Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755392AbcJ2VqC (ORCPT ); Sat, 29 Oct 2016 17:46:02 -0400 Received: from mail-co1nam03on0054.outbound.protection.outlook.com ([104.47.40.54]:10579 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754996AbcJ2Vp6 (ORCPT ); Sat, 29 Oct 2016 17:45:58 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Sun, 30 Oct 2016 00:45:41 +0300 From: Yury Norov To: Arnd Bergmann CC: James Hogan , , Vineet Gupta , Catalin Marinas , Will Deacon , Mark Salter , Aurelien Jacquiot , Yoshinori Sato , Richard Kuo , Ley Foon Tan , Jonas Bonn , Chen Liqin , Lennox Wu , Chris Metcalf , Guan Xuetao , Andrew Pinski , , , , , , , , Subject: Re: [PATCH] asm-generic: Drop getrlimit and setrlimit syscalls from default list Message-ID: <20161029214541.GA20037@yury-N73SV> References: <1477138444-14993-1-git-send-email-ynorov@caviumnetworks.com> <2502005.4risrb1P1I@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2502005.4risrb1P1I@wuerfel> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [176.59.32.58] X-ClientProxiedBy: AM4PR0701CA0001.eurprd07.prod.outlook.com (10.165.102.11) To BN4PR07MB2241.namprd07.prod.outlook.com (10.164.63.147) X-MS-Office365-Filtering-Correlation-Id: 7a42401b-e280-4fe0-1e2b-08d40044f5c6 X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2241;2:RWhkO6tyNcooZA9i1Sxo52aye9kuoZfGhIKTIV3J9DH2ZVyue8URkX5H1lM4UdzTqvhnaiNpcXltvarAxgzMtAubVuQgg2INXwam0iTx+BMwHbv+PaL2OYSIfQOHSVUgNI6a5RFOAxVSxDejb+R7+3r9w0K1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YWyLOBxU8WL5QLEZSU5Pg== X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2241;31:lrFxjksT37KxHSYu1NfEemXUxftFJSY+N5CNkJrReYPfNkqBqAsWFCFz7/BmqR0Of4JFasRqJ1X2Ox+kG0vwtDR5oogin1IOwNMrn8cX9eYUP7uc4RpkWHCMOTI9EcMFy+26SZdIiKguUCZzTU/oMr9eDImKEqq5eQK+E6TkoWS1Gk7j48eFLs4HWVrHVCo3nG7exTv0NUfIubfapJuGPk0rmaJSmTdL9zqG0YnUSb5v+0+XTcn7WMghCArgHay+gper4Iw9vOjO+ioG+Cz9xA==;20:OlhGUKyHT1D7k8QPL1UvD6wzepDP/5u45AOFCxeXeRV3cBKoduHedl+BjYx/hk54z9+cOkUai5l2ndSW9rqwVlUPytKGAMLyd7OZuE6rnzd4Jwmr0qjWk6zcqkZWOk7lrMjc1PFs8rNgTwPYWxeptGJnEbp3y5cxIXvHphyAM9RkFNlUjt/2Ptn6JtMh/nnzUQmaou4RoRqkS9eXQGtssVRr4dkGjjAsXnEkw+i+b3fbcQG/wzGCbcr/gPw89oSC3QTG0LnnKDq2M6grK/Jth0sNwbEPieb3U97hZxkvGk4o8hdy8z12xkIEZemLQ/af6rPlTLMFYds5b2p7agZH/JVPqHjmdpua0s3AC/48k2A40F2EELCO+lBW6AYLWEbMLF9bAaoPFRqxv3OVQYnF6Zb5AiaojCMl5c+ErXC8RnsPWqli82cnIjX5Y5i/WLHUvcCsTQ90ExD6cEQJHYSKLrlekyNnsQt/+KAVrq91Vr32c12Qby4bUTYyogEVT8i7AKcuUmD/D6/iDJTDzcHvfU36Qb8WQ7M1aofY9TXOd/75U62pC9idCJI1MmhSIg4cyYDc8GFnK3TBX608Wx1afVfd3QIVaOM6pUGKtFzBVQo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BN4PR07MB2241;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2241; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2241;4:rv9i7IM1vPu78gf0C2Rh/ocBg1Y1ppIQfzXkpM23BzhekeKjs7gxh9slDt+0+rhZCS/RdMWMD+f4nVYA237DYDEGWsFHYfmoa8A2XhMj/0AMtzA6SxRc2FKKaitiY/GY6syffGyGKJf0hpBVZfY6Ee9C9la5DUElk6C5pUyxxhg+YOHDPkg+ePahMGk6Lu70luG2ut16XfMDYgGIi1ow+Cns5ubNM24i9qmVWBh8GZUNi8NClIL85FAaop5B52/b0JlrTQbmmK6uVaD0uaJxlkxk4rryX3N5sRa6ALtyouRIiL+IF9erExTzSlCB0CdeKTuMaAqk8azr0Q1wSRhwmkmeRlNl2SKUEzmSnyvFO3uyo2130wyUmm7Kj6LCOeZhKCtCyEGuvYjIDUhOt1+kog== X-Forefront-PRVS: 01106E96F6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(24454002)(377454003)(189002)(76104003)(47776003)(77096005)(106356001)(23726003)(2906002)(97736004)(189998001)(4001350100001)(33656002)(305945005)(575784001)(97756001)(83506001)(7846002)(6666003)(46406003)(7736002)(66066001)(8666005)(101416001)(92566002)(7416002)(33716001)(76506005)(76176999)(6916009)(81166006)(54356999)(2950100002)(50986999)(81156014)(1076002)(42186005)(50466002)(8676002)(105586002)(6116002)(110136003)(5660300001)(9686002)(68736007)(4326007)(586003)(3846002)(18370500001)(7059030)(41533002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2241;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN4PR07MB2241;23:fFHCWpHT/870EvLhnC1Lcpc6rM86DGW2j5ylce3sT?= =?us-ascii?Q?65fhqT7xelxj4xqhQ6i4CdMNfvthEJFQ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Pg9lw3fJh5btzActiC6HODIZ7beyUK08cdlLUV1QWYyy1LrbsBg7m0F4oJdzeZAXoGGN/ZWtRTT98= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2241;7:q0I1bpLKTCc2EIi+jIDTuG8o5c4MI/YGu8WA0LVrf5lebUDjcNm4UnG53909VrWGtvim9DYkWYMkhhCemoNNE00XcAa2OeqRoNzmsew3YcphXwiokRlCZbb3Z8I1jLLNNPLQfKDFebz/7PDGMzryAE4W1aaSjjZavoXdbjoPwTmVW3HgRJXL3IOrXrSJ9wkpyXvfEdnCj/hMLHdEeOh88Njj1aRvg0Q8HPK3pegBML0UYGtAxXtAeBfE9NRg03kWsY6TImpr5ua/1E2uxiGrmUU1nzntbmqXi0IXbwZHXT2HXdiWu1msgwaj31Ydv1Zn37KVny/18wauiAJrNks4DwWeqohVhbv28T5ZRS8FloM= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2016 21:45:54.2866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2241 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1791 Lines: 37 On Sat, Oct 29, 2016 at 11:02:40PM +0200, Arnd Bergmann wrote: > On Saturday, October 22, 2016 3:14:04 PM CEST Yury Norov wrote: > > The newer prlimit64 syscall provides all the functionality provided by > > the getrlimit and setrlimit syscalls and adds the pid of target process, > > so future architectures won't need to include getrlimit and setrlimit. > > > > Therefore drop getrlimit and setrlimit syscalls from the generic syscall > > list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's > > unistd.h prior to including asm-generic/unistd.h, and adjust all > > architectures using the generic syscall list to define it so that no > > in-tree architectures are affected. > > The patch looks good, but shouldn't we also hide the actual syscall > implementation if the symbol is not set? It's just dead code otherwise > for new architectures. I was thinking on it. The patch of James Hogan, b0da6d4415 (asm-generic: Drop renameat syscall from default list) doesn't do it for renameat(), so I decided not to do it too. It's not so easy to disable syscalls because arch may support few ABIs, and some of them may require the syscall. For example, arm64 supports lp64, aarch32 and ilp32, and first two ABIs need renameat() and getrlimit/setrlimit. At now there's no arches that doesn't need renameat() and getrlimit/setrlimit, and there will be no such arch in nearest future. So there will be no dead code. But I agree with you that we need make that implementations conditional. If I understand it correctly, we need something like __ARCH_WANT_SET_GET_RLIMIT in all existing Kconfigs, correct? I think this patch may be applied as is, and if needed I can send another patch that disables renameat() and getrlimit/setrlimit soon. James, what do you think? Yury.