Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754374AbbHFAh6 (ORCPT ); Wed, 5 Aug 2015 20:37:58 -0400 Received: from mail-bn1on0069.outbound.protection.outlook.com ([157.56.110.69]:35119 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753810AbbHFAh4 (ORCPT ); Wed, 5 Aug 2015 20:37:56 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <55C2AC5B.50408@caviumnetworks.com> Date: Wed, 5 Aug 2015 17:37:47 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Leonid Yegoshin CC: Paul Burton , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 3/3] MIPS: set stack/data protection as non-executable References: <20150805234348.20722.71740.stgit@ubuntu-yegoshin> <20150805234936.20722.60927.stgit@ubuntu-yegoshin> <20150805235543.GG2057@NP-P-BURTON> <55C2A50A.50805@imgtec.com> <55C2A6FE.1020003@caviumnetworks.com> <55C2A91B.1090704@imgtec.com> In-Reply-To: <55C2A91B.1090704@imgtec.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BY2PR07CA046.namprd07.prod.outlook.com (10.141.251.21) To BN3PR0701MB1719.namprd07.prod.outlook.com (25.163.39.18) X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1719;2:8a/KMQr6dUnyI14fH3iU2euIElnetAQF0wxVvRxUBX22GbK7UytlFQa/WAml/vMMwo8m/pfywTs0K06dreDvSp/WC13nTy0yejylXC+WmP9e21oTy3LqpPGWugwXOCylZbRcc4A7gsAo1iAyNvduyDqmkGbrjk7LOKiKSAQEx7o=;3:7qEyaSW1FdBffJxjPZCl3dABlYN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cRAy4dVi5elBbP3XH3s7sL+Gu1ZqK+CSaG5zmCcwW/4q16Drkv3ZU5/GCAaNXSXGJ8KKGDw9m+bdhrPYC1rAzf0=;4:32AvwPQ+uT41AUlaj7kDz3e1vNOjkqMcwVpOlJvptiSMPmQeS9tDIJ+Q1S0tnJ8c+3qsAYFir7YHkrAfJL8tk3TJrlKjxyTC4i9Uv4HRekrXGStVKVfovh/TXMxxZnNPbXU0pyUaFEyuYciVCVdYfO4eojQ9qo5QJ0wqlqAHdCOGoF/Tz1J7CNp4rT9OaBQhINeg3r13areozEPDjPZAPOWqBjTq8a0FRyxBLF8a8O3BfQpfCVd9k/lWoyp4xhh0A9qWi8TUMkmY38MJYvKgZprGl/MDcb4y2BJORcSwKfY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR0701MB1719;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1719; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(479174004)(199003)(189002)(76176999)(50986999)(101416001)(54356999)(77096005)(68736005)(65816999)(92566002)(40100003)(62966003)(69596002)(77156002)(122386002)(65806001)(64126003)(83506001)(2950100001)(93886004)(47776003)(64706001)(65956001)(66066001)(33656002)(23676002)(5001860100001)(5001830100001)(5001960100002)(110136002)(97736004)(4001350100001)(19580395003)(81156007)(4001540100001)(189998001)(53416004)(42186005)(46102003)(50466002)(106356001)(36756003)(87976001)(105586002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1719;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjA3MDFNQjE3MTk7MjM6SklqbU5PbXVKQkhFL0ZNZGVHd2xIUEdI?= =?utf-8?B?R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VAT9PonT5eNq+fb0bZJ5cdic5F/6EfOL1IERvJ7ub5t8BrGB8t7ZbIsQ==;24:4rMuPbQA8RFQbR1ZyuMeHEZXS4uPW6MVK1gKH/4nHXN0+gMSGp2YXIFzl348AvH9+IIrSSZOXzNaBqlS22fvzXcABkas0oylKxSZ5hexmbE=;20:WRIR3MmFGu012BNEWadILnccTSA8A9fjPadaFwnQ2s/VwK6R03sASNbhfuQyJPKCIBkFzqa8iwpxzVjSkoTIxg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2015 00:37:50.9216 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1345;2:/p4IHWuSCJ9NfWMaOXefIEern5pDl4Df/Lfc7Amo7CUedSmDBjg3F+hCYBGLkFkFDR71tgu2aTl6NoG1CaZ3pgC8eabIbpPXc8nMxaP+bGfV0TrCwLij52Cfk/lhrI58RzTjEGx3T4SBKWOnBBUZt/yed16zFOTH3b4h6XokfVw=;3:2ElUasHKwNXm/SZhmHpYbTytAajDdjtYJ9qCNoWz3lK4T83bonBVG1ukwnf7hPIArOGZCdQq9d6UP8cYj9OnGyeLVbAp8jdkowHvZbtaAQRa2hwuCMXDa6ztYZ0hqPIR+0sYut+h9z8kM4O5CYAQzQ==;25:aVt5u1KfntgHEWGB3iuqs5nNPaS8XjQzQsmOHq8rutAZpx8RN9eFTzSpAa5Ty0KjsRk+O1ulsPOPvJ9uNatAmA9C+Xi2l7154eDJk54pCmdUS7kk8TK8vG15V/RmYdQR9nEQ36ECwhO4mdyCTErU3PhDg9joyxY0n/GDMjrq99Dwt1zk+mtwHLAg4XIT/Do/Ct2QUsjBzEYax6MiTNcBRUPwi4T57LTy4f2NE6gVwYdFvU4eRG2bu+OP6IdY+YQePEkjh7Ei1E/B2jPFgYbkdg==;23:cCrGE9kGTNXc9Yb5/Lp6xxPCh7Cq55Zwshlk1SvenE1mzx20I4Ta2+XrW5lIi+8GPx9K/Dmo6JHB15v4rT1UR6bIATLoUZKnP5tCLvKPy9MRQkv3S7xppyd+MSo7rqNwTyz4PeyWXFpb10BFXTYtj+IUucq5T7RcqUa4mx9LFTJdj4KFkzIaAVbAc5vH4pNdPTyA0/aV9Pre89/c5AfLfaT+gefGrcw6/PwzUEtlWvVbyiNP9/HzzpEVyQ+j8+7x X-OriginatorOrg: caviumnetworks.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 48 On 08/05/2015 05:23 PM, Leonid Yegoshin wrote: > On 08/05/2015 05:14 PM, David Daney wrote: >> On 08/05/2015 05:06 PM, Leonid Yegoshin wrote: >>> On 08/05/2015 04:55 PM, Paul Burton wrote: >>>> >>>> >>>> As was pointed out last time you posted this, it breaks backwards >>>> compatibility with userland & thus cannot be applied. >>> >>> Never observed since first version. >>> >>> In other side, the problem with apps like ssh_keygen is observed in >>> absence of executable stack protection. >> >> You cannot change the default. >> >> If your ssh_keygen is broken, get a working version. > > It is actually any application which requests non-executable stack > protection and needs some emulation BEFORE GLIBC cancels that > non-executable stack protection due to libraries. > > If you build all libraries with PT_GNU_STACK 'non-executable' and use > application with the same protection then you can't emulate even a > single instruction - it crashes immediately. So, it is not a bad > application, it is a bad choice for emulation space in past. > This just means that your userspace is broken. If GLibC cannot do the right thing then it should be fixed. The very first thing that is executed is ld.so, you need to make your ld.so do the right thing before transferring control to your program's entry point. You cannot change the default setting for executable stack just because you have created a broken userspace. The ability of legacy userspace to continue functioning cannot be sacrificed. David Daney -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/