From patchwork Wed Dec 7 21:22:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61680 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A22D38369CA for ; Wed, 7 Dec 2022 21:23:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A22D38369CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670448195; bh=knZW0CaPwX3WnZbv81XIUz03oPS9KP/uNKWR7/ZeAoc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=IIeXPuDdT5UmVEuOcAi8dQIluOlGoxjHOuOBSql2HSjKcWRHYGr5btdFWvMUSjOhj M8S5uxC5Bq67ZPTKVPjnaYgwBl0NYMJims0JmSM1N/dngSYCtUCoh+kjbFqP7rPap8 I2XeEUEQGN7ub8ywSWKDx8zrea/geNCWa5jyXn9k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id B1FE43854572 for ; Wed, 7 Dec 2022 21:22:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1FE43854572 Received: by mail-oo1-xc2c.google.com with SMTP id v62-20020a4a7c41000000b004a0a214dfbaso116657ooc.9 for ; Wed, 07 Dec 2022 13:22:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=knZW0CaPwX3WnZbv81XIUz03oPS9KP/uNKWR7/ZeAoc=; b=csdgP+xQbhTU8y4ND+C9fqdgck+Z0G2msNBXKDFXmUszyxV8+FGu2Hb0o7yaRjL4ph /7iYdTksxOTvddxvi930npnafoF2ZKJ4c/evkvToq8tWHQoNAjihWuydIrbYUzbRaW5l Yp7wNhnZOS0E7A2fYg8r0HM1HpGzBaRMeD5U1p1sR3cPragabQ4Hkrv6SM+fAjilFSRI p6UJYxoVYffnkH4nMEvBHf0wzZjzNyB1l/iLIvsf5Z4C3yAUBuuo3l8rJte01a5mzf+h JqR0F7I+60q2aPEgwqimIkUs7E+3H7OjdYFmExsXqKJklhSy8p/iqAjBG/fAfxbENJth NbQw== X-Gm-Message-State: ANoB5pmI0Y0F5LLkEs9r55rvnXYi75n/UrB/UuY0IUcQLtmNQY98sYfU J/hbVGt90CcVP4LEgmnfLL5W1uNzHtU8/WarJNM= X-Google-Smtp-Source: AA0mqf5DyVjqzDQnM5RP48pyl8in6hGtlzSQXuuBQio7i28MtDMDbj6WCaPtWsuw7bJ1xjL744Xqiw== X-Received: by 2002:a05:6820:60d:b0:4a0:8cf1:f6f4 with SMTP id e13-20020a056820060d00b004a08cf1f6f4mr11193872oow.49.1670448171778; Wed, 07 Dec 2022 13:22:51 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:6793:2c6f:f2fc:30ca:36c1]) by smtp.gmail.com with ESMTPSA id n189-20020aca59c6000000b0035a64076e0bsm9870305oib.37.2022.12.07.13.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 13:22:51 -0800 (PST) To: libc-alpha@sourceware.org, Carlos O'Donell Subject: [PATCH v2 1/5] Linux: Move wordsize-32 Version to default Date: Wed, 7 Dec 2022 18:22:42 -0300 Message-Id: <20221207212246.2384051-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> References: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" And remove redundant entries on other architectures Version. The version for fallocate64 was supposed to be 2.10, but itt was then added to 32-bit platforms in 2.11 because it mistakenly wasn't exported for them in 2.10 (see the commit message for 1f3615a1c97a030bca59f728f998947f852679b9). linux/generic did not exist before 2.15, i.e. when the tile ports were added (and microblaze did not exist before 2.18), which explains those differences but also illustrates that "2.11 for 32-bit, 2.10 for 64-bit" should be sufficient since versions older than the minimum for the architecture are automatically adjusted. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/Versions | 3 +++ sysdeps/unix/sysv/linux/arm/Versions | 3 --- sysdeps/unix/sysv/linux/generic/wordsize-32/Versions | 5 ----- sysdeps/unix/sysv/linux/hppa/Versions | 3 --- sysdeps/unix/sysv/linux/i386/Versions | 4 ---- sysdeps/unix/sysv/linux/m68k/Versions | 3 --- sysdeps/unix/sysv/linux/microblaze/Versions | 5 ----- sysdeps/unix/sysv/linux/mips/Versions | 3 --- sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions | 3 --- sysdeps/unix/sysv/linux/s390/s390-32/Versions | 3 --- sysdeps/unix/sysv/linux/sh/Versions | 3 --- sysdeps/unix/sysv/linux/sparc/sparc32/Versions | 3 --- 12 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/Versions delete mode 100644 sysdeps/unix/sysv/linux/microblaze/Versions diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index ca6eb1a49e..bc59bce42f 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -157,6 +157,9 @@ libc { GLIBC_2.10 { fallocate; } + GLIBC_2.11 { + fallocate64; + } GLIBC_2.12 { _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions index 7e5ba53455..6e7cb6e2e5 100644 --- a/sysdeps/unix/sysv/linux/arm/Versions +++ b/sysdeps/unix/sysv/linux/arm/Versions @@ -4,9 +4,6 @@ libc { inb; inw; inl; outb; outw; outl; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.24 { recvmsg; sendmsg; } diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions b/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions deleted file mode 100644 index cdc6022015..0000000000 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/Versions +++ /dev/null @@ -1,5 +0,0 @@ -libc { - GLIBC_2.15 { - fallocate64; - } -} diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions index 357c68a782..78528e5fa2 100644 --- a/sysdeps/unix/sysv/linux/hppa/Versions +++ b/sysdeps/unix/sysv/linux/hppa/Versions @@ -13,9 +13,6 @@ libc { GLIBC_2.4 { _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.12 { _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions index 1335e6551b..f99a4d88d0 100644 --- a/sysdeps/unix/sysv/linux/i386/Versions +++ b/sysdeps/unix/sysv/linux/i386/Versions @@ -37,10 +37,6 @@ libc { # v* vm86; } - GLIBC_2.11 { - # f* - fallocate64; - } GLIBC_PRIVATE { __modify_ldt; __uname; } diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index d98ae120c1..a77ea60338 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -29,9 +29,6 @@ libc { # v* versionsort64; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.31 { msgctl; semctl; shmctl; } diff --git a/sysdeps/unix/sysv/linux/microblaze/Versions b/sysdeps/unix/sysv/linux/microblaze/Versions deleted file mode 100644 index aa48a3c155..0000000000 --- a/sysdeps/unix/sysv/linux/microblaze/Versions +++ /dev/null @@ -1,5 +0,0 @@ -libc { - GLIBC_2.18 { - fallocate64; - } -} diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions index db6222e9a7..9ea0fa65a4 100644 --- a/sysdeps/unix/sysv/linux/mips/Versions +++ b/sysdeps/unix/sysv/linux/mips/Versions @@ -26,9 +26,6 @@ libc { pthread_attr_setstack; pthread_attr_setstacksize; } - GLIBC_2.11 { - fallocate64; - } GLIBC_PRIVATE { # nptl/pthread_cond_timedwait.c uses INTERNAL_VSYSCALL(clock_gettime). __vdso_clock_gettime; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions index 918e0231d0..416e8db5ae 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions @@ -31,9 +31,6 @@ libc { siglongjmp; swapcontext; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.17 { __ppc_get_timebase_freq; } diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Versions b/sysdeps/unix/sysv/linux/s390/s390-32/Versions index bd1a46df88..1b96fc42a3 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/Versions +++ b/sysdeps/unix/sysv/linux/s390/s390-32/Versions @@ -44,9 +44,6 @@ libc { getutmpx; login; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.31 { msgctl; semctl; shmctl; } diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions index 9c734ff755..3ad702e165 100644 --- a/sysdeps/unix/sysv/linux/sh/Versions +++ b/sysdeps/unix/sysv/linux/sh/Versions @@ -22,9 +22,6 @@ libc { # v* versionsort64; } - GLIBC_2.11 { - fallocate64; - } GLIBC_2.16 { fanotify_mark; } diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Versions b/sysdeps/unix/sysv/linux/sparc/sparc32/Versions index d928a65346..4529e7fe6f 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/Versions +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Versions @@ -17,7 +17,4 @@ libc { # s* scandir64; } - GLIBC_2.11 { - fallocate64; - } } From patchwork Wed Dec 7 21:22:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61682 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1448A382E46B for ; Wed, 7 Dec 2022 21:23:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1448A382E46B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670448238; bh=2EjlA3AaK2q3HpdSb4Tt0JfNP07DvBSNHHX33UCq9zY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Z3Icy73ScIRyvPh9FUUR4rGRbKUmUqf7bhnPB6LIRPVfLlr97cFSTLdSpG2eO+iy2 Qz425rsP0h5DLUhC2m0vR51IKe1DQP1MwK1phAwA8I56rfD/8cxwAWs2RmllgjGqzs xRr4YHshKv0CDWQO5KcAXBWIRUXOpPcBOPo/Yhw4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 29EC7383A0DF for ; Wed, 7 Dec 2022 21:22:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29EC7383A0DF Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1441d7d40c6so22802887fac.8 for ; Wed, 07 Dec 2022 13:22:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2EjlA3AaK2q3HpdSb4Tt0JfNP07DvBSNHHX33UCq9zY=; b=NRruvmwDteVMoPsATZMujmQ0WRQl8bdhgZiH3C19sHJZXmYT1hXmfxGcMCMAsNLmO3 XRDkG5dMwz48i7dPVxzXus7OC8Vl+H5Vnll0trSnjQwY+IddHtdonrPMr6pGKaHkPNMp 7aNnzZYCmkOcHvIZlc27v/QhKlaW4IMYxE72i/K2JgH56z9km+ozZHkAegp61uKyqRNA GFlYffcsmiKyJu6x4Y6OvR3z/2/dWzxjUZn9ZCsmyCNtHfFK/+jwqJGUkK4/Qm2Ywgbg mhCC3sryY4fpnKMS4VJZnzOKH+nUf30OZHxtK6rSCWyN1rEGHjRVfXUaFgGw6qTSsHV4 /S3w== X-Gm-Message-State: ANoB5pltArmTiILFSDwPsO7sNnYaGXnWPiFwFsIQZR3H+6zVH+72yZKK 94LLGsJhLA+QI4BX7y0wmidQcs1/Jj4kJY0Rxo8= X-Google-Smtp-Source: AA0mqf7FztganEdYOmStKNPkYxp/e7+6hbzGHplasPZeMgUGKxLz+trfXs75xxu/+O/S5STeofusCA== X-Received: by 2002:a05:6870:6126:b0:144:7c79:29bb with SMTP id s38-20020a056870612600b001447c7929bbmr9726941oae.57.1670448173267; Wed, 07 Dec 2022 13:22:53 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:6793:2c6f:f2fc:30ca:36c1]) by smtp.gmail.com with ESMTPSA id n189-20020aca59c6000000b0035a64076e0bsm9870305oib.37.2022.12.07.13.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 13:22:52 -0800 (PST) To: libc-alpha@sourceware.org, Carlos O'Donell Subject: [PATCH v2 2/5] Linux: Assume and consolidate getsockname wire-up syscall Date: Wed, 7 Dec 2022 18:22:43 -0300 Message-Id: <20221207212246.2384051-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> References: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/generic/syscalls.list | 1 - sysdeps/unix/sysv/linux/getsockname.c | 7 +------ sysdeps/unix/sysv/linux/i386/kernel-features.h | 2 +- sysdeps/unix/sysv/linux/kernel-features.h | 1 + sysdeps/unix/sysv/linux/m68k/kernel-features.h | 2 +- sysdeps/unix/sysv/linux/microblaze/kernel-features.h | 1 - sysdeps/unix/sysv/linux/powerpc/kernel-features.h | 1 - sysdeps/unix/sysv/linux/s390/kernel-features.h | 2 +- sysdeps/unix/sysv/linux/sh/kernel-features.h | 1 - sysdeps/unix/sysv/linux/sparc/kernel-features.h | 6 ++++++ 10 files changed, 11 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list index 7dbfde0dae..e89ce91ac0 100644 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -1,5 +1,4 @@ # File name Caller Syscall name # args Strong name Weak names # Socket APIs -getsockname - getsockname i:ipp __getsockname getsockname getpeername - getpeername i:ipp __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/getsockname.c b/sysdeps/unix/sysv/linux/getsockname.c index d0718c2aaf..8350b800fe 100644 --- a/sysdeps/unix/sysv/linux/getsockname.c +++ b/sysdeps/unix/sysv/linux/getsockname.c @@ -15,19 +15,14 @@ License along with the GNU C Library; if not, see . */ -#include -#include #include - #include -#include -#include int __getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len) { #ifdef __ASSUME_GETSOCKNAME_SYSCALL - return INLINE_SYSCALL (getsockname, 3, fd, addr.__sockaddr__, len); + return INLINE_SYSCALL_CALL (getsockname, fd, addr.__sockaddr__, len); #else return SOCKETCALL (getsockname, fd, addr.__sockaddr__, len); #endif diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h index ddf9ec0e5f..0c949349e1 100644 --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h @@ -19,7 +19,6 @@ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETSOCKNAME_SYSCALL 1 # define __ASSUME_GETPEERNAME_SYSCALL 1 #endif @@ -42,6 +41,7 @@ # undef __ASSUME_SOCKETPAIR_SYSCALL # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL +# undef __ASSUME_GETSOCKNAME_SYSCALL #endif /* i686 only supports ipc syscall before 5.1. */ diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index e63bd4b4fc..cac8708050 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -84,6 +84,7 @@ #define __ASSUME_SOCKETPAIR_SYSCALL 1 #define __ASSUME_LISTEN_SYSCALL 1 #define __ASSUME_SHUTDOWN_SYSCALL 1 +#define __ASSUME_GETSOCKNAME_SYSCALL 1 /* Support for SysV IPC through wired syscalls. All supported architectures either support ipc syscall and/or all the ipc correspondent syscalls. */ diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 55b8958fb2..b8f8e48c8a 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -19,7 +19,6 @@ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETSOCKNAME_SYSCALL 1 # define __ASSUME_GETPEERNAME_SYSCALL 1 #endif @@ -44,6 +43,7 @@ # undef __ASSUME_SOCKETPAIR_SYSCALL # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL +# undef __ASSUME_GETSOCKNAME_SYSCALL #endif /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h index 9ee6c621ee..12f9a55b03 100644 --- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h +++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h @@ -19,7 +19,6 @@ /* All supported kernel versions for MicroBlaze have these syscalls. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETSOCKNAME_SYSCALL 1 #define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h index ad9eb340b5..852bac0313 100644 --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h @@ -19,7 +19,6 @@ /* New syscalls added for PowerPC in 2.6.37. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETSOCKNAME_SYSCALL 1 #define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h index e47c628f51..3a3942fa68 100644 --- a/sysdeps/unix/sysv/linux/s390/kernel-features.h +++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h @@ -19,7 +19,6 @@ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETSOCKNAME_SYSCALL 1 # define __ASSUME_GETPEERNAME_SYSCALL 1 #endif @@ -44,6 +43,7 @@ # undef __ASSUME_SOCKETPAIR_SYSCALL # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL +# undef __ASSUME_GETSOCKNAME_SYSCALL #endif /* s390 only supports ipc syscall before 5.1. */ diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index 0ab656d58e..7a15569dfc 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -24,7 +24,6 @@ /* These syscalls were added for SH in 2.6.37. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETSOCKNAME_SYSCALL 1 #define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 12e98a9f95..8ada43587b 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -42,6 +42,12 @@ # undef __ASSUME_SETSOCKOPT_SYSCALL #endif +/* There syscalls were added for 32-bit in compat syscall table only + in 4.20 (but present for 64-bit in all supported kernel versions). */ +#if !defined __arch64__ && __LINUX_KERNEL_VERSION < 0x041400 +# undef __ASSUME_GETSOCKNAME_SYSCALL +#endif + /* These syscalls were added for both 32-bit and 64-bit in 4.4. */ #if __LINUX_KERNEL_VERSION < 0x040400 # undef __ASSUME_BIND_SYSCALL From patchwork Wed Dec 7 21:22:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61683 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C91A38369CA for ; Wed, 7 Dec 2022 21:24:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C91A38369CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670448280; bh=9+k5v+jkFT4FbFju0dchYowvopvy+EQk2JyDRN3ykXA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SzXRyhc77rgUi6sfBNKr5HnGLbXzAoDP0XW/+PNteuQ1KVVE3F/p/54KTQ/vfFkx5 Kt+Vqs7U9vdRAUD/gGjhxr4OREAAoEAgbyGJXf/cAcsThN/YW0k/7KlqnEnT/Snbak 7obMl2daz69Iys4VJ5MQBD5cSHuVBF0U10ZJ6LOQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id BC59A38367A1 for ; Wed, 7 Dec 2022 21:22:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC59A38367A1 Received: by mail-oi1-x231.google.com with SMTP id s187so16001234oie.10 for ; Wed, 07 Dec 2022 13:22:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9+k5v+jkFT4FbFju0dchYowvopvy+EQk2JyDRN3ykXA=; b=0A3o0xysp3FadDP50LDh1U3fAuw/UfD8yd5G2MZ2CQDIOjGdpOwJvx5fpOz34bNeGa Cby+fC9N2H2CnIYjg3btiOuKEbfPQraqUbJBPg/Jl/O8v66ISwuYo7xgiSGYs6yz8G+s r3ow1yhxUFHEkOgl0999+J2huqdzwDAzbucfwkFNU69IwUroSGy1s/0E1tOxyhOyKAzO 5RO49zblsCiNAUOE+rlDd7KQce8hwkC8xWdc6etsmg97r/jPVBaBWjn9uGWVGabNzWSk yRnhHQNTdRy462Bo8OOytm4T0uybH14fAzUJC4w5L0nctfNWUPzM0aS3+I+aFzdtrTw3 fftg== X-Gm-Message-State: ANoB5plgmrrAR/q+61YTq67oIXs1+JmbqGKl72mzrKjuZ+LmzF8YnIi+ qiQuHfKRs/VJgQa6dLfMz6Z5doEvHPgxvY9RsUM= X-Google-Smtp-Source: AA0mqf4/SVrcqY1myYWzn7IXuyCTKvSdEPGaTeNJniQoq9fGhqv+drjdDVXzJzGmfFGFHNYzPUEsWw== X-Received: by 2002:a05:6808:282:b0:35b:f0ec:be76 with SMTP id z2-20020a056808028200b0035bf0ecbe76mr11492530oic.57.1670448174806; Wed, 07 Dec 2022 13:22:54 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:6793:2c6f:f2fc:30ca:36c1]) by smtp.gmail.com with ESMTPSA id n189-20020aca59c6000000b0035a64076e0bsm9870305oib.37.2022.12.07.13.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 13:22:54 -0800 (PST) To: libc-alpha@sourceware.org, Carlos O'Donell Subject: [PATCH v2 3/5] Linux: Assume and consolidate getpeername wire-up syscall Date: Wed, 7 Dec 2022 18:22:44 -0300 Message-Id: <20221207212246.2384051-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> References: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/generic/syscalls.list | 4 ---- sysdeps/unix/sysv/linux/getpeername.c | 7 +------ sysdeps/unix/sysv/linux/i386/kernel-features.h | 6 +----- sysdeps/unix/sysv/linux/kernel-features.h | 1 + sysdeps/unix/sysv/linux/m68k/kernel-features.h | 6 +----- sysdeps/unix/sysv/linux/microblaze/kernel-features.h | 1 - sysdeps/unix/sysv/linux/powerpc/kernel-features.h | 1 - sysdeps/unix/sysv/linux/s390/kernel-features.h | 6 +----- sysdeps/unix/sysv/linux/sh/kernel-features.h | 1 - sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 + 10 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/generic/syscalls.list diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list deleted file mode 100644 index e89ce91ac0..0000000000 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ /dev/null @@ -1,4 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -# Socket APIs -getpeername - getpeername i:ipp __getpeername getpeername diff --git a/sysdeps/unix/sysv/linux/getpeername.c b/sysdeps/unix/sysv/linux/getpeername.c index 09ca76b9ad..63fa8e2fe5 100644 --- a/sysdeps/unix/sysv/linux/getpeername.c +++ b/sysdeps/unix/sysv/linux/getpeername.c @@ -15,19 +15,14 @@ License along with the GNU C Library; if not, see . */ -#include -#include #include - #include -#include -#include int __getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len) { #ifdef __ASSUME_GETPEERNAME_SYSCALL - return INLINE_SYSCALL (getpeername, 3, fd, addr.__sockaddr__, len); + return INLINE_SYSCALL_CALL (getpeername, fd, addr.__sockaddr__, len); #else return SOCKETCALL (getpeername, fd, addr.__sockaddr__, len); #endif diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h index 0c949349e1..d3d5376b92 100644 --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h @@ -17,11 +17,6 @@ License along with the GNU C Library; if not, see . */ -/* Direct socketcalls available with kernel 4.3. */ -#if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETPEERNAME_SYSCALL 1 -#endif - #include_next #undef __ASSUME_ACCEPT_SYSCALL @@ -42,6 +37,7 @@ # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL # undef __ASSUME_GETSOCKNAME_SYSCALL +# undef __ASSUME_GETPEERNAME_SYSCALL #endif /* i686 only supports ipc syscall before 5.1. */ diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index cac8708050..403223c565 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -85,6 +85,7 @@ #define __ASSUME_LISTEN_SYSCALL 1 #define __ASSUME_SHUTDOWN_SYSCALL 1 #define __ASSUME_GETSOCKNAME_SYSCALL 1 +#define __ASSUME_GETPEERNAME_SYSCALL 1 /* Support for SysV IPC through wired syscalls. All supported architectures either support ipc syscall and/or all the ipc correspondent syscalls. */ diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index b8f8e48c8a..6f7f4b2481 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -17,11 +17,6 @@ License along with the GNU C Library. If not, see . */ -/* Direct socketcalls available with kernel 4.3. */ -#if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETPEERNAME_SYSCALL 1 -#endif - #include_next #undef __ASSUME_ACCEPT_SYSCALL @@ -44,6 +39,7 @@ # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL # undef __ASSUME_GETSOCKNAME_SYSCALL +# undef __ASSUME_GETPEERNAME_SYSCALL #endif /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h index 12f9a55b03..72496aa922 100644 --- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h +++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h @@ -19,7 +19,6 @@ /* All supported kernel versions for MicroBlaze have these syscalls. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h index 852bac0313..e2dc7a15a3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h @@ -19,7 +19,6 @@ /* New syscalls added for PowerPC in 2.6.37. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h index 3a3942fa68..254b3948f4 100644 --- a/sysdeps/unix/sysv/linux/s390/kernel-features.h +++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h @@ -17,11 +17,6 @@ License along with the GNU C Library; if not, see . */ -/* Direct socketcalls available with kernel 4.3. */ -#if __LINUX_KERNEL_VERSION >= 0x040300 -# define __ASSUME_GETPEERNAME_SYSCALL 1 -#endif - #include_next #undef __ASSUME_ACCEPT_SYSCALL @@ -44,6 +39,7 @@ # undef __ASSUME_LISTEN_SYSCALL # undef __ASSUME_SHUTDOWN_SYSCALL # undef __ASSUME_GETSOCKNAME_SYSCALL +# undef __ASSUME_GETPEERNAME_SYSCALL #endif /* s390 only supports ipc syscall before 5.1. */ diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index 7a15569dfc..ae1387e7d7 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -24,7 +24,6 @@ /* These syscalls were added for SH in 2.6.37. */ #define __ASSUME_CONNECT_SYSCALL 1 -#define __ASSUME_GETPEERNAME_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 #define __ASSUME_RECV_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 8ada43587b..3ecaf36005 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -46,6 +46,7 @@ in 4.20 (but present for 64-bit in all supported kernel versions). */ #if !defined __arch64__ && __LINUX_KERNEL_VERSION < 0x041400 # undef __ASSUME_GETSOCKNAME_SYSCALL +# undef __ASSUME_GETPEERNAME_SYSCALL #endif /* These syscalls were added for both 32-bit and 64-bit in 4.4. */ From patchwork Wed Dec 7 21:22:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61681 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 20E7C381ECB4 for ; Wed, 7 Dec 2022 21:23:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20E7C381ECB4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670448236; bh=1uYf2V6RPXbZF3dKzZuraNKMx1LFHFLk7pA+VH/ZlsU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=x2A7D79SJAf82qbiy5ga0pu3/diXScBw9u0JHm893nEg6PbLDUCKCWcjW/w5z4KyN O1GtiCHYSAhriWyfpQQpnYTfHRyeUSr8EQsbTUL7CEBL+yfCHMfZN2X8Yp+dodN9/C TePunoq10OUqL+ihoAHN2DMcSB94ZDP9te78m9wQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 34AE83835555 for ; Wed, 7 Dec 2022 21:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 34AE83835555 Received: by mail-oi1-x230.google.com with SMTP id k189so3124625oif.7 for ; Wed, 07 Dec 2022 13:22:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1uYf2V6RPXbZF3dKzZuraNKMx1LFHFLk7pA+VH/ZlsU=; b=WM3b6g6JZi187zFfA30SNuUK98lkMfvujv6rMYhdCHa5zr24/4FjgJVBJPdidMJQUH 0ig2wNNgF0+H9/oBj1g96z5Np8WlxURJoFmWGwh0w38kj4IHjRwPer+aXt2PL1p4n4m3 k53pGM4+UTZD9V7pPwhnn1FbK4x4KFuwvw5LfG3XHMc4rN0cmHqPC0FYFyus6ZXLZ04m rb32+n4pzimmzNhKB9ap3E6sSVk0wcvrT+QT8Bz6F9e6IchH7JJ/J+1yvEgMRDwSDtK/ FefcGGDeoINijj0S5JLAEY6uMd4OszB/+9goMrHe8sd5d4U+wa7z3izsT22xj5iFxK2f DJRQ== X-Gm-Message-State: ANoB5plvH1tsjzovSKHLpywYtGvuHlXCd3g7zsiD+CiOMsaO+KdpOUk4 0E+aAMy8hzdvREhm0hy4U1WmKhVizcZKU/uZfgs= X-Google-Smtp-Source: AA0mqf7P2euDW2+RbaWVgJu77wWs9T8DHh2C5+R1Bkq5w7hEbEmuxNtHNA9K16O1pLdVyHcMoe94EQ== X-Received: by 2002:a05:6808:1649:b0:34f:335e:6bb8 with SMTP id az9-20020a056808164900b0034f335e6bb8mr34916517oib.213.1670448176383; Wed, 07 Dec 2022 13:22:56 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:6793:2c6f:f2fc:30ca:36c1]) by smtp.gmail.com with ESMTPSA id n189-20020aca59c6000000b0035a64076e0bsm9870305oib.37.2022.12.07.13.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 13:22:56 -0800 (PST) To: libc-alpha@sourceware.org, Carlos O'Donell Subject: [PATCH v2 4/5] Linux: Remove unused generic Makefile Date: Wed, 7 Dec 2022 18:22:45 -0300 Message-Id: <20221207212246.2384051-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> References: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Both are already defined on default linux Makefile. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/Makefile | 2 ++ sysdeps/unix/sysv/linux/generic/Makefile | 3 --- sysdeps/unix/sysv/linux/syscalls.list | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/generic/Makefile diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 60e4cb1521..632b49e9ec 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -69,6 +69,8 @@ sysdep_routines += adjtimex clone umount umount2 readahead sysctl \ clone3 clone-internal \ fanotify_mark \ mremap \ + epoll_create \ + inotify_init CFLAGS-gethostid.c = -fexceptions CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/generic/Makefile b/sysdeps/unix/sysv/linux/generic/Makefile deleted file mode 100644 index 7e27e79772..0000000000 --- a/sysdeps/unix/sysv/linux/generic/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),misc) -sysdep_routines += epoll_create inotify_init -endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index b9f45463c5..73e941ef89 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -6,7 +6,6 @@ capget EXTRA capget i:pp capget capset EXTRA capset i:pp capset create_module EXTRA create_module 3 __compat_create_module create_module@GLIBC_2.0:GLIBC_2.23 delete_module EXTRA delete_module 3 delete_module -epoll_create EXTRA epoll_create i:i epoll_create epoll_create1 EXTRA epoll_create1 i:i epoll_create1 epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl eventfd EXTRA eventfd2 i:ii eventfd @@ -28,7 +27,6 @@ getresgid - getresgid i:ppp getresgid getsid - getsid i:i getsid init_module EXTRA init_module 5 init_module inotify_add_watch EXTRA inotify_add_watch i:isi inotify_add_watch -inotify_init EXTRA inotify_init i: inotify_init inotify_init1 EXTRA inotify_init1 i:I inotify_init1 inotify_rm_watch EXTRA inotify_rm_watch i:ii inotify_rm_watch ioperm - ioperm i:UUi ioperm From patchwork Thu Dec 8 12:46:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61696 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F37B3892B9C for ; Thu, 8 Dec 2022 12:46:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F37B3892B9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670503614; bh=Ic2uH+7aiKh2+Xpn/Hh1ZPhjZas+jutjndwrXB/pIEI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kEgRbmEFLEjgfU/a6hLgQhTcEaKsA0XcDfsR5QscG/mYJQQQlVtZpJCuGXbxdFLke aymmTdEK59vo6AKrDEEJsTXnYlB+QaSuZ92QuG82+XTo8N+q01ffsc9C/YvOJyTIol AVJdCohR+Ji3VqumERLO/nxBLmPNqJEXdOdX18UY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id F1513388DD69 for ; Thu, 8 Dec 2022 12:46:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F1513388DD69 Received: by mail-oi1-x22a.google.com with SMTP id r11so1249973oie.13 for ; Thu, 08 Dec 2022 04:46:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ic2uH+7aiKh2+Xpn/Hh1ZPhjZas+jutjndwrXB/pIEI=; b=bw0PQ2YSkKqK21U0VW303N2YGx8P/h8C2A4yiYBNFKTsYWCCWtiU+tk4DWG7PmXCQS MXjGxwHbs3tMqAP3ts3Q1h4D2hIH/Y9MOXFQLQSZV2U64hdgKRELSM38asBnCaJL79Wc HO30u+1QPp9z4jS2IFAyDC+k8hZDx5jEHomqYAgtuvMnbq3xYD/U7v7hQjJ/wVpW7HaW bCf3BkQIXoe4/Q2U3RR27TNpgcZqTgPFuh+SXKhdOpcbxxiZEM4fU8/DAVhBKcUN+g2P vFG1VYqliwFihO49qYKrc3fwQZ5U87+wXU2WXV32WwX7LeWJab7kUs1ry8aRqxcsSjF/ Wx7g== X-Gm-Message-State: ANoB5pmK8Bb0rEzJJpRLklQobYVbU+R2swOjVGytklQe2dbI8hVWy7ag CSW6pKB09j1UpihkzuJ0lak4YRgaHqFNufy7gRQ= X-Google-Smtp-Source: AA0mqf7QRRr32xn+SrBvJPMmagoof47NhdajleVy0NqbNnHJhSpl0N1wBYLM372zGFxC3K0yU7/HWg== X-Received: by 2002:a05:6808:238d:b0:35b:bff7:cc45 with SMTP id bp13-20020a056808238d00b0035bbff7cc45mr20537342oib.0.1670503590042; Thu, 08 Dec 2022 04:46:30 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:6793:c722:223e:f72a:4c1]) by smtp.gmail.com with ESMTPSA id l19-20020a4ac613000000b00480fd5b0d6bsm9945399ooq.22.2022.12.08.04.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 04:46:29 -0800 (PST) To: libc-alpha@sourceware.org, Carlos O'Donell Subject: [PATCH v2 5/5] Linux: Remove generic Implies Date: Thu, 8 Dec 2022 09:46:24 -0300 Message-Id: <20221208124624.2390073-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> References: <20221207212246.2384051-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The default Linux implementation already handled the Linux generic ABIs interface used on newer architectures, so there is no need to Imply the generic any longer. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/aarch64/Implies | 1 - sysdeps/unix/sysv/linux/arc/Implies | 2 -- sysdeps/unix/sysv/linux/csky/Implies | 2 -- sysdeps/unix/sysv/linux/generic/README | 11 ----------- sysdeps/unix/sysv/linux/loongarch/lp64/Implies | 1 - sysdeps/unix/sysv/linux/nios2/Implies | 2 -- sysdeps/unix/sysv/linux/or1k/Implies | 2 -- sysdeps/unix/sysv/linux/riscv/rv32/Implies | 2 -- sysdeps/unix/sysv/linux/riscv/rv64/Implies | 1 - 9 files changed, 24 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/generic/README diff --git a/sysdeps/unix/sysv/linux/aarch64/Implies b/sysdeps/unix/sysv/linux/aarch64/Implies index 4409e19b92..9c2d2c9870 100644 --- a/sysdeps/unix/sysv/linux/aarch64/Implies +++ b/sysdeps/unix/sysv/linux/aarch64/Implies @@ -1,3 +1,2 @@ aarch64/nptl -unix/sysv/linux/generic unix/sysv/linux/wordsize-64 diff --git a/sysdeps/unix/sysv/linux/arc/Implies b/sysdeps/unix/sysv/linux/arc/Implies index 7f739a0340..5c1698c045 100644 --- a/sysdeps/unix/sysv/linux/arc/Implies +++ b/sysdeps/unix/sysv/linux/arc/Implies @@ -1,3 +1 @@ arc/nptl -unix/sysv/linux/generic/wordsize-32 -unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/csky/Implies b/sysdeps/unix/sysv/linux/csky/Implies index f37776ccef..2259772947 100644 --- a/sysdeps/unix/sysv/linux/csky/Implies +++ b/sysdeps/unix/sysv/linux/csky/Implies @@ -1,3 +1 @@ -unix/sysv/linux/generic/wordsize-32 -unix/sysv/linux/generic csky/nptl diff --git a/sysdeps/unix/sysv/linux/generic/README b/sysdeps/unix/sysv/linux/generic/README deleted file mode 100644 index 301a6107e1..0000000000 --- a/sysdeps/unix/sysv/linux/generic/README +++ /dev/null @@ -1,11 +0,0 @@ -This hierarchy supports Linux systems using the new -asm-generic/unistd.h, which removes many familiar old syscalls. For -example, to implement open(), newer Linux architectures require glibc -to invoke the __NR_openat syscall with AT_FDCWD. This hierarchy -provides all those implementations. - -It also provides support for 32-bit platforms using the 64-bit kernel -syscall APIs, as the 32-bit ones are no longer provided. Note that -newer ILP32 environments (x32 or AArch64:ILP32, for example) are -converting to use more 64-bit types in kernel syscalls, so that aspect -of this support is in more flux as of this writing. diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/Implies b/sysdeps/unix/sysv/linux/loongarch/lp64/Implies index 117c2b8efe..e0390cc3bf 100644 --- a/sysdeps/unix/sysv/linux/loongarch/lp64/Implies +++ b/sysdeps/unix/sysv/linux/loongarch/lp64/Implies @@ -1,3 +1,2 @@ unix/sysv/linux/loongarch -unix/sysv/linux/generic unix/sysv/linux/wordsize-64 diff --git a/sysdeps/unix/sysv/linux/nios2/Implies b/sysdeps/unix/sysv/linux/nios2/Implies index 4d0478bf8f..e6c9be4665 100644 --- a/sysdeps/unix/sysv/linux/nios2/Implies +++ b/sysdeps/unix/sysv/linux/nios2/Implies @@ -1,3 +1 @@ nios2/nptl -unix/sysv/linux/generic/wordsize-32 -unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/or1k/Implies b/sysdeps/unix/sysv/linux/or1k/Implies index f39f16c04a..07f8e71adc 100644 --- a/sysdeps/unix/sysv/linux/or1k/Implies +++ b/sysdeps/unix/sysv/linux/or1k/Implies @@ -1,3 +1 @@ or1k/nptl -unix/sysv/linux/generic/wordsize-32 -unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/Implies b/sysdeps/unix/sysv/linux/riscv/rv32/Implies index 8b7deb33cd..83db34c5d5 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv32/Implies +++ b/sysdeps/unix/sysv/linux/riscv/rv32/Implies @@ -1,3 +1 @@ unix/sysv/linux/riscv -unix/sysv/linux/generic/wordsize-32 -unix/sysv/linux/generic diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/Implies b/sysdeps/unix/sysv/linux/riscv/rv64/Implies index f042343bf7..2f9ad9ff94 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/Implies +++ b/sysdeps/unix/sysv/linux/riscv/rv64/Implies @@ -1,3 +1,2 @@ unix/sysv/linux/riscv -unix/sysv/linux/generic unix/sysv/linux/wordsize-64