From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757983AbcIGQiS (ORCPT ); Wed, 7 Sep 2016 12:38:18 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:37079 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717AbcIGQiQ (ORCPT ); Wed, 7 Sep 2016 12:38:16 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160906193740.GA30814@www.outflux.net> From: Kees Cook Date: Wed, 7 Sep 2016 09:38:13 -0700 X-Google-Sender-Auth: idUtnUmB0cqWsCAILXvAN7cQXsQ Message-ID: Subject: Re: [GIT PULL] usercopy fixes for v4.8-rc6 To: Linus Torvalds Cc: Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 7, 2016 at 9:33 AM, Linus Torvalds wrote: > Pulled, but: > > On Tue, Sep 6, 2016 at 12:37 PM, Kees Cook wrote: >> >> Kees Cook (3): >> usercopy: fold builtin_const check into inline function > > Hmm. So with this, check_object_size() seems sane, but it's only > marked "inline". > > And we've had the issue that without the __always_inline, gcc will > randomly not inline things. In fact, this very pull added that to the Yeah, reading the thread from 2009 made my head spin. :( > copy_xyz_user() functions exactly because of this issue. > > Now, it may be that check_object_size() is so simple that it really > always *will* be inlined regardless, but it looks a bit dodgy. True, yes. I will send another update with that added. (And a heads-up: another part of the update will be the disabling hardened usercopy's page-spanning checker too -- we've had another false positive hit on that, so it's time to drop it.) Thanks! -Kees -- Kees Cook Nexus Security