Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2639980rwb; Mon, 7 Aug 2023 00:27:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE97nR9q5gVp7VWhmZswu2hbenEdCenKRDHjsrm+yybM8dcQowdixhWuAYJ2JGBpwZf5ZYg X-Received: by 2002:a05:6a00:15d3:b0:687:7ef9:a796 with SMTP id o19-20020a056a0015d300b006877ef9a796mr11204265pfu.25.1691393232728; Mon, 07 Aug 2023 00:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691393232; cv=none; d=google.com; s=arc-20160816; b=FLs3/GK/M6IoezLYuFG/IdiahyucDbekd6qmrrn9PHmxnDgZQoxN6k2VnUp/2QVgx5 G0BBMOwJ8IG4FulbYD8bUT0Feq6qE4RACDBeid0WPlup/aWIL7K2rLk96y1C4l1iuiig MJy7v3gDhAS7g0GwxFjLoktH2gCk3QMEhrxopbszWkiWQZtcbnuWQvOWc3HL0YaekAcR ts+HO5eEK3U2N1c9aAquO4FeQPukX/SV2Xub1JjQtaeMio2xjkjwHbPCTz3UuXYJdCKY X5lq352AfSaOAKGigJYjN9kphLIy7E0ElD2rzqBFoVke3A+O/nC3Ljh3VRrfH/655VTp nSoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qBVvdfQ+7uAuAbXARcqoglYVEWjC2ubdJ2O+ToyhcnU=; fh=jzbHHzAryLHkQMLdi2qZOpSkKgHZoU03pairMFvFFNE=; b=eGSARypeiNRuzRGjuw8qYbblmR//8P1KREJAOJhCDMYxBLHzOjJf2Ko+Ee8DBSWXyV ikcYT93S5ZAXjDjOdFeU+aA0t18HFqfWGHIlV6CI2rKixASfSJNGNL0VZvISEGHNVDpB BstyYGQfcD4QVjGQonleI5xXOgvV0iPK3LXa/dRJLVEdcT3rRDieJoPsH1emEzkBei4B qCmxeOprdA5bJTiNDUbFO2ZpBLcceuBtPy5UDjDHNXgq3c+N8aZyDmBBm6bJLtmSqtKS Q/nsD92V4UIgVd/et7EbEkrdK2OatAzHhbxmq5R+GEoyZ1v1Z9aSiEQ3b5s+xv/miPZe cikg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SpNvqN9W; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br10-20020a056a00440a00b0068795f00991si3789142pfb.101.2023.08.07.00.27.01; Mon, 07 Aug 2023 00:27:12 -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=@suse.com header.s=susede1 header.b=SpNvqN9W; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjHGHDu (ORCPT + 99 others); Mon, 7 Aug 2023 03:03:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjHGHDs (ORCPT ); Mon, 7 Aug 2023 03:03:48 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86E9010D4; Mon, 7 Aug 2023 00:03:46 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6CB1C2189B; Mon, 7 Aug 2023 07:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691391824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qBVvdfQ+7uAuAbXARcqoglYVEWjC2ubdJ2O+ToyhcnU=; b=SpNvqN9W8w6c37IfcNk3eNCCy+0l0bY2sLCvSbaXXbOq+nOiCcs5cLMdA3n9BIlH9vi8jv 8ByLlL96TK8WiF7qhIOzvIwWLjdpbTOwSIgsMSMdc2Zhix/B3WxC9HUozdEXzDUtH3HOia ikj4S2h/luSXV1azSnZY+DCjxmABQiQ= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 43F6D13910; Mon, 7 Aug 2023 07:03:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2asJEFCX0GQwWAAAMHmgww (envelope-from ); Mon, 07 Aug 2023 07:03:44 +0000 Date: Mon, 7 Aug 2023 09:03:43 +0200 From: Michal Hocko To: Doug Anderson 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 Subject: Re: [PATCH v3 1/2] nmi_backtrace: Allow excluding an arbitrary CPU Message-ID: References: <20230803160649.v3.1.Ia35521b91fc781368945161d7b28538f9996c182@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 Fri 04-08-23 09:06:07, Doug Anderson wrote: > Hi, > > On Fri, Aug 4, 2023 at 8:02 AM Michal Hocko wrote: > > > > > > It would have been slightly safer to modify arch_trigger_cpumask_backtrace > > > > 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 would swap parameters as this seems simplest. > 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. Yes the current ordering is better but having it other way around is not really horrendous either. > 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? I think that swapping would be simplest as the type mismatch should catch also pending out-of-tree potential implementations. -- Michal Hocko SUSE Labs