From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6423C6FD1C for ; Wed, 22 Mar 2023 18:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZY2FB1Nsagf/kcJEDoKWJ2dPqA2fa8Ypt9HYYudk00M=; b=3tzXSmgdKqihwm JWYDmpx5FaO/j1tzbXf0Af/jZCVeL6fjK7uTR6Wo6YMtfhKlm8yso6BpkJUn4KG++99neQEVgCX1x yykhtN2hgJJL6SkRcNBtU56VYVsL2oi5kjOkRoppduUtq/M3qROv5KuM/jYN5FI8ZgdgHiOu3u21A 3rdH1AARKeP99sCszRWNDkLlOeyxXnofeZHRUpHWNVmtlLAp6yN9UCo4phtfhCePCZpLx/5WmXQp8 H8dK/DEcb8EMBgOEV07nFrw+xG0Xzveww0IzgV9262w4WCB7+JD0gSpMI9/MxVy4NL8cf0hb0xQY0 E/Lu4KxIePw+RQTQ5Ang==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pf3JB-00H2Bb-22; Wed, 22 Mar 2023 18:35:37 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pf3J9-00H2AV-0p for linux-arm-kernel@lists.infradead.org; Wed, 22 Mar 2023 18:35:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5CC5C62265; Wed, 22 Mar 2023 18:35:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FBB1C433D2; Wed, 22 Mar 2023 18:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679510131; bh=Elhv5mKGPuTN9tb82ch7Z8v7l2hA1kpDwRzCbhEVmOM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VURV87mcQN39K4QZRsysSH66EvTfDhdd7Ti8NQt+AWT2MFtM5/te7AG7EY+2zqnog kGQs/bDDtPcuuVVTIKy/OsmrheSHm8W7A6FYKXy4QpE7LF48XwZaEYDDrBdptLZYME wbncrahygwrvxOaJOK8ypkZWMyWd3Zh7OPtG/mprf7MdV9GN9DD4pKRLvS1t+WvuoI ao8ALKmRHqXsifFIPEmXbICnfwyfPVbeixb0JhfqCZxe2xj25dmX8lJxW7bVhJHaiv YQ6CPCqr9D1mp+8s6HuK6pitfcNapDwhsIxc0zKZARkorETDXvsrU5o4efrBOao+k7 mJnQW4GvGf55g== Date: Wed, 22 Mar 2023 11:35:29 -0700 From: Josh Poimboeuf To: Peter Zijlstra 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: <20230322183529.owu33xouz44sv4re@treble> References: <7638861ae89606b1277ad4235654bba2b880f313.1679456900.git.jpoimboe@kernel.org> <20230322145918.GF2357380@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230322145918.GF2357380@hirez.programming.kicks-ass.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230322_113535_336657_D580C428 X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 22, 2023 at 03:59:18PM +0100, Peter Zijlstra wrote: > On Tue, Mar 21, 2023 at 09:00:15PM -0700, Josh Poimboeuf wrote: > > +void __static_call_nop(void) > > +{ > > +} > > +EXPORT_SYMBOL_GPL(__static_call_nop); > > Kees, is this a ROP target? The above is basically ENDBR;RET, push > something on the stack, jump there and you're in business or so. I could add __noendbr, except for the !HAVE_STATIC_CALL + !CFI_CLANG case which actually needs to indirect call it. -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel