Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755317AbcLNJlE (ORCPT ); Wed, 14 Dec 2016 04:41:04 -0500 Received: from mail-by2nam03on0069.outbound.protection.outlook.com ([104.47.42.69]:4950 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755032AbcLNJjk (ORCPT ); Wed, 14 Dec 2016 04:39:40 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Wed, 14 Dec 2016 15:09:22 +0530 From: Yury Norov To: Catalin Marinas CC: , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 09/18] arm64: introduce binfmt_elf32.c Message-ID: <20161214093922.GA27720@yury-N73SV> References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> <1477081997-4770-10-git-send-email-ynorov@caviumnetworks.com> <20161205151018.GD14429@e104818-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161205151018.GD14429@e104818-lin.cambridge.arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [223.196.191.253] X-ClientProxiedBy: AM4PR02CA0021.eurprd02.prod.outlook.com (10.165.239.159) To DM3PR07MB2252.namprd07.prod.outlook.com (10.164.33.150) X-MS-Office365-Filtering-Correlation-Id: 06f50d97-b0ce-443e-6896-08d424051dbe X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM3PR07MB2252; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;3:x3o1mAaYdY154MBo53fsaxHF1RHQMJBe9YTiwrfSezPWBp5N/QuY9SNYxeo+JYdso+VvY1EZ4LkTvk9rocRoP0vztJ6MbMlWa5kQrMsqL3l+QrdgLqyjvtHhQfSsPsbqu9g7/jR/Oc2Y3kS7TZ3Ctj6cFbChD3tXiCRsnuQV8Y2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ZYsN6qA= X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;31:TjLCWt/N/t/1fRl5HGvzGbZnqa8W5cmhd2sYSCPTseNkhypD9EzN/qpzRxDaFhSqNruuWBE1JFJ9pVcjGG9QgLlt+hOYZl8JZD4uOSqYD8CWwu9cPFIO/4NekX2ctvtZvCVUYPET+50qxvDOh+8lggJMB39f2wyf3K4agMLk2hvPsdnv8GoS26qF2x0BhDv+Si4XCHcuIRFaStNAVlD4kmXgMPSRgqmTEinhHZ5NygEul3gU267iiFCBTuSjIeOW;20:jPom7e/tU1wErmyWVKWM3kunjdXUgz1xDSsUEKaUKsjfucVSBrE+us3i/f11IPgacyfMCKOHEfhgB4DPaPMj13s/3u07Hl1w2JRjvIHgSQKcrK5tCvheTJ9tBNOEPXaDku/zEcZuJSO0NZ+TgtQ0FMmSqQFkqpapevcSrShv8kfBnsyb/1z1R0USvEubRmJ4xKeybYrjhIzrfeC2DccAA8IM+AF36qt/o2ZblMjlsiFYQvnymWTrb9Rs6J4uvtwp2bbiQBhacp83Rb02juFtMmj53A3X+1JFI8g7XKCVyhw0OQfHQgd+67EK9HElkOn2QUkUbR3JyBREJtj/TwMVeu9izrNqvB4hevb64E8HOMc0HtX5WFUzJZ6XaNu0DCScE8tfknISd2+xdp9a/BVvrioMAaywWaZ/kIqbXBwr887MDttfde9jxN7YWeohRH0kYQ2Yhpnmj0TMQdwUe3mkFfThYdhMLhepqWzGNilpXt94xKlcgYxfjSYggJpsXDdiKnZiTgE2cYHlDH8YFOcfTSwdKiwH/f58A84YwpKUbXzs+LhzX4Sif9E+i0eSQNP7wzgHpF51pcYhrjgpx5n/pqjqn92G0BZQaZKOFiT2LO4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123558021)(20161123560025)(20161123564025)(20161123562025)(6072148);SRVR:DM3PR07MB2252;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2252; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;4:235kgUFz2JjePfYvDsojdMOBNeSji/6v01VKU3PJ5g53jqGDL5M9PcgHYQ9K8pjICWzHDyL6hbw38HAIwsR2NBQPSxIcsWMhhKtBsn8SOQr44TuI2v8YxM63KUWDlhnEDQdT8w6R2rSaBn+8YU9BUsVICdA0Bo0ZVJ718r9ahulU5w1fMQ0aSvp+CBakRvcyEfozqPTBHP85sjnPyqDsKQxQinazjSkHHWfn6lIovipLj4ma0Nn1wToaCBe/X0UmLtnb0ytPT5x44wfMzjmttXmpYUeTMrCAKP8FWV9RVvBFqZIXRxEGxnkeENbtt2I7YMrksv6DImVfBFH8MnqcjC2flaR+Mmyxtr8/ngmWUgUmhVJjXpEf7isMR4CYd0PrnNsickx/EzpXmIcI5zPAjDAmCxxhTwsM5nsU/wO7lSdx6SvWUTNy4vCSWHyiXjmB8sj+jGx6tcVQ7X0+pObEeb1TJemmsVFa9XmcC7G9+I3fLCjYmC4q0MPdpMa4Q96JV5ZxXb6atQBF6ske/mLJZNT4erIdOZ+umhyxEaSwqnS+I4HXCDZJo5mcqqs0L0vxwyc4yo/dVbqm7I6DVss2PgMNuegGuHmJu4t4+eOWD0M= X-Forefront-PRVS: 01565FED4C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39410400002)(39840400002)(39450400003)(24454002)(199003)(189002)(83506001)(33656002)(6116002)(3846002)(66066001)(76176999)(54356999)(50986999)(97756001)(229853002)(189998001)(1076002)(47776003)(92566002)(68736007)(6486002)(9686002)(2906002)(33716001)(76506005)(6496003)(106356001)(5660300001)(8676002)(42186005)(2950100002)(6666003)(110136003)(50466002)(23726003)(345774005)(6916009)(7736002)(46406003)(38730400001)(105586002)(81156014)(101416001)(81166006)(4001350100001)(305945005)(39060400001)(7416002)(4326007)(97736004)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2252;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM3PR07MB2252;23:8+u/ykbTvVT9D5g3L2YxdjACFtJtEOUV+vfFLK3bB?= =?us-ascii?Q?Zdoh6vEjC2SU4ihtROLfEIyuzbym1AiDitOLL3o8d2lWy3ioCMZU7wT/Fu0f?= =?us-ascii?Q?Lhen3P5AvCvW2PBGNAvTDS8PVhNicdaXkwnmlk4r2y8tOFPgs6NtS/y6CLCL?= =?us-ascii?Q?E3A1ex6bmJfkqVQUDtbRY2cf/xKyR5hk8357NiEeFR0Thzf4TmGG+fxjcq2R?= =?us-ascii?Q?YkJ1okprC86Vz7H1lfaaZ/4Kl4S0xPd+AdormBsFz1S6+gs0DgiYFy/qM842?= =?us-ascii?Q?DQ+maNVIFsV9MD1p+XOUeM2gJnai9o9EpyiuaiuK67iHvZxqTuKc+Po8yFtl?= =?us-ascii?Q?+3E7SResBZFqsW0xfo4rEmEJWrHZl5P0jZZXVgNhbQ1NMi9iTBLqhBa0QMbd?= =?us-ascii?Q?Wby51gYL7x2JV20aVzjzRe/UXJNigpnaHGraaAD/PJNWzp2bvGf7EoQaIxmO?= =?us-ascii?Q?6fiEno/0hC0pk2c9VyCoGYbSqCK0Lu5tpYKhyOOOWWPOYezdswXpzoZInAO5?= =?us-ascii?Q?36uwl4x909AUY4SlfBm/er9ASjDxL+eH770WmdfiPdu8+dfK/o/PMfmoW2vS?= =?us-ascii?Q?eD7QYpDs9lAj0UifP5MrH8r4ogSYuJ+XkC9SaUfSdWmCzDN6gxnbKzoFwaMd?= =?us-ascii?Q?Canua68hU577Zg9quYPokDELC5/5vYEnLVcYAUsPqXT7flcctst9mvhm0l9V?= =?us-ascii?Q?WgJSzxB0ldIAj61+yl3zLF9pap3iQEZa8bBgYlyiHzHfNsDt3JMtHKspXBQh?= =?us-ascii?Q?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61mDBNWv/UsHToK3yUUnF27rl9BgpmBdweFS2qdeE2XNLTFvNV9gC25bdkBrUjJpuCA++UK4wyWuxRY6N1cRqsETP/9tH/tcidvvV5ClOhFIyO4suHtG+2p92C6OkDrwIpGWmJMBiYSlk=;5:utQu47n2VK+HReV3VOQZYi7lQNmo/OZwMWfkJvTTdvygsLL1DyiOW1cDJ4eqE5k7mpfYRs1dwKQlYZE/nJ89pDdbBKdZ71YcFMvUWce2CRW36fnuuyU5MjvAuUdc1rPSYCX1zK9TotE6ayx5ACrRug8W912nW/vq+cqd1LiCD8k=;24:c0r71OvEhPQJ3LcGbzlvzrfmSa1mq0rzkawGEbM5JylN31/6mwoYRyiWX+LbdkHfCbAJ9hiV3tnKoGPxYQvOQvIC532H0vaqv7mcwP1rwl8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;7:o0Q1kQ057JGbW73Rumx0Ep0JAVSeeIlxXP7MKsV2ESEwXEenabmvVPpiYwzGrZy6VDjfS3+22A9Oew2OUR8KP8PI5l0ejW3rncsjQWpSW9jgzxnewZ3vxy64eVxfKxZ6pIB+X1OVcM5G4eAv61L3s7NDItVVMp/6OQje4TAaW+HkbbKrotZb3t2fu0CGZ+7INPUwiShwTtPWYfMmrxzUXaiLjfvibHcrzl/kNkljIAEEmD0tSO8KNX/ZcWw892gWhK4reaNAra9jALXUDZnkOg7nRTNBdh4Htyq1eYyVSVrY7JOkMd+W4X34v6jse0gTnIHabmivNkNsjoyqpj792eHM9Nj90lY4ihXQsoguaw6CjouuiIMA2etBnYrho77//a7QoJ8TlECZohM1LZC9LkPkuK8IktX/jDSMycWlsFVm40iZ6gjB7HITDvn4d9P/eGjfmHJbcz2OpPZjH9VjmA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2016 09:39:34.7107 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2252 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1306 Lines: 38 On Mon, Dec 05, 2016 at 03:10:19PM +0000, Catalin Marinas wrote: > On Fri, Oct 21, 2016 at 11:33:08PM +0300, Yury Norov wrote: > > As we support more than one compat formats, it looks more reasonable > > to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 > > specific definitions there and make code more maintainable and readable. > > Can you remind me why we need this patch (rather than using the default > fs/compat_binfmt_elf.c which you include here anyway)? https://patchwork.kernel.org/patch/8756121/ This is mostly to avoid runtime checks and hide some re-definitions for aarch32 from ilp32, to avoid re-re-definition. > > > --- /dev/null > > +++ b/arch/arm64/kernel/binfmt_elf32.c > > @@ -0,0 +1,31 @@ > > +/* > > + * Support for AArch32 Linux ELF binaries. > > + */ > > + > > +/* AArch32 EABI. */ > > +#define EF_ARM_EABI_MASK 0xff000000 > > + > > +#define compat_start_thread compat_start_thread > > +#define COMPAT_SET_PERSONALITY(ex) \ > > +do { \ > > + clear_thread_flag(TIF_32BIT_AARCH64); \ > > + set_thread_flag(TIF_32BIT); \ > > +} while (0) > > You introduce this here but it seems to still be present in asm/elf.h. Hmm... Maybe chunk that delete it from asm/elf.h was dropped at some rebase. Thank you for the catch. I'll check it again. Yury