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]
Date:	Tue, 19 Mar 2013 23:36:27 +0000
From:	"Yu, Fenghua" <fenghua.yu@...el.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	H Peter Anvin <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"penguin-kernel@...ove.sakura.ne.jp" 
	<penguin-kernel@...ove.sakura.ne.jp>,
	linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: RE: [PATCH] x86/microcode_intel_early.c: Get 32-bit physical
 address by __pa_nodebug()

> From: yhlu.kernel@...il.com [mailto:yhlu.kernel@...il.com] On Behalf Of
> Yinghai Lu
> On Tue, Mar 19, 2013 at 8:04 AM, Fenghua Yu <fenghua.yu@...el.com>
> wrote:
> > From: Fenghua Yu <fenghua.yu@...el.com>
> >
> > In 32-bit, __pa_symbol() in CONFIG_DEBUG_VIRTUAL accesses kernel data
> (e.g.
> > max_low_pfn) that haven't been setup yet in such early boot phase. To
> fix the
> > issue, __pa_nodebug() replaces __pa_symbol() to get a global symbol's
> physical
> > address.
> 
> That explanation is not precise.
> 
> __phys_addr in 32bit when DEBUG_VIRTUAL is set, it does have check
>         /* max_low_pfn is set early, but not _that_ early */
>         if (max_low_pfn) {
>          ....
>         }
> the reason should be:
> in head_32.S, 32bit flat mode, you need to switch to phys addr to
> access
> global variable max_low_pfn.

Max_low_pfn is not set up yet at this point, but __pa_symbol() reads it
if CONFIG_DEBUG_VIRTUAL. There is no need to access max_low_pfn or any
other data that is not setup yet if CONFIG_DEBUG_VIRTUAL.

So I think the explanation is ok.

Thanks.

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