From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6DB3E1F461 for ; Thu, 16 May 2019 15:06:56 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=PdlIe98dCQPrOgoh STFqXmn5njwCZP3hj83z05KviX8x7y6zXqRCyOKMO87XBd5hW+qsQNaN8JTUIKNw j7IJALBnEAafgfoHME9R1P7ayHKMmEKiziFDnviCPYixE6iHvdv5J+Hc5RQKC2EY oAPihkxryn5obtOfZeE/uSUxnrQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=CFa8U1MS0UMEM85of64iwg OxyxM=; b=eRiCOxQ/vty7/X7zVWULVa88VOwtxJqRToQ6WplbRqoJPKmqGEdME2 t7665k5TeH29uMs0MLklnNeWss91Mi41W6ixXfGX2j4xmGuvYhSLAx5xWJUAF+Xb Iwq8JEqB7L6JXqYoTeo17BoS6ZFxY8JcTGefPbPnn81KFZrte1ubQ= Received: (qmail 102779 invoked by alias); 16 May 2019 15:06:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 102520 invoked by uid 89); 16 May 2019 15:06:53 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UZCllHk7SRGc25d4nIZKgLDm/k963K5rxO6sjp00ftk=; b=efWZ8GhZ3doyaB+4+eQmLunfvHT0s+77wwdP3SqJUi1/PX+zgs7zEzcyvgLazEyg1C ysAWlX7TXkWLbqkjdTaGEqeFaWk6+eR7LNTVpq7ekuGhSfPMuE8DxT++A+G5eVKud5aP dj+fvPs9Dy/s+61vkskWXnr5x8JqyFoGO9ei+V1FrL/My3UvfUs45YeXp4ppDljVbyHK GtHIhWbVLlJn9DiaFx+hJUhCPoDvbsdQPGxPdZmN5xEGqenkjxgdg/CU9pPCnZBk9UUe RqKezooknBPemwEP20w1230heVKljPdLneOLpeKwr7mQrHoxvtOYHJvCZ2GKUQydJOr5 zq9g== To: libc-alpha@sourceware.org References: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> From: Adhemerval Zanella Openpgp: preference=signencrypt Subject: Re: Update kernel-features.h files for Linux 5.1 Message-ID: <7a32b26b-76a6-dbb1-d2ab-f2986b49c1e7@linaro.org> Date: Thu, 16 May 2019 12:06:46 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 13/05/2019 18:33, Joseph Myers wrote: > On Fri, 10 May 2019, Stepan Golosunov wrote: > >> The newly added direct ipc syscalls are different from the old ones: > > Thanks for pointing this out. Here's a revised patch version with the > __ASSUME_DIRECT_SYSVIPC_SYSCALLS changes removed. > > > Update kernel-features.h files for Linux 5.1. > > Linux 5.1 adds missing syscalls to the syscall table for many Linux > kernel architectures. This patch updates the kernel-features.h > headers accordingly. __ASSUME_DIRECT_SYSVIPC_SYSCALLS is not updated > because of the differences between new and old syscalls described in > . I > believe the statfs64 structure used by alpha matches what the new > kernel syscalls use, but that should be reviewed carefully. > > Tested with build-many-glibcs.py. LGTM. Reviewed-by: Adhemerval Zanella > > 2019-05-13 Joseph Myers > > * sysdeps/unix/sysv/linux/alpha/kernel-features.h > (__ASSUME_STATFS64): Only undefine if [__LINUX_KERNEL_VERSION < > 0x050100]. > * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_STATX): > Likewise. > * sysdeps/unix/sysv/linux/sh/kernel-features.h > (__ASSUME_STATX): Likewise. > > diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h > index f3298b234e..4a5d029c1d 100644 > --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h > +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h > @@ -22,9 +22,11 @@ > > #include_next > > -/* There never has been support for fstat64. */ > -#undef __ASSUME_STATFS64 > -#define __ASSUME_STATFS64 0 > +/* Support for statfs64 was added in 5.1. */ > +#if __LINUX_KERNEL_VERSION < 0x050100 > +# undef __ASSUME_STATFS64 > +# define __ASSUME_STATFS64 0 > +#endif Ok, alpha statfs64 used on syscall entry points defines the structure as -- typedef unsigned int __u32; __extension__ typedef unsigned long long __u64; typedef struct { int val[2]; } __kernel_fsid_t; struct statfs64 { __u32 f_type; __u32 f_bsize; __u64 f_blocks; __u64 f_bfree; __u64 f_bavail; __u64 f_files; __u64 f_ffree; __kernel_fsid_t f_fsid; __u32 f_namelen; __u32 f_frsize; __u32 f_flags; __u32 f_spare[4]; } ; -- While glibc does: -- #define __S64_TYPE long int #define __FSBLKCNT64_T_TYPE __S64_TYPE __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; #define __FSID_T_TYPE struct { int __val[2]; } __STD_TYPE __FSID_T_TYPE __fsid_t; struct statfs64 { int f_type; int f_bsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsid_t f_fsid; int f_namelen; int f_frsize; int f_flags; int f_spare[4]; }; -- My understanding is __u64 and __fsblkcnt64_t should have identical sizes on alpha. > > /* Alpha used to define SysV ipc shmat syscall with a different name. */ > #ifndef __NR_shmat > diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h > index 0f4948b8e0..333947931d 100644 > --- a/sysdeps/unix/sysv/linux/ia64/kernel-features.h > +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h > @@ -26,8 +26,10 @@ > #define __ASSUME_SEND_SYSCALL 1 > #define __ASSUME_ACCEPT4_SYSCALL 1 > > -/* No statx system call on ia64 yet. */ > -#undef __ASSUME_STATX > +/* Support for statx was added in 5.1. */ > +#if __LINUX_KERNEL_VERSION < 0x050100 > +# undef __ASSUME_STATX > +#endif > > #undef __ASSUME_CLONE_DEFAULT > #define __ASSUME_CLONE2 Ok (commit 7349ee3a97edbec60ada97e81b26b9c20e96156b). > diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h > index 767df721b8..b11a5cb544 100644 > --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h > +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h > @@ -52,7 +52,9 @@ > # undef __ASSUME_COPY_FILE_RANGE > #endif > > -/* sh does not support the statx system call. */ > -#undef __ASSUME_STATX > +/* sh does not support the statx system call before 5.1. */ > +#if __LINUX_KERNEL_VERSION < 0x050100 > +# undef __ASSUME_STATX > +#endif > > #endif > Ok (commit d25a122afd4374071bb8489a980051da37136ee1).