From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34332 invoked by alias); 23 Apr 2018 22:37:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 34301 invoked by uid 89); 23 Apr 2018 22:37:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=issuing, 1725, ports, H*RU:209.85.216.194 X-HELO: mail-qt0-f194.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=++xoO2ztVKNpdN8poCz7nSqgp7tWpjlf35iZNccbA+8=; b=A+p0yoW1ybfnVREyXXGrrGNYenbMTL1lC/XBidWsehcDTQNBXFjefmrQbDyb48x2Ij zTahcrftGA9qGANHTPlFLqNKyA5glrWyqvND1ejJUSQRvN5MLjR0qjoZW/ktyhpT5NYm h98lfiwt0moJ1zqTsOwtwjhAmF+zX0PuG7EIBYav1Yn9i2q4cko/Mi87B4nvzV3a+gzn zUJd1EBp4r6Djn90oOIj0CEc9zRqDUo5267DX7Y0UvEUYzRiLJySeYw7FOOErcPvnVYY vFJvbHXOP1vsczZBaZGWI4E6ZXWyC6WbkdA+ezURUktdDTeChSjMkgGt35bI1O+v3d6D n1Ew== X-Gm-Message-State: ALQs6tBFJO0KYAvZKpixsaIyIzyyC8pVLTF54/ayfxpswJ+qzEQP81rE wv//PagW2XyL/MljVqWvTDg99OMn5+E= X-Google-Smtp-Source: AB8JxZo33/5tz/wVy+vVXFpOhkjsGB290KWw96NPnxMZ0iPINth5C78ei/MFNJTCJrSfPkKWh1sipg== X-Received: by 10.12.188.144 with SMTP id l16mr2519317qvg.178.1524523025259; Mon, 23 Apr 2018 15:37:05 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/2] Deprecate ustat syscall interface Date: Mon, 23 Apr 2018 22:37:00 -0000 Message-Id: <1524523018-7216-2-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1524523018-7216-1-git-send-email-adhemerval.zanella@linaro.org> References: <1524523018-7216-1-git-send-email-adhemerval.zanella@linaro.org> X-SW-Source: 2018-04/txt/msg00484.txt.bz2 As for sysctl, ustat has been deprecated in favor of fstatfs. Newer ports which uses generic interface builds a stub version which returns ENOSYS. This patch deprecate ustat interface by issuing ENOSYS as default and adds compat symbol for architectures which still defines __NR_ustat. Checked on x86_64-linux-gnu and i686-linux-gnu. Also checked with a check-abi on all affected ABIs. * sysdeps/unix/sysv/linux/generic/ustat.c: Move to ... * sysdeps/unix/sysv/linux/ustat.c: ... here and deprecate symbol. * sysdeps/unix/sysv/linux/alpha/libc.abilist [GLIBC_2.28] (ustat): Add symbol. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. --- ChangeLog | 22 +++++++++++++++ sysdeps/unix/sysv/linux/alpha/libc.abilist | 1 + sysdeps/unix/sysv/linux/arm/libc.abilist | 1 + sysdeps/unix/sysv/linux/generic/ustat.c | 32 ---------------------- sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + sysdeps/unix/sysv/linux/ia64/libc.abilist | 1 + sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist | 1 + sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + sysdeps/unix/sysv/linux/microblaze/libc.abilist | 1 + .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../linux/powerpc/powerpc32/nofpu/libc.abilist | 1 + .../unix/sysv/linux/powerpc/powerpc64/libc.abilist | 1 + sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/libc.abilist | 1 + sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist | 1 + sysdeps/unix/sysv/linux/ustat.c | 29 +++++++++++++++----- sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 1 + sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 1 + 21 files changed, 62 insertions(+), 39 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/generic/ustat.c diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 09fc772..d757897 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2056,6 +2056,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/arm/libc.abilist b/sysdeps/unix/sysv/linux/arm/libc.abilist index 35741a8..a52db8b 100644 --- a/sysdeps/unix/sysv/linux/arm/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/libc.abilist @@ -132,6 +132,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.4 GLIBC_2.4 A GLIBC_2.4 _Exit F GLIBC_2.4 _IO_2_1_stderr_ D 0xa0 diff --git a/sysdeps/unix/sysv/linux/generic/ustat.c b/sysdeps/unix/sysv/linux/generic/ustat.c deleted file mode 100644 index d4f9c89..0000000 --- a/sysdeps/unix/sysv/linux/generic/ustat.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2011-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Chris Metcalf , 2011. - - 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 -#include - -#include -#include - -/* This deprecated syscall is no longer used (replaced with fstat). */ -int -ustat (dev_t dev, struct ustat *ubuf) -{ - __set_errno (ENOSYS); - return -1; -} -stub_warning (ustat) diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 1da5f49..d43a2fa 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -1896,6 +1896,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 2a1c99c..b17a8f9 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2066,6 +2066,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist index 8b51692..9e255b0 100644 --- a/sysdeps/unix/sysv/linux/ia64/libc.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist @@ -1930,6 +1930,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index d26f322..d8d05b2 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -133,6 +133,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.4 GLIBC_2.4 A GLIBC_2.4 _Exit F GLIBC_2.4 _IO_2_1_stderr_ D 0x98 diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 04dcf51..5888c38 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2010,6 +2010,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/microblaze/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/libc.abilist index dd4656c..02d50f5 100644 --- a/sysdeps/unix/sysv/linux/microblaze/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/libc.abilist @@ -2131,3 +2131,4 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 836fdab..9a80189 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2014,6 +2014,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index e68ef0e..a7b7d23 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2019,6 +2019,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist index 5983ac1..12721da 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist @@ -133,6 +133,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 _Exit F GLIBC_2.3 _IO_2_1_stderr_ D 0xe0 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index fad7b94..96c38d6 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2024,6 +2024,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index 8e88894..59832c1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -1925,6 +1925,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/sh/libc.abilist b/sysdeps/unix/sysv/linux/sh/libc.abilist index 4b8f56f..790ef22 100644 --- a/sysdeps/unix/sysv/linux/sh/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/libc.abilist @@ -1900,6 +1900,7 @@ GLIBC_2.27 wcstof64 F GLIBC_2.27 wcstof64_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 5bb6028..6873735 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2017,6 +2017,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist index 1ea1a9e..6a58857 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist @@ -1954,6 +1954,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/ustat.c b/sysdeps/unix/sysv/linux/ustat.c index 8e73faa..1fcec18 100644 --- a/sysdeps/unix/sysv/linux/ustat.c +++ b/sysdeps/unix/sysv/linux/ustat.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Get filesystem statistics (deprecated). Linux version. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -16,15 +17,25 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include - #include -#include +#include +#include +/* This deprecated syscall is no longer used (replaced with fstat). */ +int +__deprecated_ustat (dev_t dev, struct ustat *ubuf) +{ + __set_errno (ENOSYS); + return -1; +} +#ifndef __NR_ustat +weak_alias (__deprecated_ustat, ustat) +#else +versioned_symbol (libc, __deprecated_ustat, ustat, GLIBC_2_28); +# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28) int -ustat (dev_t dev, struct ustat *ubuf) +__old_ustat (dev_t dev, struct ustat *ubuf) { unsigned long long int k_dev; @@ -33,5 +44,9 @@ ustat (dev_t dev, struct ustat *ubuf) if (k_dev != dev) return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); - return INLINE_SYSCALL (ustat, 2, (unsigned int) k_dev, ubuf); + return INLINE_SYSCALL_CALL (ustat, (unsigned int) k_dev, ubuf); } +compat_symbol (libc, __old_ustat, ustat, GLIBC_2_0); +# endif /* SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28) */ +#endif /* __NR_ustat */ +stub_warning (ustat) diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index 576d3bd..5c682ac 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -1907,6 +1907,7 @@ GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A GLIBC_2.28 sysctl F +GLIBC_2.28 ustat F GLIBC_2.3 GLIBC_2.3 A GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index 31d612f..cc7bb7c 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -2149,3 +2149,4 @@ GLIBC_2.27 wcstof64_l F GLIBC_2.27 wcstof64x F GLIBC_2.27 wcstof64x_l F GLIBC_2.28 GLIBC_2.28 A +GLIBC_2.28 ustat F -- 2.7.4