public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NonExecutable Bit in 32Bit
@ 2007-04-24  6:31 Cestonaro, Thilo (external)
  2007-04-24  6:42 ` William Heimbigner
  2007-04-24 12:52 ` Andi Kleen
  0 siblings, 2 replies; 12+ messages in thread
From: Cestonaro, Thilo (external) @ 2007-04-24  6:31 UTC (permalink / raw)
  To: linux-kernel

Hey,

is it right, that the NX Bit is not used under i386-Arch but under x86_64-Arch?
When yes, is there a special argument for it not to be used?

Ciao Thilo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-24  6:31 NonExecutable Bit in 32Bit Cestonaro, Thilo (external)
@ 2007-04-24  6:42 ` William Heimbigner
  2007-04-24  7:02   ` Cestonaro, Thilo (external)
  2007-04-24  7:46   ` Tuncer Ayaz
  2007-04-24 12:52 ` Andi Kleen
  1 sibling, 2 replies; 12+ messages in thread
From: William Heimbigner @ 2007-04-24  6:42 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: linux-kernel

On Tue, 24 Apr 2007, Cestonaro, Thilo (external) wrote:

> Hey,
>
> is it right, that the NX Bit is not used under i386-Arch but under x86_64-Arch?
> When yes, is there a special argument for it not to be used?
>
> Ciao Thilo
I don't think so - some i386 cpus definitely have support for the NX bit.

Would having this be supported in i386 help debugging (and security) 
significantly?

William Heimbigner
icxcnika@mar.tar.cc

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NonExecutable Bit in 32Bit
  2007-04-24  6:42 ` William Heimbigner
@ 2007-04-24  7:02   ` Cestonaro, Thilo (external)
  2007-04-24  7:46   ` Tuncer Ayaz
  1 sibling, 0 replies; 12+ messages in thread
From: Cestonaro, Thilo (external) @ 2007-04-24  7:02 UTC (permalink / raw)
  To: William Heimbigner; +Cc: linux-kernel

 
> I don't think so - some i386 cpus definitely have support for the NX bit.
Ok, the cpu's do support it, but the kernel doesn't use it if it is active in the bios.

> Would having this be supported in i386 help debugging (and security) 
> significantly?
@William: I don't understand this question :(


Ciao Thilo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-24  6:42 ` William Heimbigner
  2007-04-24  7:02   ` Cestonaro, Thilo (external)
@ 2007-04-24  7:46   ` Tuncer Ayaz
  2007-04-25  6:19     ` Cestonaro, Thilo (external)
  1 sibling, 1 reply; 12+ messages in thread
From: Tuncer Ayaz @ 2007-04-24  7:46 UTC (permalink / raw)
  To: William Heimbigner; +Cc: Cestonaro, Thilo (external), linux-kernel

On 4/24/07, William Heimbigner <icxcnika@mar.tar.cc> wrote:
> On Tue, 24 Apr 2007, Cestonaro, Thilo (external) wrote:
>
> > Hey,
> >
> > is it right, that the NX Bit is not used under i386-Arch but
> > under x86_64-Arch?
> > When yes, is there a special argument for it not to be used?
> >
> > Ciao Thilo
> I don't think so - some i386 cpus definitely have support for
> the NX bit.
>

In detail:
1) if your CPU has NX support (some 32bit Xeons do)
2) it is not disabled in the BIOS
3) you see 'nx' in the 'flags' line in /proc/cpuinfo
4) and you have a kernel with the following config options
CONFIG_HIGHMEM64G=y
CONFIG_HIGHMEM=y
CONFIG_X86_PAE=y

NX should just work.

[snip]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-24  6:31 NonExecutable Bit in 32Bit Cestonaro, Thilo (external)
  2007-04-24  6:42 ` William Heimbigner
