From: Sam Ravnborg <sam@ravnborg.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] x86: acpi/sleep.c saved_magic fix overflow
Date: Fri, 10 Apr 2009 21:13:34 +0200 [thread overview]
Message-ID: <20090410191334.GA25336@uranus.ravnborg.org> (raw)
In-Reply-To: <20090410175545.GB16843@elf.ucw.cz>
On Fri, Apr 10, 2009 at 07:55:45PM +0200, Pavel Machek wrote:
> On Fri 2009-04-10 23:06:55, Jaswinder Singh Rajput wrote:
> > Impact: fix overflow
>
> > Constant 0x123456789abcdef0 is so big for a long.
> > So using saved_magic 0x12345678 for both 32 and 64 bit.
>
> Have you tested the patch? I have feeling that this is tested from
> assembly... Plus it is only set to long constant on 64-bit, so I don't
> think you are fixing anything. And if your code is correct the
> variable is write only...
$ git grep saved_magic
kernel/acpi/sleep.c: saved_magic = 0x12345678;
kernel/acpi/sleep.c: saved_magic = 0x123456789abcdef0;
kernel/acpi/sleep.h:extern long saved_magic;
kernel/acpi/wakeup_32.S: movl %cs:saved_magic, %eax
kernel/acpi/wakeup_32.S:ENTRY(saved_magic) .long 0
kernel/acpi/wakeup_64.S: movq saved_magic, %rax
kernel/acpi/wakeup_64.S:ENTRY(saved_magic) .quad 0
wakeup_32.S:
movl %cs:saved_magic, %eax
cmpl $0x12345678, %eax
wakeup_64.S:
movq saved_magic, %rax
movq $0x123456789abcdef0, %rdx
So patch is obviously bogus.
Sam
next prev parent reply other threads:[~2009-04-10 19:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 17:36 [PATCH -tip] x86: acpi/sleep.c saved_magic fix overflow Jaswinder Singh Rajput
2009-04-10 17:50 ` Cyrill Gorcunov
2009-04-10 17:53 ` Ray Lee
2009-04-10 17:55 ` Pavel Machek
2009-04-10 18:05 ` Jaswinder Singh Rajput
2009-04-10 18:11 ` Pavel Machek
2009-04-10 18:14 ` Cyrill Gorcunov
2009-04-10 18:15 ` Jaswinder Singh Rajput
2009-04-10 19:13 ` Sam Ravnborg [this message]
2009-04-10 19:16 ` Jaswinder Singh Rajput
2009-04-10 19:29 ` Sam Ravnborg
2009-04-10 19:49 ` Jaswinder Singh Rajput
2009-04-10 20:15 ` Pavel Machek
2009-04-12 17:25 ` Rafael J. Wysocki
2009-04-12 17:30 ` Ingo Molnar
2009-04-10 19:51 ` Thomas Gleixner
2009-04-10 18:13 ` Thomas Gleixner
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=20090410191334.GA25336@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox