lkml.org 
[lkml]   [2021]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tools/nolibc: x86: Remove `r8`, `r9` and `r10` from the clobber list
On Wed, Oct 13, 2021 at 05:23:11AM +0700, Ammar Faizi wrote:
> "Figure 3.4: Register Usage" is not the answer, if it were, nolibc.h
> would be broken as it is missing "rdi", "rsi", "rdx" in the clobber list.

It is not about what happens in practice but what the contract is:
syscall argument registers can potentially get clobbered and userspace
should treat them as such. Because if the kernel decides to actually
clobber them for whatever reason and some userspace thing thinks
otherwise, then it is the userspace thing's problem as it doesn't adhere
to the well known ABI.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-10-13 14:44    [W:0.054 / U:2.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site