All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeff Garzik <jeff@garzik.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: New x86 warning
Date: Wed, 22 Apr 2009 09:01:57 +0200	[thread overview]
Message-ID: <20090422070157.GA28438@elte.hu> (raw)
In-Reply-To: <49EEBD3C.3060009@garzik.org>


* Jeff Garzik <jeff@garzik.org> wrote:

> On x86-32, this warning now appears for me in 2.6.30-rc3, and did 
> not appear in 2.6.29.
>
> drivers/acpi/acpica/tbfadt.c: In function 'acpi_tb_create_local_fadt':
> /spare/repo/linux-2.6/arch/x86/include/asm/string_32.h:75: warning:  
> array subscript is above array bounds

Last i checked it was a GCC bounds check bogosity. All attempts to 
work it around or annotate it sanely (without changing the assembly 
code) failed. (new ideas welcome)

The closest i came was the hacklet below to the assembly code. [with 
an intentionally corrupted patch header to make it harder to apply 
accidentally.]

The hacklet writes the fifth byte by writing two bytes from byte 
position 3.

> lspci, dmesg and .config attached.
>
> 	Jeff
>
> P.S.  It is unclear in MAINTAINERS whether x86@kernel.org should 
> be CC'd in addition to the other addresses listed, or as a 
> replacement for individual emails.

at your option. Cc:-ing maintainers directly can get faster 
treatment occasionally. Using the alias is shorter.

	Ingo

NOT-Signed-off-by-me:

+++ linux/arch/x86/include/asm/string_32.h
@@ -72,7 +72,7 @@ static __always_inline void *__constant_
 		return to;
 	case 5:
 		*(int *)to = *(int *)from;
-		*((char *)to + 4) = *((char *)from + 4);
+		*((short *)(char *)(to + 3)) = *((short *)(char *)(from + 3));
 		return to;
 	case 6:
 		*(int *)to = *(int *)from;

  reply	other threads:[~2009-04-22  7:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22  6:46 New x86 warning Jeff Garzik
2009-04-22  7:01 ` Ingo Molnar [this message]
2009-04-22  8:45   ` [PATCH] X86-32: Let gcc decide whether to inline memcpy was " Andi Kleen
2009-04-22 18:00     ` [tip:x86/asm] x86: use __builtin_memcpy() on 32 bits tip-bot for Andi Kleen
2009-04-22 20:56     ` [PATCH] X86-32: Let gcc decide whether to inline memcpy was Re: New x86 warning Linus Torvalds
2009-04-22 21:15       ` Andi Kleen
2009-04-22 21:19         ` Linus Torvalds
2009-04-22 22:04           ` Andi Kleen
2009-04-23  6:08             ` fresh data was " Andi Kleen
2009-04-23  6:36               ` Ingo Molnar
2009-04-23  7:37                 ` Andi Kleen
2009-04-23  6:30             ` Ingo Molnar
2009-04-23  7:43               ` Andi Kleen
2009-04-22 23:49     ` Joe Damato
2009-04-23  1:48       ` H. Peter Anvin
2009-04-23 21:22         ` Joe Damato
2009-04-23 22:09           ` H. Peter Anvin
2009-04-24  8:44           ` Andi Kleen
2009-04-23  6:09       ` Andi Kleen

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=20090422070157.GA28438@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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.