Slashdot Mirror


AMD Could Profit from Buffer-Overflow Protection

spin2cool writes "New Scientist has an article about how AMD and Intel are planning on releasing new consumer chips with built-in buffer-overflow protection. Apparently AMD's chips will make it to market first, though, which some analysts think could give AMD an advantage as the next round of chips are released. The question will be whether their PR department can spin this into a big enough story to sell to the Average Joe."

70 of 631 comments (clear)

  1. The could profit from overflows too... by ebuck · · Score: 5, Funny

    Especially if the buffer is their banking account.

    1. Re:The could profit from overflows too... by doorbot.com · · Score: 5, Funny

      Especially if the buffer is their banking account.

      Your account might profit too, if your account is next in sequence after AMD's...

  2. AMD needs better marketing by Anonymous Coward · · Score: 5, Insightful

    Like IBM with OS/2, they have the better product. They now just need to convince ordinary consumers that this is the case. For some reason, people love that little Intel jingle.

    1. Re:AMD needs better marketing by ebuck · · Score: 5, Insightful

      I think it was the Intel inside marketing campaign that really did the trick.

      Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside.

      It is brilliant. It can't be copied or AMD looks like a "me too!" player. It can't be contested because it's just vauge enough to not claim that the machine is any better for having Intel inside, but implies that anything else is somehow inferior.

    2. Re:AMD needs better marketing by ackthpt · · Score: 5, Insightful

      Don't overdo it. The software has to be compiled to take advantage of this (hence the new version of XP), so just buying a new PC with "WOW! BUFFER OVERFLOW PROTECTION" will generate negative press as people complain, "Hey! I've still got worms! er.. my computer does, not me!" Such gaffes are what competitors live for.

      --

      A feeling of having made the same mistake before: Deja Foobar
    3. Re:AMD needs better marketing by Vancorps · · Score: 5, Informative

      AMD processors have both of those features. AMD has done well at matching Intel feature for feature. Take a look at Opteron for servers. It doesn't help right now that there are a lot of Intel boards that shipped defective. I was replacing backplanes for a solid month just before the New Year. The latest Xeon's really aren't that impressive either. There was a time the Xeon was an incredible processor worthy of running a NOC but now they are hot enough that Opteron and other players look real nice again.

    4. Re:AMD needs better marketing by Vancorps · · Score: 5, Informative
      Well just last night my AMD based laptop shut off on me because it got too hot, something stuck in the fan.

      As for the other features you mention. You are comparing Desktop processors and server processors. You might note the lack of the Opteron processor in the third party tests you linked to.

      Bout two months ago someone came to me with a motherboard and processor, Athlon XP 2600+. They couldn't get it to boot. I took one look at it and realized the heatsink was on backwards, it shut it self down as soon as it got hot enough. I put the heatsink on correctly and the thing booted right up.

      As for the PCI locking its a bit harder to vouch for since I don't see a whole lot of information about it, but I sure do recall seeing tests involving the Opteron, if I could find it right now I would, except I'm on dialup now for the first time in six years and its annoying the hell out of me.

    5. Re:AMD needs better marketing by Anonymous Coward · · Score: 5, Funny
      Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside.

      I always thought "Intel Inside" was a warning label.

    6. Re:AMD needs better marketing by Anonymous Coward · · Score: 5, Insightful

      Intel Inside is a minor part - what cemented Intel was Cyrix. People saw a low cost CPU and got burned for it - then there was no alternative to Intel until the original Athlon which meant that the Pentium and Pentium II were unchallenged.

      To this day, the legacy of Cyrix shadows AMD with marketting using the supposed clockspeed rather then actual.

      Fact of the matter is that Intel has so much branding, even being behind AMD on a few releases isn't going to do enough to displace Intel from being #1. All AMD is good for is the consumer so that there isn't a monopoly, and competition leads to innovation - otherwise Intel wouldn't have brought x86-64 to the general consumer for years. Not that I blame their logic, but then there wasn't a need to jump to Pentium either - the 486 had a lot still to offer at the time.

    7. Re:AMD needs better marketing by Neil+Watson · · Score: 5, Interesting

      It's frightening that even vendors believe in marketing. I meet with vendor one day to discuss supplying us with generic computers. I told them that most of our desktops were Durons. They gasped and stated they could not recommend such things. Stating that they would quote us Intel to "ensure stability". I asked them to cite proof that AMD systems were unstable. They could not but implied that it was common knowledge.

    8. Re:AMD needs better marketing by helzerr · · Score: 5, Insightful
      Stating that they would quote us Intel to "ensure stability".

      I bet it had more to do with ensuring their profit margin.

    9. Re:AMD needs better marketing by Loki_1929 · · Score: 4, Insightful

      " However when I need my server farm to be up 24/7 and dont realy NEED the extra speed the AMD chips just dont look to good."

      Yeah, Ok.

      How easily we all forget just how many times Intel's chips and boards have been junk-in-a-box. What good is a feature when you can't even keep the machine up and running? What kind of uptime does your server farm have when you're sending recalled CPUs back to the manufacturer? Or perhaps, in the case of Compaq's Itanium customers, the server simply doesn't arrive because it's determined to be defective from the get-go?

      Whoops.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
    10. Re:AMD needs better marketing by mcbevin · · Score: 4, Insightful

      You never considered the possibility that there might just be some basis for that belief other than Intel marketing? That while AMDs are not so bad now, older versions would for example melt if you removed the cooling (whereas Intels even back then would simply slow down).

      Also, I suspect AMD possibly suffers from the poor reputations of previous Intel competitors who truly did have unreliable, inferior products. I for one had trouble for a while remembering which of AMD and Cyrix was the one to avoid, thus for the average consumer choosing the always reliable Intel makes some sense.

      AMD still needs some time to build up the reputation Intel has. If they can continue building reliable products without cutting too many corners as they have done in the past to keep up in the race against the giant, they may eventually obtain such a reputation, but such things take time.

    11. Re:AMD needs better marketing by dgatwood · · Score: 5, Insightful
      Wait just a second here. Do you mean to tell me that Intel and AMD still don't have no-execute flags for their page tables? Wow, I guess I should be really impressed by the foresight of Motorola and IBM, who put that feature in the PowerPC series of chips back in 1994 (beginning in the PowerPC 603).

      I'm actually surprised that there are chips out there that don't have such a feature. In a perverse way, I hope IBM has a patent on it.... :-)

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    12. Re:AMD needs better marketing by Krondor · · Score: 4, Interesting
    13. Re:AMD needs better marketing by edwdig · · Score: 4, Informative

      32 bit x86 chips have the write and execute flags combined in the page tables. The segment descriptors have seperate bits for them. Intel basically expected people to use segmentation on the 386 rather than paging, so the original paging implementation was a little subpar.

      Segmentation offers much finer control over memory (allocations can be sized to the exact byte, with a fault generated on any out of bounds access) and a larger virtual address space (48 bits, accessed in segments up to 4 GB). The problem with segmentation is the kernel memory management becomes a lot more complicated, so OS developers have avoided using the segmentation. x86 chips are the only ones to provide segmentation support, so developers of portable OS's avoided the feature as well.

      When AMD designed the x86-64 architecture, they had to design new page tables to deal with 64 addresses. While making that change, they also seperated the write & execute permission bits.

    14. Re:AMD needs better marketing by freeweed · · Score: 4, Insightful

      AMDs are not so bad now, older versions would for example melt if you removed the cooling

      I've always been of the opinion that if you're in the habit of removing your heatsink from a running processor, you have deeper problems than worrying about whether or not it will melt. Tom's sure managed to keep a lot of people I know from buying AMD, which is pretty funny considering how much cooler AMD chips run these days compared to Intel.

      --
      Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
    15. Re:AMD needs better marketing by RzUpAnmsCwrds · · Score: 5, Insightful

      "versions would for example melt if you removed the cooling"

      And, why, exactly, would you remove the heatsink from a CPU while it is running?

      Moreover, this was not a flaw in the Athlon. The Athlon, since Athlon XP, has contained a thermal diode to enable safe thermal shutdown. The motherboard that Tom's Hardware used did not have the thermal protection circuitry.

      Losing a CPU to "thermal death" was a rare occurance. Most CPUs that experienced "thermal death" had improperly installed thermal solutions (e.g. the clip was not installed properly). A fan failure or failure to use thermal compound (e.g. a pad or grease) would likely not cause damage to the CPU, even without thermal protection. Only a lack of die to heatsink contact (e.g. with an improperly installed shim or a poorly installed heatsink that detached during movement) would likely cause the Athlon to experience "thermal death" ass shown in the Tom's Hardware video.

      "whereas Intels even back then would simply slow down"

      The Tom's Hardware Guide video was a fake. The CPU temperature never exceeded 30C (look at the thermal probe). Thermal throttle-down on the P4 occurs when the CPU hits 85C. And, yes, the system will crash or simply become completely unusable if the heatsink is removed.

      "without cutting too many corners as they have done in the past"

      Right. Intel has never cut corners, particularly not with major logic bugs in the Pentium, PII, PIII, P4, and Itanium.

      Look, CPUs are not flawless. But the CPU thermal issue you speak of really is not a huge issue. With a properly installed heatsink (like the heatsinks on a computer you would buy from HP or eMachines), it never was an issue. And today every new motherboard has thermal protection.

      Tom's Hardware did a disservice to the community and to AMD by taking a relatively minor issue that affected a small number of people and blowing it out of proportion to a huge flaw.

      If you read Tom's Hardware for as long as I have, you begin to notice a pattern: Tom is an egotistic nut. He posted one editorial stating that the performance war between Intel and AMD was bad for consumers (hmmm... my $90 Athlon XP 2600+ would seem to refute that, as would sub $200 P4 3.0GHz CPUs). He also says that people buying AMD64 systems are giving AMD a "no intrest loan" because of the lack of availibility of AMD64 operating systems and applications. Apparently, no one told Tom that the Athlon 64 3000+ is *cheaper* than its similarly performing P4 counterpart (in IA-32 applications). And, apparently, no one told Tom that Intel has adopted the same instruction set for its Pentium 4 based 64-bit systems.

      I have lost respect for Tom and his publication. Between his hate-filled articles filled with vague statements and mistruths, his constant bashing of AMD (he compared the Athlon XP 3400+, a $450 CPU, to the P4 Extreme Edition, a $900 CPU, and decreed the P4EE the victor because it was marginally faster in 3/4 of the tests), and his suing of other tech websites, Tom has struck out. I only hope that [H]ardOCP doesn't suffer the same fate.

    16. Re:AMD needs better marketing by Sycraft-fu · · Score: 4, Insightful

      Hey, they fall off sometimes, or a fan fails, or the AC fails. Shit happens. Happened to a friend of mine, friend one of his CPUs, though the board was ok thankfully.

      Also AMDs much larger problem was motherboards. VIA chipesest used to suck hard, and AMD's own were almost as bad. I remeber when the Athlons were fairly new it was time for me to upgrade so I decided to get one based on price. I got a 700mhz slot Athlon and a top-of-the-line Abit board with VIA chipset. I then proceeded to fight with my system for two weeks. I could not make it work in either 98 or 2000. It just would not play nice with my GeForce or my pro audio card. I finally sent it back, got a 440BX and an Intel P3 700 which I then used for like 2 years.

      Now I know the situation is completely different today, but that sort of thing sticks with many companies and OEMs. Trust is a thing that is easy to loose, hard to regain. Not fair, but that's how the world works.

      Only receantly have I started recommending ATi video cards. Why? Well becuase I supported ATis in many situations and their drivers were trash. 2d was fine but try and 3d and you were asking for BSODs. That's now changed, their drivers are in every way as solid as nVidia's and their hardware is better. But it took time for me to trust that. I had to use the cards and see them used in a number of different environments before I was ready to declare them stable enough for use in production systems.

      Also the PR numbers aren't helping. Many people see it as dishonest, espically since they haven't need consistent (some of the more receant chips haven't performed at the level their PR would infer). This again hurts crediblity in the eyes of some people.

      It's not fair per se, but it is the way of the world. You burn me, it takes time for me to trust you won't do it again.

    17. Re:AMD needs better marketing by Loki_1929 · · Score: 5, Informative
      "I for one had trouble for a while remembering" ... remembering a lot of things.

      Like the PIII Coppermine CPUs that wouldn't even boot sometimes.

      Or the randomly rebooting PII Xeons.

      Or the voltage problems with certain PIII Xeons.

      Or the memory request system hang bug in the PIII/Xeon.

      Or the PIII's SSE bug whose 'fix' killed i810 compatability.

      Or the MTH bug in the PIII CPUs that forced Intel customers to replace boards and RAM.

      Or the recalled, that's right, recalled PIII chips at 1.13GHz.

      Or the recalled (there's that word again) Xeon SERVER chips at 800 and 900MHz.

      Or the recalled (that word, AGAIN?!) cc820 "cape cod" Intel motherboards.

      Or the data overwriting bug in the P4 CPUs.

      Or the P4 chipset bug that killed video performance.

      Or the Sun/Oracle P4 bug.

      Or the Itanium bug that was severe enough to make Compaq halt Itanium shipments.

      Or the Itanium 2 bug that "can cause systems to behave unpredictably or shut down".

      Or the numerous other P4/Xeon/XeonMP bugs that have been hanging around.

      Yes, I did consider the possibility that there might just be some basis for the belief that Intel's products are superior. Having considered that, in light of the mountains of evidence to the contrary, I shall now proceed to laugh at you.

      Ha ha ha.

      Now go away, or I shall mock you again.

      --
      -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
    18. Re:AMD needs better marketing by kryptkpr · · Score: 4, Informative

      Spend the few extra dollars on a good motherboard with the nForce2 chipset. I run an Asus A7N8X-E Deluxe and in my experience it's very speedy (compared to my old ECS K7S5A, bleh) and packed to the tits with features (FireWire, SATA+RAID, USB2.0, etc..).

      Also, good memory (we're talking at least the lifetime warranty kind here) is totally necessary if you want your system to be stable at high frequencies, it seems AMD CPUs are more sensitive to bad/cheap memory (particularly in ECS boards, they're cheap, but avoid them if you at all can).

      On a side note, AIDA32 shows the chipset bus on this board as being 8-bit HyperTransport v1.0 .. totally cool :)

      --
      DJ kRYPT's Free MP3s!
  3. Code rewrites going to be needed? by PornMaster · · Score: 5, Interesting

    I know that people using standard APIs might be fine, but I can't help but wonder how many applications will not work because of it. While there probably aren't many self-modifying code apps out there, there are surely some. Will they be affected?

    1. Re:Code rewrites going to be needed? by chamilto0516 · · Score: 5, Interesting
      Self modifying code apps would be affected. And I think that is a good thing because you would want to ferret out such things in your systems.

      Writing self-modifying code was the first thing my Assembler instructor put his foot down and said, "bad idea, don't even think about it." I could see you could do it easily with assembler.

      I would entertain listening to cases where self-mod'ing code has its place.

      --
      Magic Eight Ball: Outlook not so good., Hmmm, how about Excel and Word?
    2. Re:Code rewrites going to be needed? by J-Worthington · · Score: 4, Interesting

      One type of application that would need to take this into account would be JIT compilers, e.g. like that used in .Net. These create native code in memory to execute, with the objective of increasing performance. These apps simply need to state that they want the memory they allocate to be executable when they allocate it, then they can continue to work as before.

    3. Re:Code rewrites going to be needed? by imnoteddy · · Score: 4, Interesting
      My guess is that many applications use self-modifying code as part of their anti-piracy/anti-reverse-engineering protection.

      In the early '90s Motorola released the 68040 with a code cache that made programs that used self-modifying code crash and burn. Apple had been telling people for years not to write self-modifying code because this was going to happen. When Apple started building prototype Macs with 68040s and started testing for compatibility who do you suppose was one of the biggest offenders? Microsoft. I am not making this up.

      --
      No electrons were harmed creating this post, though some may have been subjected to electrical and/or magnetic fields.
    4. Re:Code rewrites going to be needed? by kawika · · Score: 4, Informative

      Any application that creates code in stack-based memory such as a local (auto) variable, or in one of the standard heaps (from which malloc and "new" memory come) will be affected. This memory is no longer executable and cannot be made executable by an application. Some existing JIT compilers are affected and will need rework.

      To work with memory protection enabled, applications will need to allocate memory using VirtualAlloc and specify the memory options to make it executable. Then they can generate and run the code there.

      I am assuming that Linux could incorporate some similar functionality, anybody know if someone is working on it?

    5. Re:Code rewrites going to be needed? by cjellibebi · · Score: 4, Informative
      > I would entertain listening to cases where self-mod'ing code has its place.

      The Intel x86 architecture has few registers, so if you want to keep lots of values handy, you're going to have to keep swapping values in and out of memory. Alternatively, immediate-value constants can be hard-coded in the code that do not change during a long loop or a loop with many layers of nestedness. Just before the loop is executed, these hard-coded constants will be modified by re-writing the immediate-values in the code. An example of this is some code that draws a scaled translucent sprite. Throughout the code, the scale will remain constant, and if the translucency is uniform, that will remain constant too. The code that does the translucent blitting will use the registers only for values that change during the sprite-drawing.

      On an 80386, using this technique will cause a significant speed-increase in the code, but on 80486's and above where there are on-board L1 caches on the CPUs, the code-modification may cause cache-misses that may slow down the system - espcecially if it is run on an even newer x86 CPU that has a seperate program and data cache in the L1 cache. To make things worse, nowardays, most code runs in a multi-tasking environment, so trying to figure out if self-modifying code causes a slowdown or a speed-increase is almost impossible to predict.

      Of course, nowardays, most drawing is done by hardware accellerated graphics cards so this isn't a good example, but there could still be some use for hard-coding values that do not change in a loop.

    6. Re:Code rewrites going to be needed? by beerman2k · · Score: 4, Informative

      All modern architecture's have seperate caches for code and data. Simply flushing the i-cache will allow you to update your code on the fly.

    7. Re:Code rewrites going to be needed? by larkost · · Score: 4, Interesting

      On Apple platforms Microsoft has a very long history of this. There was another major case in the Apple II era where Apple developer documentation specifically reserved an address space for future expansion. Microsoft ignored this, and the IIe broke a good chunk of their software because of this.

      Microsoft has historically had very bad coding practices. From all accounts I have heard this has markedly improved, but it was pretty bad.

  4. what a drag by Wellmont · · Score: 4, Insightful

    Can anyone else say that it is ABOUT time that buffer overflow was built into a processor or motherboard? The only thing i worry about is the performance drag that making up for everyone's programming mistakes can do to a processor.

    1. Re:what a drag by m0rph3us0 · · Score: 4, Insightful

      All it is is on extra bit in the pagetable that check whether the memory region is W^X (write or execute). This kind of thing usually requires a bit of operating system magic to make it work. i386 already has W^X protection, it just isn't enabled by most OS's.

    2. Re:what a drag by paranode · · Score: 5, Informative

      Exactly. OpenBSD 3.3 already came with this feature in May 2003.

      "W^X (pronounced: "W xor X") on architectures capable of pure execute-bit support in the MMU (sparc, sparc64, alpha, hppa). This is a fine-grained memory permissions layout, ensuring that memory which can be written to by application programs can not be executable at the same time and vice versa. This raises the bar on potential buffer overflows and other attacks: as a result, an attacker is unable to write code anywhere in memory where it can be executed. (NOTE: i386 and powerpc do not support W^X in 3.3; however, 3.3-current already supports it on i386, and both these processors are expected to support this change in 3.4). "

  5. They are NOT protecting against overflows by Anonymous Coward · · Score: 5, Informative

    They are protecting the pages marked as code from the data pages. Code could still overflow, but not use that to execute arbitrary code in the pages marked as data(or non-executable).

  6. Linux support by nate1138 · · Score: 5, Insightful

    AMD's Athlon-64 (for PCs) and Opteron (for servers) will protect against buffer overflows when used with a new version of Windows XP.

    This does require some interaction from the operating system in order to work. Hopefully AMD will release enough information to allow this feature to be implemented in Linux.

    --
    Where's my lobbyist? Right here.
    1. Re:Linux support by TheRealFoxFire · · Score: 5, Informative

      It will likely be in their architecture manual. The summary of the protection is that it allows the OS to mark pages of virtual memory with a No Execute (NX) bit. Attempting to execute any instructions from such a page would cause a trap to the OS.

      An OS would then use this to mark pure data page and areas like the stack as NX so that overflowing datastructures doesn't allow arbitrary malicious code to be run.

    2. Re:Linux support by Tony+Hoyle · · Score: 5, Interesting

      It's been implemented in Linux since about 6 months ago, at least on the amd64 branch.

      http://www.x86-64.org/lists/discuss/msg03469.htm l

  7. Nope by lukewarmfusion · · Score: 4, Interesting

    It would be a hell of a marketing and user education campaign to get users to understand this (or almost any hardware related details).

    They want fast and reliable, not techspeak. I can barely get my clients to understand why they need SSL (and how it works).

    1. Re:Nope by Inuchance · · Score: 5, Interesting

      I think a good commercial would having hackers trying to break into a computer, and then a big "ACCESS DENIED" error shows, and one of the hackers exclaims, "No good, they've got the latest AMD CPU!" And then some announcer says something like, "With the latest CPUs from AMD, your computer executes only what YOU want it to, not what THEY [flash over to image of frustrated hackers] want!"

  8. Securing C++ through hardware by KingOfBLASH · · Score: 5, Insightful

    I find it interesting that one of the reasons that hardware protection from buffer overflows is needed is because many programs were created using functions in languages that don't properly check array bounds. Programmers really need to learn that either they need to use functions which provide bounds checking if they insist on using a language like C or C++, or they need to program in another language.

    (Note: Although many people come down on C++, it's also what functions you use. For instance, while fget() is considered "safe" because you provide a buffer boundry, gets() is considered unsafe. This drives me nuts! We knew how to program to prevent buffer overruns years ago, and they're still a problem!)

    1. Re:Securing C++ through hardware by DaHat · · Score: 5, Insightful

      I think you are forgetting something though... C and C++ are the most powerful higher level languages that exist today... Why? Because with them... you can easily mess everything up!

      Back in college I would defend C/C++ against one of my professors who thought it was the spawn of satan (and oddly though Pascal was/is the greatest language ever) for the simple fact that it gives you the ability to do so many things with few limits.

      A hammer cannot only be used to drive in nails or bang a dent out of your car hood... but it can also be used to break your neighbors windows and beat someone to death. Just because a tool CAN be used for ill, doesn't mean the tool is to blame. After all... guns don't kill people... murders/soldiers/hunters/etc do!

    2. Re:Securing C++ through hardware by john.r.strohm · · Score: 4, Insightful

      Back in college I would defend C/C++ against one of my professors who thought it was the spawn of satan (and oddly though Pascal was/is the greatest language ever) for the simple fact that it gives you the ability to do so many things with few limits.

      If we ignore for the sake of argument the specific "high-level assembler" design goal for C, and look instead at philosophy which was carried into C++, there was this fundamental hacking philosophy that said that, because you occasionally needed to do something a bit bizarre, it should be EASY to do that bizarre thing. Further, the entire C/C++ philosophy was that the programmer was solely responsible for the consequences of his actions.

      We contrast this with Ada. Ada's philosophy was that you only occasionally need to do bizarre things, that 95-99% of the time, you are doing perfectly straightforward things, that the effort should be distributed accordingly, and that the language should be helping the programmer to do the routine things correctly. This implies that, when the programmer attempts to do something bizarre, 95-99% of the time it is because he screwed something up, and he DIDN'T mean to do what he typed, and the compiler barfs.

      At that point, it becomes the programmer's responsibility to tell the compiler, and NOT INCIDENTALLY everyone who will ever do maintenance on his code, that "Yea verily I DID intend to shoot myself in the foot here!". Idioms are provided for doing that. If the programmer really intended to take that floating-point number and treat it as a bitmask, he has to tell the compiler that this was indeed his intention.

      Ada did not provide a "back door" array reference mechanism comparable to the C/C++ pointer hacking, for the reason that it is impossible to do proper bounds checking in that case. Ada does provide a mechanism for suppressing bounds checking, but it is NOT the default and it is explicitly forbidden by the standard from it being the default in any conforming implementation. If the programmer has a good reason for suppressing bounds checking, he has to do it EXPLICITLY, at some level.

      Your analogy with hammers is OK, but it breaks down with guns. Guns have trigger guards and safety catches, PRECISELY to prevent naive users from shooting themselves in the foot, or from shooting someone else that they didn't intend to shoot. At the same time, those safety mechanisms do not prevent the gun from being used to shoot someone that the user most fervently WANTS shot right then.

      In my view, if I utter a sequence of instructions that will dance a fandango on core, it is almost certainly the case that I have made an error, and I would prefer the toolset to ask me "Are you sure? (Y/N)". If I am certain that I intended to dance that fandango, I am also certain I want to warn the next guy in line that I am now lacing up my dancing wafflestompers, and the language should support that.

  9. Of course they can by mikeophile · · Score: 5, Funny
    The question will be whether their PR department can spin this into a big enough story to sell to the Average Joe.


    Sure, AMD just has to write a buffer-overflow exploit into a worm that carries the pop-up window message, "If you had and AMD processor, you're hard drive wouldn't be erasing right now."

  10. Look closer... by heironymouscoward · · Score: 4, Funny

    ....

    MOV AX,DS:OSID[BX]
    CMP AX,2 ; 2=Windows 3.x
    JE PANIC
    CMP AX,3 ; 3=Windows 9x
    JE PANIC
    CMP AX,4 ; 4=Windows 2K/ME/XP
    JE PANIC
    CMP AX,10 ; 10=Minix
    JE OKAY
    CMP AX,11 ; 11=... :PANIC
    ISSUE 'CPU BUFFER OVERFLOW ACTIVATED'
    JMP PANIC

    --
    Ceci n'est pas une signature
  11. Rob Enderle Strikes Again! by Galuvian · · Score: 4, Funny

    Although this is great for AMD I'm sure, I stopped reading the article when Enderle was the first 'analyst' quoted.

  12. Ahem... by cbiffle · · Score: 5, Insightful

    From my reading of the article, this sounds like it's just a new spin on the per-page eXec flag on the AMD64 architecture.

    Granted, yes, this is a good thing, but "buffer-overflow protection when used with a new version of Windows XP?" We now have to rely on Microsoft to set the X flag properly...

    This has been talked about on Slashdot a lot in the past; the OpenBSD guys in particular are hot on the Opteron because it, like SPARC, provides this protection. Fortunately, this isn't some Windows-specific voodoo; we all stand to benefit from this fundamental fix to the broken Intel VM architecture. :-)

  13. Re:"Average Joe" Vs. buffer overflows by iantri · · Score: 4, Insightful

    Explain to Average Joe that his computer will be protected from (some) crashes and (some) computer viruses..

  14. Re:Pathetic by DaHat · · Score: 5, Insightful

    Wraaaag! Why does everyone keep calling this a Microsoft bug?

    Yes... the vast majority of buffer overflow exploits we read about are Microsoft based, however it's not too hard to find software from other providers, yes, even in Linux. Which can suffer from this kind of flaw.

  15. There's no excuse for buffer overflows by ChiralSoftware · · Score: 5, Insightful
    Remember back in the 60s and before, all cars leaked oil? People just accepted, "Cars leak oil." They didn't realize that it didn't have to be that way.

    Then the Japanese started making cars that didn't leak oil. Now, no one would accept a car that leaks oil. People have realized that cars don't have to leak and we shouldn't accept it.

    It's the same thing with buffer overflows. People now have this attitude "well, there's nothing you can do. Just write code really carefully. Anyone who makes buffer overflows in his code is just a sloppy coder!"

    Nothing could be further from the truth. There is no way anyone can code a large project in plain old C and not make buffer overflows. Look at OpenBSD, who are masters of secure C. They still have buffer problems.

    And yet, there is absolutely no reason for code to have any buffer overflows! There are programatic tools, such as virtuams machines (think JVM) and safe libraries which mean that programmers never have to manipulate buffers in unsafe ways.

    Putting in hardware-level support for this would be fantastic. It is time for people to change their attitude about what they accept in computers. Crashes and security holes are not inherent aspects of software. Mistakes are inherent in writing code, but these mistakes don't always need to have such disasterous consequences.

    ---------
    Create a WAP server

    1. Re:There's no excuse for buffer overflows by Fapestniegd · · Score: 4, Funny

      If you designed and produced cars on a typical programmer's development schedule, you would probably have to pour oil into them while running to keep the fluid levels right.

      And they would just explode for no reason sometimes.

  16. Re:Pathetic by eht · · Score: 5, Insightful

    What's about GNU/Linux's bugs or NetBSD's or Sendmail's bugs? This is OS agnostic.

    This isn't insightful, it's flamebait and FUD.

  17. the Average Joe doesn't buy processors by funny-jack · · Score: 5, Insightful

    They buy computers. They don't need to sell the idea to the Average Joe, they need to sell the idea to the people making computers for the Average Joe.

    --
    You probably shouldn't click this.
  18. Re:the Chipmaker??? by normal_guy · · Score: 4, Informative
    --

    Linux: Free if your time is worthless.
  19. Re:Pathetic by strictnein · · Score: 5, Interesting

    It's pathetic that AMD has to fix M$'s bugs...

    How is this insightful? First of all, any post that uses the $ is Microsoft's name should be modded -1, 14 year old poster.

    As if buffer overflows really had much to do with the OS. It has a lot more to do with poor coding. Try the following searches for more info:

    linux buffer overflow
    bsd buffer overflow
    OS X buffer overflow
    Solaris buffer overflow
    And yes, everyone's favorite:
    windows buffer overflow

  20. AMD Opteron and Athlon 64 already have this by dtjohnson · · Score: 4, Informative



    The AMD Opteron and Athlon 64 chips already
    have the buffer overflow protection in their hardware and the
    feature is already supported by both Linux and Windows XP 64-bit
    edition. AMD calls this "Execution Protection" and the
    basic idea is that the processor will not allow code that arrives to
    the system via a buffer overflow to be marked as
    executable. The slashdot story says "will have" for both
    Intel and AMD when it should read "AMD already has and Intel will
    have..."

  21. Re:Awesome by Sloppy · · Score: 5, Insightful
    Why didn't they think of this in the first place.
    Because it's hard to fix while keeping compatibility, and it was a different world in 1980.

    Some of today's problems are really just side-effects of the x86 legacy. If you're willing to break binary compatibility, fixing problems is really, really easy. For example, there's no law that stacks have to stupidly grow downwards in memory so that an overflow ends up overwriting older stuff on the stack space, instead of overwriting in the direction where the unallocated space is. And indeed, on many architectures, it works more sensibly. So even if you don't protect against overflows, their damage doesn't need to be so severe.

    But by the time it became popular for personal computers to be connected to the internet (and thus, overflow protection started to become really important), it was far too late to fix the problem, because too many people were locked into x86.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  22. Old news by Todd+Knarr · · Score: 5, Interesting

    This existed in the 8086 and 8088 CPUs. You seperate your program into code, data and stack segments and load the appropriate segment registers. Code segments can't be read or written, data and stack segments can't be executed. But stupid programmers decided that that kept you from playing games with code-as-data and data-as-code, so they created flat addressing mode with all segment registers pointing at a single segment. Feh. Those who don't read history are doomed to repeat it. Badly.

    1. Re:Old news by tomstdenis · · Score: 4, Informative

      Except you could write/read from the CODE segment and you could far jump into the data/extra/stack segment registers.

      What's better is that CS==DS was a common mode [known as a .COM or TINY model program].

      So there goes your theory.

      Tom

      --
      Someday, I'll have a real sig.
  23. Re:Pathetic by Anonymous Coward · · Score: 5, Insightful

    Don't blame MS for everything. Unix too has a notorious history of its contibution due to buffer overflow. Ever heard of sendmail? I believe the first internet worm in 1988 utilized buffer overflow in number of unix apps including sendflow, finger, ...

    Software can't do everything. In fact, some earlier architectures offered choice of separating data segment and code segment (DEC VAX were the latest I used which had this feature), but because they have some performance penalty, the hardware companies removed this feature. Now that we have more speed than needed, it is being put back.

  24. Execution bit on MMU Pages by adisakp · · Score: 5, Interesting

    For what it's worth... many processors, like the PowerPC series have had this "buffer overflow protection" feature for years. The idea is to mark program code pages after they are loaded as executeable and read-only. No other pages are marked executeable. It destroys clever little hacks like self-modifying code but at the same time, makes it impossible for buffer overflows to introduce new code into a programs executeable code page set.

  25. The Average Joe? by SpaceRook · · Score: 5, Interesting

    The average joe can't even figure out that he shouldn't open email attachments from people he doesn't know (Exhibit A: MyDoom). You really think he knows what the fuck a buffer overflow is? "No buffer overflow? But what if I *want* overflow! More is better!" I applaud this security feature, but don't think of it as a selling point for typical users.

  26. Wow! by El · · Score: 4, Funny

    Separation of programs into separate code and data segment -- what a novel idea! I hope they got a patent on this technology!

    --

    "Freedom means freedom for everybody" -- Dick Cheney

  27. Designed for Microsoft Windows by Hamster+Lover · · Score: 4, Funny

    Now those stickers on the front of the computer really mean something...

  28. Those are MOTHERBOARDS by Anonymous Coward · · Score: 4, Insightful

    Not CPU's. AMD doesn't make those motherboards, so it's not their fault if they don't implement the features.

  29. Re:the Chipmaker??? by kfg · · Score: 4, Informative

    This has nothing to do with Microsoft, and everything to do with architecture and programing languages.

    If you program in C on Intel you are going to have problems without almost fanatical devotion to the Po^H^H management of your memory resources.

    That goes for Linux as well, as any check at Bugtraq can confirm.

    Yes, people should be very careful when coding in languages and on architechtures which allow buffer overflow, but the real solution is at a level lower than the coder's.

    KFG

  30. Re:Awesome by phil+reed · · Score: 4, Insightful
    Why didn't they think of this in the first place.

    They did. Mainframes and the like have had protection from this sort of hack for ages. AS/400s have object orientation support built into the hardware, and a data object (which is what a stack or buffer would be implemented as) cannot be executed as code, no matter what. The hardware will not allow it. Nor would the buffer be allowed to grow into a code location.

    We're living with hardware and software architecture decisions made in the 1980s, when PCs were still considered toys.

    --

    ...phil
    "For a list of the ways which technology has failed to improve our quality of life, press 3."
  31. Isn't this already possible with segmentation? by ktulu1115 · · Score: 4, Informative

    Call me stupid, but AFAIK x86 chips have full segmentation support (in protected mode obviously) - ability to define different segment types (read only, r/w, execute only, etc)... For those of you not familiar with it, it allows the programmer to define different types of memory segments, which would allow you to do some pretty interesting things such as defining read-only code segments (so the machine instructions can't be modified in memory), and non-executing data segments (to prevent OS from trying to run code stored in program data/buffers). This would solve the problem, at least how they addressed it in the article.

    If current operating systems actually used this in addition to paging (which is what most of them only use now), why would they need to create a new chip? Linux does not fully utilize segmention, mostly only paging. I don't have any resources on MS OS design right now so I can't comment on it... (although maybe looking at the recent source would help some ;)

    --
    # fuser -v /dev/attention | grep work
    #
  32. Re:the Chipmaker??? by nehril · · Score: 4, Insightful

    why can't they just double check their code?
    for the same reason cooperative multitasking went out of style: humans.

    theoretically a coop multitasking operating system is much more efficient than pre-emptive multitasking. coop multitasking systems (like Mac OS pre X and Novell Netware) require each application to voluntarily give up the CPU when appropriate. That means that every app gets the entire cpu to itself, yielding better cache performance and allowing the app to continue a thread until a good time to stop came along (like, waiting for input or disk or whatever). Unfortunately, that means all programs must be perfect, a bug in any one of the running programs will bring down the entire OS like a house of cards. Or if you didn't release resources just right, your app would appear to hog the entire system and it would LOOK like you crashed everything.

    Most programmers are not perfect.

    Thus the rise in pre-emptive multitasking, where app programmers no longer get to decide when to give up the cpu, the operating system yanks your thread based on timeslices or some other mechanism outside the apps control. this means your various caches no longer have the "right" data most of the time, and maybe your thread gets yanked 1 instruction short of what would have been a better stopping place (maybe the next cycle was for a well-timed disk access). Some advanced chip features like memory streaming for SIMD ops also get trampled by pre-emptive multitasking, meaning you can no longer prefetch large chunks of data since threading out stops all your streams (this is a problem for Altivec programming.)

    But on the whole, by acknowledging that programmers are not perfect (it only takes one bad one to ruin your system), and moving to the "wrong" solution of pre-empt multitasking, we get vastly improved stability and perceived performance. This is also why "wrong" solutions like hardware overflow protection are needed.

    A scientist would say you are right, but an engineer would say you are wrong.

  33. AMD is doing just fine by gosand · · Score: 4, Insightful
    Nobody knows if Intel is better, but they don't want a computer that "lacks" Intel inside. They simply guess that if it's inside, it's better than not having it inside. It is brilliant. It can't be copied or AMD looks like a "me too!" player. It can't be contested because it's just vauge enough to not claim that the machine is any better for having Intel inside, but implies that anything else is somehow inferior.

    Do you remember when the "Intel Inside" logo came out? There was no real competition. (it was the Pentium days) There were other processors, but the Pentium pretty much blew them away. Intel didn't just success on that logo alone, they do have a little bit of technology behind it.

    I think it is funny when people say AMD is better. When they say that, ask them why - 99% of the time it will be because it is cheaper (bang for the buck). The other 1% might do overclocking, or read anandtech on a daily basis, or have some highly technical reason - which is essentially irrelevant to the argument. For AMD to be where they are in the processor market, it is nearly a miracle. The only reason is because Intel was comfortable in their position. AMD came on the scene with a comparable product at a cheaper price, and it woke Intel up real fast. They catered more to the "home enthusiast" market at just the right time.

    I have a buddy who has worked at Intel for 7 years now, and I always kid him about AMD. He works on the thermal solutions, and has access to the fab floor. There may be some advantages that Intel has over AMD in some areas (and vice versa) but if you have two well put together systems of each sitting side-by-side, the processor is pretty much a non-issue.

    --

    My beliefs do not require that you agree with them.

    1. Re:AMD is doing just fine by Hoser+McMoose · · Score: 4, Informative

      Do you remember when the "Intel Inside" logo came out?

      1991, according to Intel themselves

      There was no real competition. (it was the Pentium days) There were other processors, but the Pentium pretty much blew them away.

      The Intel Inside marketing program started two years before the Pentium came out. At that time AMD was competing very effectively with the 486. So much so that Intel wanted a new marketing campaign to try to bring people back. Even in the early Pentium days AMD continued to compete effectively. Their 5x86 120MHz chips were very competitive with the Pentium 60 and Pentium 66, and even the 75MHz Pentium chips. It wasn't really until '94 or '95 that Intel really started leaving AMD in the dust, mainly because AMD was WAY late at releasing their K5 processor and when it did come out they had so many problems manufacturing it that it was clocked much lower than initially hoped for. Cyrix continued to offer some competition for Intel during this time, but they were plagued by crappy motherboards which gave them a poor reputation (it was a bit of a self-fulfilling prophecy thing: reputation for being cheap crap meant that they were put on cheap crap motherboards which resulted in a poor quality system).

      it will be [better] because it is cheaper

      And that is somehow an invalid reason for a product to be better?

  34. stupid by ajagci · · Score: 4, Interesting

    Marking pages as executable/non-executable is old, and it's not the way to deal with buffer overflows. Many buffer overflow exploits, in fact, only modify data (like the saved PC pointer).

    The correct way of dealing with buffer overflow problems is to make them not happen in the first place. That means that all pointers need to have bounds associated with them. Unfortunately, both the C mindset and some design quirks of the C programming language make that a little harder than it should be for UNIX/Linux and C-based systems.

    The real problem is ultimately the use of C, and the real solution is not to use a new CPU or add instructions, but to use a language without C's quirks. In terms of performance, C's pointer semantics only hurt anyway.