From patchwork Mon Feb 8 21:49:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1437926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ibAY71+C; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DZKSR1KbKz9sBJ for ; Tue, 9 Feb 2021 08:49:59 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F5BF3840C16; Mon, 8 Feb 2021 21:49:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F5BF3840C16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612820997; bh=wVsC1p5bG1RLItV7zQyIAHiTxxmb8jhSmuh4QPFeUNE=; 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=ibAY71+CUBm9h/iGSaYzyDWLKnsAKvyk4QO1rsEmnEnvWpnZn6iyhIGOoJHUuIg8P 7Yb6s5xUm2EMwASPpIxMIoUMXeXA9xsCQCCmxjBTpRnShRZ7NPljNDlqPG0rKxvT4U jomTOW3iP1jiqbcs7NHcHNEFce3LDX5kczA5wdJk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by sourceware.org (Postfix) with ESMTPS id 57AC93840C16 for ; Mon, 8 Feb 2021 21:49:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 57AC93840C16 Received: by mail-qk1-x730.google.com with SMTP id 19so5919960qkc.13 for ; Mon, 08 Feb 2021 13:49:54 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wVsC1p5bG1RLItV7zQyIAHiTxxmb8jhSmuh4QPFeUNE=; b=Jgwi837f4z4OLtvX8gOK8m12cccL75eMpoiTA4XFx8FrY7cq0XRx/cp3QJUJdqh5z5 f/hPgB/C6a/gkSiqCLFqNCywjyEezE4x6q0WwWtWXIH4KVL8NdVYy7LfPjMo017FGEoQ 1njMtkGuj4Rj/m7AAQrONwwXiFbM1WsWPWNVpgFR7yQYox0Ab+1Y+mxOiu2SSLpEtqZD IgbBfxAnbmTtBh320n0kzcvnviD/qex87OzBrBNDtGWd23S2fiI9lPqMxGBX/iOhbxWm wF7pLJN9QoSGh3Ht0zakYWOaaPrIO4S0MoCTgr5wBLjbzfiGku1xsBV4azdhyEmapRCt hUKQ== X-Gm-Message-State: AOAM531nsbIK8n4ZHAmJxk5EPCEImHLF6/TnNt4VD6dSBF+Qo0C3Nevb vuFY/cdb1S+yR4kcpPiwALRrONaH8dPXOw== X-Google-Smtp-Source: ABdhPJzXzolblhKx04pfU34f0n85jpibXyIGW8zGopn7SV3EnU5I4K23pQz0wCNLt/nyWdjZKpZWnA== X-Received: by 2002:a05:620a:12d5:: with SMTP id e21mr18869725qkl.131.1612820992943; Mon, 08 Feb 2021 13:49:52 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id e15sm12720078qtq.43.2021.02.08.13.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 13:49:52 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 01/10] linux: Fix STATFS_IS_STATFS64 definition Date: Mon, 8 Feb 2021 18:49:27 -0300 Message-Id: <20210208214936.1502047-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210208214936.1502047-1-adhemerval.zanella@linaro.org> References: <20210208214936.1502047-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.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.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 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@sourceware.org Sender: "Libc-alpha" aarch64, arc, ia64, mips64, powerpc64, riscv32, riscv64, s390x, sparc64, and x86_64 defines STATFS_IS_STATFS64 to 0, but all of them alias both statfs to statfs64 and struct statfs has the same and layout of struct statfs64. The correct definition will be used on the {f}statfs{64} consolidation. This patch does not change code generation since the symbols are implemented using the auto-generation syscall for all the aforementioned abis. Reviewed-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/aarch64/kernel_stat.h | 21 +++++++++++++++++++ sysdeps/unix/sysv/linux/ia64/kernel_stat.h | 2 +- sysdeps/unix/sysv/linux/mips/kernel_stat.h | 6 +++++- .../linux/powerpc/powerpc64/kernel_stat.h | 2 +- sysdeps/unix/sysv/linux/riscv/kernel_stat.h | 2 +- .../sysv/linux/s390/s390-64/kernel_stat.h | 2 +- .../sysv/linux/sparc/sparc64/kernel_stat.h | 7 +++++-- sysdeps/unix/sysv/linux/x86_64/kernel_stat.h | 2 +- 8 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/aarch64/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/aarch64/kernel_stat.h b/sysdeps/unix/sysv/linux/aarch64/kernel_stat.h new file mode 100644 index 0000000000..33ad1b622b --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/kernel_stat.h @@ -0,0 +1,21 @@ +/* Internal definitions for stat functions. Linux/AARch64 version. + Copyright (C) 2021 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 + . */ + +#define STAT_IS_KERNEL_STAT 1 +#define XSTAT_IS_XSTAT64 1 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h index e1eac69850..ee05a15590 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h @@ -19,4 +19,4 @@ #define STAT_IS_KERNEL_STAT 1 #define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index 21dba2de73..e4b0f211ca 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -62,6 +62,10 @@ struct kernel_stat #define STAT_IS_KERNEL_STAT 0 #define STAT64_IS_KERNEL_STAT64 0 #define XSTAT_IS_XSTAT64 0 -#define STATFS_IS_STATFS64 0 +#if _MIPS_SIM == _ABI64 +# define STATFS_IS_STATFS64 1 +#else +# define STATFS_IS_STATFS64 0 +#endif #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h index a1f66bcece..bc7390c9ff 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h @@ -19,4 +19,4 @@ #define STAT_IS_KERNEL_STAT 1 #define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/riscv/kernel_stat.h b/sysdeps/unix/sysv/linux/riscv/kernel_stat.h index ee8b37a9eb..4ad7913762 100644 --- a/sysdeps/unix/sysv/linux/riscv/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/riscv/kernel_stat.h @@ -20,4 +20,4 @@ #define STAT_IS_KERNEL_STAT 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h index e1eac69850..ee05a15590 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h @@ -19,4 +19,4 @@ #define STAT_IS_KERNEL_STAT 1 #define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h index 0f3d405239..29d18908da 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h @@ -50,6 +50,9 @@ struct kernel_stat64 #define STAT_IS_KERNEL_STAT 0 #define STAT64_IS_KERNEL_STAT64 0 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 - +#ifdef __arch64__ +# define STATFS_IS_STATFS64 1 +#else +# define STATFS_IS_STATFS64 0 +#endif #endif /* _KERNEL_STAT_H */ diff --git a/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h b/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h index e1eac69850..ee05a15590 100644 --- a/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h @@ -19,4 +19,4 @@ #define STAT_IS_KERNEL_STAT 1 #define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1