Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5160229imb; Thu, 7 Mar 2019 09:03:06 -0800 (PST) X-Google-Smtp-Source: APXvYqyNgcTRiqY9GYsdoQ23W2HZk3GYa8mkQ1PhVgVF80Iucp0/POBnrhLocQtf7PBDsHFQyTUg X-Received: by 2002:a63:d112:: with SMTP id k18mr12436570pgg.426.1551978186216; Thu, 07 Mar 2019 09:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551978186; cv=none; d=google.com; s=arc-20160816; b=RxJ/xxsGqOqExtLn1+ljnXSPZL8HbD8JR5cf5pSY7WlMG7ICf/ZF8KjNDeLLbLiBy9 9h59YZza6M215xzjBiWFQfEfOwlRVlFSAV3yDbGPQjwjTn4Nkr+9xxE59D3Jn8xuzLTo fBNPERqg0tlOzkHK+XT37lg57Pk6cpYIrWopBMo2xmBL8+hm5z0Jiuko/AIjCh2BNK2y shT2dZdneJV+wFSOT9yDXv+907fATBn6dBKpEfj4OuE1OpGEo3BCzrS9Z5ZPEZkBLr+J rasTUzuLGLACGGN8ZM5YXvY1+eWh95BzdXYUmhvP8SemV/L5yi9L7oD1PltlbYFJTAp3 Uzrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=s1zsB/737Tin5CwcqhmNyyqJfdWx3oMpEszPfXu6l9U=; b=Co7lV422JVr5fOpAHeEKNixKskXoLb4pUW87LpxJeDCGiYOQMn+hwxNyl51DlYC3Tr 9QmE0T0QrFFRIMDP7f8kOMogNnK0Ce9Kc4Gwo7yB6IfUtS5yeeSTjCrO+CCdr0z0Blcp b6atwf/cVP8QXsqCbkpDVsGN0X49Rl2A32vMYYLUqP+sUum322Tf+qkdcGy8PRkLg6Zo fS9kDbocIAW57twNP0UPfJWBv87hbk/QtYu91NBrtteJWh94VLRnGOKl4A2u7i5VYaNn saxrmdvGUoVaUlDkmmbacmWtejJ4lO2lMIp4S0TKHJz9NmOcYDPyneTq503fRh4icPFy 56VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IKSxgclQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si4780222ple.241.2019.03.07.09.02.50; Thu, 07 Mar 2019 09:03:06 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IKSxgclQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbfCGRBK (ORCPT + 99 others); Thu, 7 Mar 2019 12:01:10 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34489 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbfCGRBK (ORCPT ); Thu, 7 Mar 2019 12:01:10 -0500 Received: by mail-lf1-f67.google.com with SMTP id d26so12225417lfa.1 for ; Thu, 07 Mar 2019 09:01:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s1zsB/737Tin5CwcqhmNyyqJfdWx3oMpEszPfXu6l9U=; b=IKSxgclQkCN0UpoO8GTTI61KcDoTPid2lOS/fmRFez62Fh/bmnGQsVXHwovTOBJAey s1xiOqztJAcc/abRipT5Osb48j1XzMpHhaR89qjt6OjJihYQ5sAVtp71lv9EcGSXHnSX fM0yH7MDuByffboSXDThJlxPU/Af4pUQFD2Xs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s1zsB/737Tin5CwcqhmNyyqJfdWx3oMpEszPfXu6l9U=; b=ugzcqkAk6MmFt3iWbiIVtPIQYfWU5H1EY1gTjZCudsGxQn7iQC9xbJ2H8GLIU5AYMw qeQ4k+AfofH/wxPQ0lCZ5UHdoCvqVYFR/GK3T9dnK5MBpuZVhSXKsBhO00VyPRgJ0nH7 HaOjkmQVqy9qwoIn9Y9wGdHgtrYcZ2MOlsSHXZDC2QUbKjsaRHXIimBjUlxBpE9tMkNE AmfkZy6KwUE++h/abxoEFyd8cZGOYakBgMqQeFE76WLvDDd1Rg1OkGhg96bkPovf0YRV nRHT9AEn+Bbo0siiZYXQ2HBlTZIUfDeIJh+qr4WM0/wYEA15GvGVOaTicSXXlWw84Bf5 mC/w== X-Gm-Message-State: APjAAAUBTd2FnXkWPyQCu9Q5PzMkmTTDNMslrKezANBLedmGQAWtvGPn O6OV3Skd3szybVvJku6/Ch7B32GK/HI= X-Received: by 2002:ac2:5497:: with SMTP id t23mr7643541lfk.69.1551978067012; Thu, 07 Mar 2019 09:01:07 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id s7sm923839ljs.8.2019.03.07.09.01.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 09:01:06 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id l5so14886698lje.1 for ; Thu, 07 Mar 2019 09:01:05 -0800 (PST) X-Received: by 2002:a2e:9786:: with SMTP id y6mr5777048lji.79.1551978065237; Thu, 07 Mar 2019 09:01:05 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <20190307164705.qbu4ytdfdmsighas@treble> From: Linus Torvalds Date: Thu, 7 Mar 2019 09:00:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/20] objtool: UACCESS validation v3 To: Josh Poimboeuf 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. But that macro really is the macro from hell regardless. Do people really use CONFIG_PROFILE_ALL_BRANCHES? Linus