From 1a6566094d3097f4a3037ab5555cddc6cb11c3a3 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 14 Sep 2019 18:22:52 +0200 Subject: alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986] On alpha, Linux kernel 5.1 added the standard getegid, geteuid and getppid syscalls (commit ecf7e0a4ad15287). Up to now alpha was using the corresponding OSF1 syscalls through: - sysdeps/unix/alpha/getegid.S - sysdeps/unix/alpha/geteuid.S - sysdeps/unix/alpha/getppid.S When building against kernel headers >= 5.1, the glibc now use the new syscalls through sysdeps/unix/sysv/linux/syscalls.list. When it is then used with an older kernel, the corresponding 3 functions fail. A quick fix is to move the OSF1 wrappers under the sysdeps/unix/sysv/linux/alpha directory so they override the standard linux ones. A better fix would be to try the new syscalls and fallback to the old OSF1 in case the new ones fail. This can be implemented in a later commit. Changelog: [BZ #24986] * sysdeps/unix/alpha/getegid.S: Move to ... * sysdeps/unix/sysv/linux/alpha/getegid.S: ... here. * sysdeps/unix/alpha/geteuid.S: Move to ... * sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here. * sysdeps/unix/alpha/getppid.S: Move to ... * sysdeps/unix/sysv/linux/alpha/getppid.S: ... here --- ChangeLog | 10 ++++++++++ sysdeps/unix/alpha/getegid.S | 26 -------------------------- sysdeps/unix/alpha/geteuid.S | 26 -------------------------- sysdeps/unix/alpha/getppid.S | 26 -------------------------- sysdeps/unix/sysv/linux/alpha/getegid.S | 26 ++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/geteuid.S | 26 ++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/alpha/getppid.S | 26 ++++++++++++++++++++++++++ 7 files changed, 88 insertions(+), 78 deletions(-) delete mode 100644 sysdeps/unix/alpha/getegid.S delete mode 100644 sysdeps/unix/alpha/geteuid.S delete mode 100644 sysdeps/unix/alpha/getppid.S create mode 100644 sysdeps/unix/sysv/linux/alpha/getegid.S create mode 100644 sysdeps/unix/sysv/linux/alpha/geteuid.S create mode 100644 sysdeps/unix/sysv/linux/alpha/getppid.S diff --git a/ChangeLog b/ChangeLog index 00658e6..1541a44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2019-09-14 Aurelien Jarno + + [BZ #24986] + * sysdeps/unix/alpha/getegid.S: Move to ... + * sysdeps/unix/sysv/linux/alpha/getegid.S: ... here. + * sysdeps/unix/alpha/geteuid.S: Move to ... + * sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here. + * sysdeps/unix/alpha/getppid.S: Move to ... + * sysdeps/unix/sysv/linux/alpha/getppid.S: ... here + 2019-09-09 Paul Eggert Fix http: URL in 'configure' diff --git a/sysdeps/unix/alpha/getegid.S b/sysdeps/unix/alpha/getegid.S deleted file mode 100644 index a4a3bf9..0000000 --- a/sysdeps/unix/alpha/getegid.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - - -PSEUDO (__getegid, getxgid, 0) - MOVE (r1, r0) - ret -PSEUDO_END (__getegid) - -weak_alias (__getegid, getegid) diff --git a/sysdeps/unix/alpha/geteuid.S b/sysdeps/unix/alpha/geteuid.S deleted file mode 100644 index f249808..0000000 --- a/sysdeps/unix/alpha/geteuid.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - - -PSEUDO (__geteuid, getxuid, 0) - MOVE (r1, r0) - ret -PSEUDO_END (__geteuid) - -weak_alias (__geteuid, geteuid) diff --git a/sysdeps/unix/alpha/getppid.S b/sysdeps/unix/alpha/getppid.S deleted file mode 100644 index bbbbff7..0000000 --- a/sysdeps/unix/alpha/getppid.S +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - - -PSEUDO (__getppid, getxpid, 0) - MOVE (r1, r0) - ret -PSEUDO_END (__getppid) - -weak_alias (__getppid, getppid) diff --git a/sysdeps/unix/sysv/linux/alpha/getegid.S b/sysdeps/unix/sysv/linux/alpha/getegid.S new file mode 100644 index 0000000..a4a3bf9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getegid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include + + +PSEUDO (__getegid, getxgid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__getegid) + +weak_alias (__getegid, getegid) diff --git a/sysdeps/unix/sysv/linux/alpha/geteuid.S b/sysdeps/unix/sysv/linux/alpha/geteuid.S new file mode 100644 index 0000000..f249808 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/geteuid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include + + +PSEUDO (__geteuid, getxuid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__geteuid) + +weak_alias (__geteuid, geteuid) diff --git a/sysdeps/unix/sysv/linux/alpha/getppid.S b/sysdeps/unix/sysv/linux/alpha/getppid.S new file mode 100644 index 0000000..bbbbff7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/getppid.S @@ -0,0 +1,26 @@ +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include + + +PSEUDO (__getppid, getxpid, 0) + MOVE (r1, r0) + ret +PSEUDO_END (__getppid) + +weak_alias (__getppid, getppid) -- cgit v1.1