linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Aleksa Sarai' <cyphar@cyphar.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@kernel.org>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Shuah Khan <shuah@kernel.org>,
	"Christian Brauner" <christian.brauner@ubuntu.com>,
	"dev@opencontainers.org" <dev@opencontainers.org>,
	"containers@lists.linux-foundation.org" 
	<containers@lists.linux-foundation.org>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: RE: [PATCH 1/2] uapi: split openat2(2) definitions from fcntl.h
Date: Fri, 20 Dec 2019 10:18:23 +0000	[thread overview]
Message-ID: <85251686ad074be18db926f903497a45@AcuMS.aculab.com> (raw)
In-Reply-To: <20191220093153.v7jpzvch3lohabll@yavin.dot.cyphar.com>

From: Aleksa Sarai
> Sent: 20 December 2019 09:32
...
> > I'm guessing that is just 64bit aligned on 32bit archs like x86?
> 
> Yeah,
> 
> #define __aligned_u64 __u64 __attribute__((aligned(8)))
> 
> > No need to enforce it provided the structure will have no padding on
> > archs where the 64bit fields are 64bit aligned. A plain __u64 should
> > be fine.
> 
> Will this cause problems for x86-on-x86_64 emulation? Requiring an
> 8-byte alignment for 'struct open_how' really isn't that undue of a
> burden IMHO. Then again, clone3 is a bit of an outlier since both
> perf_event_open and sched_setattr just use __u64s.

Makes diddly-squit difference.
The 64bit kernel will 64bit align the structure.
The kernel must allow for the userspace structure having arbitrary alignment.
So there is no reason to (try to) align the user structure.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2019-12-20 10:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 10:55 [PATCH 0/2] openat2: minor uapi cleanups Aleksa Sarai
2019-12-19 10:55 ` [PATCH 1/2] uapi: split openat2(2) definitions from fcntl.h Aleksa Sarai
2019-12-19 11:07   ` Florian Weimer
2019-12-19 13:45     ` Aleksa Sarai
2019-12-19 14:05       ` David Laight
2019-12-20  9:31         ` Aleksa Sarai
2019-12-20 10:18           ` David Laight [this message]
2019-12-19 10:55 ` [PATCH 2/2] openat2: drop open_how->__padding field Aleksa Sarai
2019-12-19 11:18   ` Christian Brauner
2019-12-19 10:55 ` [PATCH 0/2] openat2: minor uapi cleanups Aleksa Sarai
2019-12-19 10:55 ` [PATCH 1/2] uapi: split openat2(2) definitions from fcntl.h Aleksa Sarai
2019-12-19 10:55 ` [PATCH 2/2] openat2: drop open_how->__padding field Aleksa Sarai
2019-12-19 11:19 ` [PATCH 0/2] openat2: minor uapi cleanups Christian Brauner
2019-12-19 13:41   ` Aleksa Sarai

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=85251686ad074be18db926f903497a45@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=bfields@fieldses.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=cyphar@cyphar.com \
    --cc=dev@opencontainers.org \
    --cc=fweimer@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).