Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436585
| From | "H. Peter Anvin" <hpa@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Syscall arguments are unsigned long (full registers) |
| Date | 2016-07-04 22:30 +0200 |
| Message-ID | <rRiFb-1L6-11@gated-at.bofh.it> (permalink) |
| References | <rRczL-6hG-9@gated-at.bofh.it> <rRgN3-yZ-9@gated-at.bofh.it> <rRivv-1HR-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On July 4, 2016 1:13:21 PM PDT, "Tautschnig, Michael" <tautschn@amazon.co.uk> wrote: > >> On 4 Jul 2016, at 20:27, H. Peter Anvin <hpa@zytor.com> wrote: >> >> On July 4, 2016 6:52:58 AM PDT, "Tautschnig, Michael" ><tautschn@amazon.co.uk> wrote: >>> All syscall arguments are passed in as types of the same byte size >as >>> unsigned long (width of full registers). Using a smaller type >without a >>> cast may result in losing bits of information. In all other >instances >>> apart from the ones fixed by the patch the code explicitly >introduces >>> type casts (using, e.g., SYSCALL_DEFINE1). >>> >>> While goto-cc reported these problems at build time, it is >noteworthy >>> that the calling conventions specified in the System V AMD64 ABI do >>> ensure that parameters 1-6 are passed via registers, thus there is >no >>> implied risk of misaligned stack access. >>> >>> >[...] >> >> Wrong. Syscall arguments aren't necessarily full registers, and on >x86 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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] Syscall arguments are unsigned long (full registers) "H. Peter Anvin" <hpa@zytor.com> - 2016-07-04 20:30 +0200
Re: [PATCH] Syscall arguments are unsigned long (full registers) "Tautschnig, Michael" <tautschn@amazon.co.uk> - 2016-07-04 22:20 +0200
Re: [PATCH] Syscall arguments are unsigned long (full registers) "H. Peter Anvin" <hpa@zytor.com> - 2016-07-04 22:30 +0200
csiph-web