All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber
Date: Wed, 30 Sep 2009 15:40:44 -0700	[thread overview]
Message-ID: <20090930154044.0c7ace16.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090926192748.GX7681@const.famille.thibault.fr>

On Sat, 26 Sep 2009 21:27:48 +0200
Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:

> 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.
> 
> Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Cc: stable@kernel.org
> 
> diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
> index 7c5ef8b..46fc474 100644
> --- a/arch/x86/include/asm/checksum_32.h
> +++ b/arch/x86/include/asm/checksum_32.h
> @@ -161,7 +161,8 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
>  	    "adcl $0, %0	;\n"
>  	    : "=&r" (sum)
>  	    : "r" (saddr), "r" (daddr),
> -	      "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
> +	      "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)
> +	    : "memory");
>  
>  	return csum_fold(sum);
>  }

You describe it as "trivial" and also cc stable@kernel.org.  These things
are contradictory!

Maybe backporting it is a good idea from a sleep-soundly-at-night POV. 
I don't know..


  reply	other threads:[~2009-09-30 22:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-26 19:27 [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber Samuel Thibault
2009-09-30 22:40 ` Andrew Morton [this message]
2009-09-30 22:45   ` H. Peter Anvin
2009-09-30 23:01     ` Samuel Thibault
2009-09-30 23:19       ` Andrew Morton
2009-09-30 23:22         ` David Miller
2009-09-30 23:45           ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090930154044.0c7ace16.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.