From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001AbcALXG3 (ORCPT ); Tue, 12 Jan 2016 18:06:29 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:51638 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbcALXG1 (ORCPT ); Tue, 12 Jan 2016 18:06:27 -0500 From: Arnd Bergmann To: Yury Norov Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Subject: Re: [PATCH v6 11/21] arm64: ilp32: introduce binfmt_ilp32.c Date: Wed, 13 Jan 2016 00:05:28 +0100 Message-ID: <28415384.BjJykMzeP5@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160112164641.GA9246@yury-N73SV> References: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> <5115829.mX1Uk4EoYk@wuerfel> <20160112164641.GA9246@yury-N73SV> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:qzSbNZfa1VZDHpegBW93sQFHcoAaurQc0//D61kWFPeeGa+RMSC 6425MkavNb4kup5FCYeZeJVJ9dkomck4x8RqETTg/wJ2TrePoSphtTYjSCwsAfamvIUKI1Q MVQDDdC0tq1qGH93jeOpHXrp62ww1tk+SsfgXnVRN1ZI9yD1V8dK22HjOuynWw+tlcuz09N I4Y3F0ra1WDwMFtcHXZ8g== X-UI-Out-Filterresults: notjunk:1;V01:K0:vLo6QTj2j40=:oI6UpYSKfu5QldADdY5jaD XDx1CWhmf4fYU+4vudlCn9kGHfJP0d01/w1qbOdhJKBIz6hkxaeSXit3y3HSMzICnBzAYEGLI HBN7m2tyfDzT8bRsEC/qGG/YC/3RcSxhrel6W14I6hPZp3WdP9orczgNz4ZvBjFXgVSTxDBut EkJjLsd6ELNbhigsD+mXpoVeYeJEdiZhi1kX0NfkZZ/U3YToFJr2XCb7/oOI0E3iztOTlnOk6 s2GGYac+SKaWgzlm3zUmNAQaqlUwld3nq/77Zew8w5lF4Repy/gDSVQJTYHiJDVNoLuXU9RK3 vKU5myPRGtvVgi02Ll9UC8uWfyThJsjZI0BjqCcEqluh6bbkd0OCmymbqDtG0x7igyFoY1uIg FODtTkI6V6/RUDrzHiSbs0vAntOkbsAmIc4iZMy0+pUH3KMM/mdJqAp9qjc87Og3ht3m5Ji4G b5rMizZKDP5w31bPGz/lL592Z0jrnbDUluMYUtpM/c0srI/XaNnFmEWi9Xx91M5eVCGks11sy hNngpjdPG18x85AhIWzRf4kSA5J7BI2PmAZgHCeYLmOWntE4Qhfg8eHUivhWnpehE5a3CNIY2 fOCj36zeHtWD9AqXtYfKBhAPUIY4ARtOng9L7L+0fR10wzUdUwaHS2rWVAb3jQbSaEm+Hh/dB YmU2+NByRuCxzUX09gOS66Jn/4uRVYxwf0KQBNwO5AFS0TyCp2rFnUtP/jIHVJtbhaluA/zhb 0Q4DUo4uJdu+gqdQ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 12 January 2016 19:46:41 Yury Norov wrote: > On Fri, Jan 08, 2016 at 10:08:44AM +0100, Arnd Bergmann wrote: > > On Friday 08 January 2016 02:34:29 Yury Norov wrote: > > > + > > > +#include "../../../fs/compat_binfmt_elf.c" > > > > > > > This is the wrong file, you have to include fs/binfmt_elf.c, otherwise > > you pick up the same definitions that you have for the other one. > > > > I chose compat as it's how it wokrs now. It redefines some types like > user_long_t, and I think it's neccessary for ILP32, as for aarch32. I really think the double indirection adds way too much complexity here, it makes it rather hard to understand what is going on, and that leads to bugs. fs/compat_binfmt_elf.c is not doing much at all, and most of it is not actually needed if you just make a copy of that file and fill in the data as needed. Some of the overrides (ELF_ARCH, ELF_PLATFORM, ELF_NREG, ELF_HWCAP, ELF_HWCAP2) are identical between ilp32 and lp64 modes for arm64, but are different for arm32 compat, so you don't even have to override them at all. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 13 Jan 2016 00:05:28 +0100 Subject: [PATCH v6 11/21] arm64: ilp32: introduce binfmt_ilp32.c In-Reply-To: <20160112164641.GA9246@yury-N73SV> References: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> <5115829.mX1Uk4EoYk@wuerfel> <20160112164641.GA9246@yury-N73SV> Message-ID: <28415384.BjJykMzeP5@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday 12 January 2016 19:46:41 Yury Norov wrote: > On Fri, Jan 08, 2016 at 10:08:44AM +0100, Arnd Bergmann wrote: > > On Friday 08 January 2016 02:34:29 Yury Norov wrote: > > > + > > > +#include "../../../fs/compat_binfmt_elf.c" > > > > > > > This is the wrong file, you have to include fs/binfmt_elf.c, otherwise > > you pick up the same definitions that you have for the other one. > > > > I chose compat as it's how it wokrs now. It redefines some types like > user_long_t, and I think it's neccessary for ILP32, as for aarch32. I really think the double indirection adds way too much complexity here, it makes it rather hard to understand what is going on, and that leads to bugs. fs/compat_binfmt_elf.c is not doing much at all, and most of it is not actually needed if you just make a copy of that file and fill in the data as needed. Some of the overrides (ELF_ARCH, ELF_PLATFORM, ELF_NREG, ELF_HWCAP, ELF_HWCAP2) are identical between ilp32 and lp64 modes for arm64, but are different for arm32 compat, so you don't even have to override them at all. Arnd