Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4261175iob; Sun, 8 May 2022 07:37:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbyk6LR4h5MK2JtzozL5mUL1EOSSu5xkek1nLP2Qg24++mbG3Up7S4zZ0qd3ZDtP2QX4NO X-Received: by 2002:a17:902:ef49:b0:15e:b6ed:4832 with SMTP id e9-20020a170902ef4900b0015eb6ed4832mr11897293plx.173.1652020627117; Sun, 08 May 2022 07:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652020627; cv=none; d=google.com; s=arc-20160816; b=C/vz+/u+RDo0KABMUizkpTyC1Zb3YPj0UEhvLdFWLQYFdRl6HJ2q959ABtIAVkjNSQ P9o0Uxj3r3TtBy9QW6fMyPJoRuhtjGOGbKZ28wPmHx2hybVdQD534RJhQVXE1wlzKr8f pnSh8tRSpINqePeE4a2zAZYw1Y36vpCYsZoZ4b8X0fQe3/yC3TJut7KTwCTsb02ZMlkD C4Mtp0JUZfAjICJcIruLOCPkKlytAweA0BKVSyFEw9QQw2tOyGTMAEpianAT8BHR85e7 J7dcykdd+Gl5f8PAqm8yEVEd+K02/9QL+cIYMdZW2nQODN66UgjJwpkzyuOS0oYrazU5 +jmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oYHoqrW62bDSXtF7FVIR7Ce1mBN8BG4H8G3uYkKai+M=; b=WM6+wi2H3s0K5BIz3XSsCZZi/qzsvoXajCfpHRnOOCsUfHsahYX6nu3+ooFcMF9hdS U7d6LgaH3DbDef2zvxlBNon/qULQUCSEwf7I6vO9POTRs17JD7J/LmjKW4onxmyWrV/g G/zR3uG5O6WFmU6Hk2RI7Gqonvup2/Uw5vzrhv9ERixJKwOWhKGYxgELmOtKr7/v02b4 kwcaE++ic90CTh1gWSpM6P0QtIEZ0iW4ee6TR+eAxieVTxgzIIs39XTeMbA6TRNGmNve l3Bfmj4sSOKyXN9aTqfIf8PjuPdYR2SMK0SaQpHl4hQjQdUf/JD8jWADdg1HKv5TJ1TS Q8LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oqfp3V8h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i69-20020a638748000000b003c6ab6a4b69si2166892pge.285.2022.05.08.07.36.52; Sun, 08 May 2022 07:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oqfp3V8h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445051AbiEGAS2 (ORCPT + 99 others); Fri, 6 May 2022 20:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235557AbiEGAS0 (ORCPT ); Fri, 6 May 2022 20:18:26 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 626A7193D5; Fri, 6 May 2022 17:14:38 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id r27so9747262iot.1; Fri, 06 May 2022 17:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oYHoqrW62bDSXtF7FVIR7Ce1mBN8BG4H8G3uYkKai+M=; b=oqfp3V8h26v18VZIi2Ugg2P0nVNPUi7Aal2Ctl1ZLnK2pYUBxojPPv3lGexF0I+caO 0kkK7AFdAeMrc8UQeViEh+4tCmHU4NNvblhuqBWhDZj0EdX/51JGAgxsQNY9s3KvSv0J Gej1/ktNWNuD26jhXCcDAWBHgmfhhpLXsNKCDBwhtB5neYxy/YInL798GOSRGN2+fHar 2iBy8mA1rAz0AkzK5lHusLtZQFsF0qXovs3sqHLKJCoVnFvWUSm1TXIm4JZPyx6q3/cx l08+TbVNxmBr64wUETW1ma7zxO+DPxJ/nJVGxnebVQklUg2MI9UzSNEwLuOlqiGKQa2o lWhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oYHoqrW62bDSXtF7FVIR7Ce1mBN8BG4H8G3uYkKai+M=; b=k/o1WTEkCBvl5V0LQYV2kwQwu847eVbLFIn2vBlqCgDmlqmRLQSHLZuPHCOgYz74aO Syg5TG9uqnQcJ/vmVPlJ90f0pZ+lejB8nKJ7ER478zXsJR7EQPKwZkyIYdhUc+Xxzoui VLk0dyLWO/UWhFFrxtzWbFqPHrc1fHKB6MD+5X5jAjja3NMwLCjbxIxuWM0QDsqF+jtA b22oLdSK/5U27lSfcpGmZSVpWWRoeSNfDbewLLQe0CaN7aFjusZWcxw0orzyUo+ePPdG dI/7S/4pofB1m+5UPkFIEtWQhgS6TIaOOoTmTah+MIytfqLj15qH561tcBGcasz72sLT zx9A== X-Gm-Message-State: AOAM531AdQuDaPdcFOn0B+cUysEJIhKQLNH5x+pv4u21P8RCkHRAfv/w 1lGM0RlUkaTgBolsSb3iw7GdnlVc6YmtBBVO3fY= X-Received: by 2002:a05:6638:2104:b0:326:1e94:efa6 with SMTP id n4-20020a056638210400b003261e94efa6mr2620154jaj.234.1651882477804; Fri, 06 May 2022 17:14:37 -0700 (PDT) MIME-Version: 1.0 References: <20220422150507.222488-1-namhyung@kernel.org> <20220422150507.222488-5-namhyung@kernel.org> In-Reply-To: From: Andrii Nakryiko Date: Fri, 6 May 2022 17:14:27 -0700 Message-ID: Subject: Re: [PATCH 4/4] perf record: Handle argument change in sched_switch To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Andi Kleen , Ian Rogers , Song Liu , Hao Luo , bpf , "linux-perf-use." , Blake Jones Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 28, 2022 at 4:58 PM Namhyung Kim wrote: > > On Wed, Apr 27, 2022 at 12:26 PM Andrii Nakryiko > wrote: > > > > On Wed, Apr 27, 2022 at 11:15 AM Namhyung Kim wrote: > > > Actually I tried something similar but it was with a variable (in bss) > > > so the verifier in an old kernel rejected it due to invalid arg access. > > > > > > I guess now the const makes the verifier ignore the branch as if > > > it's dead but the compiler still generates the code, right? > > > > > > yes, exactly > > Then I'm curious how it'd work on newer kernels. > The verifier sees the false branch and detects type mismatch > for the second argument then it'd reject the program? > Verifier will know which branch is never taken, and will just ignore and remove any code in it as dead code. > Thanks, > Namhyung