Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-20 Thread Sebastian Andrzej Siewior
On 2016-02-20 11:43:41 [+], Julien Cristau wrote:
> > diff --git a/libclamav/yara_exec.c b/libclamav/yara_exec.c
> > index dbd7ae8..eb06fbb 100644
> > --- a/libclamav/yara_exec.c
> > +++ b/libclamav/yara_exec.c
> [...]
> > @@ -184,7 +194,7 @@ int yr_execute_code(
> >  #endif
> >  
> >case OP_PUSH:
> > -r1 = *(uint64_t*)(ip + 1);
> > +r1 = get_unaligned_64(ip + 1);
> >  ip += sizeof(uint64_t);
> >  push(r1);
> >  break;
> 
> Wouldn't "memcpy(, ip + 1, sizeof(uint64_t))" be simpler?  Either

The get_unaligned() might be more obvious why this is done instead of
derefencing the variable like it was done. Given the optimisations the
compiler can do I would expect the same code in all three cases on x86.
However your memcpy() suggestion makes the resulting yara_exec.o smaller
by 33 bytes so okay, I will redo it with memcpy.

> way, yes, it'd be good to have it fixed in sid first.

Okay. So sid, jessie and then we get back hereā€¦

> Thanks,
> Julien

Sebastian



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-20 Thread Julien Cristau
On Sat, Feb 20, 2016 at 00:21:15 +0100, Sebastian Andrzej Siewior wrote:

> On 2016-02-19 05:56:27 [+], Adam D. Barratt wrote:
> > The sparc build has now failed three times, across two different builds.
> 
> And why did mips pass? Isn't mips the difficult one?
> 
Not sure what you mean here.

> The patch attached is a simplified version of what I had on smetana
> during testing. I would give it another try to make sure it works before
> the final upload.
> Speaking of which: does this count as a wheezy-pu bug for
> clamav/0.99+dfsg-0+deb7u2?
> Do you want to see this change in unstable before it hits wheezy?
> 
> I have a tiny testcase which fails on my armel box but succeeds on the
> armel porterbox. I guess the HW on the porterbox is new enough to work
> with this (mine is ARMv5 and the porterbox is ARMv7 which is enough for
> armhf). My testcase does not fail on the mips/mipsel porter boxes.
> 

> diff --git a/libclamav/yara_exec.c b/libclamav/yara_exec.c
> index dbd7ae8..eb06fbb 100644
> --- a/libclamav/yara_exec.c
> +++ b/libclamav/yara_exec.c
[...]
> @@ -184,7 +194,7 @@ int yr_execute_code(
>  #endif
>  
>case OP_PUSH:
> -r1 = *(uint64_t*)(ip + 1);
> +r1 = get_unaligned_64(ip + 1);
>  ip += sizeof(uint64_t);
>  push(r1);
>  break;

Wouldn't "memcpy(, ip + 1, sizeof(uint64_t))" be simpler?  Either
way, yes, it'd be good to have it fixed in sid first.

Thanks,
Julien



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-19 Thread Sebastian Andrzej Siewior
On 2016-02-19 05:56:27 [+], Adam D. Barratt wrote:
> The sparc build has now failed three times, across two different builds.

And why did mips pass? Isn't mips the difficult one?

The patch attached is a simplified version of what I had on smetana
during testing. I would give it another try to make sure it works before
the final upload.
Speaking of which: does this count as a wheezy-pu bug for
clamav/0.99+dfsg-0+deb7u2?
Do you want to see this change in unstable before it hits wheezy?

I have a tiny testcase which fails on my armel box but succeeds on the
armel porterbox. I guess the HW on the porterbox is new enough to work
with this (mine is ARMv5 and the porterbox is ARMv7 which is enough for
armhf). My testcase does not fail on the mips/mipsel porter boxes.

> Regards,
> 
> Adam

Sebastian
diff --git a/libclamav/yara_exec.c b/libclamav/yara_exec.c
index dbd7ae8..eb06fbb 100644
--- a/libclamav/yara_exec.c
+++ b/libclamav/yara_exec.c
@@ -54,6 +54,16 @@ typedef struct _YR_MATCH
 #include "yara_exec.h"
 #endif
 
+#define __packed__attribute__((packed))
+
+struct __una_u64 { uint64_t x; } __packed;
+
+static inline uint64_t get_unaligned_64(const void *p)
+{
+	const struct __una_u64 *ptr = (const struct __una_u64 *)p;
+	return ptr->x;
+}
+
 #define STACK_SIZE 16384
 #define MEM_SIZE   MAX_LOOP_NESTING * LOOP_LOCAL_VARS
 
@@ -184,7 +194,7 @@ int yr_execute_code(
 #endif
 
   case OP_PUSH:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 push(r1);
 break;
@@ -194,38 +204,38 @@ int yr_execute_code(
 break;
 
   case OP_CLEAR_M:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 mem[r1] = 0;
 break;
 
   case OP_ADD_M:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 pop(r2);
 mem[r1] += r2;
 break;
 
   case OP_INCR_M:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 mem[r1]++;
 break;
 
   case OP_PUSH_M:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 push(mem[r1]);
 break;
 
   case OP_POP_M:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 pop(mem[r1]);
 break;
 
   case OP_SWAPUNDEF:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 pop(r2);
 if (r2 != UNDEFINED)
@@ -540,7 +550,7 @@ int yr_execute_code(
 
 // r1 = number of arguments
 
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 
 // pop arguments from stack and copy them to args array
@@ -854,7 +864,7 @@ int yr_execute_code(
 
 #if REAL_YARA //not supported ClamAV
   case OP_IMPORT:
-r1 = *(uint64_t*)(ip + 1);
+r1 = get_unaligned_64(ip + 1);
 ip += sizeof(uint64_t);
 
 FAIL_ON_ERROR(yr_modules_load(


Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-19 Thread Adam D. Barratt
On Fri, 2016-02-19 at 08:31 -0800, Scott Kitterman wrote:
> 
> On February 19, 2016 6:22:19 AM PST, "Adam D. Barratt" 
>  wrote:
> >On Fri, 2016-02-19 at 05:56 +, Adam D. Barratt wrote:
> >> On Thu, 2016-02-18 at 22:54 +, Adam D. Barratt wrote:
> >> > Control: tags -1 + pending
> >> > 
> >> > On Wed, 2016-02-17 at 22:18 -0500, Scott Kitterman wrote:
> >> [...]
> >> > > Thanks.  Both clamav and libclamunrar source uploads are done. 
> >I'll see what 
> >> > > I can get done about getting them pushed through New.
> >> > 
> >> > clamav got through NEW earlier today and has already built
> >everywhere
> >> > except sparc. I've scheduled the binNMUs with appropriate
> >dep-waits.
> >> 
> >> The sparc build has now failed three times, across two different
> >builds.
> >
> >c-icap-modules also appears to have FTBFS on all architectures.
> 
> OK. Will have a look at that too.

Thanks.

Regards,

Adam



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-19 Thread Scott Kitterman


On February 19, 2016 6:22:19 AM PST, "Adam D. Barratt" 
 wrote:
>On Fri, 2016-02-19 at 05:56 +, Adam D. Barratt wrote:
>> On Thu, 2016-02-18 at 22:54 +, Adam D. Barratt wrote:
>> > Control: tags -1 + pending
>> > 
>> > On Wed, 2016-02-17 at 22:18 -0500, Scott Kitterman wrote:
>> [...]
>> > > Thanks.  Both clamav and libclamunrar source uploads are done. 
>I'll see what 
>> > > I can get done about getting them pushed through New.
>> > 
>> > clamav got through NEW earlier today and has already built
>everywhere
>> > except sparc. I've scheduled the binNMUs with appropriate
>dep-waits.
>> 
>> The sparc build has now failed three times, across two different
>builds.
>
>c-icap-modules also appears to have FTBFS on all architectures.

OK. Will have a look at that too.

Scott K



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-19 Thread Adam D. Barratt
On Fri, 2016-02-19 at 05:56 +, Adam D. Barratt wrote:
> On Thu, 2016-02-18 at 22:54 +, Adam D. Barratt wrote:
> > Control: tags -1 + pending
> > 
> > On Wed, 2016-02-17 at 22:18 -0500, Scott Kitterman wrote:
> [...]
> > > Thanks.  Both clamav and libclamunrar source uploads are done.  I'll see 
> > > what 
> > > I can get done about getting them pushed through New.
> > 
> > clamav got through NEW earlier today and has already built everywhere
> > except sparc. I've scheduled the binNMUs with appropriate dep-waits.
> 
> The sparc build has now failed three times, across two different builds.

c-icap-modules also appears to have FTBFS on all architectures.

Regards,

Adam



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-18 Thread Adam D. Barratt
On Thu, 2016-02-18 at 22:54 +, Adam D. Barratt wrote:
> Control: tags -1 + pending
> 
> On Wed, 2016-02-17 at 22:18 -0500, Scott Kitterman wrote:
[...]
> > Thanks.  Both clamav and libclamunrar source uploads are done.  I'll see 
> > what 
> > I can get done about getting them pushed through New.
> 
> clamav got through NEW earlier today and has already built everywhere
> except sparc. I've scheduled the binNMUs with appropriate dep-waits.

The sparc build has now failed three times, across two different builds.

Regards,

Adam



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-18 Thread Adam D. Barratt
Control: tags -1 + pending

On Wed, 2016-02-17 at 22:18 -0500, Scott Kitterman wrote:
> On Wednesday, February 17, 2016 08:22:23 PM Adam D. Barratt wrote:
> > Control: tags -1 + confirmed
> > 
> > On Fri, 2016-02-12 at 15:04 -0500, Scott Kitterman wrote:
> > > This is the follow-up to #807969 for wheezy.  Equivalent debdiff will be
> > > attached as a reply to the bug (since it's huge) to make sure the doesn't
> > > get blocked.
> > > 
> > > As with Jessie, this will require a small transition.  Clamav and
> > > libclamunrar will both need source uploads (prepared) and will hit New
> > > due to bumped so name. I'll file a separate bug for libclamunrar. 
> > > Additionally, four packages
> > > will need binNMUs:
> > Please go ahead.
> > 
> > Feel free to get the package name change fast-tracked through NEW. If
> > you do, please let us know so that we can spot it appearing in p-u (as
> > it'll bypass stable-new).
> 
> Thanks.  Both clamav and libclamunrar source uploads are done.  I'll see what 
> I can get done about getting them pushed through New.

clamav got through NEW earlier today and has already built everywhere
except sparc. I've scheduled the binNMUs with appropriate dep-waits.

Regards,

Adam



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-17 Thread Scott Kitterman
On Wednesday, February 17, 2016 08:22:23 PM Adam D. Barratt wrote:
> Control: tags -1 + confirmed
> 
> On Fri, 2016-02-12 at 15:04 -0500, Scott Kitterman wrote:
> > This is the follow-up to #807969 for wheezy.  Equivalent debdiff will be
> > attached as a reply to the bug (since it's huge) to make sure the doesn't
> > get blocked.
> > 
> > As with Jessie, this will require a small transition.  Clamav and
> > libclamunrar will both need source uploads (prepared) and will hit New
> > due to bumped so name. I'll file a separate bug for libclamunrar. 
> > Additionally, four packages
> > will need binNMUs:
> Please go ahead.
> 
> Feel free to get the package name change fast-tracked through NEW. If
> you do, please let us know so that we can spot it appearing in p-u (as
> it'll bypass stable-new).

Thanks.  Both clamav and libclamunrar source uploads are done.  I'll see what 
I can get done about getting them pushed through New.

Scott K



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-17 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Fri, 2016-02-12 at 15:04 -0500, Scott Kitterman wrote:
> This is the follow-up to #807969 for wheezy.  Equivalent debdiff will be
> attached as a reply to the bug (since it's huge) to make sure the doesn't get
> blocked.
> 
> As with Jessie, this will require a small transition.  Clamav and libclamunrar
> will both need source uploads (prepared) and will hit New due to bumped so
> name. I'll file a separate bug for libclamunrar.  Additionally, four packages
> will need binNMUs:

Please go ahead.

Feel free to get the package name change fast-tracked through NEW. If
you do, please let us know so that we can spot it appearing in p-u (as
it'll bypass stable-new).

Regards,

Adam



Bug#814544: wheezy-pu: package clamav/0.99+dfsg-0+deb7u1

2016-02-12 Thread Scott Kitterman
Package: release.debian.org
Severity: normal
Tags: wheezy
User: release.debian@packages.debian.org
Usertags: pu

This is the follow-up to #807969 for wheezy.  Equivalent debdiff will be
attached as a reply to the bug (since it's huge) to make sure the doesn't get
blocked.

As with Jessie, this will require a small transition.  Clamav and libclamunrar
will both need source uploads (prepared) and will hit New due to bumped so
name. I'll file a separate bug for libclamunrar.  Additionally, four packages
will need binNMUs:

* c-icap-modules
* dansguardian
* havp
* python-clamav

These have all been tested by the team.

Scott K