Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751074AbaJDQRQ (ORCPT ); Sat, 4 Oct 2014 12:17:16 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:49729 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbaJDQRP convert rfc822-to-8bit (ORCPT ); Sat, 4 Oct 2014 12:17:15 -0400 From: Leonid Yegoshin To: Linus Torvalds CC: Peter Zijlstra , linux-mips , Zubair Kakakhel , David Daney , Paul Gortmaker , Davidlohr Bueso , "Maciej W. Rozycki" , "chenhc@lemote.com" , =?iso-8859-2?Q?Rafa=B3_Mi=B3ecki?= , James Hogan , Kees Cook , "alex@alex-smith.me.uk" , Thomas Gleixner , John Crispin , "jchandra@broadcom.com" , Paul Burton , Qais Yousef , "Linux Kernel Mailing List" , Ralf Baechle , Markos Chandras , "Manuel Lauss" , Andrew Morton , "lars.persson@axis.com" Subject: Re: [PATCH 0/3] MIPS executable stack protection Thread-Topic: [PATCH 0/3] MIPS executable stack protection Thread-Index: AQHP34Gysxw0os/VaEewjedDoGfZbpwgDy6AgACAvYD//45ViA== Date: Sat, 4 Oct 2014 16:17:03 +0000 Message-ID: References: <20141004030438.28569.85536.stgit@linux-yegoshin> <20141004082307.GS10583@worktop.programming.kicks-ass.net>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, it works on CPU with hardware page table walker - MIPS P5600 aka Apache. I was involved in architecture development of HTW and took care of it. Linus Torvalds wrote: On Sat, Oct 4, 2014 at 1:23 AM, Peter Zijlstra wrote: > On Fri, Oct 03, 2014 at 08:17:14PM -0700, Leonid Yegoshin wrote: >> The following series implements an executable stack protection in MIPS. >> >> It sets up a per-thread 'VDSO' page and appropriate TLB support. > > So traditionally we've always avoided per-thread pages like that. What > makes it worth it on MIPS? Nothing makes it worth it on MIPS. It may be easy to implement when you have all software-fill of TLB's, but it's a mistake even then - because it means that you'll never be able to do hardware TLB walkers. And MIPS *does* have hardware TLB walkers, even if they are not necessarily available everywhere. So this is a horrible idea. Don't do it. Page tables need to be per-process, not per thread, so that page tables can be shared. Linus -- 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/