Re: [PATCH] Syscall arguments are unsigned long (full registers)
From: H. Peter Anvin <hidden>
Date: 2016-07-04 20:24:39
Also in:
lkml
On July 4, 2016 1:13:21 PM PDT, "Tautschnig, Michael" [off-list ref] wrote:
quoted
On 4 Jul 2016, at 20:27, H. Peter Anvin [off-list ref] wrote: On July 4, 2016 6:52:58 AM PDT, "Tautschnig, Michael"[off-list ref] wrote:quoted
quoted
All syscall arguments are passed in as types of the same byte sizeasquoted
quoted
unsigned long (width of full registers). Using a smaller typewithout aquoted
quoted
cast may result in losing bits of information. In all otherinstancesquoted
quoted
apart from the ones fixed by the patch the code explicitlyintroducesquoted
quoted
type casts (using, e.g., SYSCALL_DEFINE1). While goto-cc reported these problems at build time, it isnoteworthyquoted
quoted
that the calling conventions specified in the System V AMD64 ABI do ensure that parameters 1-6 are passed via registers, thus there isnoquoted
quoted
implied risk of misaligned stack access.[...]quoted
Wrong. Syscall arguments aren't necessarily full registers, and onx86 truncation is already done by the callee, so we don't need any special handing. Some other architectures have other constraints. Ok - I'm assuming I have thus misunderstood eb974c62565072e10c1422eb3205f5b611dd99a1 ? Supposedly all those SYSCALL_DEFINEx are required for other architectures only? Best, Michael
That, and tracing. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.