From patchwork Thu Jul 23 19:46:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 40155 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 B9E073861838; Thu, 23 Jul 2020 19:46:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9E073861838 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1595533615; bh=cy0cIwLEUm4a4vYgBakqPfNVJGFXEvc6LB9z1W+J1OA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Wm3mRez38qKt0nBw1fI9TW6S+ElCiabiqE64NyPh+C2GVWwrVXtzJbxUb4MSnwnKF U/4h8/AnLqYAVuAohCOc4r+eE/HzbHfaOMsjAwehqlJ3OfY7uiozOY+gdFnJBct254 UWIJXf35k3xoCINNZ8mTslFnHDlE/3HfxqBfe/Ak= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by sourceware.org (Postfix) with ESMTPS id 888A43858D38 for ; Thu, 23 Jul 2020 19:46:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 888A43858D38 Received: by mail-qt1-x842.google.com with SMTP id e12so5298688qtr.9 for ; Thu, 23 Jul 2020 12:46:52 -0700 (PDT) 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=cy0cIwLEUm4a4vYgBakqPfNVJGFXEvc6LB9z1W+J1OA=; b=S7llGSZqSDkhU2OcdcGFL+MR/xxSpTHGoHuEKudPcB51ScUC2HFzz/L5oj7pSoqwSn gRBRdBlgrm4+R05RbPPxnP+2U5tQmz4GQINytsqdBDLtGi58uXs5yDgTSvppoZPSG2VY eQsxjdMqtIP4LQN6ZOBLFMMU7VA1mKoAH4nDhlQTNck/NA1jkC5jpH0zNBZFLGDcdGke 8SU8R4jpk2zO31hCK4Zz99gtkNQAICYgC5kRfEwYFBVxNIxRPkLAG6FVJPPxoqbyexv/ 4XyBzkIHEStoWG0SvBhgrC5zvwyJzUT2CI4knZjoIdktMDr2BKDceqw5oBO2WYy6y2jN mRpQ== X-Gm-Message-State: AOAM532+Rik0FeopE5VN9RxNrBn/EtHF36mr8EiT2kyastHD4RuJH+Ln 2EkiPDVAFGI2YOlGKaf6d+djk9pA5uw= X-Google-Smtp-Source: ABdhPJxSgAXeDpIrYDQep4z8Zz2P68OkLPLfqz7bdon4L5IK5Dy5IN1giTObsC46ck+jHYwAliscew== X-Received: by 2002:ac8:44a8:: with SMTP id a8mr6094123qto.29.1595533611824; Thu, 23 Jul 2020 12:46:51 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id k56sm3570639qtk.61.2020.07.23.12.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 12:46:51 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 02/16] linux: Define STAT64_IS_KERNEL_STAT64 Date: Thu, 23 Jul 2020 16:46:27 -0300 Message-Id: <20200723194641.1949404-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200723194641.1949404-1-adhemerval.zanella@linaro.org> References: <20200723194641.1949404-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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 Cc: Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" It indicates that the glibc export stat64 is similar in size and layout of the kernel stat64 used on the syscall. It is not currently used on stat implementation, but the idea is to indicate whether to use the kernel_stat to issue on the syscall on the *stat*64 variant (more specifically on mips which its exported ABI does not match the kernel). Reviewed-by: Lukasz Majewski --- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/arc/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/hppa/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/ia64/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/microblaze/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/mips/kernel_stat.h | 6 ++++++ sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h | 1 + sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h | 6 ++++++ sysdeps/unix/sysv/linux/x86_64/kernel_stat.h | 1 + 13 files changed, 23 insertions(+) diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index 9bcc96c577..ff69045f8f 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -86,5 +86,6 @@ struct glibc21_stat }; #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/arc/kernel_stat.h b/sysdeps/unix/sysv/linux/arc/kernel_stat.h index 8fdd86b9e8..fd9b113f45 100644 --- a/sysdeps/unix/sysv/linux/arc/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/arc/kernel_stat.h @@ -19,6 +19,7 @@ /* Needed to elide the itemized copy code in common xstatconv.c. */ #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1 /* Nice side-effect of 64-bit time_t switch is these are same. */ #define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h index 0cbd010fc3..e8ad135e70 100644 --- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h @@ -31,5 +31,6 @@ struct kernel_stat { #define _HAVE_STAT64_NSEC #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h index b38bf741d3..c96a0589dc 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel_stat.h @@ -17,5 +17,6 @@ . */ #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/kernel_stat.h b/sysdeps/unix/sysv/linux/kernel_stat.h index ff54a4524c..b1bc1459f0 100644 --- a/sysdeps/unix/sysv/linux/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/kernel_stat.h @@ -35,5 +35,6 @@ struct kernel_stat #define _HAVE_STAT64_NSEC #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h b/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h index 4daaedc4b6..9ab1e50115 100644 --- a/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h @@ -49,5 +49,6 @@ struct kernel_stat }; #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h index e75f3e805b..21dba2de73 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h @@ -1,3 +1,6 @@ +#ifndef _KERNEL_STAT_H +#define _KERNEL_STAT_H + #include /* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the userland data structures are not identical, because of different @@ -57,5 +60,8 @@ struct kernel_stat #endif #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 0 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h index 75610b8df3..5757e65f8e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h @@ -48,5 +48,6 @@ struct kernel_stat #define _HAVE_STAT64_NSEC #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h index 5c10da3356..9f11b69e4f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h @@ -17,5 +17,6 @@ . */ #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 0 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 b38bf741d3..c96a0589dc 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h @@ -17,5 +17,6 @@ . */ #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h index 5c8cacaf67..4a2df42d37 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h @@ -32,5 +32,6 @@ struct kernel_stat #define _HAVE_STAT64_NSEC #define STAT_IS_KERNEL_STAT 0 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 0 #define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h index d14b2487ac..0f3d405239 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h @@ -1,3 +1,6 @@ +#ifndef _KERNEL_STAT_H +#define _KERNEL_STAT_H + /* Definition of `struct stat' used in the kernel */ struct kernel_stat { @@ -45,5 +48,8 @@ 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 + +#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 b38bf741d3..c96a0589dc 100644 --- a/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/x86_64/kernel_stat.h @@ -17,5 +17,6 @@ . */ #define STAT_IS_KERNEL_STAT 1 +#define STAT64_IS_KERNEL_STAT64 1 #define XSTAT_IS_XSTAT64 1 #define STATFS_IS_STATFS64 0