flat assembler
Message board for the users of flat assembler.

Index > Linux > Linux ABI stack alignment

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20361
Location: In your JS exploiting you and your system
revolution 14 Apr 2017, 15:50
fasmnewbie wrote:
Many parts of Linux kernel is still undocumented too. But still people have such great confidence in its consistency. One example is sys_brk / sbrk. It is not explicitly stated in the man whether it will be aligned to a page boundary or not, but it is. Now should we re-align the returned pointer to some aligned address just because it's not documented or we are applying 'defensive programming'?
Sure, why not? It's no big deal. Alignment is easy and fast, why eschew it?

Don't rely on undocumented behaviour unless you know you will never run your code on any other versions, ever; or if you know that you can update your code also when in the future something changes.
Post 14 Apr 2017, 15:50
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 555
fasmnewbie 14 Apr 2017, 15:54
revolution wrote:
or if you know that you can update your code also when in the future something changes.


Now you're accusing Linux future changes are not backward-compatible as well!

Do you hate Linux that much? :p
Post 14 Apr 2017, 15:54
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20361
Location: In your JS exploiting you and your system
revolution 14 Apr 2017, 15:59
fasmnewbie wrote:
Now you're accusing Linux future changes are not backward-compatible as well!
Question
fasmnewbie wrote:
Do you hate Linux that much? :p
Apparently I do. Rolling Eyes
Post 14 Apr 2017, 15:59
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.