Samuel Thibault | 1 Oct 01:01 2009

Re: [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber

H. Peter Anvin, le Wed 30 Sep 2009 15:45:15 -0700, a écrit :
> On 09/30/2009 03:40 PM, Andrew Morton wrote:
> > You describe it as "trivial" and also cc stable <at> kernel.org.  These things
> > are contradictory!
> > 
> > Maybe backporting it is a good idea from a sleep-soundly-at-night POV. 
> > I don't know..
> 
> /me suspects it was supposed to mean "trivially correct",

Yes.

> which isn't really what "trivial" means.

Ah.

> This is a potentially serious bug and should be treated as such.

Yes.  Actually it hit Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).

Samuel
Joe Perches | 1 Oct 01:09 2009

Re: [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile

On Thu, 2009-10-01 at 00:46 +0200, Jan Engelhardt wrote:
> On Thursday 2009-10-01 00:37, Joe Perches wrote:
> >This centralizes the definition and removes the
> >replicated #defines from all files
> And increases the length of the command line. Not that Linux does not
> support long command lines (in fact, configure often determines huge
> possible values on the max length test), but sometimes, developers
> have to inspect the command lines anyway for bugs, or something. It
> is already pretty long due to all the compiler flags.

Hi Jan.

I think this increased command line length hardly matters.

I think a reasonable complaint might be that it separates
the definition of a macro from the code.  I think it's
similar to the already used KBUILD_MODNAME macro though.

> How about an #include file for the ipvs private things?

It's not just IPVS, this style could be used treewide
without requiring extra #includes.

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Ingo Molnar | 1 Oct 01:09 2009
Picon
Picon

Re: x86: mce: Please revert 22223c9b417be5fd0ab2cf9ad17eb7bd1e19f7b9


* Borislav Petkov <petkovbb <at> googlemail.com> wrote:

> On Wed, Sep 30, 2009 at 11:48:59PM +0200, Ingo Molnar wrote:
> > I.e. something like the patch below. Completely untested.
> 
> [..]
> 
> > Note, while looking at the interaction of decode_mce() with the other 
> > MCE code i also noticed a few other things and made the following 
> > cleanups/fixes:
> > 
> >  - Fixed the mce_decode() weak alias - a weak alias is really not good
> >    here, it should be a proper callback. A weak alias will be overriden
> >    if a piece of code is built into the kernel - not good, obviously.
> 
> The original idea was for the edac_mce_amd.o module to override the 
> weak symbol but the problem with that is that when CONFIG_CPU_SUP_AMD 
> is set, MCE decoding is built in by default thus overriding the weak 
> symbol even on non-AMD systems running distro kernels with multiple 
> x86 CPU types support. Your patch solves that.
> 
> However, currently we can't get rid of the decoding code when booted 
> on non-AMD boxes - it amounts to ~ 15K of object code on non-debug 
> builds. Is it worth the trouble to add it to initmem on such boxes and 
> remove it during boot?

it's ~5K here. Btw., how would that work? Initmem cannot generally be 
discarded optionally like that.

(Continue reading)

Andrew Morton | 1 Oct 01:08 2009

Re: [Patch] rwsem: fix rwsem_is_locked() bug

On Tue, 29 Sep 2009 23:19:02 -0400
Amerigo Wang <amwang <at> redhat.com> wrote:

> 
> rwsem_is_locked() tests ->activity without locks, so we should always
> keep ->activity consistent. However, the code in __rwsem_do_wake()
> breaks this rule, it updates ->activity after _all_ readers waken up,
> this may give some reader a wrong ->activity value, thus cause
> rwsem_is_locked() behaves wrong.
> 
> Brian has a kernel module to reproduce this, I can include it
> if any of you need. Of course, with Brian's approval.
> 
> With this patch applied, I can't trigger that bug any more.
> 

Changelog doesn't describe the bug well.

> 
> ---
> diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c
> index 9df3ca5..44e4484 100644
> --- a/lib/rwsem-spinlock.c
> +++ b/lib/rwsem-spinlock.c
>  <at>  <at>  -49,7 +49,6  <at>  <at>  __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite)
>  {
>  	struct rwsem_waiter *waiter;
>  	struct task_struct *tsk;
> -	int woken;
>  
(Continue reading)

Andrew Morton | 1 Oct 01:13 2009

Re: [PATCH] floppy: Add an extra bound check on ioctl arguments

On Wed, 30 Sep 2009 13:17:09 +0200
Arjan van de Ven <arjan <at> infradead.org> wrote:

> gcc is not convinced that the floppy.c ioctl has sufficient bound checks,

gad.  You said "floppy" and "ioctl" in the same sentence.  Where angels
fear to tread.

It would be useful if you were to quote the gcc output in the changelog
please.  I assume that you're using some magical new gcc option or
something?

Tilman Schmidt | 1 Oct 01:15 2009

capi.c calls receive_buf with interrupts disabled (was: N_PPP_SYNC ldisc BUG: sleeping function called from invalid context)

Jarek Poplawski schrieb:
> Tilman Schmidt wrote, On 09/30/2009 08:55 PM:
[...]
>> - ppp_sync_receive() was called, as the LD's receive_buf method,
>>   via handle_recv_skb() [drivers/isdn/capi/capi.c line 504, inlined]
>>   from handle_minor_recv() [drivers/isdn/capi/capi.c line 519]
>>
>> - handle_minor_recv() was called from capi_recv_message()
>>   [drivers/isdn/capi/capi.c line 656]
>>
>> - capi_recv_message() was called, as the CAPI application's
>>   recv_message method, from recv_handler()
>>   [drivers/isdn/capi/kcapi.c line 268]
>>
>> - recv_handler() is never called directly. It's only scheduled
>>   via the work queue ap->recv_work from capi_ctr_handle_message()
>>   [drivers/isdn/capi/kcapi.c line 349]
>>
>> Even if we don't trust the backtraces, there's not much room for
>> another activation path. So for all I know, the expectation of the
>> tty logic should have been met. The call was indeed processed from
>> a work queue.
>>
>> Why then does mutex_lock() complain?
> 
> Hmm... capi_recv_message() calls handle_minor_recv() under
> spin_lock_irqsave(), doesn't it?

Well spotted. Indeed it does. That explains it, of course.

(Continue reading)

Andrew Morton | 1 Oct 01:16 2009

Re: [PATCH] floppy: Add an extra bound check on ioctl arguments

On Wed, 30 Sep 2009 13:17:09 +0200
Arjan van de Ven <arjan <at> infradead.org> wrote:

> 
> >From 90d75780b319153d050bb1c0f3f38ce054775615 Mon Sep 17 00:00:00 2001
> From: Arjan van de Ven <arjan <at> linux.intel.com>
> Date: Wed, 30 Sep 2009 13:13:59 +0200
> Subject: [PATCH] floppy: Add an extra bound check on ioctl arguments
> 
> gcc is not convinced that the floppy.c ioctl has sufficient bound checks,
> and frankly, as a human I have a hard time proving the same more or less
> (the size comes from the ioctl argument. humpf. maybe. the code isn't
> very nice)
> 
> This patch adds an explicit check to make 100% sure it's safe, better
> than finding out later that there indeed was a gap.
> 
> Signed-off-by: Arjan van de Ven <arjan <at> linux.intel.com>
> ---
>  drivers/block/floppy.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index 5c01f74..0f11a77 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
>  <at>  <at>  -3497,6 +3497,9  <at>  <at>  static int fd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
>  	    ((cmd & 0x80) && !capable(CAP_SYS_ADMIN)))
>  		return -EPERM;
>  
(Continue reading)

