From: "H. Peter Anvin" <hpa@zytor.com>
To: "Tautschnig, Michael" <tautschn@amazon.co.uk>
Cc: "x86@kernel.org" <x86@kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Jaswinder Singh <jaswinder@infradead.org>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] Syscall arguments are unsigned long (full registers)
Date: Mon, 04 Jul 2016 13:23:58 -0700 [thread overview]
Message-ID: <C76180AF-6FEA-4AA4-9324-439A3456FBB0@zytor.com> (raw)
In-Reply-To: <C9F705AD-41A0-48CF-8A3E-507C12EB5D0E@amazon.com>
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.
prev parent reply other threads:[~2016-07-04 20:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 13:52 Tautschnig, Michael
2016-07-04 14:28 ` Andi Kleen
2016-07-04 14:47 ` Tautschnig, Michael
2016-07-04 14:59 ` Arnd Bergmann
2016-07-04 15:13 ` Tautschnig, Michael
2016-07-04 18:27 ` H. Peter Anvin
2016-07-04 20:13 ` Tautschnig, Michael
2016-07-04 20:23 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C76180AF-6FEA-4AA4-9324-439A3456FBB0@zytor.com \
--to=hpa@zytor.com \
--cc=ak@linux.intel.com \
--cc=jaswinder@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tautschn@amazon.co.uk \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®