@ 2007-04-24 12:52 ` Andi Kleen
  1 sibling, 0 replies; 12+ messages in thread
From: Andi Kleen @ 2007-04-24 12:52 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: linux-kernel

"Cestonaro, Thilo \(external\)"    <Thilo.Cestonaro.external@fujitsu-siemens.com> writes:


> is it right, that the NX Bit is not used under i386-Arch but under x86_64-Arch?

It is wrong.

-Andi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NonExecutable Bit in 32Bit
  2007-04-24  7:46   ` Tuncer Ayaz
@ 2007-04-25  6:19     ` Cestonaro, Thilo (external)
  2007-04-25  6:33       ` Tuncer Ayaz
  2007-04-25  6:55       ` H. Peter Anvin
  0 siblings, 2 replies; 12+ messages in thread
From: Cestonaro, Thilo (external) @ 2007-04-25  6:19 UTC (permalink / raw)
  To: Tuncer Ayaz; +Cc: linux-kernel

Hey,

> CONFIG_HIGHMEM64G=y
> CONFIG_HIGHMEM=y
> CONFIG_X86_PAE=y

Ok in highmem it's active, whats about lowmem?
x86-64 is NX active for lowmem too AFAIK.


Ciao Thilo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-25  6:19     ` Cestonaro, Thilo (external)
@ 2007-04-25  6:33       ` Tuncer Ayaz
  2007-04-25  6:37         ` Tuncer Ayaz
  2007-04-25  6:55       ` H. Peter Anvin
  1 sibling, 1 reply; 12+ messages in thread
From: Tuncer Ayaz @ 2007-04-25  6:33 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: linux-kernel

On 4/25/07, Cestonaro, Thilo (external)
<Thilo.Cestonaro.external@fujitsu-siemens.com> wrote:
> Hey,
>
> > CONFIG_HIGHMEM64G=y
> > CONFIG_HIGHMEM=y
> > CONFIG_X86_PAE=y
>
> Ok in highmem it's active, whats about lowmem?
> x86-64 is NX active for lowmem too AFAIK.

It's more of an issue of having PAE enabled.
Without PAE you are not able to use the the NX bit.
That's the way the CPU works, not Linux.

Hope this helps.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-25  6:33       ` Tuncer Ayaz
@ 2007-04-25  6:37         ` Tuncer Ayaz
  2007-04-25  6:58           ` Cestonaro, Thilo (external)
  0 siblings, 1 reply; 12+ messages in thread
From: Tuncer Ayaz @ 2007-04-25  6:37 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: linux-kernel

On 4/25/07, Tuncer Ayaz <tuncer.ayaz@gmail.com> wrote:
> On 4/25/07, Cestonaro, Thilo (external)
> <Thilo.Cestonaro.external@fujitsu-siemens.com> wrote:
> > Hey,
> >
> > > CONFIG_HIGHMEM64G=y
> > > CONFIG_HIGHMEM=y
> > > CONFIG_X86_PAE=y
> >
> > Ok in highmem it's active, whats about lowmem?
> > x86-64 is NX active for lowmem too AFAIK.
>
> It's more of an issue of having PAE enabled.
> Without PAE you are not able to use the the NX bit.
> That's the way the CPU works, not Linux.

Forgot to add:
from arch/i386/Kconfig:
config X86_PAE
	bool
	depends on HIGHMEM64G
	default y
	select RESOURCES_64BIT

> Hope this helps.
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-25  6:19     ` Cestonaro, Thilo (external)
  2007-04-25  6:33       ` Tuncer Ayaz
@ 2007-04-25  6:55       ` H. Peter Anvin
  1 sibling, 0 replies; 12+ messages in thread
From: H. Peter Anvin @ 2007-04-25  6:55 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: Tuncer Ayaz, linux-kernel

Cestonaro, Thilo (external) wrote:
> Hey,
> 
>> CONFIG_HIGHMEM64G=y
>> CONFIG_HIGHMEM=y
>> CONFIG_X86_PAE=y
> 
> Ok in highmem it's active, whats about lowmem?

It's not highmem vs lowmem, it is that HIGHMEM64G is required for
X86_PAE, which is required for NX support.

> x86-64 is NX active for lowmem too AFAIK.

Good thing, since x86-64 doesn't have highmem (nor does it need it,
since it has enough virtual address space to map all physical address
space and still have left over, like it *should* be.)

	-hpa

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NonExecutable Bit in 32Bit
  2007-04-25  6:37         ` Tuncer Ayaz