Andrew Morton | 1 Oct 01:19 2009

Re: [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber

On Thu, 1 Oct 2009 01:01:38 +0200
Samuel Thibault <samuel.thibault <at> ens-lyon.org> wrote:

> Actually it hit Hurd's pfinetv4 when we tried to compile it with
> gcc-4.3 (bogus checksums).

That's important information!  I updated the changelog and added the
Cc:stable, thanks.

Full patch for netdev benefit:

From: Samuel Thibault <samuel.thibault <at> ens-lyon.org>

Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.

This caused failures in Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).

Signed-off-by: Samuel Thibault <samuel.thibault <at> ens-lyon.org>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Thomas Gleixner <tglx <at> linutronix.de>
Cc: "H. Peter Anvin" <hpa <at> zytor.com>
Cc: "David S. Miller" <davem <at> davemloft.net>
Cc: Andi Kleen <andi <at> firstfloor.org>
Cc: <stable <at> kernel.org>
Signed-off-by: Andrew Morton <akpm <at> linux-foundation.org>
---

(Continue reading)

David Miller | 1 Oct 01:22 2009
Picon

Re: [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber

From: Andrew Morton <akpm <at> linux-foundation.org>
Date: Wed, 30 Sep 2009 16:19:39 -0700

> From: Samuel Thibault <samuel.thibault <at> ens-lyon.org>
> 
> Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
> memory clobber, as it is only passed the address of the buffer, not a
> memory reference to the buffer itself.
> 
> This caused failures in Hurd's pfinetv4 when we tried to compile it with
> gcc-4.3 (bogus checksums).
> 
> Signed-off-by: Samuel Thibault <samuel.thibault <at> ens-lyon.org>
> Signed-off-by: Andrew Morton <akpm <at> linux-foundation.org>

I'm happy to see this go in via the x86 tree, and thus:

Acked-by: David S. Miller <davem <at> davemloft.net>
David Miller | 1 Oct 01:23 2009
Picon

Re: [PATCH] net: Fix sock_wfree() race

From: Eric Dumazet <eric.dumazet <at> gmail.com>
Date: Thu, 24 Sep 2009 22:49:24 +0200

> [PATCH] net: Fix sock_wfree() race
> 
> Commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
> (net: No more expensive sock_hold()/sock_put() on each tx)
> opens a window in sock_wfree() where another cpu
> might free the socket we are working on.
> 
> A fix is to call sk->sk_write_space(sk) while still
> holding a reference on sk.
> 
> 
> Reported-by: Jike Song <albcamus <at> gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet <at> gmail.com>

Applied to net-2.6 and I'll queue this up for -stable.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane