Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5174469imb; Thu, 7 Mar 2019 09:18:30 -0800 (PST) X-Google-Smtp-Source: APXvYqx8mpzmTgEmq2mN29ZuhbbTaKiJ3lV+MBfOPP7Yg4gClUE1cdalKOO4j416i+S/kXKXqcot X-Received: by 2002:a63:1260:: with SMTP id 32mr12446698pgs.278.1551979110753; Thu, 07 Mar 2019 09:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551979110; cv=none; d=google.com; s=arc-20160816; b=hpZF2gTYMlypq3vi3lCIn7tWhCkUHHcNUZukWfuDfKSJP4vHP3E7b2nmHNeIHTzSAF 07/2gk0Iqvbux9z+SzdspfMtQU4IrOvLicm5oCPZKcq+OolpexUGGvQtkWq3RhalYFu6 ksvjeDG6SXJIvmE5rYt2JVeMWt5098kVaT1WtmuSIsQ3FsZuLfc/2xRBdBfoIOj6WZ5e DMvT1IDGCa3ou7Gy400tn7mUpmNsqPhmEhazVXrHe10BI8FCv/Ne2NZuXPZOQDHON95v +q6tMARYBplaisUr9z9wIzXZYDD+rcBh08sY1b+k5YhPwreNyp/ej7bZrao+KLKk7y8z FavQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7ELbxA/rtaY6e32vgAXBgxwbYBVBntSip1WEKyFvi3Q=; b=y+82j0qB71lSxRiY4SGdxBegLlZ0mhN+wZlrXF1C0chiV47oTZR2OmAOwIV9hQYo/H yIa6kbHFHmYhf4IgUdIzGO0dlLqQknu0ijwStZ/BO/RaK63N7HoXe/E5J/qyHbTzuSis y3DtJlgIzzUlLl2q/NSZeui71fOnT+2bK25CBdRlvKYRFz1UaILrk1bZT4tq/7aM4IyL +fGLSI3sOCUxFjANwTIBXQUk26CDdB49/h/TJ/HETDgwwqzET65b8mDcw3fyH6I6mtWr U3qdA17sINtvaHPVuhAx7TnZOGOweYvqd+IkX4v8soP+cqeqj8Hy++J4FCRnF52sg0rp croQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si4140797pgm.575.2019.03.07.09.18.15; Thu, 07 Mar 2019 09:18:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbfCGRRO (ORCPT + 99 others); Thu, 7 Mar 2019 12:17:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfCGRRN (ORCPT ); Thu, 7 Mar 2019 12:17:13 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6604381DFC; Thu, 7 Mar 2019 17:17:13 +0000 (UTC) Received: from treble (ovpn-120-61.rdu2.redhat.com [10.10.120.61]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A00BB5C28C; Thu, 7 Mar 2019 17:17:11 +0000 (UTC) Date: Thu, 7 Mar 2019 11:17:09 -0600 From: Josh Poimboeuf To: Linus Torvalds Cc: Peter Zijlstra , Thomas Gleixner , Peter Anvin , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , Linux List Kernel Mailing , Dmitry Vyukov , Steven Rostedt Subject: Re: [PATCH 00/20] objtool: UACCESS validation v3 Message-ID: <20190307171709.dap5hfeof4yo3nsc@treble> References: <20190307114511.870090179@infradead.org> <20190307120317.GD32477@hirez.programming.kicks-ass.net> <20190307125526.GB32534@hirez.programming.kicks-ass.net> <20190307131312.GC32534@hirez.programming.kicks-ass.net> <20190307164705.qbu4ytdfdmsighas@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 07 Mar 2019 17:17:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 09:00:49AM -0800, Linus Torvalds wrote: > On Thu, Mar 7, 2019 at 8:47 AM Josh Poimboeuf wrote: > > > > This "fixes" it, and also seems to help -Os make much code: > > Yeah, considering that this __trace_if() macro from hell is doing an > 'if()' on the result of that inner thing, it makes sense to *not* use > that "looks simpler and shorter" array sequence, but depend on the > compiler then noticing that the conditionals are the same and joining > the two branches together. > > The compiler has to do much more work to either generate the actual > dynamic array thing, or notice that the _index_ of the array matches > the _conditional_ on the branch, and undo that thing. Yeah, agreed. Now it doesn't have to do the funky xor thing to convert the conditional to an int. > But that macro really is the macro from hell regardless. > > Do people really use CONFIG_PROFILE_ALL_BRANCHES? IIRC, Steven runs it once a year or so... -- Josh