lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239392981.5943.1.camel@localhost.localdomain>
Date:	Sat, 11 Apr 2009 01:19:41 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Pavel Machek <pavel@....cz>, Ingo Molnar <mingo@...e.hu>,
	x86 maintainers <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>, josh@...edesktop.org
Subject: Re: [PATCH -tip] x86: acpi/sleep.c saved_magic fix overflow

On Fri, 2009-04-10 at 21:29 +0200, Sam Ravnborg wrote:
> On Sat, Apr 11, 2009 at 12:46:56AM +0530, Jaswinder Singh Rajput wrote:
> > Sorry, I was confused by this sparse warning on 64 bit box:
> > 
> > CHECK   arch/x86/kernel/acpi/sleep.c
> >  arch/x86/kernel/acpi/sleep.c:107:16: warning: constant 0x123456789abcdef0 is so big it is long
> > 
> > atleast I found problem in sparse ;-)
> 
> Sparse tells you that the constant is so big it is long - correct.
> So rather than being implicit appending an L would make sparse happy.
> 
> So please use the constant 0x123456789abcdef0L and I think sparse is silenced.
> And code/functionality is the same.
> 

Yes, this fixes the sparse warning, Thanks :-)

diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 7c243a2..3445d0f 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -104,7 +104,7 @@ int acpi_save_state_mem(void)
        initial_gs = per_cpu_offset(smp_processor_id());
 #endif
        initial_code = (unsigned long)wakeup_long64;
-       saved_magic = 0x123456789abcdef0;
+       saved_magic = 0x123456789abcdef0L;
 #endif /* CONFIG_64BIT */
 
        return 0;

--


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