Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2014 16:13:09 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Chagin Dmitry <dchagin@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-user@freebsd.org
Subject:   Re: svn commit: r265187 - in user/dchagin/lemul/sys: amd64/linux amd64/linux32 compat/linux i386/linux
Message-ID:  <844C08D2-4660-456A-9DCE-62A47A411688@bsdimp.com>
In-Reply-To: <20140501162640.GA19112@dchagin.static.corbina.net>
References:  <201405011402.s41E2lnv074130@svn.freebsd.org> <559801B7-3515-44C1-ABF4-2ED6D7F1A4F4@gmail.com> <20140501162640.GA19112@dchagin.static.corbina.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_9D7C383C-13FA-4844-92AD-A45609A3D9CB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


On May 1, 2014, at 10:26 AM, Chagin Dmitry <dchagin@freebsd.org> wrote:

> On Thu, May 01, 2014 at 09:17:45AM -0600, Warner Losh wrote:
>> Re this and the signals changes: Are you sure that these values are =
identical on all linux ABIs? Last time I checked, there was substantial =
variation between arm, x86 and mips for these values.
>>=20
>=20
> They are all different. I know. We emulate only x86, not arm or mips. =
So what the reason to case about this platform?

The structure of the code is such that the other platforms can be added =
later. These changes make that harder than necessary when you could have =
move them to sys/x86 instead of making them fully MI.

Anyway, just my humble feedback. I suspect we=92ll get demand to support =
linux/arm64 binaries about this time next year based on the trajectories =
of the arm64 roll out...

Warner

