Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp616967pxh; Tue, 9 Nov 2021 16:15:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtKjy+32/eviIacLwh/R0RLjbibudqHfnlRsC7wHdlhFb2FwH4afG3ZFy3Xp3L5fwZZ2eM X-Received: by 2002:a05:6e02:1541:: with SMTP id j1mr8071147ilu.177.1636503304681; Tue, 09 Nov 2021 16:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636503304; cv=none; d=google.com; s=arc-20160816; b=fCuDjPckVht/MHDFBOWRJOSSmSOxtITIcqFx8qHrga1yQblHz2AaXg7W75SBj9OMtN KEVQBVC4OXQXtAU/EuydBOk/rysWTjkkM3DEIZvS3x2VsvvAyEj+eheP8YUXu+CYXNjI tOBorK/b1mc2MNNnB2x0zw7VmVP+8XwWGOfK4gSRbpwMMSCaojSQrFIRhbdDpn510Qx6 QVh2aPuiogm1V7KWFHlj/456G3ukqPrisx7ldZ2fAuLqYTx/XHFbEtgWPhGoo0h1SyY/ OVh/oJCqxYDGiUR/Yo/vmLnY5N5mIWgwOHbU4ipR2dYBQ6Ur52v824fNHVzpE/niKkOf fiwQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6q8o/4Pkkcqnzs9b9O2zsqdgubB0fcTVKR8hrr53nDc=; b=uWQrg4DNhQlZ3uhgDrFYk0TcmNRbNFCXBwuVTZumdrYk/bVoQtpL+Gqbva5BTD/qm3 ARHVhDw5qIPXdzM1x7shbrsqTU+TQN9xnReTDkab5TB4ie/5pbEQUem5EmTCYtB7hMmw V+BgvnGBStn8V72RvOYMud4X9i2WoTKBxmygZgBq+xapBEZiztF89C8o/rce9F6FU7s/ CPUkRfzDPiDFNYhXI3dxboIAI4fCP6rpdBbwmrhdMCXPF0KfA51Kk/8cZ/nFoHqogwAn eyggIozbZGpt+iI3r5czKtF9d6alylH+qcHBgSCyJH5pvNsJH5JQCoZS9w4w7JQnazrz vVLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kk3EVhy9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay7si34685068iob.27.2021.11.09.16.14.51; Tue, 09 Nov 2021 16:15:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kk3EVhy9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243624AbhKITfs (ORCPT + 97 others); Tue, 9 Nov 2021 14:35:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243613AbhKITfl (ORCPT ); Tue, 9 Nov 2021 14:35:41 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAD0C06120B for ; Tue, 9 Nov 2021 11:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6q8o/4Pkkcqnzs9b9O2zsqdgubB0fcTVKR8hrr53nDc=; b=kk3EVhy9UUxRRrN11k4L21uxpj UVHGtyDqnm5clQjHGudLAhYcuwUsgUkYFAAVAWXGWYiL6CU79Y+K/qKTrzhDoP6tZA6JeqBiuq3uZ 2CBABtVWk0FCq520AbJydDEJ6XEoX/3H0L2wAEFqwLRFMPhO4IPdJ/C5qU6mOe4ZeQPFad7Kjl26Z uqslipsFl8/XZYKVgaT6KMqZ7++/rjsdgykqcNIo7JHrdTHJ/FmA/WmCoIzGI+OxodxK0UhEWfX/u 5te8+sda545OXivI+FBlGHiuOMmt6Tj6303R9JNIyGVVRt/UFvoDuPxS2dwPoQfRuUdGLJGM/+mgX l7zL0uDw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkWrB-00F7LI-A8; Tue, 09 Nov 2021 19:32:33 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A5D4A3001C7; Tue, 9 Nov 2021 20:32:32 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 893D02C525D31; Tue, 9 Nov 2021 20:32:32 +0100 (CET) Date: Tue, 9 Nov 2021 20:32:32 +0100 From: Peter Zijlstra To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Josh Poimboeuf , Jason Baron , Steven Rostedt , Mark Rutland , Kees Cook Subject: Re: [RFC PATCH 1/7] static_call: get rid of static_call_cond() Message-ID: References: <20211109164549.1724710-1-ardb@kernel.org> <20211109164549.1724710-2-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109164549.1724710-2-ardb@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 09, 2021 at 05:45:43PM +0100, Ard Biesheuvel wrote: > static inline > void __static_call_update(struct static_call_key *key, void *tramp, void *func) > { > + WRITE_ONCE(key->func, func ?: (void *)&__static_call_nop); > } Ha, yes, I suppose that ought to work.