Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp615165pxh; Tue, 9 Nov 2021 16:13:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfAtk4weY1mxKK/Uk/U4pPSeM31ArY784oV+MJJbpxSz6oUnL94O8NyXyhn63UQIrFDe00 X-Received: by 2002:a05:6602:3281:: with SMTP id d1mr8218049ioz.84.1636503197400; Tue, 09 Nov 2021 16:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636503197; cv=none; d=google.com; s=arc-20160816; b=wp4ODQ+VObJHDdVQv6ZhsPBgWCZF8mAFtKi/9ZjOsCC9/EBBEhXyJxySBJ5jPb7J94 SXMB4Jn6t7G8kIaaZ5/1dYwk+KJ4RhDl714jDzl0lYKzxIye4345bgbQG8+2s5j6ayWM o49EVyg9rhpZNXxsVp4cvyTQgknSu0gn1KNIXaAIfVFO+Kc2qmmJIrnIEklVGbDoBDgW LQWd5bV2u/cq0jV50WGLawBoaQm+d8H2G33CKIPhtMOGCw0olgEkcFrgbgHNpDvfvuYX 3xzOYng6t74m/bq/WnugkZ7Qy38SCc9C1jX3y1ElOOE6+tgkBKPZUIc5upK+3UZ4j6ZO TLAQ== 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=u3FQPPMTwKhIwI4dCTCxShL7v0DIZcxjmFUSnXqOhSM=; b=e/AGmuadz+prJJ38kabMmZTPizEsL7ytLUzjPBl3Xqe6HGfn2iYUM7EqR3P+2UFe1B oLCXzu0FnZk6CWAo98sdE5Qho1aaD5TlVTb3lgmwGonS/llL4W3ZcA08hyeDXKPj+dam kkpHkEbpJx5NIUcsKkt0CtpXVory9ec84OMP42OhwDLn6OLdj8va7NlC23REHQ3fqgn4 pMvIcmD7bDB0wsf8Goq6AQ029zMXEtCNeSpVMPYIlxjTPoNZb6eV7COqQCKg6DfF64Oq +OuPDWPp8xJjrs3WvFtVSpItKTCw9D6zvOtTMjbA+pKzAUo6GD21wRLyxzVt8mPBYcVV nBzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=an2LWyWT; 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 h25si28418236iob.58.2021.11.09.16.13.04; Tue, 09 Nov 2021 16:13:17 -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=an2LWyWT; 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 S242794AbhKIS7I (ORCPT + 97 others); Tue, 9 Nov 2021 13:59:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237469AbhKIS7H (ORCPT ); Tue, 9 Nov 2021 13:59:07 -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 1741FC061764 for ; Tue, 9 Nov 2021 10:56:20 -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=u3FQPPMTwKhIwI4dCTCxShL7v0DIZcxjmFUSnXqOhSM=; b=an2LWyWTsLNHAU3v9uYogWfVbN E1OYqIrizTLqSaoInwXrDRQPKlaAX+hHZy7sXTM/VuqLvoQ7K7CcNRHeWSMOl1jUZGOsW9vUAJM2s LwkYyZ+bv9Sd7iGdAJONNFIInG7deBx2BTFNUJ5PTrpTYN4M6ue5Vvcfi/TXkcGI+cra01DHk6JWe VuJMrKRpv03P/sMx7dAUYN6XY1OJuzvjpm9biqka9DSexYoALAU5+vkP619vrr7cY1o7roJOc5fW5 8zu1KtfRNJuqluXlvOTNLWQ4GVibO4mfHYAZP28+U3qW0nn55LzOx5Gx2aSNxSIcDyum3b8j5Bzj4 NVDa3Tkw==; 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 1mkWHv-00F76z-SZ; Tue, 09 Nov 2021 18:56:08 +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 30F753000DD; Tue, 9 Nov 2021 19:56:07 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 144DC212EE599; Tue, 9 Nov 2021 19:56:07 +0100 (CET) Date: Tue, 9 Nov 2021 19:56:07 +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 4/7] static_call: fix broken static_call_query() for non-exported keys Message-ID: References: <20211109164549.1724710-1-ardb@kernel.org> <20211109164549.1724710-5-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109164549.1724710-5-ardb@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 09, 2021 at 05:45:46PM +0100, Ard Biesheuvel wrote: > static_call_query() accesses the func member of the static call key > directly, which means that it is broken for cases where it is used from > a module and the key resides elsewhere and is not exported. > Arguably when the module can't change the value, it shouldn't be having any interest in obtaining said value either. I really think you're exporting too much. Modules aren't good, they deserve to suffer.