>=20
>> Warner
>>=20
>> On May 1, 2014, at 8:02 AM, Dmitry Chagin <dchagin@FreeBSD.org> =
wrote:
>>=20
>>> Author: dchagin
>>> Date: Thu May  1 14:02:47 2014
>>> New Revision: 265187
>>> URL: http://svnweb.freebsd.org/changeset/base/265187
>>>=20
>>> Log:
>>> To avoid code duplication move MI open/fcntl definitions to the MI
>>> header file.
>>>=20
>>> Modified:
>>> user/dchagin/lemul/sys/amd64/linux/linux.h
>>> user/dchagin/lemul/sys/amd64/linux32/linux.h
>>> user/dchagin/lemul/sys/compat/linux/linux_file.h
>>> user/dchagin/lemul/sys/compat/linux/linux_socket.c
>>> user/dchagin/lemul/sys/i386/linux/linux.h
>>>=20
>>> Modified: user/dchagin/lemul/sys/amd64/linux/linux.h
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>> --- user/dchagin/lemul/sys/amd64/linux/linux.h	Thu May  1 =
14:01:45 2014	(r265186)
>>> +++ user/dchagin/lemul/sys/amd64/linux/linux.h	Thu May  1 =
14:02:47 2014	(r265187)
>>> @@ -353,44 +353,6 @@ struct l_rt_sigframe {
>>> };
>>>=20
>>> /*
>>> - * open/fcntl flags
>>> - */
>>> -#define	LINUX_O_RDONLY		00000000
>>> -#define	LINUX_O_WRONLY		00000001
>>> -#define	LINUX_O_RDWR		00000002
>>> -#define	LINUX_O_ACCMODE		00000003
>>> -#define	LINUX_O_CREAT		00000100
>>> -#define	LINUX_O_EXCL		00000200
>>> -#define	LINUX_O_NOCTTY		00000400
>>> -#define	LINUX_O_TRUNC		00001000
>>> -#define	LINUX_O_APPEND		00002000
>>> -#define	LINUX_O_NONBLOCK	00004000
>>> -#define	LINUX_O_NDELAY		LINUX_O_NONBLOCK
>>> -#define	LINUX_O_SYNC		00010000
>>> -#define	LINUX_FASYNC		00020000
>>> -#define	LINUX_O_DIRECT		00040000	/* Direct disk =
access hint */
>>> -#define	LINUX_O_LARGEFILE	00100000
>>> -#define	LINUX_O_DIRECTORY	00200000	/* Must be a =
directory */
>>> -#define	LINUX_O_NOFOLLOW	00400000	/* Do not follow =
links */
>>> -#define	LINUX_O_NOATIME		01000000
>>> -#define	LINUX_O_CLOEXEC		02000000
>>> -
>>> -#define	LINUX_F_DUPFD		0
>>> -#define	LINUX_F_GETFD		1
>>> -#define	LINUX_F_SETFD		2
>>> -#define	LINUX_F_GETFL		3
>>> -#define	LINUX_F_SETFL		4
>>> -#define	LINUX_F_GETLK		5
>>> -#define	LINUX_F_SETLK		6
>>> -#define	LINUX_F_SETLKW		7
>>> -#define	LINUX_F_SETOWN		8
>>> -#define	LINUX_F_GETOWN		9
>>> -
>>> -#define	LINUX_F_RDLCK		0
>>> -#define	LINUX_F_WRLCK		1
>>> -#define	LINUX_F_UNLCK		2
>>> -
>>> -/*
>>> * mount flags
>>> */
>>> #define	LINUX_MS_RDONLY		0x0001
>>>=20
>>> Modified: user/dchagin/lemul/sys/amd64/linux32/linux.h
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>> --- user/dchagin/lemul/sys/amd64/linux32/linux.h	Thu May  1 =
14:01:45 2014	(r265186)
>>> +++ user/dchagin/lemul/sys/amd64/linux32/linux.h	Thu May  1 =
14:02:47 2014	(r265187)
>>> @@ -468,47 +468,12 @@ struct l_rt_sigframe {
>>> } __packed;
>>>=20
>>> /*
>>> - * open/fcntl flags
>>> + * arch specific open/fcntl flags
>>> */
>>> -#define	LINUX_O_RDONLY		00000000
>>> -#define	LINUX_O_WRONLY		00000001
>>> -#define	LINUX_O_RDWR		00000002
>>> -#define	LINUX_O_ACCMODE		00000003
>>> -#define	LINUX_O_CREAT		00000100
>>> -#define	LINUX_O_EXCL		00000200
>>> -#define	LINUX_O_NOCTTY		00000400
>>> -#define	LINUX_O_TRUNC		00001000
>>> -#define	LINUX_O_APPEND		00002000
>>> -#define	LINUX_O_NONBLOCK	00004000
>>> -#define	LINUX_O_NDELAY		LINUX_O_NONBLOCK
>>> -#define	LINUX_O_SYNC		00010000
>>> -#define	LINUX_FASYNC		00020000
>>> -#define	LINUX_O_DIRECT		00040000	/* Direct disk =
access hint */
>>> -#define	LINUX_O_LARGEFILE	00100000
>>> -#define	LINUX_O_DIRECTORY	00200000	/* Must be a =
directory */
>>> -#define	LINUX_O_NOFOLLOW	00400000	/* Do not follow =
links */
>>> -#define	LINUX_O_NOATIME		01000000
>>> -#define	LINUX_O_CLOEXEC		02000000
>>> -
>>> -#define	LINUX_F_DUPFD		0
>>> -#define	LINUX_F_GETFD		1
>>> -#define	LINUX_F_SETFD		2
>>> -#define	LINUX_F_GETFL		3
>>> -#define	LINUX_F_SETFL		4
>>> -#define	LINUX_F_GETLK		5
>>> -#define	LINUX_F_SETLK		6
>>> -#define	LINUX_F_SETLKW		7
>>> -#define	LINUX_F_SETOWN		8
>>> -#define	LINUX_F_GETOWN		9
>>> -
>>> #define	LINUX_F_GETLK64		12
>>> #define	LINUX_F_SETLK64		13
>>> #define	LINUX_F_SETLKW64	14
>>>=20
>>> -#define	LINUX_F_RDLCK		0
>>> -#define	LINUX_F_WRLCK		1
>>> -#define	LINUX_F_UNLCK		2
>>> -
>>> union l_semun {
>>> 	l_int		val;
>>> 	l_uintptr_t	buf;
>>>=20
>>> Modified: user/dchagin/lemul/sys/compat/linux/linux_file.h
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>> --- user/dchagin/lemul/sys/compat/linux/linux_file.h	Thu May  =
1 14:01:45 2014	(r265186)
>>> +++ user/dchagin/lemul/sys/compat/linux/linux_file.h	Thu May  =
1 14:02:47 2014	(r265187)
>>> @@ -54,4 +54,42 @@
>>> #define	LINUX_MS_NOEXEC		0x0008
>>> #define	LINUX_MS_REMOUNT	0x0020
>>>=20
>>> +/*
>>> + * common open/fcntl flags
>>> + */
>>> +#define	LINUX_O_RDONLY		00000000
>>> +#define	LINUX_O_WRONLY		00000001
>>> +#define	LINUX_O_RDWR		00000002
>>> +#define	LINUX_O_ACCMODE		00000003
>>> +#define	LINUX_O_CREAT		00000100
>>> +#define	LINUX_O_EXCL		00000200
>>> +#define	LINUX_O_NOCTTY		00000400
>>> +#define	LINUX_O_TRUNC		00001000
>>> +#define	LINUX_O_APPEND		00002000
>>> +#define	LINUX_O_NONBLOCK	00004000
>>> +#define	LINUX_O_NDELAY		LINUX_O_NONBLOCK
>>> +#define	LINUX_O_SYNC		00010000
>>> +#define	LINUX_FASYNC		00020000
>>> +#define	LINUX_O_DIRECT		00040000	/* Direct disk =
access hint */
>>> +#define	LINUX_O_LARGEFILE	00100000
>>> +#define	LINUX_O_DIRECTORY	00200000	/* Must be a =
directory */
>>> +#define	LINUX_O_NOFOLLOW	00400000	/* Do not follow =
links */
>>> +#define	LINUX_O_NOATIME		01000000
>>> +#define	LINUX_O_CLOEXEC		02000000
>>> +
>>> +#define	LINUX_F_DUPFD		0
>>> +#define	LINUX_F_GETFD		1
>>> +#define	LINUX_F_SETFD		2
>>> +#define	LINUX_F_GETFL		3
>>> +#define	LINUX_F_SETFL		4
>>> +#define	LINUX_F_GETLK		5
>>> +#define	LINUX_F_SETLK		6
>>> +#define	LINUX_F_SETLKW		7
>>> +#define	LINUX_F_SETOWN		8
>>> +#define	LINUX_F_GETOWN		9
>>> +
>>> +#define	LINUX_F_RDLCK		0
>>> +#define	LINUX_F_WRLCK		1
>>> +#define	LINUX_F_UNLCK		2
>>> +
>>> #endif	/* !_LINUX_FILE_H_ */
>>>=20
>>> Modified: user/dchagin/lemul/sys/compat/linux/linux_socket.c
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>> --- user/dchagin/lemul/sys/compat/linux/linux_socket.c	Thu May  =
1 14:01:45 2014	(r265186)
>>> +++ user/dchagin/lemul/sys/compat/linux/linux_socket.c	Thu May  =
1 14:02:47 2014	(r265187)
>>> @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
>>> #include <machine/../linux/linux.h>
>>> #include <machine/../linux/linux_proto.h>
>>> #endif
>>> +#include <compat/linux/linux_file.h>
>>> #include <compat/linux/linux_socket.h>
>>> #include <compat/linux/linux_util.h>
>>>=20
>>>=20
>>> Modified: user/dchagin/lemul/sys/i386/linux/linux.h
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>> --- user/dchagin/lemul/sys/i386/linux/linux.h	Thu May  1 =
14:01:45 2014	(r265186)
>>> +++ user/dchagin/lemul/sys/i386/linux/linux.h	Thu May  1 =
14:02:47 2014	(r265187)
>>> @@ -445,47 +445,12 @@ struct l_rt_sigframe {
>>> extern struct sysentvec linux_sysvec;
>>>=20
>>> /*
>>> - * open/fcntl flags
>>> + * arch specific open/fcntl flags
>>> */
>>> -#define	LINUX_O_RDONLY		00000000
>>> -#define	LINUX_O_WRONLY		00000001
>>> -#define	LINUX_O_RDWR		00000002
>>> -#define	LINUX_O_ACCMODE		00000003
>>> -#define	LINUX_O_CREAT		00000100
>>> -#define	LINUX_O_EXCL		00000200
>>> -#define	LINUX_O_NOCTTY		00000400
>>> -#define	LINUX_O_TRUNC		00001000
>>> -#define	LINUX_O_APPEND		00002000
>>> -#define	LINUX_O_NONBLOCK	00004000
>>> -#define	LINUX_O_NDELAY		LINUX_O_NONBLOCK
>>> -#define	LINUX_O_SYNC		00010000
>>> -#define	LINUX_FASYNC		00020000
>>> -#define	LINUX_O_DIRECT		00040000	/* Direct disk =
access hint */
>>> -#define	LINUX_O_LARGEFILE	00100000
>>> -#define	LINUX_O_DIRECTORY	00200000	/* Must be a =
directory */
>>> -#define	LINUX_O_NOFOLLOW	00400000	/* Do not follow =
links */
>>> -#define	LINUX_O_NOATIME		01000000
>>> -#define	LINUX_O_CLOEXEC		02000000
>>> -
>>> -#define	LINUX_F_DUPFD		0
>>> -#define	LINUX_F_GETFD		1
>>> -#define	LINUX_F_SETFD		2
>>> -#define	LINUX_F_GETFL		3
>>> -#define	LINUX_F_SETFL		4
>>> -#define	LINUX_F_GETLK		5
>>> -#define	LINUX_F_SETLK		6
>>> -#define	LINUX_F_SETLKW		7
>>> -#define	LINUX_F_SETOWN		8
>>> -#define	LINUX_F_GETOWN		9
>>> -
>>> #define	LINUX_F_GETLK64		12
>>> #define	LINUX_F_SETLK64		13
>>> #define	LINUX_F_SETLKW64	14
>>>=20
>>> -#define	LINUX_F_RDLCK		0
>>> -#define	LINUX_F_WRLCK		1
>>> -#define	LINUX_F_UNLCK		2
>>> -
>>> union l_semun {
>>> 	l_int		val;
>>> 	struct l_semid_ds	*buf;
>>>=20
>>=20
>=20
> --=20
> Have fun!
> chd


--Apple-Mail=_9D7C383C-13FA-4844-92AD-A45609A3D9CB
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTYsb1AAoJEGwc0Sh9sBEAw9IP/0r9wKde3Qyacz9tnzxDWen2
q1/LONW6FqFqmZ2gwv0qg3C4JOvF4Q5L5KKdY5BmPtYpIKtOIBBD2jsMunNjzyl5
bTfjN8Y23rU/PUpgcLbXxfLH+6b236YNof0aoknwK8Slo8GcnYgzQSdcPNiOoOXa
Y6CpAqGkk46BVaJNy9w8cs2VwIWIjk3ws8pM2t5ASzEN55Vc25tYSMTszdpxQsHl
FWJg/Nxel/7ryqNmZfWFE9rnWR/cTFYsw9jY8Sc/skzb4CkK87mWCzkiuYFgh8iB
wArCW1mbDeUjzcORk1h+mPLHfa0ELXVsm5azj/YPhPH/fqnaYJdbQjuX3kuLjCBP
X71ZzXabm2CynItfsZZAArCvy+tBvffbpa1IE3pL7Lla1NqEdtzAO2yNZSFun40x
xWMqfxuwDssYvGk1j4jmP/YjVilHMPXdc7QheE1+oSBoIYMGREC9nFCwe/yxi1km
0WqkbHnc3137bzTnnzBeNj4QG+IMiHXKFfRXH5wfwG3pHTIHXjwRnYnejcRFXlmo
QEvW6Y4az09k65TKIKjpfbRG8zldE0p2M1ydXsJYqhXyyAIuKvBiqMrTKp7mK7FJ
YFKOtzbUl7HcSFXZWULwTPQeRnt6lbkY8gDvKDdr2Ef05lVMd8mjp3TgRA7jBA5Z
CuuPqwcGXRVvdq4J7zT+
=k9QT
-----END PGP SIGNATURE-----

--Apple-Mail=_9D7C383C-13FA-4844-92AD-A45609A3D9CB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?844C08D2-4660-456A-9DCE-62A47A411688>