From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754796AbdBGPH7 (ORCPT ); Tue, 7 Feb 2017 10:07:59 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:33084 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754166AbdBGPH6 (ORCPT ); Tue, 7 Feb 2017 10:07:58 -0500 Date: Tue, 7 Feb 2017 16:07:37 +0100 From: Peter Zijlstra To: Mark Rutland Cc: Kees Cook , "Reshetova, Elena" , Greg KH , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Will Deacon , David Windsor , Hans Liljestrand , David Howells , LKML , "kernel-hardening@lists.openwall.com" Subject: Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION Message-ID: <20170207150737.GM25813@worktop.programming.kicks-ass.net> References: <1486164412-7338-1-git-send-email-keescook@chromium.org> <1486164412-7338-5-git-send-email-keescook@chromium.org> <20170205154046.GF6515@twins.programming.kicks-ass.net> <20170206085739.GH6515@twins.programming.kicks-ass.net> <20170207083405.GV6500@twins.programming.kicks-ass.net> <20170207111011.GB28790@leverpostej> <20170207123630.GR6515@twins.programming.kicks-ass.net> <20170207135020.GA26173@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207135020.GA26173@leverpostej> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 07, 2017 at 01:50:20PM +0000, Mark Rutland wrote: > > Right something along those lines. (a) will need GCC help, and (b) would > > be kernel-arch specific. So this isn't something we can quickly do. > > I agree this isn't something that can be hacked together quickly, and > certainly shouldn't block these patches. > > However, I don't think we need anything new from GCC, and I think we > already have a generic API for (b). > > For (a) we don't need new GCC help if we do something like we did in > commit 72c5839515260dce to do the mangling. Prepend a prefix to the > register, e.g. changing 'x0' to '__pt_regs_offset_x0', which we arrange > to hold the correct value. I'm not sure I can decipher that commit and therefore have no idea if something similar can be done for other architectures. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 7 Feb 2017 16:07:37 +0100 From: Peter Zijlstra Message-ID: <20170207150737.GM25813@worktop.programming.kicks-ass.net> References: <1486164412-7338-1-git-send-email-keescook@chromium.org> <1486164412-7338-5-git-send-email-keescook@chromium.org> <20170205154046.GF6515@twins.programming.kicks-ass.net> <20170206085739.GH6515@twins.programming.kicks-ass.net> <20170207083405.GV6500@twins.programming.kicks-ass.net> <20170207111011.GB28790@leverpostej> <20170207123630.GR6515@twins.programming.kicks-ass.net> <20170207135020.GA26173@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207135020.GA26173@leverpostej> Subject: Re: [kernel-hardening] Re: [PATCH 4/4] refcount: Report failures through CHECK_DATA_CORRUPTION To: Mark Rutland Cc: Kees Cook , "Reshetova, Elena" , Greg KH , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Will Deacon , David Windsor , Hans Liljestrand , David Howells , LKML , "kernel-hardening@lists.openwall.com" List-ID: On Tue, Feb 07, 2017 at 01:50:20PM +0000, Mark Rutland wrote: > > Right something along those lines. (a) will need GCC help, and (b) would > > be kernel-arch specific. So this isn't something we can quickly do. > > I agree this isn't something that can be hacked together quickly, and > certainly shouldn't block these patches. > > However, I don't think we need anything new from GCC, and I think we > already have a generic API for (b). > > For (a) we don't need new GCC help if we do something like we did in > commit 72c5839515260dce to do the mangling. Prepend a prefix to the > register, e.g. changing 'x0' to '__pt_regs_offset_x0', which we arrange > to hold the correct value. I'm not sure I can decipher that commit and therefore have no idea if something similar can be done for other architectures.