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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 22 Oct 2008 17:08:01 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Daniele Calore <orkaan@...aan.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.27] x86: memtest fix use of reserve_early()


* Yinghai Lu <yinghai@...nel.org> wrote:

> On Mon, Oct 13, 2008 at 1:34 AM, Daniele Calore <orkaan@...aan.org> wrote:
> > Hi all,
> >
> > Wrong usage of 2nd parameter in reserve_early call.
> > 66/75: reserve_early(start_bad, last_bad - start_bad, "BAD RAM");
> >                                ^^^^^^^^^^^^^^^^^^^^
> >
> > The correct way is to use 'end' address and not 'size'.
> > As a bonus a fix to the printk format.
> >
> > Signed-off-by: Daniele Calore <orkaan@...aan.org>
> >
> > ---
> > diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
> > index 672e17f..9cab18b 100644
> > --- a/arch/x86/mm/memtest.c
> > +++ b/arch/x86/mm/memtest.c
> > @@ -61,9 +61,9 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
> >                                last_bad += incr;
> >                        } else {
> >                                if (start_bad) {
> > -                                       printk(KERN_CONT "\n  %010lx bad mem addr %010lx - %010lx reserved",
> > +                                       printk(KERN_CONT "\n  %016lx bad mem addr %010lx - %010lx reserved",
> >                                                val, start_bad, last_bad + incr);
> > -                                       reserve_early(start_bad, last_bad - start_bad, "BAD RAM");
> > +                                       reserve_early(start_bad, last_bad + incr, "BAD RAM");
> >                                }
> >                                start_bad = last_bad = start_phys_aligned;
> >                        }
> > @@ -72,9 +72,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
> >        if (start_bad) {
> >                printk(KERN_CONT "\n  %016lx bad mem addr %010lx - %010lx reserved",
> >                        val, start_bad, last_bad + incr);
> > -               reserve_early(start_bad, last_bad - start_bad, "BAD RAM");
> > +               reserve_early(start_bad, last_bad + incr, "BAD RAM");
> >        }
> > -
> >  }
> >
> >  /* default is disabled */
> 
> Acked-by: Yinghai Lu <yinghai@...nel.org>

applied to tip/x86/urgent, thanks!

	Ingo
--
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