Bug#930919: dovecot: dsync broken for sieve filters

2019-10-04 Thread James Beck
On Fri, Sep 06, 2019 at 07:07:43PM +0200, Lukas Schwaighofer wrote:
> Hi James,

Hi Lukas,

Firstly, apologies for how long it's taken me to get back to you!

> > Sep 05 23:21:04  dovecot[12574]: doveadm: Error:
> > Exporting mailbox INBOX failed: Mailbox attribute
> > vendor/vendor.dovecot/pvt/server/sieve/files/roundcube lookup failed:
> > Mailbox attributes not enabled
> 
> I also got this error when migrating my configuration from stretch to
> buster and added the following setting to my 10-mail.conf:
> 
> mail_attribute_dict = file:~/dovecot-attributes

I've tested enabling that setting in our config and it looks like it
also fixes it for us.

> I just tested creating, editing and removing a sieve config via
> roundcube's sieve plugin (using roundcube from Debian buster) and
> everything went smoothly.

I've tested the same actions, using roundcube from Buster, and it all
worked for me too.

> I'm running a custom build of dovecot with the referenced patch
> cherry-picked for a few weeks now (I recently updated it to version
> 1:2.3.4.1-5+deb10u1 because of the security fix). I haven't noticed any
> issues.

I think we'll be running a custom build with that patch too, until this
is fixed.

Thanks for your help :)

-- 
James Beck
Andrews & Arnold Ltd
Tel: 0 400999



Bug#930919: dovecot: dsync broken for sieve filters

2019-09-06 Thread James Beck
I tested a local build with that patch and I don't think it is a
complete fix.  In our setup, it stalls replication for our webmail users
who use the Roundcube sieve plugin:

Sep 05 23:21:04  dovecot[12574]: doveadm: Error: Exporting mailbox 
INBOX failed: Mailbox attribute 
vendor/vendor.dovecot/pvt/server/sieve/files/roundcube lookup failed: Mailbox 
attributes not enabled

It's possible that our Roundcube configuration is doing something odd
with sieve, but sieve filter replication with this setup worked before
this bug was introduced.


Thanks,
James



Bug#851750: kpatch: module FTBFS for Linux 4.9

2017-02-24 Thread James Beck
Hi,

I made a patch for kmod/core/core.c using the upstream commit that fixes
the problem. When I apply this to core.c, kpatch 0.3.2 builds on kernel
4.9:


45a46
> #include 
71,75d71
< struct kpatch_backtrace_args {
<   struct kpatch_module *kpmod;
<   int ret;
< };
< 
135a132,138
> #define MAX_STACK_TRACE_DEPTH   64
> static unsigned long stack_entries[MAX_STACK_TRACE_DEPTH];
> struct stack_trace trace = {
>.max_entries= ARRAY_SIZE(stack_entries),
>.entries= _entries[0],
> };
> 
197,198c200,201
< static void kpatch_backtrace_address_verify(void *data, unsigned long address,
<   int reliable)
---
> static int kpatch_backtrace_address_verify(struct kpatch_module *kpmod,
>   unsigned long address)
200,201d202
<   struct kpatch_backtrace_args *args = data;
<   struct kpatch_module *kpmod = args->kpmod;
205,206c206
<   if (args->ret)
<   return;
---
>   int ret;
230,233c230,233
<   args->ret = kpatch_compare_addresses(address, func_addr,
ret)
<   return;
---
>ret = kpatch_compare_addresses(address, func_addr,
>   func_size, func_name);
>if (ret)
>return ret;
239,244c239,244
<   args->ret = kpatch_compare_addresses(address,
new_addr,
new_size,
name);
<   if (args->ret)
<   return;
---
>ret = kpatch_compare_addresses(address,
>   func->new_addr,
>   func->new_size,
>   func->name);
>if (ret)
>return ret;
247,258d246
< }
< 
< static int kpatch_backtrace_stack(void *data, char *name)
< {
<   return 0;
< }
< 
< static const struct stacktrace_ops kpatch_backtrace_ops = {
<   .address= kpatch_backtrace_address_verify,
<   .stack  = kpatch_backtrace_stack,
<   .walk_stack = print_context_stack_bp,
< };
260,263c248
< static int kpatch_print_trace_stack(void *data, char *name)
< {
<   pr_cont(" <%s> ", name);
<   return 0;
---
>   return ret;
266,278d250
< static void kpatch_print_trace_address(void *data, unsigned long addr,
<  int reliable)
< {
<   if (reliable)
<   pr_info("[<%p>] %pB\n", (void *)addr, (void *)addr);
< }
< 
< static const struct stacktrace_ops kpatch_print_trace_ops = {
<   .stack  = kpatch_print_trace_stack,
<   .address= kpatch_print_trace_address,
<   .walk_stack = print_context_stack,
< };
< 
287a260
>   int i;
290,294d262
<   struct kpatch_backtrace_args args = {
<   .kpmod = kpmod,
<   .ret = 0
<   };
< 
297,302c265,271
<   dump_trace(t, NULL, NULL, 0, _backtrace_ops, );
<   if (args.ret) {
<   ret = args.ret;
<   pr_info("PID: %d Comm: %.20s\n", t->pid, t->comm);
<   dump_trace(t, NULL, (unsigned long *)t->thread.sp,
<  0, _print_trace_ops, NULL);
---
> 
>trace.nr_entries = 0;
>save_stack_trace_tsk(t, );
>if (trace.nr_entries >= trace.max_entries) {
>ret = -EBUSY;
>pr_err("more than %u trace entries!\n",
>   trace.max_entries);
304a274,283
> 
> for (i = 0; i < trace.nr_entries; i++) {
>if (trace.entries[i] == ULONG_MAX)
>break;
>ret = kpatch_backtrace_address_verify(kpmod,
>  
> trace.entries[i]);
>if (ret)
>goto out;
>}
> 
307a287,297
>if (ret) {
>pr_err("PID: %d Comm: %.20s\n", t->pid, t->comm);
>for (i = 0; i < trace.nr_entries; i++) {
>if (trace.entries[i] == ULONG_MAX)
>break;
>pr_err("  [<%pK>] %pB\n",
>   (void *)trace.entries[i],
>   (void *)trace.entries[i]);
>}
>}
>