Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Security Businesses Red Hat Software Software Linux

Red Hat Introduces NX Software Support For Linux 188

abertoll writes "In this story at ZDnet, Red Hat has apparently added NX support to Linux. NX security technology is a hardware attempt at stopping malicious code." (We recently posted about Transmeta's announcement that its chips will incorporate the NX bit as well.)
This discussion has been archived. No new comments can be posted.

Red Hat Introduces NX Software Support For Linux

Comments Filter:
  • by PiGuy ( 531424 ) <squirrel@@@wpi...edu> on Saturday June 05, 2004 @11:13PM (#9348122) Homepage
    What I fail to understand is the difference between this 'no execute' bit and the 'executable' bit in standard 386 protected mode. Does the 'executable' bit not cause an exception if the PC proceeds to pages without it set? Even then, protected mode also has a 'read-only' bit - isn't this set for code pages? And if not, why not?
  • Re:Darn. (Score:1, Interesting)

    by sploo22 ( 748838 ) <dwahler@gmail.LISPcom minus language> on Saturday June 05, 2004 @11:39PM (#9348234)
    Yes, I do. It was a JOKE. You really want me to spell it out for you? I was implying that I'd been hacking Slashdot regularly but now the new NX protection was stopping me. Happy?
  • by MntlChaos ( 602380 ) on Saturday June 05, 2004 @11:48PM (#9348266)
    How would Just-in-time compilers and interpreters work? If I understand this correctly, you can't write data to executable areas of memory, but then how do you run instructions that are written to memory!?!? Could someone explain?
  • by l0ungeb0y ( 442022 ) on Saturday June 05, 2004 @11:52PM (#9348284) Homepage Journal
    "AMD's Athlon 64 and Opteron processors have had NX since their debut, though the extra bit won't do anything on a Windows XP system until you obtain and install Service Pack 2. Intel is expected to add NX (or XD) to the next generation of its 90-nanometer-process Pentium 4 "Prescott" CPUs -- bundling the security enhancement with a larger 2MB Level 2 cache and perhaps a faster 1066MHz front-side bus -- in the fourth quarter of this year."

    This year has truly been AMD's year to guide the microprocessor market. Remember not so far back when everything AMD did was a response to Intel? This year it's been Intel responding to AMD. I hope this trend continues as it shows that the so-called WIntel stranglehold is starting to crack and that it is possible for the competition to assume a leading role in the market. Now hopefully, IBM has something in the works for it's PPC/Power lines, as they've been working closely with AMD and this processor feature is something that every networked system could use.

  • Re:Fine No Execute (Score:5, Interesting)

    by explorer ( 42481 ) on Saturday June 05, 2004 @11:57PM (#9348305)
    Right, all AMD K8-class processors have the NX-bit already. And despite the Intel-centric spin on the ZDNet article, the fact is that Intel has only announced that support for it is coming in future Intel parts. Unlike AMD, it doesn't appear you can buy any CPUs from Intel that support the NX bit today.

    In other words, Intel is playing catch-up.

    And note the comment in Ingo's linux-kernel posting that refers to the "existing NX support in the 64-bit x86_64 kernels ... written by Andi Kleen". I.e. NX-bit support was already available to AMD64 owners running 64-bit linux kernels.
  • by forkazoo ( 138186 ) <wrosecrans@@@gmail...com> on Saturday June 05, 2004 @11:59PM (#9348310) Homepage
    However, true W^X (shorthand for "no segment is both writable and executable") support won't work for applications that depend on self-modifying code, such as JIT-compiling virtual machines for Java and .NET platforms.

    data char* temp = new data char[len];
    executable char* code = new executable char[len];
    int function() = code;

    compile(javasrc, temp);
    copy(temp, code);
    function();

    From what I've heard, allocations will default to non-executable, but there will be some sort of API that allows executable space to be allocated on every OS that deals with NX bits. You will probably also see WinXP and the like with the ability to "Run this program in compatibility mode..." until the developer updates to deal with the tweaks made in the updates.
  • by dealsites ( 746817 ) on Sunday June 06, 2004 @12:02AM (#9348321) Homepage
    This is just an attempt by the hardware developers to patch problems made by the software developers. Ultimately in the end, we will lose performance because they are adding overhead to general processing. The software developers (or companies) should be held responsible. It's no different than trying to patch a patch a patch, etc...

    This is why linux is so efficient; bugs are corrected in the kernel and recompiled for the new releases. It's a much better solution that adding code bloat or processor overhead to solve these types of issues.

    --
    Smack your momma good deals!: http://www.dealsites.net/livedeals.html [dealsites.net]
  • by tepples ( 727027 ) * <tepples@gmai l . com> on Sunday June 06, 2004 @12:11AM (#9348354) Homepage Journal

    compile(javasrc, temp);
    copy(temp, code);
    function();

    And watch as NX::copy() has a huge overhead from going into kernel space and back.

  • One step at a time (Score:1, Interesting)

    by SoSueMe ( 263478 ) on Sunday June 06, 2004 @12:46AM (#9348520)
    This, to me, seems like just one more slow, inexhorable step towards "Trusted Computing".
  • by RAMMS+EIN ( 578166 ) on Sunday June 06, 2004 @03:04AM (#9348832) Homepage Journal
    Why do we need a per-page NX bit if the write and execute permissions are already set for the segment?

    Even on the 286 (running in protected mode), code segments are executable, but cannot be writeable, and non-code segments can be writeable, but not executable. I think that's basically what you want - non-executable data, and non-modifiable code (of course, the code needs to be written to memory once, but you can make it non-writeable before starting execution).

    So how come we also need an NX bit on pages (knowing that pages can only be accessed if there is a segment that references them)? Do our operating simply ignore the security that the segment permissions provide, and if yes, why? Why is per-page control so much better than per-segment control?
  • by SalsaDot ( 772010 ) on Sunday June 06, 2004 @04:02AM (#9348971) Homepage
    Yep true. I know one compiler that used "thunks" (small sections of runtime generated code) to make multiple inheritance as efficient as single inheritance code (the Zortech C++ compiler). Probably what I was thinking of.
  • by fatphil ( 181876 ) on Sunday June 06, 2004 @05:48AM (#9349247) Homepage
    As a long time happy linux user, but also a kernel author (not x86 though, C80), I can't share your positive attitude towards linux on this issue.

    Linus sloppily decided to avoid _almost all_ of the protection mechanisms that the 386 makes available to the system. That's why you can smash the stack for fun and profit. He chose to let CS access the same pages as DS (and SS,ES,FS,GS), whe he could have allocated some linear addresses as code-only, and others as data-only. After that you simply need to ensure that no CS ever was given access outside the executable range, and no other segment was given access in the executabe range.
    And you can ensure this - as you, the kernel, are entirely in charge of setting up user-space descriptors.

    To do so would have added a bit more complexity to the memory management (with lower case letters) part of the kernel, but would have prevented all smash stacking and heap smashing attacks.

    Linux is not _technically_ as good OS at all. It's simply _practically_ (for people like me) a good OS.

    Tannenbaum is still right. (And when Tannenbaum says "run 20% slower" he means "take up 0.6% of the CPU rather than 0.5% of it, thus giving apps 99.4% of the cpu rather than 99.5%. But that's another rant.)

    FP.
  • by Anonymous Coward on Sunday June 06, 2004 @07:06AM (#9349416)
    Grsecurity/PAX users have had this on ALL the platforms for couple years already.

    Grsecurity/pax has had a few hundred more security enhanchement improvements over the stuff the articles now here are talking about. So what's the fuzz? Hah.

    Btw, the development of Grsecurity (which is the best [most secure, most effective, easiest] way to make Linux platform secure) stopped already and the project will officially die tomorrow due the lack of sponsors.
  • by RAMMS+EIN ( 578166 ) on Sunday June 06, 2004 @08:30AM (#9349643) Homepage Journal
    ``Because most OS use flat memory model where the whole address space is one segment. This would then include both execute code and data.''

    Well, yes, that's what they would use if the x86 let them. As it is, a segment is either code (and thus executable, but not writeable), or data (not executable). This means that they must use different descriptors, and hence different selectors for each. From there, it seems a small step to have the segments not overlap, thereby disabling applications from writing to their code segment. Not doing this seems like ignoring a perfectly good security mechanism.

Always look over your shoulder because everyone is watching and plotting against you.

Working...