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 90989C433EF for ; Fri, 29 Apr 2022 23:22:39 +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=nj90VDF9r7pE3shWTTE77/YSt1lq3okAMTgfZo/Lhyg=; b=r6osPi0kjdClsG Du9zAR2NE4kEypkkbXezqrz0bhDivhuXh6BrBVKSzgO+lR3ta+vPUGrAa/bjBjbcCK+8oeko9FKgf I7otfN2YJ+fOdvijmNUy+Tew01k+HG0vzo5kFopSOCYcgD6Ukxz7yDBwdaVyufs4elxfsHaMrwO4y atqktwzRH8yzhq88xPgof615JvCL5PStjGPn4cV9lTB2UpMaGFXXdg2GYl11z/aAEnph3itiv4LZP wtX/vhBCcL+onFGAiyYgnxZ1upu5iayGEsY+BpElNJ0rcqZF+AS5iP9ELcBeNkWS/TxtT4CSDkEEo CT2KXscSM9PYHSZdNDKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkZvi-00D1P3-J9; Fri, 29 Apr 2022 23:21:42 +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 1nkZvg-00D1OF-I4 for linux-arm-kernel@bombadil.infradead.org; Fri, 29 Apr 2022 23:21:40 +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=GuE59RNYBcSn7YxgPNLjHOdq2pqA9HQAGI3HMZ8V3bA=; b=Mg6soHH5neJME8iJ1TwIkua8FK 4tj0TafDVMPpeqLC33cK1YvHmi7JKaWuMNmUIkVN7Y5J9FG967oWK9ZMRBXuyLwz3coHcpSnYUi+S qhtN1hnGwCbfWy13sN3Rb4aNTkWYbehc3ihRODwUTj8ysjEiGmXzA4lrwdgXtQ6bq+ELPHbxUOM+B 6IFDD+ykq2CD1tvoNT307XYOgsBkVrEz2iS3Xrn1sDUIH1xX/aNS2ggcoVsZ0xk3+6lylomVF2OLm J9fk2qe3YH1VFmcfT3hTEdUBxC7MYdG8CFqTEqrNUPkmbgLPHUoP0VcyhXhwBVhzxJqlkbr033Ii+ g/4U+wQw==; 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 1nkZvZ-009j5m-Ls; Fri, 29 Apr 2022 23:21:34 +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)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A8436300385; Sat, 30 Apr 2022 01:21:32 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6CEFA2028F01B; Sat, 30 Apr 2022 01:21:32 +0200 (CEST) Date: Sat, 30 Apr 2022 01:21:32 +0200 From: Peter Zijlstra To: Sami Tolvanen Cc: linux-kernel@vger.kernel.org, Kees Cook , Josh Poimboeuf , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC PATCH 14/21] treewide: static_call: Pass call arguments to the macro Message-ID: References: <20220429203644.2868448-1-samitolvanen@google.com> <20220429203644.2868448-15-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220429203644.2868448-15-samitolvanen@google.com> 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 Fri, Apr 29, 2022 at 01:36:37PM -0700, Sami Tolvanen wrote: > Include the function arguments in the static call macro to make it > possible to add a wrapper for the call. This is needed with > CONFIG_CFI_CLANG to disable indirect call checking for static calls > that are patched into direct calls at runtime. > > Users of static_call were updated using the following Coccinelle > script and manually adjusted to preserve coding style: > > @@ > expression name; > expression list args; > identifier static_call =~ "^static_call(_mod|_cond)?$"; > @@ > > - static_call(name)(args) > + static_call(name, args) Urgh, sadness.. I worked so hard to get away from that terrible syntax. Can you explain why this is needed? I don't think there are any indirect calls to get confused about. That is, if you have STATIC_CALL_INLINE then the compiler should be emitting direct calls to the trampoline. At no point will there be an indirect call. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel