Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6213924rwl; Wed, 22 Mar 2023 07:54:00 -0700 (PDT) X-Google-Smtp-Source: AK7set+jsKyQr17+y5IfgcYTtkeAnglzqzKo9SLfQEuuizAJlDglCTsQl3zLi8Y1AKw22r/g8FCa X-Received: by 2002:a17:906:5046:b0:932:ba53:83ba with SMTP id e6-20020a170906504600b00932ba5383bamr6812199ejk.34.1679496840160; Wed, 22 Mar 2023 07:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679496840; cv=none; d=google.com; s=arc-20160816; b=A549l6Qend1THAz92EnQC01HamT52kfxBjQGTy7uQBAbXu7l7dTD2Y+PN09ivsI79P WTkd+iZX8Mr6kP4HViG9cXoLKJkVMDN9zezwKPK14+C8iRslhEYK+XSawSore1OXwe9b kX1quVAFFCsFXU9w4m8RaIj+tcVPssCaV3tkfxpPu5B6m1UrLtuyteyYN7Gx21iytQu8 zTL0jC6I/H1H3L6Wm6BukqrABysd5nZZibp6sA/bd3wL6QumYM3NapDSkh4q2Eu2jM81 PIA7O/6kGXxLawk1Q2Ry2pnor1YwtbB/r0htFD5E/pNY7kotuOMikTzFe+BdTi07rHvM TjFQ== 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=Jo4szZ4FZcTQ+zI+smakOHqo+Q6smmJ4l5cIPdumn/Y=; b=kyHmq6rSjeO+Tn+aPnisFXlMtucPtGRPCz06QcSnVR5UKyvr695VKg5KoUAzrxCXIn tnIeSzZVajJlpK8n4pFRxHbpTyOWAPkCnWWai/OdtsNRpw8ITmgyYe+VQBwP9gAhViZU cRvVg+VqTUu8I5irZceB0Vs9rYuVQEUGzV7pOAXNOx8mXMnLse4UIRSC3ycEktxyOmSr Eb8DBBjGbq0Cu3e7QMh1HEPLdbbno7OlFZlgFSqlMBUyslDJJB8KDJlWLojk4V6mdgVM gXon5SlfHpQChtBffxftMkWs9WHCvmlUcVFZKi9Vkyk4fYZIspeLoxDTA+6k7/oufZ9N YUBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=f0L1C07D; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc16-20020a1709078a1000b009333e2401d0si15535295ejc.48.2023.03.22.07.53.34; Wed, 22 Mar 2023 07:54:00 -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=@infradead.org header.s=desiato.20200630 header.b=f0L1C07D; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbjCVOsa (ORCPT + 99 others); Wed, 22 Mar 2023 10:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjCVOsI (ORCPT ); Wed, 22 Mar 2023 10:48:08 -0400 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 B75EA69217 for ; Wed, 22 Mar 2023 07:46:39 -0700 (PDT) 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=Jo4szZ4FZcTQ+zI+smakOHqo+Q6smmJ4l5cIPdumn/Y=; b=f0L1C07DEYVBTLW160fPMk8G3J BscFktQ/PN0rta7oVdlKWTvsbPvyADPog47HHmCz5br5qSSjPh6n/VN2BL5zolOUBlNGj2Ak/XxLo 74WMK6Kb0hITbNi2MRngKfnW0ni6Fz0vrlPBfDZWK/fBY+yo3nGDjYpoL5j4xK05ukpzvxcKYogdj 69wcpfBRTPJfkKZZbxN7HvvwqRYK0s/56cvOB0gKRGDzAVNGhaKkCr+UUZWx+rB1kuCahB9UtaNaX 0+2HAxtoHCH265pS9xFh3mbKWE2RmGLGEqOL4U7l9FpGiuYg8INnSD/PpRA6o7+plf6ridGBgno3W EunR2Kkw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pezik-004ZrU-2H; Wed, 22 Mar 2023 14:45:46 +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 (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7207430035F; Wed, 22 Mar 2023 15:45:45 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4E0F3201FFA49; Wed, 22 Mar 2023 15:45:45 +0100 (CET) Date: Wed, 22 Mar 2023 15:45:45 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Jason Baron , Steven Rostedt , Ard Biesheuvel , Christophe Leroy , Paolo Bonzini , Sean Christopherson , Sami Tolvanen , Nick Desaulniers , Will McVicker , Kees Cook , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 09/11] static_call: Make NULL static calls consistent Message-ID: <20230322144545.GE2357380@hirez.programming.kicks-ass.net> References: <7638861ae89606b1277ad4235654bba2b880f313.1679456900.git.jpoimboe@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7638861ae89606b1277ad4235654bba2b880f313.1679456900.git.jpoimboe@kernel.org> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=unavailable 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 Tue, Mar 21, 2023 at 09:00:15PM -0700, Josh Poimboeuf wrote: > + * or using static_call_update() with a NULL function pointer. In both cases > + * the HAVE_STATIC_CALL implementation will patch the trampoline with a RET > +* instruction, instead of an immediate tail-call JMP. HAVE_STATIC_CALL_INLINE > +* architectures can patch the trampoline call to a NOP. > * > * In all cases, any argument evaluation is unconditional. Unlike a regular > * conditional function pointer call: you wrecked the indent there ;-)