From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753508AbcHWQHS (ORCPT ); Tue, 23 Aug 2016 12:07:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13615 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbcHWQHP (ORCPT ); Tue, 23 Aug 2016 12:07:15 -0400 Date: Tue, 23 Aug 2016 11:06:29 -0500 From: Josh Poimboeuf To: Linus Torvalds Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , Andy Lutomirski , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park , Nilay Vaish Subject: Re: [PATCH v4 54/57] x86/mm: convert arch_within_stack_frames() to use the new unwinder Message-ID: <20160823160629.pgnwzl65zji5l76w@treble> References: <62fab36288792edae0181274641d6b4c62157fea.1471525031.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Aug 2016 16:06:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2016 at 03:11:32PM -0700, Linus Torvalds wrote: > On Thu, Aug 18, 2016 at 6:06 AM, Josh Poimboeuf wrote: > > Convert arch_within_stack_frames() to use the new unwinder. > > Please don't do this. > > There's no real reason to unwind the stack frame. If it's not on the > current stack page, it shouldn't be a valid source anyway, so > unwidning things just seems entirely pointless. > > Quite frankly, I think the whole "look at the stack frames" logic > should be removed from this. It's classic crap that external patches > do. How many call-sites does it actually check, and how many of them > aren't already checked by the existing static checks for constant > addresses within existing objects? I noticed the __compiletime_object_size() check is completely disabled for gcc >= 4.6, thanks to: 2fb0815c9ee6 ("gcc4: disable __compiletime_object_size for GCC 4.6+") AFAICT, that change went too far: it disabled both the compile-time *and* the runtime checks, so copy_from_user_overflow() is never called. Working on a couple of patches to try to fix that. -- Josh