Earlier quoted context omitted.
Well, doing terrible things is sometimes necessary to perform magic or to get a better understanding about how things work. From the less flamey parts of the discussion, I gather his ideas weren't all that unsound, just extremely hard to pull off.
Generally speaking if you have to do terrible things then you need to a: know exactly what you are doing before hand and b: have the fortitude to be able to withstand harsh criticism until you can prove your code. In this case I think the harsh criticism was fully justified. People should be warned away from doing this sort of thing, precisely because it's hard to get right. As the thread makes abundantly clear the o…
Your code should be taken out back, lined up against a wall, and machine-gunned
71–76 of 76 posts
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#72Earlier quoted context omitted.
Read item 1 under 2.3.3 Stack Implementation in the Intel 80386 Reference Programmer's Manual. http://pdos.csail.mit.edu/6.828/2006/readings/i386/s02_03.ht...
The stack segment descriptor virtually never changes in userland protected mode code. You're not "asking for trouble" by not fucking with it. It's also not simply a pointer, unlike EBP with frame pointers. And it's called SS, not "ESS", and it's implied in stack operations.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#73Earlier quoted context omitted.
The stack segment descriptor virtually never changes in userland protected mode code. You're not "asking for trouble" by not fucking with it. It's also not simply a pointer, unlike EBP with frame pointers. And it's called SS, not "ESS", and it's implied in stack operations.
Read 2.3.2 Segment Registers.
And while you're at it: have you ever written code that switched stacks? You might have had to if you wrote a userland threading library, or if you wrote an exception handling system, or a coroutine library. This stuff you're critiquing this guy on the Cygwin list about: are you an expert?
I saw your Reddit comments; I believe you're a competent WinAPI C programmer. What I want to know is, do you actually know assembly? Or just have a lot of opinions about it?
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#74Earlier quoted context omitted.
Read 2.3.2 Segment Registers.
Have you ever changed a segment register in userland code? Tell me about the code that did it and why. And while you're at it: have you ever written code that switched stacks? You might have had to if you wrote a userland threading library, or if you wrote an exception handling system, or a coroutine library. This stuff you're critiquing this guy on the Cygwin list about: are you an expert? I saw your Reddit comments…
You can insist until your face turns blue that you've never seen a stack segment register changed. The fact remains the Intel standard reference states that the stack segment register can be changed and is used in stack operations. The difference between you and me is that I code defensively to handle the published standard contract so as not to worry about some corner cases coming up in some compiler implementation while you ignore the published standard and base decision solely on what you have seen. That's fine, to each their own. I just find the cavalier attitude surprising coming from a supposed security expert.
It's obvious that you don't have anything constructive to say and arguing purely for argument sake. That's the end of this discussion.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#75Earlier quoted context omitted.
Have you ever changed a segment register in userland code? Tell me about the code that did it and why. And while you're at it: have you ever written code that switched stacks? You might have had to if you wrote a userland threading library, or if you wrote an exception handling system, or a coroutine library. This stuff you're critiquing this guy on the Cygwin list about: are you an expert? I saw your Reddit comments…
Yes, I had, in both user mode or kernel mode codes. Where do you think I got the idea about stack segment register? I don't need to prove how awesome an expert I am, unlike someone. My comments remain as they stand. You can insist until your face turns blue that you've never seen a stack segment register changed. The fact remains the Intel standard reference states that the stack segment register can be changed and i…
I'm convinced you can code, but I'm equally convinced that you had no business berating someone else for asking questions about how Cygwin handles its stack, because you don't know either. Don't pile on to people.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#76Earlier quoted context omitted.
Yes, I had, in both user mode or kernel mode codes. Where do you think I got the idea about stack segment register? I don't need to prove how awesome an expert I am, unlike someone. My comments remain as they stand. You can insist until your face turns blue that you've never seen a stack segment register changed. The fact remains the Intel standard reference states that the stack segment register can be changed and i…
I asked if you'd ever changed a segment selector in userland code and why. You said "yes", didn't say why, blew smoke about how "Intel says its possible to change them!" (no shit?), said changing the stack segment selector is "defensive coding" (again: userland code practically disables segment addressing, except for conveniences like the TEB at GS), made reference to a "published standard", and then called me a "sup…
For someone who failed reading comprehension repeatedly, you make a bad troll.