From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbcFWSyH (ORCPT ); Thu, 23 Jun 2016 14:54:07 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:46457 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbcFWSyE (ORCPT ); Thu, 23 Jun 2016 14:54:04 -0400 Date: Thu, 23 Jun 2016 20:53:40 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Oleg Nesterov , Andy Lutomirski , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , "linux-arch@vger.kernel.org" , Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Josh Poimboeuf , Jann Horn , Heiko Carstens Subject: Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Message-ID: <20160623185340.GO30154@twins.programming.kicks-ass.net> References: <20160623143126.GA16664@redhat.com> <20160623170352.GA17372@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2016 at 10:52:58AM -0700, Linus Torvalds wrote: > Ugh. Looking around at this, it turns out that a great example of this > kind of legacy issue is the debug_mutex stuff. > > It uses "struct thread_info *" as the owner pointer, and there is _no_ > existing reason for it. In fact, in every single place it actually > wants the task_struct, and it does task_thread_info(task) just to > convert it to the thread-info, and then converts it back with > "ti->task". > > So the attached patch seems to be the right thing to do regardless of > this whole discussion. Yeah, that looks fine. Want me to take it or will you just commit? From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Date: Thu, 23 Jun 2016 20:53:40 +0200 Message-ID: <20160623185340.GO30154@twins.programming.kicks-ass.net> References: <20160623143126.GA16664@redhat.com> <20160623170352.GA17372@redhat.com> Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: To: Linus Torvalds Cc: Oleg Nesterov , Andy Lutomirski , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , "linux-arch@vger.kernel.org" , Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Josh Poimboeuf , Jann Horn , Heiko Carstens List-Id: linux-arch.vger.kernel.org On Thu, Jun 23, 2016 at 10:52:58AM -0700, Linus Torvalds wrote: > Ugh. Looking around at this, it turns out that a great example of this > kind of legacy issue is the debug_mutex stuff. > > It uses "struct thread_info *" as the owner pointer, and there is _no_ > existing reason for it. In fact, in every single place it actually > wants the task_struct, and it does task_thread_info(task) just to > convert it to the thread-info, and then converts it back with > "ti->task". > > So the attached patch seems to be the right thing to do regardless of > this whole discussion. Yeah, that looks fine. Want me to take it or will you just commit? From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Date: Thu, 23 Jun 2016 20:53:40 +0200 From: Peter Zijlstra Message-ID: <20160623185340.GO30154@twins.programming.kicks-ass.net> References: <20160623143126.GA16664@redhat.com> <20160623170352.GA17372@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [kernel-hardening] Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) To: Linus Torvalds Cc: Oleg Nesterov , Andy Lutomirski , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , "linux-arch@vger.kernel.org" , Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Josh Poimboeuf , Jann Horn , Heiko Carstens List-ID: On Thu, Jun 23, 2016 at 10:52:58AM -0700, Linus Torvalds wrote: > Ugh. Looking around at this, it turns out that a great example of this > kind of legacy issue is the debug_mutex stuff. > > It uses "struct thread_info *" as the owner pointer, and there is _no_ > existing reason for it. In fact, in every single place it actually > wants the task_struct, and it does task_thread_info(task) just to > convert it to the thread-info, and then converts it back with > "ti->task". > > So the attached patch seems to be the right thing to do regardless of > this whole discussion. Yeah, that looks fine. Want me to take it or will you just commit?