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 8066EC433EF for ; Sun, 6 Feb 2022 20:30:56 +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=ZIU1iGrcPm9poPaIUlUOkHR1oAI8kK3l0VzDFFOy39c=; b=MG/UilXr7p2Obu U/G3o9KQRr4YHvsINHL3fye/+Ftk33l7pRoCpp6/ZHKdWTATjWq/kUdeT2cA0PjLXFEpTE3AqhPR7 i0jNUx7XPz4cu72Wc92p7Gmmjhit7iPnsRJG32IAqlQTevFU6hXEJBhHUtKyDC8i0gRs/8iFPCajp JJ0Gtxt4tf82/ArAqlB8Fu2cbYmFhYm2F4VDRfykrRePaF9lgquYjLi03evKlHUfvH667qxogBhdL NIBVm12Lp3IaxTfRB1AIfOiA1jhBAlwiAk0arfnEJz//NYKUNGRmxU9jrMLrp2v2dv1xiSJdjUoeq f48MEHqp4viWsyFld3nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nGo9a-008bPC-VA; Sun, 06 Feb 2022 20:28:59 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nGo9Z-008bP6-4H for linux-arm-kernel@bombadil.infradead.org; Sun, 06 Feb 2022 20:28:57 +0000 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=7i3Z46f5V98hV+7wSTAkWTsI05L/w170G6IYhhzBpJA=; b=LTZUCqL9Z3AVQpPhC89N2wQE/C YdGgOE1ts3Gu9PU8GOjbz4eCamBzlB/KgHkxoDvcBviMgkTQhkBe9WHUehrTo/WvD10IIuNK+Ff7k 3IQH1lm5ymPtJtvqFFK3yULXa8hD5OViN/myVM7rlPRRzc4UccEswil6Fm69OyxKdV8xWEjCYhl+S WQ/MFu0/O8jyETbb6MqCdHb/i84MyngV/2XAr6K28PxPENXi/kM9GqjIUfsiapg7SkXIP+XGXdCtU xyrbvaM3yTboYVCL0+OvEir4eQ2qIraGZYDAnt5coom3Iuh5Y2VVy78vZCKfeZpM3IU89MSE98rt/ NetFg+qg==; 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 1nGo9W-007XVO-KM; Sun, 06 Feb 2022 20:28:54 +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 4A9503001C7; Sun, 6 Feb 2022 21:28:52 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 321F621378EDF; Sun, 6 Feb 2022 21:28:52 +0100 (CET) Date: Sun, 6 Feb 2022 21:28:52 +0100 From: Peter Zijlstra To: Kees Cook Cc: Sami Tolvanen , Sean Christopherson , LKML , linux-arm-kernel , kvmarm , kvm@vger.kernel.org, Will McVicker Subject: Re: [PATCH v4 09/17] perf/core: Use static_call to optimize perf_guest_info_callbacks Message-ID: References: <20211111020738.2512932-1-seanjc@google.com> <20211111020738.2512932-10-seanjc@google.com> <202202061011.A255DE55B@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202202061011.A255DE55B@keescook> 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 Sun, Feb 06, 2022 at 10:45:15AM -0800, Kees Cook wrote: > I'm digging through the macros to sort this out, but IIUC, an example of > the problem is: > > so the caller is expecting "unsigned int (*)(void)" but the prototype > of __static_call_return0 is "long (*)(void)": > > long __static_call_return0(void); > > Could we simply declare a type-matched ret0 trampoline too? That'll work for this case, but the next case the function will have arguments we'll need even more nonsense... And as stated in that other email, there's tb_stub_func() having the exact same problem as well. The x86_64 CFI patches had a work-around for this, that could trivially be lifted I suppose. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel