From patchwork Thu Nov 10 21:06:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 81755 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp944397qge; Thu, 10 Nov 2016 13:07:01 -0800 (PST) X-Received: by 10.36.111.135 with SMTP id x129mr18774516itb.88.1478812021470; Thu, 10 Nov 2016 13:07:01 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id gy9si5635991pac.294.2016.11.10.13.07.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2016 13:07:01 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-74668-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-74668-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74668-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:from:to:date:content-type :mime-version; q=dns; s=default; b=Hoves4Kkz6Na+bOtgXgVO/z+etKwq qBPxU5Lk+Vhgo5Yo/qldriaIWDKj2KjJmQThaxEe2L0Eqm911S/fDh9uilSwU+sY CGGRUlBHD5q3AzwOdWoRcWkCoP5lOeGYzF5alvqW18FJssuMXDCiid9HPLUQxsvn bjg7t3Zl6KjdfI= 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:message-id:subject:from:to:date:content-type :mime-version; s=default; bh=/CCLMVGkKAzFgi+77J+xRmoS1NE=; b=YkQ r8kG5BDmSCalFndH833DFSqbLQk5wBvkHIB9H2SqnOQ+yOQkzOdvsiQzXL2en4qi naMrw2Q+dYLLpMgQXkj5oxiy45xI05AnKi++3WuHpPcXoz8e3uap2vQ4AgvrUKza zEhOxg/Q7K1H8lZq4sJO5BoEfokdQu7Xc8wBn0wo= Received: (qmail 69332 invoked by alias); 10 Nov 2016 21:06:51 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 69318 invoked by uid 89); 10 Nov 2016 21:06:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:NAM03-B, H*RU:sk:NAM03-B, H*r:sk:mail-by, HX-HELO:sk:NAM03-B X-HELO: NAM03-BY2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; Message-ID: <1478811993.4630.87.camel@caviumnetworks.com> Subject: [PATCH] Use XSTAT_IS_XSTAT64 in generic xstat functions From: Steve Ellcey To: Date: Thu, 10 Nov 2016 13:06:33 -0800 MIME-Version: 1.0 X-ClientProxiedBy: CY1PR13CA0085.namprd13.prod.outlook.com (10.164.65.11) To SN2PR0701MB1071.namprd07.prod.outlook.com (10.160.59.17) X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 2:7Z0rIpxYeVOxNtzg4Xamlgs75R+WfQ2PfPT+RR5BDuIPi9LcrEErIgCJ8lMG1o/GzNFKnEVA/cwKvQ/AIj+pTeoF3SGRvQHNDySjEAzFL7AGTnRjkxITlP/XkTDIR9cG7zYd4ot2t0XzSStPAIXlqN5VJw4YasK5gzJw1FZgY0s=; 3:RZQ9f/b/+Xpj8zekPSGLFvoM45uFwaWMLXCze6bR5RKjEmocnBgvKkPG1gH/Pghy5v06yv7bsgzb1HOHKUHcuu4DETTqXKmfzfb+r4n8eStRSUG24ZVp2jueD+ch17S3w+VY1XoCCIWCezE4WK3J70Lm7+NZvUxS8gWWZ3SoafA= X-MS-Office365-Filtering-Correlation-Id: 829c1fe4-abf3-4b11-3b43-08d409ad74b5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN2PR0701MB1071; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 25:1r33vrmmIkw/Udfl3yWhIdfTCQ19ipIZ1emm6iub4JfP232aqmOJBiE/8+jYmv4N3xWkdO/HU64/4G0kbI24f097f+LDcW4V638xZ4/enzqMmcGgIZEhPpqKYmWvVQ2LR4YSaI3QkWpZDJcApe7cGHC8k9mVELJqbPsiq30L3dI8r+2/b+HP4qqpJU7tvyc/0z5yw6uRBmZFzhrHfofTTBT2AOQB5Xm/27rd6Yhwilm0CN5JXpLBNj91U2jQktzjZn49V6WP3Ew6F0WMjz6b/aM8OfpSL8mHkw1vf8LBmgn2GrCRfxaACubh4lTukBw2DHug1rH9c1zQ9+ix4jKZQiLpmvlcsQmvGJYUXSrF/PNlwx39id4vkcgtyqhC7NMD/yrztjbeUlqR+TsI75ocOHCoFkMUIpxdqtWzvz8eNNI4aTws/HI7gGIHXC3dLaXQHM+d6V+s1+RNMBVKs0v0UFJZkTTBB5eZwJ+QTYub8CBvqZSFYeVJE4I78dMc5sQcdDW44cdXxEaxphADrfcO5oNqIjThF5W14zkC7HgGTRNEE+za1TfKAO8K29RQDs+TuNEIuEO16vTvhiKhnfv4AgQiekjpz/nOFGo2kM9XrsHsnl++ckVewffENvu7WEoZnAkmA3GMgSIz6JAtzoKULDvD9xYD3ZetL2rhzY7P0Np/kz3TnkZ7OdFr+6f6zdlCkDmDd4CRg6fnmyI6C4P8alM1vgM+PM5sTh/luw4q+NHIn9k/gr3hC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VCNutbOs3qtot5txg2yuUxFIIRaYc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:SN2PR0701MB1071; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1071; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 4:G90995umce6O5A1DHkKfu7w2JdjqwfmFf/7TMAYAGPqgCLwGwnYfct+T5+T362uNv+iqm1dnxxFOVNpRKsHTTLWX7QKGEhpq1FfAkX9JNXsUMwkXCh/nk4VRSia1vOzURq5BsA8oruVb328AQszWmKGIXd0YR3vk4qfHfK4afGEudgZlDljqXoY7pFHzWnLjh41y40xfkELtYVkaPVJIQk+AD/z63IbBRrDv1kC5X2Q2zKpkPyMOfRZuK+B3kUkZANVl4Lhcq7TQPc9N3RYHwWtMKThbcD55HjORGHlaUlbTjYfmQfoVJ2a9zxyIsXClzb534O23KOardHg4OAbnWbITQtp3e3+tPVOPJqnlDhpqvpyBER0g0mO82cCWsGWjRBJWZD4KwFbmX064YDjE8pSCrz5QmO+axN32z5wCdSc= X-Forefront-PRVS: 01221E3973 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(377424004)(2351001)(92566002)(110136003)(77096005)(5660300001)(66066001)(50986999)(50226002)(68736007)(6916009)(450100001)(101416001)(33646002)(42882006)(6116002)(4610100001)(7846002)(3846002)(7736002)(568964002)(81156014)(36756003)(81166006)(5890100001)(189998001)(84326002)(42186005)(586003)(4001150100001)(53416004)(97736004)(305945005)(69596002)(107886002)(8676002)(103116003)(2476003)(105586002)(2906002)(106356001)(512874002)(15760500001)(41533002)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1071; H:sellcey-lt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR0701MB1071; 23:PVBoK03oZWBneJhOFV2hmBDioEGxS1Ano8vlAmF?= =?us-ascii?Q?KNl7Ph9i6pca2U7UKHGrMj7rVWMvotToprPo9+kuctRZkdAyrEHRFaNFt36w?= =?us-ascii?Q?KmNjFE745Gp7JAOKqpUWtxegCR+LGWebxB9bVQmkB/0lZXql242VcGndWHsH?= =?us-ascii?Q?o0REIx6sjCZKexc9nF7IG11fiCy5slZiwoMuRIDfcguS3W9THlex1Grj0c6N?= =?us-ascii?Q?vWvJlMCUXEWmpZ1R9UyfoW16iMx9XFkeVWiyYHJN0lcCGmwrIKCCTfd0J1B0?= =?us-ascii?Q?jgAuvDfRhH0oT2oh6Jr2150N5Rnxx6yXR8vGlQuW+2yeNblCl3Boq9FNJ5Tw?= =?us-ascii?Q?SWUKCvcgo9eVeSmc2p8ZPMwOAawIE/2k+7CJEKxGUBt/oUVKn1RNjsc0EzNN?= =?us-ascii?Q?9ekoFquFKZmsGO/gxyEgBoBs1PF4lo73svwSxlntCm9Gsv7++yoynEk0pkZl?= =?us-ascii?Q?EOgIpqPiqpq0Dzq4S1uwZAxDN9ymq216/t0Axj9hcRvdDR1esqEQi/WVluNA?= =?us-ascii?Q?U8zZ/1Hm1h0Dd8Xq0VrcJZAjW+SPR30iej2+3z5brWoxRbocFSHnN4w83p6j?= =?us-ascii?Q?qlGjR98mPon8Iabu5B57BTJls1hfYIqii6OiJNeU8nf2ftqT/CKM2+9Ww7/d?= =?us-ascii?Q?03n8ZLS4/2mk9GnRxcVrfqqItPCRB3aRAqwD+TwhbwijOtDpXyJMnjNMSa7I?= =?us-ascii?Q?B1TuVfSkCEgok4SZArULqoRRaZped4GSpN/mfXPCrgItibtdWRDcQiChFY0Y?= =?us-ascii?Q?YT50eWpjvUCuRWjT0ZVGOHBwd0U82mSBJ8bbayjCuoTTztK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83CGmQB2SHT0AICpK3qL7oEh28=; 24:R8Z4SO8SjsnQo/lB7b8QxZ0OeBv4zHqfG7XRYyFFfHprNveJCAkvtvKuwMRxETeemNcVeO2/UFO2jSHFqYnqrMT63Xt5yLAjz8sADQcvsns= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 7:n2IQ+qgU+MH1I2lJslI0PM1GJbeRsILaKsdOJBkhCAtuGdBQLhlvw/7pm29tiszSB9E0dgtmrsWZaf/gfRKX/NcoGsJ9ECaVA5awJgh5lCt6kiHPqKotqrYWekpbjyN9RdR5cGSXAzg6mb5JulnXVKzLdtO57CbZWXfbH9WGj/rn7/vS3MLb0u1BeqMmAmcrgZciuRyExvb6cXczy2AXhAYm7lyvFnEfXbIBvfJXER8+f5/RwfE39QHvWeX3+ixNW4n8YTyuAQI27egOCgbgB5tidTwccCLdwDQ/NoCA/D5xsKxis2tNIw/rNc47dZ+mBv9/v2BxgwgtNHX6pTxCEwIH2UCoD6WEREEE2BxgIRA= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 21:06:35.5817 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1071 Here is an xstat patch to allow the 32 bit generic xstat functions in sysdeps/unix/sysv/linux/generic/wordsize-32 be aliases of the 64 bit versions.  This is similar to what is done for the non-generic xstat functions and uses the same macro, XSTAT_IS_XSTAT64, to control if they are aliased or not. I tested this on x86 and aarch64 using the top-of-tree sources where it has no affect and on aarch64 with the rest of the ILP32 patches where it is used and there were no regressions. As with the earlier statfs patches I don't know if we want to stick with this defined/undefined use of XSTAT_IS_XSTAT64 that already exists or if I should change it to be defined all the time to either 0 or 1. For this patch, I left it as is. OK to checkin? Steve Ellcey sellcey@caviumnetworks.com 2016-11-10  Yury Norov       Steve Ellcey   * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c: Do not define fxstat if XSTAT_IS_XSTAT64 is defined. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Ditto for fxstatat. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c: Ditto for lxstat. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c: Ditto for xstat. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c: New file. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c: New file. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c: Make __lxstat an alias of __lxstat64 if XSTAT_IS_XSTAT64 is defined. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c: Ditto for __xstat. diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c index dd52011..ac015c0 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c @@ -25,6 +25,7 @@ #include #include +#ifndef XSTAT_IS_XSTAT64 #include "overflow.h" /* Get information about the file FD in BUF. */ @@ -43,3 +44,4 @@ __fxstat (int vers, int fd, struct stat *buf) hidden_def (__fxstat) weak_alias (__fxstat, _fxstat); +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c index e69de29..00f9119 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c @@ -0,0 +1,36 @@ +/* __fxstat64 () implementation. + Copyright (C) 2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 + . */ + +/* Hide the prototypes for __fxstat and _fxstat so that GCC will not + complain about the different function signatures if they are aliased + to __fxstat64. If XSTAT_IS_XSTAT64 is set then the stat and + stat64 structures have an identical layout but different type names. */ + +#define __fxstat __fxstat_disable +#define _fxstat _fxstat_disable + +#include + +#undef __fxstat +#undef _fxstat +#ifdef XSTAT_IS_XSTAT64 +weak_alias (__fxstat64, __fxstat) +weak_alias (__fxstat64, _fxstat) +hidden_ver (__fxstat64, __fxstat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c index dc7f934..b00f65d 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c @@ -26,6 +26,7 @@ #include #include +#ifndef XSTAT_IS_XSTAT64 #include "overflow.h" /* Get information about the file NAME in BUF. */ @@ -42,3 +43,4 @@ __fxstatat (int vers, int fd, const char *file, struct stat *buf, int flag) return -1; } libc_hidden_def (__fxstatat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c index e69de29..2d72fb1 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c @@ -0,0 +1,37 @@ +/* __fxstatat64 () implementation. + Copyright (C) 2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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 + . */ + +/* Hide the prototype for __fxstatat so that GCC will not complain about + the different function signature if it is aliased to __fxstatat64. + If XSTAT_IS_XSTAT64 is set then the stat and stat64 structures have an + identical layout but different type names. */ + +#define __fxstatat __fxstatat_disable + +#include +#undef _STAT_VER_LINUX +#define _STAT_VER_LINUX _STAT_VER_KERNEL + +#include + +#undef __fxstatat +#ifdef XSTAT_IS_XSTAT64 +weak_alias (__fxstatat64, __fxstatat) +libc_hidden_ver (__fxstatat64, __fxstatat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c index 395f98b..4fec6c9 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c @@ -25,6 +25,7 @@ #include #include +#ifndef XSTAT_IS_XSTAT64 #include "overflow.h" /* Get information about the file NAME in BUF. */ @@ -41,3 +42,4 @@ __lxstat (int vers, const char *name, struct stat *buf) return -1; } hidden_def (__lxstat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c index e1c15a8..49ed940 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c @@ -16,6 +16,13 @@ License along with the GNU C Library. If not, see . */ +/* Hide the prototype for __lxstat so that GCC will not complain about + the different function signature if it is aliased to __lxstat64. + If XSTAT_IS_XSTAT64 is set then the stat and stat64 structures have an + identical layout but different type names. */ + +#define __lxstat __lxstat_disable + #include #include #include @@ -36,3 +43,9 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf) return -1; } hidden_def (__lxstat64) + +#undef __lxstat +#ifdef XSTAT_IS_XSTAT64 +strong_alias (__lxstat64, __lxstat) +hidden_ver (__lxstat64, __lxstat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c index fdd2cb0..8fc13bd 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c @@ -25,6 +25,7 @@ #include #include +#ifndef XSTAT_IS_XSTAT64 #include "overflow.h" /* Get information about the file NAME in BUF. */ @@ -41,3 +42,4 @@ __xstat (int vers, const char *name, struct stat *buf) return -1; } hidden_def (__xstat) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c index 2252337..75a90f0 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c @@ -16,6 +16,13 @@ License along with the GNU C Library. If not, see . */ +/* Hide the prototype for __xstat so that GCC will not complain about + the different function signature if it is aliased to __xstat64. + If XSTAT_IS_XSTAT64 is set then the stat and stat64 structures have an + identical layout but different type names. */ + +#define __xstat __xstat_disable + #include #include #include @@ -36,3 +43,9 @@ __xstat64 (int vers, const char *name, struct stat64 *buf) return -1; } hidden_def (__xstat64) + +#undef __xstat +#ifdef XSTAT_IS_XSTAT64 +strong_alias (__xstat64, __xstat) +hidden_ver (__xstat64, __xstat) +#endif