From patchwork Mon May 30 10:59:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1636882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=vHr2YcSq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LBXW107DMz9s07 for ; Mon, 30 May 2022 21:00:11 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nvd7v-0007Ml-QS; Mon, 30 May 2022 10:59:59 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nvd7s-0007MY-Ff for kernel-team@lists.ubuntu.com; Mon, 30 May 2022 10:59:56 +0000 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1D1F33FC01 for ; Mon, 30 May 2022 10:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1653908396; bh=ccrALdXZbpmN+p5kbmjTIVKkk08Ira42ruIO2sZlDkg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=vHr2YcSqxs4TZgQbCylQnOI7PPoA9wsicH61G1mPnkiXW/MwVztlBS2o/gAiEnKEW uGxAW595PuC5ebxEnbqE+eTpfioP5RpAGfM2f7WsAitmzhT9YgvtEh2VVKILHpgH2m SWWcy/42GGiz21n2+PYOZBTvmqPwDkB9ZowYLSfB08yP7jQ64gXr7P8jr2bTraAVKm XX4bXbGCUl3YjyAjtgcC7p7Yp3xi+cVuRLqTgD7d+Yf89NW+Lt0HWiK46FQpGTxnC7 qwILimSLX412QaaMXp+5CVYzQwAq/uKAwMnLqPEMJ4R2kmeWifVRWUIpILnpDRe+yO v5n6ByH85aHAg== Received: by mail-wm1-f69.google.com with SMTP id l31-20020a05600c1d1f00b003974df9b91cso9492221wms.8 for ; Mon, 30 May 2022 03:59:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ccrALdXZbpmN+p5kbmjTIVKkk08Ira42ruIO2sZlDkg=; b=dESlZ1Z7RyPLtWE29tYmw1OVMu9Ib5gfSk/XDzGv41HLcPoB5CUn65Da/lPhPVqhpw K9YaYepu1sRtfEgg6LMex5jIgMNvOJu4wPQIt4uidJ6zda4iOUjErz6Nkt6VympNHe1u 4sAc18L7nPNIuOFgNUY+Cu+q/73bMWHbbpvukyb49vK+LvTLwZygdS8TzM6avjNV/ukB 4SUr9KM7+VtbjaggvidohCxCsOmLHbnEp3HNnTFMEJLaVBkiYXziBuFhhQu6SFRrVGJT SVQJLDTEw3Pr7whb6TDIctdb5kwBnrhI+oEMPoP+9Ltvz33k88/Ui4EUt00gEIk7y5U/ cvHA== X-Gm-Message-State: AOAM5335RPdT0FpB6gp7shgESoXawClloc/z8U1uvJdxtvaNu9rtnsWF 0uwQszaL2Sz4yW9zDiZaueYbrxV/+ApxwtYIrCde7MSzKlLFKTWvY731upUS3Zr7vbmgjB10+wT Ds8mHvyEeTEZXiHKZCBNcGmucCsCt4FYF/B9Jv9AHXA== X-Received: by 2002:a05:600c:a41:b0:39c:1512:98bd with SMTP id c1-20020a05600c0a4100b0039c151298bdmr1630570wmq.88.1653908395529; Mon, 30 May 2022 03:59:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCwXismNQXa/Azf/yQuQCHz8ubEv0+IfXQ8rlKFUtfA2S235yKi3AOrgFH/HMQT8B1QMx1MA== X-Received: by 2002:a05:600c:a41:b0:39c:1512:98bd with SMTP id c1-20020a05600c0a4100b0039c151298bdmr1630554wmq.88.1653908395219; Mon, 30 May 2022 03:59:55 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:a0ae:234e:379b:136f]) by smtp.gmail.com with ESMTPSA id j11-20020adff00b000000b0020d0dfcd10asm8835910wro.65.2022.05.30.03.59.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 03:59:54 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][IMPISH][JAMMY][KINETIC][PATCH] powerpc: Export mmu_feature_keys[] as non-GPL Date: Mon, 30 May 2022 11:59:46 +0100 Message-Id: <20220530105946.232371-1-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kevin Hao BugLink: https://bugs.launchpad.net/bugs/1976248 When the mmu_feature_keys[] was introduced in the commit c12e6f24d413 ("powerpc: Add option to use jump label for mmu_has_feature()"), it is unlikely that it would be used either directly or indirectly in the out of tree modules. So we exported it as GPL only. But with the evolution of the codes, especially the PPC_KUAP support, it may be indirectly referenced by some primitive macro or inline functions such as get_user() or __copy_from_user_inatomic(), this will make it impossible to build many non GPL modules (such as ZFS) on ppc architecture. Fix this by exposing the mmu_feature_keys[] to the non-GPL modules too. Fixes: 7613f5a66bec ("powerpc/64s/kuap: Use mmu_has_feature()") Reported-by: Nathaniel Filardo Signed-off-by: Kevin Hao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220329085709.4132729-1-haokexin@gmail.com (backported from commit d9e5c3e9e75162f845880535957b7fd0b4637d23 upstream) Signed-off-by: Dimitri John Ledkov Acked-by: Cengiz Can Acked-by: Andrea Righi --- arch/powerpc/kernel/cputable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 7bd6546b9fde..f9b3def5b254 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -2119,7 +2119,7 @@ void __init cpu_feature_keys_init(void) struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = { [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT }; -EXPORT_SYMBOL_GPL(mmu_feature_keys); +EXPORT_SYMBOL(mmu_feature_keys); void __init mmu_feature_keys_init(void) {