Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753651AbbHFAki (ORCPT ); Wed, 5 Aug 2015 20:40:38 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:21448 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbbHFAkh (ORCPT ); Wed, 5 Aug 2015 20:40:37 -0400 Date: Wed, 5 Aug 2015 17:40:32 -0700 From: Paul Burton To: Leonid Yegoshin CC: David Daney , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 3/3] MIPS: set stack/data protection as non-executable Message-ID: <20150806004032.GA24016@NP-P-BURTON> 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> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <55C2A91B.1090704@imgtec.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [192.168.159.103] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1396 Lines: 31 On Wed, Aug 05, 2015 at 05:23:55PM -0700, Leonid Yegoshin wrote: > 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. ...snip... > Create a buildroot FS with PT_GNU_STACK 'non-executable' libraries. Then run > ssh_keygen on CPU without FPU and look. > > You also may try to run MIPS R2 Debian on MIPS R6 CPU, and see a spectacular > failure of ssh_keygen (it tries to emulate MIPS R2 instruction before first > library is loaded and that fails due to non-executable stack protection. All of that sounds like perfectly valid reasons to move the FP branch delay emulation away from using the stack, which we absolutely do need to do. They do not however justify changing the default flags & breaking backwards compatibility. Thanks, Paul -- 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/