From patchwork Mon Jun 19 15:49:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9796815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BBD8600C5 for ; Mon, 19 Jun 2017 16:49:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4459027CF9 for ; Mon, 19 Jun 2017 16:49:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37EA527EE2; Mon, 19 Jun 2017 16:49:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E214D27CF9 for ; Mon, 19 Jun 2017 16:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lk9EKKp0x978WrcyRkjlnD4BOLC7TdBImk0A6Fi0ui4=; b=X7KSgIzF/RkIdD ujdZL8PC1a4SlrfX1ra06Upa0bYouytSmbXUU9uF0rxmu88koh3XXwsJspKF4IxHS4zp2Ry0EmdRU R4lrKDdN1P/giIXqWM/hLT7ukH2VN0Wm9DTc97gh9kCzldIsWDCqQqktlBicaWU2W0ce1054dAMuB 2Ctu0M3CuiK7lQbxUiMkcfwAAt6Y6jbpIh2B5iBhnfAZ1a11a+mTQB+Cp1Mtsm5wJkp6yVrKJUH4J /c1VBz6bxMTl3Cf7AOM4ILT4QH4UfhX28frxcNROj1FiTWVfYaFkf6SbpgqNCEbESZfzjJ644y2Ki zhDi+tAtkdzWeqMmZnMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dMzru-0006EK-TK; Mon, 19 Jun 2017 16:49:38 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dMzrX-0005kJ-Mt for linux-arm-kernel@bombadil.infradead.org; Mon, 19 Jun 2017 16:49:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IxAN9JlvAv7V6d5GQvQ1klQkMAlPaxzUh1wSsMTLBQ8=; b=mkK2ZjyCxegO/xWKQmgZZVLVk 1Ii6Bv38HThu/f4icULqrgQduZujBPsbf0L7gBuI8poIdFfXdQTG0cFMBstCO6VKWRlifGdgRab4h tchb2Yr/1cZbu7UUTpP0GVe9Zqcb1Y1ORQFteqgX4SR54hTbCQD1uerotT1GbQ5ah2s474GSpmA39 f08OIlPy9m+MQDSk7wx2I0r6eJFGtD1+h3PH6jm9cMRnXWioMW05/cKcUMvsuSonGixswVkBHroEm kK2qqiwOEunilRIkR2wdwXCLbvOjr6BgeGM7DB55IGoPD3p5YSlYtAxMn28TIra0h3B05dxrtWYgn YevBOrJAQ==; Received: from mail-sn1nam01on0044.outbound.protection.outlook.com ([104.47.32.44] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dMyzH-0001rT-7M for linux-arm-kernel@lists.infradead.org; Mon, 19 Jun 2017 15:53:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IxAN9JlvAv7V6d5GQvQ1klQkMAlPaxzUh1wSsMTLBQ8=; b=c58it7Ksf0Omp+Tx2rbB9raFoxhMY5hhzglDp0b8SjmwgFkoJGZYKsjRtrE3BXeAHvHe1ohsyT+L+iF1ugzJ5ebOJOK9u5Bv3isHRhNre4Za09MUlIzgboBhmHZtdhXwJE96RLWsyl0o1LtA+xNPZxoCa5g4cF/7OcealTeNOE0= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (85.253.137.34) by BY1PR0701MB1864.namprd07.prod.outlook.com (10.162.143.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Mon, 19 Jun 2017 15:52:45 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 12/20] arm64: ilp32: introduce binfmt_ilp32.c Date: Mon, 19 Jun 2017 18:49:55 +0300 Message-Id: <20170619155003.13218-13-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0022.EURP190.PROD.OUTLOOK.COM (10.165.188.163) To BY1PR0701MB1864.namprd07.prod.outlook.com (10.162.143.146) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9962ca2e-a063-40e2-bfae-08d4b72b3aca X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 3:ILovznBKgCx/hmi+lK1mOnzbF8nGBVpAAjNLrUwrZf8BtbohYnlEmDtIiaNhruTdggzbTSi8emhcisuKMsj6wlneeEyzFVSQr6eoRufHeu8MELpQueMUSqKLqxq9mrALfLb4Ur3ouqin1BuYPax67YKFdV0aQjzJ/z9K+dnrhidiqV0W98IYo7ueD3F027OfkGdy/B/zgF0aJl2hhoV5H38DIc4Fhq2Y89DCMDNiNjcxGwymnCZOoBf4KdlEBrPLttO//1IdRWUQfkSqIgGDi6SoqsbAZEOJu7dizkXTs5Qpga5FY5GlD5OVJme7sfWyVUbypG8gUVAqgKQ57iRDfQ==; 25:A5/JprNsNzsyKzFFb1Q4Lm5yvSkIALbwOM4cr+4DmDqQ60qkn4LefkwVikSzNq3M2lg8UqEXIrrQNtaMy4/PIDUjHd0eojOc1+9oDOPUyV7P2agFKfKtx1AQx8OqQZrXBXhTIK7lxbmEpgawartFXs47494qIL+KMLYCQLu2tVkK7VmAJa/4StZdJAz7k26ZJ+rDJXkahSKgho4znieP6eXSXB7g7jGwBvzyAOKdjb/RTylhqwDP9ukMnfpawwhUwMnB6c7CFzrICnL6C1eeHRLQEOoGaT2ZNdxV8zMHqZ+rS5vzdCv8KRGIVbqYde313Y7qnkieXiSvbcrqzIwVzRPIc4Epd3f8K5w8V9gzBifIZK1d72lq81ED+fHNu7A2Fds++cCwGprqPjf5EbmkEWkdWTKhaW4dWTgAkKlirs4mX4nGwlZa46R+FyQ+dISYts1nz4kNdMXBVAERN5AsrPB6t+3jCAwrHiTbbv+EMOk= X-MS-TrafficTypeDiagnostic: BY1PR0701MB1864: X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 31:jIo2fu1HWKcquCmkGCB/vyTd9hJt5SdQiYxFi+0liub535RJKmJCPCeFOkcx3Q9oiuYopXW2GX+GL6zfTsNYuoGvliNJR4CGT8i9kp6byzq9mSmlqe9J9fgm9NjTno4v4QyoypXnbrqqTuIYNUz2lU1lPhnAiMSTjS2eE59a7K8XGoGXP4PjHUV53TOJcv6Cab4iWxob0g2wstdE2gS7HYiW1PlPE8usUhXPFScYDRY=; 20:qVpqqaXRtwMrzTqgfx8GVmXb7vntuIRhL1b8+OQWOKP/5jpCXUjYoSni84NJExEpiMV/PwP47P+D6QM7278Ortx45e1/InJw1oQHlr4b6oAcwBXpvqZhPN+IocWLoJxChliEFFTIXGvkm7kHruh9VwLz3oyMVwU6kRvEKcXeKsdBpCW0cXX3J7gXWbJSEw72lAJFEtPLr01xgAjfCNzlX86Rrji0WGa935ZCb/kOMinunwRc21ugnNpULYl3iOxXOHcDWDzPTpjO+b7lS8/dq68iJx9brNjelJtIi3LH/zXsZTepau7E+4D+6ToBxu7SHKWxhkYu2RAJmj2ZJx2obbI+PZ5aVunvEhCD+OZSlMcoxzTKytZ5YQ8/zwVaCeoBgTIGRm9lum7+uL5kPnGW289in60pCz0ZSKlAdGxAnclMK9OQbtLsvjQVtlemrwVgQ2jMMSkIKLid7ju41rEXhGhQ7YQzfI3PNUX0gZsPxXlzjcm2rNPk0RJaxRgrZljhu9wkEuGuI2SYZtuICAZbqCZAVZ+AopXX/sdOwrWxsm7/SPiOXCpiPFxaEMi33HGORZPQX1KLYA+3ZMcziIppa7tJoznxM/NadQmOwo/tKdo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0701MB1864; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1864; 4:kV2rO56/LVerPOyRwy9lL41iNRY5sCkWid803AzG?= =?us-ascii?Q?TagZmYvUAaoTYcTmTWfWGqMbUEMmSemZNXym5JVjXumrGtzTBon1Oq2tcJ5n?= =?us-ascii?Q?muMm7HEK2aaEqtPPv8+N+5byZHXsn3LuM83ANC8QQjTUgkPJyzKZM9Z+E/eM?= =?us-ascii?Q?T6VwibRc8Gm/9aCQtERTnm9vmnoubAVvJwuptF2rQtes2Cz3TcOLne6t/VWJ?= =?us-ascii?Q?FlTHXLYfPPAnnbVD1N9y+4XNFhEuIWoq0UZ1xbDTwqvjxJ+kfJyiFeFGLBEI?= =?us-ascii?Q?CqLA32w7penOKAadtV+8Lq1daHrYnDxvIrkbAhzFWqeJ2uEWGLL6cEYNOna2?= =?us-ascii?Q?WetFIJOPfiOT0ox/4oc0pHvFOGg3M0Err16zmU30+KdyYsd/21SfEhQDeCfd?= =?us-ascii?Q?xhlEANr2If/P9S75tUNtBQS0w95mXfR9wrqSxv1zAKFdEjfr71naiSG++JDG?= =?us-ascii?Q?6QvW7yZiaQ0E4WCyTRwUECdKNaPfPN4xUjymsDzBePIM3Q7jSxSyeLW2+/+i?= =?us-ascii?Q?vHqDeZzXjkQDNiVKUS8sQDuf1RvJm61V5aYMFKv5va2PmniNKZxdLxtwHhth?= =?us-ascii?Q?4bcmugVG06/B3PUOliNMpTMdJyedZgRiTeN6d4kqP0Ig8f76irmT/u964K7G?= =?us-ascii?Q?7GYylGS3FMjSECES/czEHE5b9k4aOeUxfc6REX8v8+jPhFqkvpGfrecUSkvo?= =?us-ascii?Q?26m8wBJMo5Ql2h3ypEw4lYMc7/5kYlVJ7gkneJx9gl61HQzmZzS+vtbszls9?= =?us-ascii?Q?M9O+Dcqow0CuM+us0P4CGvNn4srrPcmVVJFJkX77ZI/d97/jLCJPnkGb1wyW?= =?us-ascii?Q?Rn6jzFKKKphjlIyvJ7pT+t90yAF+3EVcjwC5WRrQxPo4AFn8M4PykppBv3o0?= =?us-ascii?Q?TbdDbgHdw3tLpwY1oO573Fseek4C4dGZCobvKHzTkrvCh5RfkbVTAdxVZEde?= =?us-ascii?Q?ec3NNqsSWr36zEqKgO7P/F1fbmb8wOdVJ8tLUOzFJwOxeX/Oye1KASnX9Bvv?= =?us-ascii?Q?XJ2z+FvFPFA8Xkpea+391rIbdZ22V/fKJZDSOBJdV1qVuOqsx0eZLxt/wB1C?= =?us-ascii?Q?49MxD/PtDEVFWX8yFOnMOlZdJh/chQQYeu3OgrYp4r58X1txHSDcin5Pwufh?= =?us-ascii?Q?k76/OUrP1os=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(50226002)(33646002)(7416002)(7406005)(6666003)(5003940100001)(76176999)(305945005)(42882006)(2950100002)(6486002)(8676002)(50986999)(42186005)(7736002)(76506005)(50466002)(5660300001)(81166006)(48376002)(25786009)(54906002)(478600001)(189998001)(66066001)(1076002)(47776003)(72206003)(3846002)(6116002)(36756003)(38730400002)(53936002)(2906002)(6496005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1864; H:localhost; FPR:; SPF:None; MLV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?Q?tEVJXMdjs/iiYvWSjHnxeVlowYHTp9GWlXE8LTRavQldYJe43/4aFY9ghsZP?= =?us-ascii?Q?H+s0m8NyWSJVQgcC2OBlwD07MPhfvdmlbCaQA3LQU3id328Mr1WvqeGxHzr+?= =?us-ascii?Q?xgluIFeQ/fiGxfIET19qafXzoAI+XYk0mPc5yeUjwjkJKAVXpd3oVpEJJHCv?= =?us-ascii?Q?cqbIiHirjK7HNntaSrQfG75TN7nKP/NgJtLzSDptP58MrRpFXKf6wd/JpdGt?= =?us-ascii?Q?YzfFha8trSvwmhatxXYAKyZi27bTgs4MJZmKzgyei0nnQ1W2ckA=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1864; 6:1v2eFOtvMldd3+XQsyS3W0Ptecjr0bJW2EBfvWKy?= =?us-ascii?Q?H/r7VoEf8koS3ZF68dexK5WvOEbEUmaq3Ocw9MslUFwvU3PEwIQAiUkg9JiN?= =?us-ascii?Q?FhzMcjyVyleO+MrSB5jwjWsPc/GE49Z8pCys+fYzgClg+3lLeW1UGThy7eob?= =?us-ascii?Q?RL7num4Q2oqG1FJ0qMrMVVHwumMfdXKRuXDb3R3zZR2wqUtm3yAU+oHQJZsk?= =?us-ascii?Q?gm7+L6VrFlWT0UzgluYFafGpzdlp7lz+MN8kN710yYt3VMlkGKP3iJT8RG9X?= =?us-ascii?Q?v800gY9qEQfpJWYggh7v7srpq2XNIKIfBaCO4KY3cItBdlsxUqgCmjF5RewU?= =?us-ascii?Q?2vbw3Gh0ThL8YVNMDWEtnZ5+SVeiODU51ld5auFjKD4V3XzivS6j872NZDCg?= =?us-ascii?Q?blTI9QX1fF1UXW2zEtww0Z5tCpoC2BlL27EiwtBiwntbFlnt57RIt4SOZf1c?= =?us-ascii?Q?jgNJIZXSEG5RODM3dFZkr/4QbouKoGFNuRgfdrH2CxTQpEVx7A8uZBIwIRBU?= =?us-ascii?Q?q+DgQS5TZVy83MVF0P8mWlpPdNIW71kvZW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t1S6ZxFFiIRQTj/ze/iDmzB1x8DlXcr9BMyA9keypUW7tP; 24:2MbAeA62yNjuy4GPduQZ0uBwBl8x2qu1ovVDRhVEA6ecSFiYO5gMpaEDWpaWh00Z8wicHOOgYZq/APAY8tNgJ55hU8cIkHYnj2t1EA2TRa8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 7:uWVGYH0lOns5kFmA/d0dPFLb4U4h1D7FkUGTxH/odOV0gYIJUYefp1z6FSUThGInMXLJjMJm6sbGZETlzHiKToFyfJ4RMKUIedRRdI5UT0UwnyUbbQszXYANsrf3KnjE67KrrYRSGUdTO8hwFb18NVyO9apoOdQdP4Q9Kvp5O2KsdwhMESlPAeP4o+mu7NJYUMH06+x/Jx1WDr75o1n02pXASfRoemkwnuN+wLZuRVg/5I3K9ghWPBa/Y+1NhHr1g3hvPT/cirQpU6DqL/qVGPPj35Aqg/3Kpo3kEPKI75qpBGpCQsnKr1erV6vEJChMiNa5hWTvb+wVOyoGwGQA3ILGzJX8qHIBRjx3fNVReWKtO1tEYYGnAZIOYHtGusojwML6e6UgJipBQFa277ketYfnWGuTQ+Yi86No/QDybrfsfk0euk0Jx6fuRB2bQRNKNOYA0MmplTxNEzuE1dijRAHyaFcwjAoQSKVeQG99Fc9CxLtGp/S53aYOvrI/z0rGwNPCOJ8zg+Sm+Db2bU123OFokYtdvyCwFRQiyub0RUiif3MoByfSfB+pe2qLSADQRqY7llInTQ0do5QVkUjQqz9IPsRMubCCm7o9xbAScyGka/Z75DMtSCglsya+GnUubVqdaEMJN7/RylqUEldYnp7UxJoEN+AVjHnNQPokiGQSNeIFSyAAPZnV6sASRkgeLee+tN0C1JH4Dl0Mwlh0W5Ipcz8KGwGVB/J1JfKDMHdxlr/qV7NUfHgVpINkGCUV8hx2BVIQFVoWQsrzUTrbDfWuRNztnx/Jh8CtNwqbEd0= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:52:45.7987 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1864 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , Alexander Graf , Geert Uytterhoeven , Adam Borowski , manuel.montezelo@gmail.com, James Hogan , Chris Metcalf , Andrew Pinski , linyongting@huawei.com, Alexey Klimov , Mark Brown , Bamvor Zhangjian , Bamvor Jian Zhang , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, James Morse , Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Like binfmt_elf32.c, binfmt_ilp32.c is needed to handle ILP32 binaries. Signed-off-by: Yury Norov Signed-off-by: Bamvor Jian Zhang --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/binfmt_ilp32.c | 85 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 arch/arm64/kernel/binfmt_ilp32.c diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index de6c84702d83..41d9a3ab07a7 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -29,6 +29,7 @@ $(obj)/%.stub.o: $(obj)/%.o FORCE arm64-obj-$(CONFIG_AARCH32_EL0) += sys32.o kuser32.o signal32.o \ sys_compat.o entry32.o binfmt_elf32.o +arm64-obj-$(CONFIG_ARM64_ILP32) += binfmt_ilp32.o arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o arm64-obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o diff --git a/arch/arm64/kernel/binfmt_ilp32.c b/arch/arm64/kernel/binfmt_ilp32.c new file mode 100644 index 000000000000..bb31325e6f80 --- /dev/null +++ b/arch/arm64/kernel/binfmt_ilp32.c @@ -0,0 +1,85 @@ +/* + * Support for ILP32 Linux/aarch64 ELF binaries. + */ +#undef CONFIG_AARCH32_EL0 +#define compat_elf_gregset_t elf_gregset_t + +#include +#include + +#undef ELF_CLASS +#define ELF_CLASS ELFCLASS32 + +#undef elfhdr +#undef elf_phdr +#undef elf_shdr +#undef elf_note +#undef elf_addr_t +#define elfhdr elf32_hdr +#define elf_phdr elf32_phdr +#define elf_shdr elf32_shdr +#define elf_note elf32_note +#define elf_addr_t Elf32_Addr + +/* + * Some data types as stored in coredump. + */ +#define user_long_t compat_long_t +#define user_siginfo_t compat_siginfo_t +#define copy_siginfo_to_user copy_siginfo_to_user32 + +/* + * The machine-dependent core note format types are defined in elfcore-compat.h, + * which requires asm/elf.h to define compat_elf_gregset_t et al. + */ +#define elf_prstatus compat_elf_prstatus +#define elf_prpsinfo compat_elf_prpsinfo + +/* AARCH64 ILP32 EABI. */ +#undef elf_check_arch +#define elf_check_arch(x) (((x)->e_machine == EM_AARCH64) \ + && (x)->e_ident[EI_CLASS] == ELFCLASS32) + +#undef SET_PERSONALITY +#define SET_PERSONALITY(ex) \ +do { \ + set_bit(TIF_32BIT, ¤t->mm->context.flags); \ + set_thread_flag(TIF_32BIT_AARCH64); \ + clear_thread_flag(TIF_32BIT); \ +} while (0) + +#undef ARCH_DLINFO +#define ARCH_DLINFO \ +do { \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, \ + (elf_addr_t)(long)current->mm->context.vdso); \ +} while (0) + +#undef ELF_PLATFORM +#ifdef __AARCH64EB__ +#define ELF_PLATFORM ("aarch64_be:ilp32") +#else +#define ELF_PLATFORM ("aarch64:ilp32") +#endif + +#undef ELF_ET_DYN_BASE +#define ELF_ET_DYN_BASE COMPAT_ELF_ET_DYN_BASE + +#undef ELF_HWCAP +#undef ELF_HWCAP2 +#define ELF_HWCAP ((u32) elf_hwcap) +#define ELF_HWCAP2 ((u32) (elf_hwcap >> 32)) + +/* + * Rename a few of the symbols that binfmt_elf.c will define. + * These are all local so the names don't really matter, but it + * might make some debugging less confusing not to duplicate them. + */ +#define elf_format compat_elf_format +#define init_elf_binfmt init_compat_elf_binfmt +#define exit_elf_binfmt exit_compat_elf_binfmt + +#undef ns_to_timeval +#define ns_to_timeval ns_to_compat_timeval + +#include "../../../fs/binfmt_elf.c"