Message ID | 20201118195552.2687336-1-adhemerval.zanella@linaro.org |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> 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 F305F3854835; Wed, 18 Nov 2020 19:56:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F305F3854835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1605729364; bh=riPlk5TL0rlQLtpc03+sQBIkMtYMF3DTbaRSjqTB09c=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pfDISMJI1h/ZAiMyrpj7vbqPXCtHZDZwvMz7g5aoa5Zi+Hk+p6Jmr91eYjwdgsywq /wp/qcxbyn2QC2oKSZW6NdVFsJy+XpTKLEs3kAIIM/vYj5cd3I34Jq9/dXyKg9HnOG goZTRBsexVVwnWi2lgMpffxzyrWD6gJreOnwGXxI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by sourceware.org (Postfix) with ESMTPS id 429663854835 for <libc-alpha@sourceware.org>; Wed, 18 Nov 2020 19:55:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 429663854835 Received: by mail-qv1-xf31.google.com with SMTP id y11so1651589qvu.10 for <libc-alpha@sourceware.org>; Wed, 18 Nov 2020 11:55:59 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=riPlk5TL0rlQLtpc03+sQBIkMtYMF3DTbaRSjqTB09c=; b=seNQGU+EKLOjauwYkUiuN7xkWGYGiVPdECLxZSLu6+YIiNKqhsFJVgbSYKRacr8t+T FV06+qs5JvS0/Y2mmVGmgrdw1BKWH9Qvq0BymnAGUcasTKGKRxj7QsfO06oCMxeIbYDi h6ML7SCzynCMQjyWUnevKZuKT3yFR2irtpfJLFBjiRkUt5Ogu3sSMBmNnNogaQ3FoZXi fM/xinFwcl/Iym0b6r1Vnd5ZxC376B3OPGXt9gGCrt62lotVe/14PDP4agX2+sa/GRoR bC0FOCAHZ9v83DQhQSMuyPY2SAxFVF9cqtmG9ocGZd7yzbpgwf318KkUSWyOjCkoxet/ H3KQ== X-Gm-Message-State: AOAM53238PipoHxKJCEi4+3ampu6/oS5lxvCQxaIWUzIsK9jmIsyWzn1 AA0T6bFd6NKD9WCzCw7B+PsSAWHzy0NZFw== X-Google-Smtp-Source: ABdhPJz0m+jWbVqhRjHqMOuU30Wh3zFrBQfTAasC0+2F/pUSwW6WQBKbEPQWeV+5+PAX3k1q7WOfwA== X-Received: by 2002:ad4:524d:: with SMTP id s13mr6633783qvq.19.1605729358257; Wed, 18 Nov 2020 11:55:58 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id f27sm6538775qtv.95.2020.11.18.11.55.57 for <libc-alpha@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 11:55:57 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 00/28] More Linux syscall refactor Date: Wed, 18 Nov 2020 16:55:24 -0300 Message-Id: <20201118195552.2687336-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Adhemerval Zanella <adhemerval.zanella@linaro.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
More Linux syscall refactor
|
|
Message
Adhemerval Zanella Netto
Nov. 18, 2020, 7:55 p.m. UTC
This is second part of Linux syscall refactor (the first one [1] focused on simplify the internal mechanism). Although this patchset is independent from first part, some code do intersect (such the ones that might use the syscall return value), however they are easily fixed whether one is pushed first. This part remove ununsed code, consolidate implementation, simplify the auto-generation syscall list, move some auto-generation to C, and move some assembly implementation to C. The idea is to 1. remove implementations from auto-generation which require either arch-specific knowledge or can't be implemented easily on C (such as 64-bit variable on 32-bit architecture) and 2. minimize the assembly implementation that issues syscalls to a bare minimum (only the ones that are not easily implemented in C, such as clone or vfork). The long goal with this refactor is to replace the auto-generation using assembly macros to a auto-generation using C code, thus removing the requirement of each architecture to provide the ASM assembly macros (all syscall will be done through proper inline functions). The subsequent part to implement it relies on this patchset and the previous one [1]. [1] https://sourceware.org/pipermail/libc-alpha/2020-November/119456.html Adhemerval Zanella (28): Remove generic pthread linuxism on POSIX timer_routine Removed ununsed pthread implementations Remove local-setxid.h Remove HAVE_INLINED_SYSCALLS usage on generic implementations linux: Consolidate and cleanup personality syscall x32: Remove syscalls.list linux: Assume bind support linux: Assume getpeername support linux: Assume getsockname support linux: Assume getsockopt support linux: Assume listen support linux: Assume setsockopt support linux: Assume shutdown support linux: Assume socket support linux: Assume socketpair support linux: Remove superflous __ASSUME_CONNECT_SYSCALL definitions x86_64: Remove ununsed syscalls.list entry nptl: Add futex_trylock_pi linux: Add fanotify_mark C implementation linux: Add prlimit64 C implementation linux: Implement mremap in C Linux: implement ioctl in C mips: Implement n32 lseek64 in C x32: Implement lseek64 in C linux: Implement pipe in terms of __NR_pipe2 linux: Consolidate brk implementation linux: Add generic C syscall implementation alpha: Move implementations to C debug/read_chk.c | 9 -- debug/readlink_chk.c | 5 - nptl/Makefile | 4 - nptl/pthread_mutex_trylock.c | 9 +- nptl/pthread_setegid.c | 3 - nptl/pthread_seteuid.c | 3 - nptl/pthread_setgid.c | 3 - nptl/pthread_setregid.c | 3 - nptl/pthread_setresgid.c | 3 - nptl/pthread_setresuid.c | 3 - nptl/pthread_setreuid.c | 3 - nptl/pthread_setuid.c | 3 - sysdeps/generic/local-setxid.h | 4 - sysdeps/nptl/futex-internal.h | 36 ++++++ sysdeps/nptl/lowlevellock-futex.h | 5 + sysdeps/posix/spawni.c | 5 +- sysdeps/pthread/timer_routines.c | 19 ---- sysdeps/unix/syscalls.list | 2 - sysdeps/unix/sysv/linux/Makefile | 4 +- sysdeps/unix/sysv/linux/aarch64/sysdep.h | 3 + sysdeps/unix/sysv/linux/alpha/brk.S | 83 -------------- sysdeps/unix/sysv/linux/{arm => alpha}/brk.c | 13 +-- sysdeps/unix/sysv/linux/alpha/dl-brk.S | 1 - .../alpha/{fraiseexcpt.S => fraiseexcpt.c} | 37 ++----- .../sysv/linux/alpha/{getegid.S => getegid.c} | 15 +-- .../sysv/linux/alpha/{geteuid.S => geteuid.c} | 15 +-- .../sysv/linux/alpha/{getppid.S => getppid.c} | 15 +-- .../sysv/linux/alpha/ieee_get_fp_control.S | 50 --------- .../linux/alpha/ieee_get_fp_control.c} | 29 ++--- .../sysv/linux/alpha/ieee_set_fp_control.S | 46 -------- .../linux/alpha/ieee_set_fp_control.c} | 24 ++-- sysdeps/unix/sysv/linux/alpha/pipe.S | 1 - .../alpha/{setcontext.S => setcontext.c} | 27 ++--- sysdeps/unix/sysv/linux/alpha/syscalls.list | 11 -- sysdeps/unix/sysv/linux/alpha/sysdep.h | 21 ++++ sysdeps/unix/sysv/linux/arc/sysdep.h | 3 + sysdeps/unix/sysv/linux/arm/syscalls.list | 17 --- .../unix/sysv/linux/{microblaze => }/brk.c | 5 +- sysdeps/unix/sysv/linux/csky/sysdep.h | 3 + sysdeps/unix/sysv/linux/dl-brk.c | 5 - .../sysv/linux/{sh/pipe.S => fanotify_mark.c} | 42 +++---- sysdeps/unix/sysv/linux/generic/brk.c | 43 -------- sysdeps/unix/sysv/linux/generic/syscalls.list | 12 -- .../linux/generic/wordsize-32/syscalls.list | 5 - sysdeps/unix/sysv/linux/hppa/brk.c | 41 ------- sysdeps/unix/sysv/linux/hppa/fanotify_mark.c | 2 + sysdeps/unix/sysv/linux/hppa/prlimit64.c | 2 + sysdeps/unix/sysv/linux/hppa/syscall.c | 65 ----------- sysdeps/unix/sysv/linux/hppa/syscalls.list | 16 --- sysdeps/unix/sysv/linux/i386/brk.c | 45 -------- .../unix/sysv/linux/i386/kernel-features.h | 23 ++-- sysdeps/unix/sysv/linux/i386/syscalls.list | 6 - sysdeps/unix/sysv/linux/i386/sysdep.h | 3 + sysdeps/unix/sysv/linux/ia64/brk.S | 50 --------- sysdeps/unix/sysv/linux/ia64/dl-brk.S | 1 - sysdeps/unix/sysv/linux/ia64/pipe.S | 37 ------- sysdeps/unix/sysv/linux/ia64/syscalls.list | 11 -- sysdeps/unix/sysv/linux/ia64/sysdep.h | 3 + .../unix/sysv/linux/{x86_64/brk.c => ioctl.c} | 31 +++--- sysdeps/unix/sysv/linux/kernel-features.h | 9 ++ sysdeps/unix/sysv/linux/local-setxid.h | 16 --- .../unix/sysv/linux/m68k/kernel-features.h | 23 ++-- sysdeps/unix/sysv/linux/m68k/syscalls.list | 3 - sysdeps/unix/sysv/linux/m68k/sysdep.h | 3 + .../sysv/linux/microblaze/kernel-features.h | 10 -- .../unix/sysv/linux/microblaze/syscalls.list | 4 - sysdeps/unix/sysv/linux/microblaze/sysdep.h | 3 + sysdeps/unix/sysv/linux/mips/brk.c | 46 -------- .../unix/sysv/linux/mips/mips32/syscalls.list | 5 - sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 3 + .../unix/sysv/linux/mips/mips64/n32/lseek64.c | 47 ++++++++ .../sysv/linux/mips/mips64/n32/syscalls.list | 11 -- .../sysv/linux/mips/mips64/n64/syscalls.list | 4 - sysdeps/unix/sysv/linux/mips/mips64/sysdep.h | 3 + sysdeps/unix/sysv/linux/mips/pipe.S | 1 - sysdeps/unix/sysv/linux/mips/syscalls.list | 14 --- .../unix/sysv/linux/{sh/brk.c => mremap.c} | 40 +++---- sysdeps/unix/sysv/linux/nios2/sysdep.h | 3 + sysdeps/unix/sysv/linux/personality.c | 24 +--- sysdeps/unix/sysv/linux/{generic => }/pipe.c | 6 +- sysdeps/unix/sysv/linux/powerpc/dl-brk.S | 1 - .../unix/sysv/linux/powerpc/kernel-features.h | 10 -- .../linux/powerpc/powerpc32/syscalls.list | 3 - .../unix/sysv/linux/powerpc/powerpc64/brk.S | 43 -------- sysdeps/unix/sysv/linux/prlimit.c | 2 + .../{powerpc/powerpc32/brk.S => prlimit64.c} | 51 ++++----- sysdeps/unix/sysv/linux/riscv/sysdep.h | 3 + sysdeps/unix/sysv/linux/s390/brk.c | 55 --------- .../unix/sysv/linux/s390/kernel-features.h | 22 ++-- .../sysv/linux/s390/s390-32/syscalls.list | 4 - sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 5 + sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 5 + sysdeps/unix/sysv/linux/sh/fanotify_mark.c | 2 + sysdeps/unix/sysv/linux/sh/kernel-features.h | 10 -- sysdeps/unix/sysv/linux/sh/syscalls.list | 6 - .../unix/sysv/linux/sparc/kernel-features.h | 17 ++- sysdeps/unix/sysv/linux/sparc/sparc32/brk.c | 54 --------- sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S | 39 ------- .../sysv/linux/sparc/sparc32/syscalls.list | 3 - .../unix/sysv/linux/sparc/sparc32/sysdep.h | 3 + sysdeps/unix/sysv/linux/sparc/sparc64/brk.S | 104 ------------------ .../unix/sysv/linux/sparc/sparc64/dl-brk.S | 1 - .../sysv/linux/sparc/sparc64/personality.c | 3 - sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S | 40 ------- .../sysv/linux/sparc/sparc64/syscalls.list | 7 -- sysdeps/unix/sysv/linux/spawni.c | 19 +++- sysdeps/unix/sysv/linux/{riscv => }/syscall.c | 33 +++--- sysdeps/unix/sysv/linux/syscalls.list | 2 - sysdeps/unix/sysv/linux/sysdep.h | 4 + .../unix/sysv/linux/wordsize-64/syscalls.list | 4 - sysdeps/unix/sysv/linux/x86_64/syscalls.list | 13 --- sysdeps/unix/sysv/linux/x86_64/x32/lseek.S | 43 -------- sysdeps/unix/sysv/linux/x86_64/x32/lseek64.S | 1 - .../{m68k/brk.c => x86_64/x32/lseek64.c} | 44 ++++---- .../unix/sysv/linux/x86_64/x32/syscalls.list | 4 - 115 files changed, 429 insertions(+), 1497 deletions(-) delete mode 100644 nptl/pthread_setegid.c delete mode 100644 nptl/pthread_seteuid.c delete mode 100644 nptl/pthread_setgid.c delete mode 100644 nptl/pthread_setregid.c delete mode 100644 nptl/pthread_setresgid.c delete mode 100644 nptl/pthread_setresuid.c delete mode 100644 nptl/pthread_setreuid.c delete mode 100644 nptl/pthread_setuid.c delete mode 100644 sysdeps/generic/local-setxid.h delete mode 100644 sysdeps/unix/sysv/linux/alpha/brk.S rename sysdeps/unix/sysv/linux/{arm => alpha}/brk.c (77%) delete mode 100644 sysdeps/unix/sysv/linux/alpha/dl-brk.S rename sysdeps/unix/sysv/linux/alpha/{fraiseexcpt.S => fraiseexcpt.c} (66%) rename sysdeps/unix/sysv/linux/alpha/{getegid.S => getegid.c} (79%) rename sysdeps/unix/sysv/linux/alpha/{geteuid.S => geteuid.c} (79%) rename sysdeps/unix/sysv/linux/alpha/{getppid.S => getppid.c} (79%) delete mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S rename sysdeps/unix/{mips/pipe.S => sysv/linux/alpha/ieee_get_fp_control.c} (64%) delete mode 100644 sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S rename sysdeps/unix/{alpha/pipe.S => sysv/linux/alpha/ieee_set_fp_control.c} (68%) delete mode 100644 sysdeps/unix/sysv/linux/alpha/pipe.S rename sysdeps/unix/sysv/linux/alpha/{setcontext.S => setcontext.c} (62%) rename sysdeps/unix/sysv/linux/{microblaze => }/brk.c (90%) delete mode 100644 sysdeps/unix/sysv/linux/dl-brk.c rename sysdeps/unix/sysv/linux/{sh/pipe.S => fanotify_mark.c} (56%) delete mode 100644 sysdeps/unix/sysv/linux/generic/brk.c delete mode 100644 sysdeps/unix/sysv/linux/generic/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/hppa/brk.c create mode 100644 sysdeps/unix/sysv/linux/hppa/fanotify_mark.c create mode 100644 sysdeps/unix/sysv/linux/hppa/prlimit64.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/syscall.c delete mode 100644 sysdeps/unix/sysv/linux/hppa/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/i386/brk.c delete mode 100644 sysdeps/unix/sysv/linux/ia64/brk.S delete mode 100644 sysdeps/unix/sysv/linux/ia64/dl-brk.S delete mode 100644 sysdeps/unix/sysv/linux/ia64/pipe.S rename sysdeps/unix/sysv/linux/{x86_64/brk.c => ioctl.c} (63%) delete mode 100644 sysdeps/unix/sysv/linux/local-setxid.h delete mode 100644 sysdeps/unix/sysv/linux/mips/brk.c delete mode 100644 sysdeps/unix/sysv/linux/mips/mips32/syscalls.list create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/lseek64.c delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/mips/pipe.S rename sysdeps/unix/sysv/linux/{sh/brk.c => mremap.c} (57%) rename sysdeps/unix/sysv/linux/{generic => }/pipe.c (86%) delete mode 100644 sysdeps/unix/sysv/linux/powerpc/dl-brk.S delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S rename sysdeps/unix/sysv/linux/{powerpc/powerpc32/brk.S => prlimit64.c} (54%) delete mode 100644 sysdeps/unix/sysv/linux/s390/brk.c create mode 100644 sysdeps/unix/sysv/linux/sh/fanotify_mark.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/brk.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/brk.S delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/personality.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list rename sysdeps/unix/sysv/linux/{riscv => }/syscall.c (53%) delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/lseek.S delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/lseek64.S rename sysdeps/unix/sysv/linux/{m68k/brk.c => x86_64/x32/lseek64.c} (51%) delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list
Comments
This series introduces assumptions that various socket syscalls are available. That's not valid until the minimum Linux kernel version has been increased to at least 4.4 (depending on the architecture, but probably such a change would be done globally). In the case of getpeername and getsockname, at least, it's not safe (for 32-bit SPARC under 64-bit kernels) until Linux 4.20 - in general, before assuming a syscall to be present after any increase of the minimum Linux kernel version, it's important to review the actual state of support for that syscall in the minimum kernel version, including in compat syscall tables. As I previously noted <https://sourceware.org/pipermail/libc-alpha/2020-July/116453.html>, I think we ought to implement Carlos's proposal of removing the runtime check for old kernel versions before increasing the minimum kernel version, given that an increased version allows very little cleanup for e.g. x86_64. I also think that, when assuming presence of a syscall reduces the C implementation of a socket function to just calling a single syscall unconditionally, having one line for that function in a single syscalls.list file is better than having a manually-maintained C implementation.
On 18/11/2020 18:06, Joseph Myers wrote: > This series introduces assumptions that various socket syscalls are > available. That's not valid until the minimum Linux kernel version has > been increased to at least 4.4 (depending on the architecture, but > probably such a change would be done globally). In the case of > getpeername and getsockname, at least, it's not safe (for 32-bit SPARC > under 64-bit kernels) until Linux 4.20 - in general, before assuming a > syscall to be present after any increase of the minimum Linux kernel > version, it's important to review the actual state of support for that > syscall in the minimum kernel version, including in compat syscall tables. The idea of this socket changes is to align with default Linux kernel ABI, to make the outliers to explicit disable the syscall support where applicable and simplify the relation netweenn the syscalls.list and the required C implementations. The 'bind', for instance, is not listed on sysdeps/unix/sysv/linux/syscalls.list, so ports that do not imply on 'generic' will need to explicit disable on the kernel-features.h. Another idea of this change it to eventually remove the sysdeps/unix/sysv/linux/generic/ and make sysdeps/unix/sysv/linux the default implementation. And the idea is not change any current assumption, my goal is just reorganize the code. For getpeername and getsockname is indeed wrong assumption in my patch, it should disable both for !__arch64__ && __LINUX_KERNEL_VERSION < 0x040400. > > As I previously noted > <https://sourceware.org/pipermail/libc-alpha/2020-July/116453.html>, I > think we ought to implement Carlos's proposal of removing the runtime > check for old kernel versions before increasing the minimum kernel > version, given that an increased version allows very little cleanup for > e.g. x86_64. I thing this change is orthogonal to what I am proposing here. > > I also think that, when assuming presence of a syscall reduces the C > implementation of a socket function to just calling a single syscall > unconditionally, having one line for that function in a single > syscalls.list file is better than having a manually-maintained C > implementation. > I do agree, and my proposal here in once we have a proper support for direct syscall with bump minimal kernel support we can just remove the C implementation and move it to syscalls.list without the need to change and rework over various files.
On Thu, 19 Nov 2020, Adhemerval Zanella wrote: > And the idea is not change any current assumption, my goal is just reorganize > the code. Then I think the individual patches need longer descriptions that make this clear - that is, that say explicitly that the change is to the default, with the final value of the __ASSUME_* macro being unchanged for all glibc configurations. Because that's not what e.g. "Assume bind support" suggests to me. > For getpeername and getsockname is indeed wrong assumption in my > patch, it should disable both for !__arch64__ && __LINUX_KERNEL_VERSION < 0x040400. 4.20 for those two, I think, because of the compat syscall table.
On 19/11/2020 13:38, Joseph Myers wrote: > On Thu, 19 Nov 2020, Adhemerval Zanella wrote: > >> And the idea is not change any current assumption, my goal is just reorganize >> the code. > > Then I think the individual patches need longer descriptions that make > this clear - that is, that say explicitly that the change is to the > default, with the final value of the __ASSUME_* macro being unchanged for > all glibc configurations. Because that's not what e.g. "Assume bind > support" suggests to me. Fair enough, I will improve the message on the patches. > >> For getpeername and getsockname is indeed wrong assumption in my >> patch, it should disable both for !__arch64__ && __LINUX_KERNEL_VERSION < 0x040400. > > 4.20 for those two, I think, because of the compat syscall table. > Right, I will fix this also.