From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38078 invoked by alias); 27 Apr 2018 12:10:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 38043 invoked by uid 89); 27 Apr 2018 12:10:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=guo, Guo, Hx-languages-length:725, our X-HELO: relay1.mentorg.com Date: Fri, 27 Apr 2018 12:10:00 -0000 From: Joseph Myers To: Guo Ren CC: Mao Han , , , Subject: Re: [RFC PATCH V2 02/10] C-SKY: TLS support In-Reply-To: <20180427015537.GA7006@guoren> Message-ID: References: <4b02034496617cddcca1a9443ac1a990d5b77710.1523169833.git.han_mao@c-sky.com> <20180426073346.GC15099@vmh-VirtualBox> <20180427015537.GA7006@guoren> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-04/txt/msg00575.txt.bz2 On Fri, 27 Apr 2018, Guo Ren wrote: > And our hardware mmu tlb-entry do not have EXEC bit to protect the > page-non-exec. I'm not sure what's best in the kernel for hardware not supporting readable but non-executable pages. However, whatever the solution, I'd say the following principle applies to userspace code: binaries that require execution of code on stack pages should be distinguished from those that do not, and the latter should be the default, so that if a future hardware version does support readable but non-executable pages, existing binaries can automatically get non-executable stacks when run on the new hardware. -- Joseph S. Myers joseph@codesourcery.com