lkml.org 
[lkml]   [1998]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New Solaris 7 features

Andi Kleen writes:

> I think there is an misunderstanding. What I was trying to say was:
> It is legal to put arbitary data between code sequences in any code page
> (e.g. gcc does it for switch I think). Now there is this classic problem
> while writing a disassembler: how can it distingush between code and data.
>
> If you add a simple scanner for the instruction sequences that break
> the Ultra and the program contains these patterns as inline data then it
> will not work.

Your choice:

a. Do not allow 64-bit software.
b. Allow all 64-bit software, even if it is a security hole.
c. Allow some (most?) 64-bit software with a minor slowdown.

If something won't run because gcc put suspicious data into a code
page, recompile with different options until you get lucky. You can
always fall back to 32-bit code if needed.

> there: linux can't check when the page is first mapped because it may be
> changed later. Now you could implement something like 'check-on-execute'
> in the page fault handler, but the problem is that the page may still
> change later: to solve it the page would need to be toggled between read-only
> and non-executable: as soon as an execution occurs mark it readonly, as
> soon as a write occurs mark it non executable and do checking-on-fault.
>
> This all is horrible slow, does not work in all cases (inline data), and
> would make JITs pretty pointless.

Don't do that.

Note that executables owned by root could be exempt from checking.
As long as root owns the JIT compiler, it can run at full speed.

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

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.046 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site