@ 2007-04-25  6:58           ` Cestonaro, Thilo (external)
  2007-04-25  9:41             ` Marat Buharov
  0 siblings, 1 reply; 12+ messages in thread
From: Cestonaro, Thilo (external) @ 2007-04-25  6:58 UTC (permalink / raw)
  To: Tuncer Ayaz; +Cc: linux-kernel

> > > > CONFIG_HIGHMEM64G=y
> > > > CONFIG_HIGHMEM=y
> > > > CONFIG_X86_PAE=y
> > >
> > > Ok in highmem it's active, whats about lowmem?
> > > x86-64 is NX active for lowmem too AFAIK.
> >
> > It's more of an issue of having PAE enabled.
> > Without PAE you are not able to use the the NX bit.
> That's the way the CPU works, not Linux.
> 
> Forgot to add:
> from arch/i386/Kconfig:
> config X86_PAE
> 	bool
> 	depends on HIGHMEM64G
> 	default y
> 	select RESOURCES_64BIT
> 
> > Hope this helps.
> >

Just that I get it right, NX just works with PAE enabled, and PAE just works with HIGHMEM64G enabled.
And this prevents the lowmemory to be secured by NX?

Ciao Thilo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NonExecutable Bit in 32Bit
  2007-04-25  6:58           ` Cestonaro, Thilo (external)
@ 2007-04-25  9:41             ` Marat Buharov
  2007-04-25 10:28               ` Cestonaro, Thilo (external)
  0 siblings, 1 reply; 12+ messages in thread
From: Marat Buharov @ 2007-04-25  9:41 UTC (permalink / raw)
  To: Cestonaro, Thilo (external); +Cc: Tuncer Ayaz, linux-kernel

On 4/25/07, Cestonaro, Thilo (external)
<Thilo.Cestonaro.external@fujitsu-siemens.com> wrote:
> And this prevents the lowmemory to be secured by NX?

What do you mean, when you say "lowmemory"?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NonExecutable Bit in 32Bit
  2007-04-25  9:41             ` Marat Buharov
@ 2007-04-25 10:28               ` Cestonaro, Thilo (external)
  0 siblings, 0 replies; 12+ messages in thread
From: Cestonaro, Thilo (external) @ 2007-04-25 10:28 UTC (permalink / raw)
  To: Marat Buharov; +Cc: linux-kernel

> > And this prevents the lowmemory to be secured by NX?
> What do you mean, when you say "lowmemory"?

I mean EF-Segments. Cause we got a kernel oops as we accidentally used ioremap_nocache on a EF-Segment address.
Before that usage the EF-Segments weren't secured, afterwards they were.
We use now ioremap which does the high low mem check, but I was a bit confused that NX was not active before.
But I can't provide any further informations about the system, cause it was more or less support for a customer.

Ciao Thilo

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-04-25 10:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24  6:31 NonExecutable Bit in 32Bit Cestonaro, Thilo (external)
2007-04-24  6:42 ` William Heimbigner
2007-04-24  7:02   ` Cestonaro, Thilo (external)
2007-04-24  7:46   ` Tuncer Ayaz
2007-04-25  6:19     ` Cestonaro, Thilo (external)
2007-04-25  6:33       ` Tuncer Ayaz
2007-04-25  6:37         ` Tuncer Ayaz
2007-04-25  6:58           ` Cestonaro, Thilo (external)
2007-04-25  9:41             ` Marat Buharov
2007-04-25 10:28               ` Cestonaro, Thilo (external)
2007-04-25  6:55       ` H. Peter Anvin
2007-04-24 12:52 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox