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] [day] [month] [year] [list]
Date:	Mon, 26 Mar 2012 08:27:01 +0800
From:	Wang YanQing <udknight@...il.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Florian Tobias Schandinat <FlorianSchandinat@....de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Randy Dunlap <rdunlap@...otime.net>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Michal Januszewski <spock@...too.org>,
	linux-fbdev@...r.kernel.org, x86@...nel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] x86: export 'pcibios_enabled'

On Thu, Mar 22, 2012 at 08:41:35AM +0800, Wang YanQing wrote:
> On Wed, Mar 14, 2012 at 11:21:37AM +0000, Alan Cox wrote:
> > You can use set_memory_x() to mark memory executable (and _nx to set it back).
> > 
> NO I can't, if I set_memory_x and don't set pcibios_enabled = 1, then
> static_protections will still failed because pcibios_enabled == 0, 
> and I don't want to use set_memory_x, because I don't want to give the user 
> of uvesafb that feeling "I will lost BIOS NX protection if I choice uvesafb."
> 
> > If you really need to know if NX is being used then the check
> > 
> > 	if (__supported_pte_mask & PTE_NX)
> > 
> > will do the trick and the variable is exported.
> I don't understand what do you mean, do you means CONFIG_X86_PAE for 32? Or CONFIG_X86_64?
> when NX is being used, the pci bios is NX or not also depend on
> ACPI.ACPI on or off all will influnce the code path in pci_arch_init,
> decide the set_bios_x have chance to execute or not.See
> https://lkml.org/lkml/2011/11/16/84
> 
> By the way _PAGE_NX instead of PTE_NX, right?
> 
> > I'd suggest however you wrap that in a cpu_has_nx() type macro somewhere
> > in the arch headers.
> > 
> The same above.
> 
> > If you go poking around pcibios values you are going to get burned if
> > someone is ever bored enough to make NX and PCIBIOS work together
> > differently.
> > 
> Indeed according to 5bd5a452662bc37c54fb6828db1a3faf87e6511c, who bring me 
> the trouble, check the pcibios_enabled is the only simple and good way to 
> resolve the Oops I meet.
> 
> If you really don't want it, and if I am not all wrong about your "helper method",
> you means you want export the below:
> int check_pcibios_enabled()?
> See https://lkml.org/lkml/2012/2/26/124
> 
> Thanks.
> 
Sorry for the delay reply and cross email threads,  Alan Cox.
But I still can't find a better way then to check the pcibios_enabled variable,
any better suggestion?
--
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