Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp91619rwb; Fri, 4 Aug 2023 09:35:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFBa0c4Kf8AfEENJNKl1YtWCBjwJUpZth1lJeN7ffDI81b7rLH9MyXo791UmLxm3Jczpkw X-Received: by 2002:a17:907:60cd:b0:99c:2e3:cad7 with SMTP id hv13-20020a17090760cd00b0099c02e3cad7mr204542ejc.5.1691166937069; Fri, 04 Aug 2023 09:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691166937; cv=none; d=google.com; s=arc-20160816; b=UnP51K9/5DGGXHXJX+JkwN7EuXvzsU9dRdSwcMVpT4Wdt3ajeKM7TxeoJ8csS7L4Rq qtEIs4JkkbUZXuoKFHiVR/nFUMv4VPUNUFHmIpGlSKA+KdRe1PARzB2umvQTPhu4v0Re BmW5iHzASsqupXcf4JpRr9c/xijfR/SvjxiRHHn/vODJokRuKF1++0UiP90/F4r5TEr3 tZvK2Zrw/2+De7u17+c+99dws0ZtKH06giyuMCCckkwnm9VSK6Hvztp/Tc0TXl7Z0/q8 a5LYdb6GN2x25V7uhSOMgosO+YTSG8FGToyCpX7/gbqtJJ6qOcmj6pneaG7+xqmhSQhI 2Vgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iO5rwUzHdvsTta4AYoM7PZm/e8fMyDOqZiTH6w2WucI=; fh=L+KTZTXHmwVwu9PHocnB3t7CVBDe3jAZvZL56FfIaGI=; b=ig9NF8YlLfcxE3wncCAxQPkjo7jdWaY/ydhE0nFczE9AFRWzz0FUlNKvH1IdcHktmD pndpYEaXnYjjcQUTO4wrRSFBc9d0+KaHYSCYAApXVhozJ5tCww6T5bltdlH/sb4n8Nw4 sYdPz3RXrRaBfdYUDG/ayrma48zbCGOqt3N+10MbXVnRmQdoqF1pGFLjbQ3hd6fdR0YZ COegtObh7AhYKQn3pAK4KWCmVacIvxFBM1Yfye9lipAsgNb/d65+s2PqxIhD8ySpg/W6 QrqXBtnRKnDOcvkv4LH64E1lGp318K8fRw7GNUGPyd2p6n8NuLmeg7LbpGdAe5G7a7dM ISCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AMUKG0O3; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gw1-20020a170906f14100b0099233cac125si1785979ejb.915.2023.08.04.09.35.11; Fri, 04 Aug 2023 09:35:37 -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=@chromium.org header.s=google header.b=AMUKG0O3; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231600AbjHDQGq (ORCPT + 99 others); Fri, 4 Aug 2023 12:06:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbjHDQGn (ORCPT ); Fri, 4 Aug 2023 12:06:43 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B9FE46B3 for ; Fri, 4 Aug 2023 09:06:42 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51a52a7d859so7182567a12.0 for ; Fri, 04 Aug 2023 09:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691165201; x=1691770001; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iO5rwUzHdvsTta4AYoM7PZm/e8fMyDOqZiTH6w2WucI=; b=AMUKG0O3ZHryKLr0tnTo/WTbH6EIhzWu2/l3KbipyDRSvc4gTMborJHpukGwA9PrV/ 2vL1fAteIN2zhSb8OrF3fDoffz9wHnACihFdMSwHU+PJLv1tWJqlym5Yikhypq+ZjtH5 XvAFdLNHmEGqT0fEZ+4UyKWvd0dD4G7ZOzrc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691165201; x=1691770001; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iO5rwUzHdvsTta4AYoM7PZm/e8fMyDOqZiTH6w2WucI=; b=agYBrLnArM82zx/4vrLQ4hQNPahfAhCg6IfJ5g7bsYIz7AKPcqsPgo/i/7PPid8J0l nhEM08BvKYCUSGX5jd8azUSLv41Hq44MIBc6XdBAX7WdKftRr4dwH0iULf6KCyNuyByK oHoLEgO1OLWxEjmLzb608DYuxxKmsGtntGnirIBcu8mDd/lADsdS2XvcusHofunugxah uXv0Rms8q4v3CJrhf0i0BZqVASAgb9JfZBIS7l2SAyZoTCoftEAi/1Hncry/RqpA1h7h aYYihMfBQsHwp6TLeH0ZBW1lBUfmvuVZHSPDpGPXbLK1b+Y7bM2pakQ6ELffp0chx43z FNwQ== X-Gm-Message-State: AOJu0YxPtFVhGv8mpfs4Mzo3W4TXRh/yZ+pA4+t6koq+yAbAn1sK7/Xz zjhMnqGL/AfnKBnwI4YlpSbjTiP7+sVwM8Lzqszd+4qj X-Received: by 2002:a05:6402:1145:b0:521:d2ab:e4df with SMTP id g5-20020a056402114500b00521d2abe4dfmr188309edw.19.1691165200841; Fri, 04 Aug 2023 09:06:40 -0700 (PDT) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com. [209.85.128.48]) by smtp.gmail.com with ESMTPSA id r14-20020aa7da0e000000b0052286e8dee1sm1423115eds.76.2023.08.04.09.06.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Aug 2023 09:06:40 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3fe2a116565so87875e9.1 for ; Fri, 04 Aug 2023 09:06:40 -0700 (PDT) X-Received: by 2002:a50:d0dd:0:b0:522:2dd2:afa5 with SMTP id g29-20020a50d0dd000000b005222dd2afa5mr73563edf.7.1691165180310; Fri, 04 Aug 2023 09:06:20 -0700 (PDT) MIME-Version: 1.0 References: <20230803160649.v3.1.Ia35521b91fc781368945161d7b28538f9996c182@changeid> In-Reply-To: From: Doug Anderson Date: Fri, 4 Aug 2023 09:06:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/2] nmi_backtrace: Allow excluding an arbitrary CPU To: Michal Hocko Cc: Andrew Morton , Petr Mladek , Arnd Bergmann , Borislav Petkov , Christophe Leroy , "Darrick J. Wong" , Dave Hansen , "David S. Miller" , Gaosheng Cui , "Gautham R. Shenoy" , Greg Kroah-Hartman , "Guilherme G. Piccoli" , Guo Ren , "H. Peter Anvin" , Huacai Chen , Ingo Molnar , "Jason A. Donenfeld" , Jianmin Lv , Jinyang He , Josh Poimboeuf , Kees Cook , Lecopzer Chen , Marc Zyngier , Mark Rutland , Michael Ellerman , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Pingfan Liu , Qing Zhang , "Rafael J. Wysocki" , Russell King , Stephen Rothwell , Thomas Bogendoerfer , Thomas Gleixner , Tom Rix , Ulf Hansson , Valentin Schneider , WANG Xuerui , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 Hi, On Fri, Aug 4, 2023 at 8:02=E2=80=AFAM Michal Hocko wrote= : > > > > It would have been slightly safer to modify arch_trigger_cpumask_back= trace > > > by switching arguments so that some leftovers are captured easier. > > > > I'm not sure I understand. Oh, you're saying make the prototype of > > arch_trigger_cpumask_backtrace() incompatible so that if someone is > > directly calling it then it'll be a compile-time error? > > exactly. bool to int promotion would be too easy to miss while the > pointer to int would complain loudly. > > > I guess the > > hope is that nobody is calling that directly and they're calling > > through the trigger_...() functions. > > Hope is one thing, being preventive another. > > > For now I'm going to leave this alone. > > If you are going to send another version then please consider this. Not > a hard requirement but better. If I do send another version, do you have any suggestions for how to change this to make it incompatible? I guess swapping the order of the parameters would be best? I considered doing that for v4 but I felt like long term the current order of the parameters was better. I also considered a rename, but that different problems. ;-) If I rename both the #define and the function then if someone has an out-of-tree patch adding arch_trigger_cpumask_backtrace() for another architecture, like say arm64, then there would be no compile-time failure indicating that the out-of-tree patch needs updating. I could rename the functions but _not_ the #define, I guess?