From patchwork Wed Nov 9 21:21:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 81571 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp411322qge; Wed, 9 Nov 2016 13:21:34 -0800 (PST) X-Received: by 10.98.163.71 with SMTP id s68mr2994009pfe.60.1478726494562; Wed, 09 Nov 2016 13:21:34 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id yx2si1041838pab.293.2016.11.09.13.21.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 13:21:34 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-74607-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-74607-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74607-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:in-reply-to :references:content-type:mime-version; q=dns; s=default; b=IVDBe +yF5rU4PaMIlm/llv1zIiLr1K6CnNYRCqaIqJ3Zijr/EYNTpP4ciBhslXqb+raw8 Wywao2jt3ZC9/gSaol772KvCSF8PAzh+q3YB/tAfdVNJ9Wmd2guYuObRdN6LECxt V8KLORcgK1B+9MeMbXd3J5sDJqPPW7VSdbsHII= 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:in-reply-to :references:content-type:mime-version; s=default; bh=GovPnzccSAP UuUCmP8e7XsqeWOA=; b=c73i/MBjs+542wn0Jmt5OPRGWNohiiTjlJHM3XtSZbg RH+z+meCDcqVE1UW0HZkbrhsef24vXUt60Cl3KnsPQYI6rnUG8+TZ/FKjXgKy2/E O8X8dekgOfZfQq/yJYX7XMwTPaToeyprhr6h+9G/JMgrfeeJrT3aDPJ2t9aV2lUY = Received: (qmail 24382 invoked by alias); 9 Nov 2016 21:21:24 -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 24362 invoked by uid 89); 9 Nov 2016 21:21:23 -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=7911, filesystem, wordsize32, wordsize-32 X-HELO: NAM01-BN3-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; Message-ID: <1478726466.4630.71.camel@caviumnetworks.com> Subject: Re: [PATCH] Allow [f]statfs64 to alias [f]statfs From: Steve Ellcey To: , Date: Wed, 9 Nov 2016 13:21:06 -0800 In-Reply-To: <201611072213.uA7MDcpB020773@sellcey-lt.caveonetworks.com> References: <201611072213.uA7MDcpB020773@sellcey-lt.caveonetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: CY4PR02CA0038.namprd02.prod.outlook.com (10.175.57.152) To SN2PR0701MB1069.namprd07.prod.outlook.com (10.160.59.156) X-MS-Office365-Filtering-Correlation-Id: 1976ae70-146e-486a-92e8-08d408e65373 X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1069; 2:yti7jNa/CQUAS1j7Ihu4K9jt/Wdo/D9XfYRbn4CQtlDYKMKYxnFU3/PkGTIIFge2bcG8/ywvsolLUxMe3PMfi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M4m8lJHOF93s+Ib7CQKfx4tg24vEZeoicQ3fftJHlQjH127BsJKTeMY1Eq6bRPC1UGfFk= 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:SN2PR0701MB1069; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1069; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1069; 4:lELQAoAK+l727IoPAcYQuKrCVaoGgyWOuLp6za4AA9dvRGPV0eOv/qxDNw6Q6DpxThJNJDEUzhCTdkh9JRwAbWohg+koq3lIJUvNaZA2KA8gp45XOsEM9obrghtyl6oWIv0WKc9PkXdHccJtixDzT3uiKaSK+sb6vwPwJGGRATb6CsGxGtDioXNAe927XIxiiIbKari8Y5epg8m/Red+aOT/BSAFjBrsHDjyWbrAATsC+jGFFvXsjiTYx2ZiXmfOlkSNEKnurkFwQCNo9xA4pf7dHKxk3lD4DY1PMcT0UvekZ+sSzWBIuBTtoURbaCmxAiQo19ZFsidEUncjeFT1qX+J/bBmAvK3wMD84oGsdup+10tlmGkfgEE9kK9G0w/PCwYJXCT24uN1Po76/jDJrLUKPsI9GuEcDsu12JC8GdM= X-Forefront-PRVS: 0121F24F22 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(24454002)(377424004)(189002)(3846002)(77096005)(586003)(8676002)(68736007)(50226002)(6116002)(42186005)(66066001)(2476003)(568964002)(81166006)(81156014)(7736002)(7846002)(305945005)(2906002)(97736004)(189998001)(450100001)(5001770100001)(92566002)(6666003)(107886002)(36756003)(106356001)(84326002)(103116003)(5660300001)(105586002)(33646002)(53416004)(42882006)(2950100002)(101416001)(4610100001)(69596002)(50986999)(512874002)(5890100001)(76176999)(229853002)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1069; 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; SN2PR0701MB1069; 23:A8+xykv6ULDm3vn/c3X8j9dV9UHV+gt+/PI3x5T?= =?us-ascii?Q?Czy3CtTf08zkHA79GthTUXT67Lmwx9DSB8hdHR4SeQ6LNxk0mG8crEX6hrPa?= =?us-ascii?Q?dfnbGYLwcsIzPclvBpt/+TbN/amoLCe8irI2jdhJphRdKr/4EAyPmorjxUFK?= =?us-ascii?Q?zQcg+QWnVaf5a54Fb9fZB7Jd7QUPeQGtWINIR+xpNHKLqkr3b3o8pNZ5O3y+?= =?us-ascii?Q?U4WjVBhfKR1k1rZDEiPXMMwaHzhNUsw3VjtrciZmK0KAX0hEXQ0rvcMMvEH3?= =?us-ascii?Q?42csvncGsYUVAnUE4R2gFunBtlwDRZ4uW/DsQDD7jBob4ioaYsuF5z6CNMTX?= =?us-ascii?Q?5RPqqTC+hBwuspHXgbD901N1Oi0BiqM7YNr4ILHFUygnS7v4WqNd9onUlWo7?= =?us-ascii?Q?3tWKvMEDHnIV24euHGrIqC5Xzw9t5eVT7MtEubxu9hKqynTY6zFyDNXpPxYn?= =?us-ascii?Q?zgQ+ohr7anZ0eAwgN80ZRDcymNw8c0S89uYsbpHQ5Dg2bgAQFrlnc5CPiB95?= =?us-ascii?Q?BA6JfdW1SXvlecxbVh2qzPkaScuffUy7FQ78iwHLFwxQZvXAT38Vcpw3V5ms?= =?us-ascii?Q?KvJEX3iecj0jQmgd1Fl5/YaiTcxCMnei+Yc8eynjCrwIr4UgMEer70JtqrNl?= =?us-ascii?Q?paoPYnBk7Ueh99KL3aRaZEoY1wHOu91fRT8RDvzz2Q7jUwDukYjeaCnSmZ/C?= =?us-ascii?Q?i5fP2N4Uugh8eLs/4BWpTLWqGxzo6+JJ2a99elj/bvsN8ZR8SsSZO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3NDuwTrPriJ3U+J0PKtBlX2HBe+i10jYloMGUsHmpDxus9CSPKEKB7RtIggxrJXDTO5nrxpL66trvoFq84taCvc75s=; 24:+quoaFTtSJaYDGEOFi7S1max5kKKQxlqURyrO6IZVxA1tPZXY1PsHG7vC+FUeIqQQDtTT7t5k0PlxowCzmZtXeiSe3A2h8AVfnJcFpMeJIo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1069; 7:ramQ/TZYwDsQDpTxJ+ML+59ydU0Smd5xYlqEr6qXjfqIRBuIkvzPksjUpbCwEaW1cwMy3ES2FNvVXJi0cz9NhZt1nz63EBWBqREB4pWqiKk7nimANHpPzp8y+bk2iHAesazmvv6wt0VuwJw09VuzmufBCFzodtPbpId99vzfeVNXjS03MoC57+MZ+i6M9BUDU1iFHUGu7xxOuAmn1QMtYQ9yNPjPos1wboq6C7UUZCb+PzpxANGET4pMwOV9D/SQRU8DI9NKOiBjTsBeIUrPPzAdRIFj22Ic+NbSbI1eUepVW/Bpw/PJ//vnBiduw3tufyqwKTSqEAlkKmCGnpZaQnS419OkbEpNVSXi7201YWw= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2016 21:21:09.9103 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1069 On Mon, 2016-11-07 at 14:13 -0800, Steve Ellcey wrote: > This is a preparatory patch for the ILP32 aarch64 patch.  On that system > statfs and fstatfs will match statfs64 and fstatfs64.  So this patch > follows what was already done for xstat and fxstat in making the 64 > bit entry points aliases of the regular versions.  Right now this will > not affect any existing platform because none of them define > STATFS_IS_STATFS64 but aarch64 will define this later. > > My main question is, is this an OK use of '#ifdef' or should the > STATFS_IS_STATFS64 be defined on all platforms (presumably in kernel_stat.h) > so that we can check the value instead of checking to see it is defined > or not?  I know that we want to move in that direction but I wasn't > sure if I should include that change in this patch or not.  I also wasn't > sure if I should try to change how XSTAT_IS_XSTAT64 or STAT_IS_KERNEL_STAT > are used. > > There are 13 kernel_stat.h files in the glibc source tree, in addition > to a number of _HAVE_* macros, some of them define XSTAT_IS_XSTAT64 > and some define STAT_IS_KERNEL_STAT.  Those are the only defines > in those files right now.  So the magnitude of the change isn't too large > if we do want to define those two macros everywhere. > > I tested this patch on x86 to make sure nothing broke and I tested with > the full ILP32 aarch64 patch to make sure this part of the patch worked > with the rest of the ILP32 changes. > > Is the patch OK like this or should it be redone? > > Steve Ellcey > sellcey@caviumnetworks.com I have modified this patch, I missed a problem in the ILP32 glibc build and so I had to add the #define of some symbols to hide their prototypes when aliasing them.  This in turn required me to add some includes of kernel_stat.h.  This also matches what is being done with xs tat. Steve Ellcey sellcey@caviumnetworks.com 2016-11-09  Steve Ellcey   * sysdeps/unix/sysv/linux/fstatfs64.c: Hide prototypes for fstatfs and __fstatfs.  Make them aliases of __fstatfs64 if __STATFS_IS_STATFS64 is set. * sysdeps/unix/sysv/linux/statfs64.c: Ditto for __statfs, statfs, and __statfs64. * sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: Do not define __fstatfs and fstatfs if __STATFS_IS_STATFS64 is set. * sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: Ditto for __statfs and statfs. diff --git a/sysdeps/unix/sysv/linux/fstatfs64.c b/sysdeps/unix/sysv/linux/fstatfs64.c index a624de6..5f56e68 100644 --- a/sysdeps/unix/sysv/linux/fstatfs64.c +++ b/sysdeps/unix/sysv/linux/fstatfs64.c @@ -16,9 +16,18 @@ License along with the GNU C Library; if not, see . */ +/* Hide the prototypes for __fstatfs and fstatfs so that GCC will not + complain about the different function signatures if they are aliased + to __fstat64. If STATFS_IS_STATFS64 is set then the statfs and + statfs64 structures have an identical layout but different type names. */ + +#define __fstatfs __fstatfs_disable +#define fstatfs fstatfs_disable + #include #include #include +#include #include #include #include @@ -70,3 +79,11 @@ __fstatfs64 (int fd, struct statfs64 *buf) #endif } weak_alias (__fstatfs64, fstatfs64) + +#undef __fstatfs +#undef fstatfs + +#ifdef STATFS_IS_STATFS64 +weak_alias (__fstatfs64, __fstatfs) +weak_alias (__fstatfs64, fstatfs) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c index be9599a..3bada44 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c @@ -18,8 +18,10 @@ #include #include +#include #include +#ifndef STATFS_IS_STATFS64 #include "overflow.h" /* Return information about the filesystem on which FD resides. */ @@ -30,3 +32,4 @@ __fstatfs (int fd, struct statfs *buf) return rc ?: statfs_overflow (buf); } weak_alias (__fstatfs, fstatfs) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c index 1937f05..aab59fd 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c @@ -18,8 +18,10 @@ #include #include +#include #include +#ifndef STATFS_IS_STATFS64 #include "overflow.h" /* Return information about the filesystem on which FILE resides. */ @@ -31,3 +33,4 @@ __statfs (const char *file, struct statfs *buf) } libc_hidden_def (__statfs) weak_alias (__statfs, statfs) +#endif diff --git a/sysdeps/unix/sysv/linux/statfs64.c b/sysdeps/unix/sysv/linux/statfs64.c index de42261..0d881ed 100644 --- a/sysdeps/unix/sysv/linux/statfs64.c +++ b/sysdeps/unix/sysv/linux/statfs64.c @@ -16,9 +16,18 @@ License along with the GNU C Library; if not, see . */ +/* Hide the prototypes for __statfs and statfs so that GCC will not + complain about the different function signatures if they are aliased + to __stat64. If STATFS_IS_STATFS64 is set then the statfs and + statfs64 structures have an identical layout but different type names. */ + +#define __statfs __statfs_disable +#define statfs statfs_disable + #include #include #include +#include #include #include #include @@ -72,3 +81,12 @@ __statfs64 (const char *file, struct statfs64 *buf) #endif } weak_alias (__statfs64, statfs64) + +#undef __statfs +#undef statfs + +#ifdef STATFS_IS_STATFS64 +weak_alias (__statfs64, __statfs) +weak_alias (__statfs64, statfs) +libc_hidden_ver (__statfs64, __statfs) +#endif