It's not needed if you map your kernel into the application's page tables.;)
All you need are separate segments for kernel and user mode.
1) Segmentation is essentially non-existent* in 64-bit mode. 2) Segmentation sucks. Always has, always will. That's why even in 32-bit mode most segments are made with base 0 and max limit, and processors are optimized for this case. 3) Okay, so you switch your CS and DS segments when you go into kernel mode (well actually you do anyway, but they're non-base-zero in this case). That's great, but you still need to map your linear address (linear = virtual address + segment base) to a physical address. So you either need to write to CR3 to use the kernel's page table, or you need to map your kernel's memory into the user's page table.
* Ask VmWare about the non-essentially existent remnants of segmentation.
Yeah, shouldn't switch be easily take care of by a base register?
Well it is. On x86 systems, the intuitively named Control Register 3 is a pointer to the base of the page tables. From a software point of view, switching address spaces is as easy as writing CR3.
From a hardware point of view, that act has additional implications. You have to flush the TLBs, which sucks royal if it happens on every system call. If you have linearly tagged caches (or any other linearly tagged structure) then you'll have to flush those too. There are ways to partially mitigate these effects, but since you can't rely on them being there it's best to just avoid CR3 writes as much as possible -- which means there's less reason to implement the necessary widgets.
Besides, the article is actually about NULL pointer dereferences within the kernel, where niceties like language-based exception handling mechanisms are often hard to come by. So the language you write your application code is immaterial.
Also not just any dereference will do, it has to be a function pointer dereference.
And recent kernels have protection against mmap()ing page 0.
However the author has a good point that both NULL function pointer calls in the kernel and hackers getting around the mmap() protection have happened before. So while you can't exactly exploit any Linux system using the procedure he describes (several critical components require you to already have root:P) it does sound like a weakness.
I thought the BigMem kernel patches a few years back put the kernel in it's own VM, with minimal copying into userspace VM space, or am i missing something?
I don't know what that patch did (BigMem implies something like using 2MB pages, but what's in a name?), but I do know that the author is right about address space switches being expensive and not something you'd want to do on every system call, or any system call that is expected to return control to the same process for that matter.
In practice I don't ever see CR3 writes ( CR3 points to the root of the page table, so writing it is how you switch address spaces) in system calls. Though I am not sure exactly what kernel rev or patch level the benchmark traces are taken from. Still, sounds like it's probably right to me.
Alas, here come another problem: science is as applicable to natural phenomena as much as they are recurring. The foundation of science is experiment which by definition of scientific experiment should be repeatable. The natural phenomena that are under science should be repeatable.
More fundamentally, science is about observation. You make observations, construct a hypothesis which makes certain predictions, and then conduct further observations to either confirm or deny the predictions. This doesn't always take the form of a repeatable experiment. Sure if it's chemistry then anyone should be able to duplicate the results. However in geology or astronomy it is perfectly valid to observe an unusual phenomenon only once, and construct a hypothesis that predicts certain other phenomenon, and if you later observe that new phenomenon that's evidence for your hypothesis. All without repeatability.
So even observing each UFO only once, it would be perfectly possible to construct hypothesis based on those solitary observations that allows for future observation to confirm or deny it.
They included accidents wherein passengers had alcohol in their systems, even though the drivers were completely sober.
And regardless of which car the person who had been drinking is in.
As in: You're stopped at a red light, passenger in your back seat had a couple drinks, and some douche talking on their cell phone rear-ends you. That counts as an alcohol-related accident.
I wonder if there's some consumer protection laws that states if you buy something legally you have a right to enjoy it. Because right now you're buying a digital copy of something that is encrypted but you're not receiving the license that is required to watch it.
Ha!
When I buy a DVD I'm receiving a digital copy, and the license to watch it, but because there are no players on Linux which themselves have license to decrypt, I'm still breaking the law when I watch DVDs on my computer.
So if you get a copy but with the caveat that they don't want you to watch it unless you pay for the privilege, don't expect the law to help you.
That's exactly why our IT department implemented the password expiry policy some years back. My workplace is stuffed full of enginerds, so when they sent out the email informing us of the change, of course they got back tons of emails explaining all the reasons discussed here why it was a stupid idea. They politely dodged all questions while insisting that the policy was going through. I thought this was all kinda weird, since our sysadmins were on the whole IT ninjas and knew their stuff. Well when I talked to one in person and asked they said that yup, it was stupid, but Corporate said they had to do it for liability reasons. Password rotation was one of a number of bullet-point items that would make it appear we were trying to protect our data, which would increase our legal position in the event that it was actually stolen.
The rule is "stop if you can", not "stop if you want to".
Indeed, and the whole point of yellow light timing is to make it so those who can't stop have time to make it through, while those who can stop but just "want" to go through end up running a red.
Since "impossible" relates to "can" not "want", I'm glad we agree that the AC was correct and "get your brakes checked" was a silly response.
Otherwise, you'll get a a ticket for running the yellow.
Don't recall the specifics, but at least one study found that lengthening the yellow light acually reduced accidents more than installing cameras.
Indeed. Which is why when red light cameras came to Austin, they first studied all the 'bad' intersections and decided which should have their yellow light lengthened, and which should get a camera. I looked at a map they published showing which got which treatment, and it seemed like about half of the problem intersections were given longer yellows.
One of the intersections that got a camera I have a lot of personal experience with, and it's yellow was just fine before and unchanged after. The problem was people just flagrantly running the red. Seriously it was ridiculous.
Anyway, while I'm sure there's a contractor making a lot of money off the cameras, it seems to have been implemented fairly intelligently here.
Also, while contracts may stipulate maximum yellows, state laws often dictate minimums. I've heard (on/.) of various municipalities getting in trouble with the state governments for breaking these laws to increase red light camera revenue. Which is disgusting. Okay yeah law is sometimes arbitrary, but this law is fundamentally based on the laws of physics.:P
Good advice in general, but not an answer to the AC's correct statement. Keep thinking.
Hint: There's a reason traffic engineers have to consider the speed limit of the road and typical stopping distances when designing how long a yellow light lasts.
Since the proposed FY2011 NASA budget has about $6B allocated for helping fund the development of these new vehicles.... it sounds like they're going to get exactly what they're asking for. I'm not sure I see what the problem is.
I believe it may be tied to a new way of going about procurement that I heard NASA was planning, though I'm not sure if that's actually part of the new budget but if it was it would explain their concern. Basically, NASA would be only paying for results, like you provide a working rocket capable of lifting X lbs, they give you a contract for $BIGNUM. As opposed to now where they provide you with $PRETTYBIGNUM for claiming to be able to deliver the most for the least, only then five years later they say that wasn't enough and they now need $HUGENUM to finish it, and gee you wouldn't want to have wasted $PRETTYBIGNUM and have nothing to show for it, would you?
I'm sure there's still up-front money to be handed out for the R&D and such, but the point is, it's a complete up-ending of all the defense contractors' business models.
Ever watch old kung-fu movies? I find it fascinating the way mortal enemies still have a genuine respect for one another. Each sees that his opponent is skillful and formidable and honors this.
I find it really, really hard to respect the movement when I see town hall meetings stuffed full of elderly people on Medicare screaming about how they'd rather die than have the government provide their healthcare. When the representatives who are actually on their side of the issue end up having to try to correct the audience's misbegotten notions, and fail. Does that count as a good reason not to like them, that their arguments are so bad that even their allies that have a clue end up basically arguing against them?
I'm not saying it's right. Certainly they deserve basic human dignity and I don't wish any ill on anyone. But respect is just hard for me to come by, I'm sorry. The kung-fu fighters respect each other because they see true skill. Deep and enduring respect for a mule's hard-headedness just doesn't fit that mold to me.
Some armed conflicts in real life have been this way; I believe WWI was the last. There used to be the notion that if you lose your honor by engaging in those low-road practices, then the conflict has cost you quite a bit more than even the casualties sustained.
Yeah, that's because they discovered that razor wire, artillery, and machine guns were more effective at stopping the enemy than disrespect. Assuming of course you don't think it's disrespectful to bomb the enemy's trenches with mustard gas. The only time "honor" like you're describing was important in warfare was when a Lord's honor was literally more important than the lives of the conscripts they sacrificed, but then again so was the Lord's trousers.
Oh and on a more comparable level, the propaganda from back then was ridiculously insulting to the enemy. This idea of mutual respect is one I think mostly exists in nostalgia-land.
So, basically this will only increase their time spent playing non-listed games.
Yeah. Think of it as the Unpopular MMO Promotion Act. Encouraging a healthy ecosystem of MMOs, when smaller ones normally have trouble stealing enough subscribers from the big ones to stay afloat. That's it. That's the ticket.
I still now that the 'big bang' was that hominid Lucy getting laid, resulting in the first darwinian instance of 'natural selection' whether the WH admits it or not.
Dude, yeah our education system sucks but where the hell did you go to school?!
If that's all I can get, it's better than a perpetual backslide.
Other than not recreating Apollo, we aren't backsliding. We didn't have anything like the ISS (which thanks to Constellation funds being freed up now has an extended lease on life). We now have multiple private providers of launches coming on line. We have rovers on Mars and more probes and telescopes exploring our solar system and the cosmos than ever before.
Our progress is undeniably disappointing, but we aren't backsliding. As far as I'm concerned the things we're losing all count as steps forward.:P
I want more; I want to see a (small) Martian colony in my lifetime. Not going to happen, but I can dream.
Well if you're going to dream, you should be dreaming in the direction of the new plan because it's the only one with the potential to make that plan a reality. Constellation is not and never would be a stepping stone to a Mars colony. It wasn't even a stepping stone to a Moon colony. Putting bootmarks on the moon and then taking off is all it was going to do.
No, if you want to see a Mars colony, then you need the R&D the new plan is going to do. We'll need large structures and habitats, larger than are economical to lift from Earth in one shot. In-space assembly, check. We'll need, ideally, a lot of materials already built when humans arrive. Automated mineral excavation and factories, check. Well need a way to supply our astronauts on Mars with a steady stream of supplies, meaning we'll need cheaper ways to ship mass from earth to mars. New propulsion systems, check. It goes on.
If you're a dreamer, and dreaming of the future, the kind of future we were thinking of back when landing on the Moon was new, then the new NASA R&D-based plan is exactly what we need.
If you dream only of the past, then Constellation was the program for you.
Why should a change of the page table be needed?
It's not needed if you map your kernel into the application's page tables. ;)
All you need are separate segments for kernel and user mode.
1) Segmentation is essentially non-existent* in 64-bit mode.
2) Segmentation sucks. Always has, always will. That's why even in 32-bit mode most segments are made with base 0 and max limit, and processors are optimized for this case.
3) Okay, so you switch your CS and DS segments when you go into kernel mode (well actually you do anyway, but they're non-base-zero in this case). That's great, but you still need to map your linear address (linear = virtual address + segment base) to a physical address. So you either need to write to CR3 to use the kernel's page table, or you need to map your kernel's memory into the user's page table.
* Ask VmWare about the non-essentially existent remnants of segmentation.
It's not about changing privilege levels, it's about changing address spaces, which is a costly operation in any architecture.
Yeah, shouldn't switch be easily take care of by a base register?
Well it is. On x86 systems, the intuitively named Control Register 3 is a pointer to the base of the page tables. From a software point of view, switching address spaces is as easy as writing CR3.
From a hardware point of view, that act has additional implications. You have to flush the TLBs, which sucks royal if it happens on every system call. If you have linearly tagged caches (or any other linearly tagged structure) then you'll have to flush those too. There are ways to partially mitigate these effects, but since you can't rely on them being there it's best to just avoid CR3 writes as much as possible -- which means there's less reason to implement the necessary widgets.
Besides, the article is actually about NULL pointer dereferences within the kernel, where niceties like language-based exception handling mechanisms are often hard to come by. So the language you write your application code is immaterial.
Also not just any dereference will do, it has to be a function pointer dereference.
And recent kernels have protection against mmap()ing page 0.
However the author has a good point that both NULL function pointer calls in the kernel and hackers getting around the mmap() protection have happened before. So while you can't exactly exploit any Linux system using the procedure he describes (several critical components require you to already have root :P) it does sound like a weakness.
I thought the BigMem kernel patches a few years back put the kernel in it's own VM, with minimal copying into userspace VM space, or am i missing something?
I don't know what that patch did (BigMem implies something like using 2MB pages, but what's in a name?), but I do know that the author is right about address space switches being expensive and not something you'd want to do on every system call, or any system call that is expected to return control to the same process for that matter.
In practice I don't ever see CR3 writes ( CR3 points to the root of the page table, so writing it is how you switch address spaces) in system calls. Though I am not sure exactly what kernel rev or patch level the benchmark traces are taken from. Still, sounds like it's probably right to me.
Alas, here come another problem: science is as applicable to natural phenomena as much as they are recurring. The foundation of science is experiment which by definition of scientific experiment should be repeatable. The natural phenomena that are under science should be repeatable.
More fundamentally, science is about observation. You make observations, construct a hypothesis which makes certain predictions, and then conduct further observations to either confirm or deny the predictions. This doesn't always take the form of a repeatable experiment. Sure if it's chemistry then anyone should be able to duplicate the results. However in geology or astronomy it is perfectly valid to observe an unusual phenomenon only once, and construct a hypothesis that predicts certain other phenomenon, and if you later observe that new phenomenon that's evidence for your hypothesis. All without repeatability.
So even observing each UFO only once, it would be perfectly possible to construct hypothesis based on those solitary observations that allows for future observation to confirm or deny it.
Also, the article in the first link says that the GAO investigation is looking into *all* forms of piracy, other than the Somalian kind of course.
Awesome! I'm going to start up a Somalia-based DVD copying operation, and I'll totally fly under their radar!
They included accidents wherein passengers had alcohol in their systems, even though the drivers were completely sober.
And regardless of which car the person who had been drinking is in.
As in: You're stopped at a red light, passenger in your back seat had a couple drinks, and some douche talking on their cell phone rear-ends you. That counts as an alcohol-related accident.
I wonder if there's some consumer protection laws that states if you buy something legally you have a right to enjoy it. Because right now you're buying a digital copy of something that is encrypted but you're not receiving the license that is required to watch it.
Ha!
When I buy a DVD I'm receiving a digital copy, and the license to watch it, but because there are no players on Linux which themselves have license to decrypt, I'm still breaking the law when I watch DVDs on my computer.
So if you get a copy but with the caveat that they don't want you to watch it unless you pay for the privilege, don't expect the law to help you.
That's exactly why our IT department implemented the password expiry policy some years back. My workplace is stuffed full of enginerds, so when they sent out the email informing us of the change, of course they got back tons of emails explaining all the reasons discussed here why it was a stupid idea. They politely dodged all questions while insisting that the policy was going through. I thought this was all kinda weird, since our sysadmins were on the whole IT ninjas and knew their stuff. Well when I talked to one in person and asked they said that yup, it was stupid, but Corporate said they had to do it for liability reasons. Password rotation was one of a number of bullet-point items that would make it appear we were trying to protect our data, which would increase our legal position in the event that it was actually stolen.
The rule is "stop if you can", not "stop if you want to".
Indeed, and the whole point of yellow light timing is to make it so those who can't stop have time to make it through, while those who can stop but just "want" to go through end up running a red.
Since "impossible" relates to "can" not "want", I'm glad we agree that the AC was correct and "get your brakes checked" was a silly response.
Otherwise, you'll get a a ticket for running the yellow.
Where do you live that this actually happens?
I doubt that the goal is just to subsidize whoever might be behind.
No kidding.
Every body knows masturbation leads to blindness, so, now, she's gonna push these people even further.
Who knows, maybe it wraps around and they'll be able to see again!
Don't recall the specifics, but at least one study found that lengthening the yellow light acually reduced accidents more than installing cameras.
Indeed. Which is why when red light cameras came to Austin, they first studied all the 'bad' intersections and decided which should have their yellow light lengthened, and which should get a camera. I looked at a map they published showing which got which treatment, and it seemed like about half of the problem intersections were given longer yellows.
One of the intersections that got a camera I have a lot of personal experience with, and it's yellow was just fine before and unchanged after. The problem was people just flagrantly running the red. Seriously it was ridiculous.
Anyway, while I'm sure there's a contractor making a lot of money off the cameras, it seems to have been implemented fairly intelligently here.
Also, while contracts may stipulate maximum yellows, state laws often dictate minimums. I've heard (on /.) of various municipalities getting in trouble with the state governments for breaking these laws to increase red light camera revenue. Which is disgusting. Okay yeah law is sometimes arbitrary, but this law is fundamentally based on the laws of physics. :P
You should get your brakes checked.
Good advice in general, but not an answer to the AC's correct statement. Keep thinking.
Hint: There's a reason traffic engineers have to consider the speed limit of the road and typical stopping distances when designing how long a yellow light lasts.
Hint^2: "stopping distance".
Since the proposed FY2011 NASA budget has about $6B allocated for helping fund the development of these new vehicles.... it sounds like they're going to get exactly what they're asking for. I'm not sure I see what the problem is.
I believe it may be tied to a new way of going about procurement that I heard NASA was planning, though I'm not sure if that's actually part of the new budget but if it was it would explain their concern. Basically, NASA would be only paying for results, like you provide a working rocket capable of lifting X lbs, they give you a contract for $BIGNUM. As opposed to now where they provide you with $PRETTYBIGNUM for claiming to be able to deliver the most for the least, only then five years later they say that wasn't enough and they now need $HUGENUM to finish it, and gee you wouldn't want to have wasted $PRETTYBIGNUM and have nothing to show for it, would you?
I'm sure there's still up-front money to be handed out for the R&D and such, but the point is, it's a complete up-ending of all the defense contractors' business models.
Ever watch old kung-fu movies? I find it fascinating the way mortal enemies still have a genuine respect for one another. Each sees that his opponent is skillful and formidable and honors this.
I find it really, really hard to respect the movement when I see town hall meetings stuffed full of elderly people on Medicare screaming about how they'd rather die than have the government provide their healthcare. When the representatives who are actually on their side of the issue end up having to try to correct the audience's misbegotten notions, and fail. Does that count as a good reason not to like them, that their arguments are so bad that even their allies that have a clue end up basically arguing against them?
I'm not saying it's right. Certainly they deserve basic human dignity and I don't wish any ill on anyone. But respect is just hard for me to come by, I'm sorry. The kung-fu fighters respect each other because they see true skill. Deep and enduring respect for a mule's hard-headedness just doesn't fit that mold to me.
Some armed conflicts in real life have been this way; I believe WWI was the last. There used to be the notion that if you lose your honor by engaging in those low-road practices, then the conflict has cost you quite a bit more than even the casualties sustained.
Yeah, that's because they discovered that razor wire, artillery, and machine guns were more effective at stopping the enemy than disrespect. Assuming of course you don't think it's disrespectful to bomb the enemy's trenches with mustard gas. The only time "honor" like you're describing was important in warfare was when a Lord's honor was literally more important than the lives of the conscripts they sacrificed, but then again so was the Lord's trousers.
Oh and on a more comparable level, the propaganda from back then was ridiculously insulting to the enemy. This idea of mutual respect is one I think mostly exists in nostalgia-land.
So, basically this will only increase their time spent playing non-listed games.
Yeah. Think of it as the Unpopular MMO Promotion Act. Encouraging a healthy ecosystem of MMOs, when smaller ones normally have trouble stealing enough subscribers from the big ones to stay afloat. That's it. That's the ticket.
Fuck Everything, We're Doing Five Boobs.
I fail to see how any of those movies "look half done."
Really?
The Gilliam movies I've seen are Time Bandidts,
They didn't even hire a real minotaur! And the only reason it starred midgets is because actors were paid by the foot back then.
Twelve Monkeys
Yeah someone really dropped the ball in the animal department. I think there was, at most, one monkey in this movie. This one wasn't even half done!
and Brazil
And there's even less Brazil in Brazil than there were monkeys in Twelve Monkeys.
What a hack!
Nice try, but I'm not getting suckered into RTFA that easily!
I still now that the 'big bang' was that hominid Lucy getting laid, resulting in the first darwinian instance of 'natural selection' whether the WH admits it or not.
Dude, yeah our education system sucks but where the hell did you go to school?!
Her name was Henrieta.
OMG, how come it's always the BROWN dwarves that scare people so much, and nobody ever seems to worry about the white ones?
*Alex brown shakes his fist at MS* "Curse your sudden but inevitable betrayal!"
If that's all I can get, it's better than a perpetual backslide.
Other than not recreating Apollo, we aren't backsliding. We didn't have anything like the ISS (which thanks to Constellation funds being freed up now has an extended lease on life). We now have multiple private providers of launches coming on line. We have rovers on Mars and more probes and telescopes exploring our solar system and the cosmos than ever before.
Our progress is undeniably disappointing, but we aren't backsliding. As far as I'm concerned the things we're losing all count as steps forward. :P
I want more; I want to see a (small) Martian colony in my lifetime. Not going to happen, but I can dream.
Well if you're going to dream, you should be dreaming in the direction of the new plan because it's the only one with the potential to make that plan a reality. Constellation is not and never would be a stepping stone to a Mars colony. It wasn't even a stepping stone to a Moon colony. Putting bootmarks on the moon and then taking off is all it was going to do.
No, if you want to see a Mars colony, then you need the R&D the new plan is going to do. We'll need large structures and habitats, larger than are economical to lift from Earth in one shot. In-space assembly, check. We'll need, ideally, a lot of materials already built when humans arrive. Automated mineral excavation and factories, check. Well need a way to supply our astronauts on Mars with a steady stream of supplies, meaning we'll need cheaper ways to ship mass from earth to mars. New propulsion systems, check. It goes on.
If you're a dreamer, and dreaming of the future, the kind of future we were thinking of back when landing on the Moon was new, then the new NASA R&D-based plan is exactly what we need.
If you dream only of the past, then Constellation was the program for you.
Me, I dream of the future.