From patchwork Wed Jan 31 19:02:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Kanner X-Patchwork-Id: 194907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp2099693dyb; Wed, 31 Jan 2024 11:04:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyONagHtsZfQ4TgIW2kbZzRuLqUwGVFJd82Mq+KEGeBVXPeroJbai9ohqJwG7+KmTukTf6 X-Received: by 2002:aa7:d311:0:b0:55f:891:d8e3 with SMTP id p17-20020aa7d311000000b0055f0891d8e3mr1740367edq.21.1706727843616; Wed, 31 Jan 2024 11:04:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706727843; cv=pass; d=google.com; s=arc-20160816; b=ik5CrlC7kPobwupMbYIdmjAfSK7M2V/dDYENpaDy/tFxY+1ZnQtamnlr19YlD253+3 fyu5bf/zgMhOVGvQPaiQbK9uEwed8ffUeca/Fdm5wfGndOnZyPXxx3ws/UP/2IZtD8OI fcFSOg4iQfkNg/g5x+VcxgCYed5mDSoeDix5PA8znBfxSTwOkbElbvzWOf6CtP7EdqqA 7mPfNmqcYAm6jhOb8pi51m+Z4zuf5D679IwDNm11W6kGBC7StlDRJBLOPKsyi53bNqsq rBDz9qD7AekOFfAvMmK8CgiXs9XKaDEpdnKg7S/nZvGIgsHNL6mpUakX5gMB/+XZlT0e FPFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=uCHcg1JGhJ1uDn0/KCMDkISefHyEiFXm2OiWCo3MPgk=; fh=9WRCcnHlhP6W3AWCTRlcXcLFzORhMR16/fRlcL4nR1w=; b=M5Gtjkr8Mpal1FJs+/syM8YoGN8fVsRVkiyibYj1XK4VftFIvLRncbCO9MgPltDk5e YkZcEyE8pjVMYZsaEsaT5cBRu4p6fqkPZtJyL/iKmtWt5U+6spT4IbFrXHb40QfF9y24 0dQZZGo7XjDtLvYqLRcxtnfLGurcPzDCteSZCSuCGmz8TPo2kklX0KJVlvMecJtSX12O T91clOkZC1Uj8u3HdiJzcvlqR0fMe1tpzHiS3Lz9N1CsiXO9XrF+rGTza9ZLZwoyMiSl /UgfEY22HTPg+BYdSp01LOxcD+iSG8GJZgbnnhMt5kdVMavD1Qy97+f3CRjT6BSqzyOG W9lA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YaB8JCQk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-47000-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47000-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCXPE7kfVIIUx7DGcc4yG4pQAzWOz0WgUrWcu1dze9ZXzVz40OOD4kjpMaynuV+59X87FCVGOi6lTcZOfdLLQTm/ie1AFw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n18-20020a5099d2000000b0055f02e16ecbsi3299644edb.610.2024.01.31.11.04.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 11:04:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47000-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YaB8JCQk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-47000-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47000-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3E0151F216DA for ; Wed, 31 Jan 2024 19:04:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28B4638F8F; Wed, 31 Jan 2024 19:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YaB8JCQk" Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCDE63613E; Wed, 31 Jan 2024 19:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706727827; cv=none; b=H6GJISbsnI/QybB0R8jze0QrlEqJXyum78dVPgEFHZGOVORuqNPjVive3PEYCt8j8jfC6PA6TRZiIVuBUAj5zryipReLDjXnTxjoymfFffjkGVtpLhFTKUKbbLJmoO1rov46nfDaFjvSPuzUqpQkUqzaZNELX0yS8JYfU+98vqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706727827; c=relaxed/simple; bh=UXmrc4wHW1CYloxZDq3S33BFNdKy0XymGy38w6L2Lpk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=gDVqclDyVtaowCWBEUewQz+cw0z1PaKgE3SR+lmME9etpG/TtaBZS4uCI6jk97J+Ua2IasxD9F0Hc44jvTqfyl5ftEcuATit3LqXIJAgSlE2MkE3RT07Wq48sPDPt51icccu6lqqEDJ1XrHVlY8rk/u3OWJGKQv6KNP3Jg7vl2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YaB8JCQk; arc=none smtp.client-ip=209.85.208.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d057b6df2aso2321061fa.3; Wed, 31 Jan 2024 11:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706727824; x=1707332624; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uCHcg1JGhJ1uDn0/KCMDkISefHyEiFXm2OiWCo3MPgk=; b=YaB8JCQkbrytj6fAYLEnEcgzz7LT/WlZF5qrgL288Ef3iRNlh1F44h1x1WGQdGZBuc sCQ4fCjlN1KCaYZppcYIQ2LD6YrC60OYAcUC2/rn9oJTAVJAxbOys/ab9/mAYSPE0phl Ew3+IpP/YTfhyuIfFjJLcRcxeLpkCKMXiH/F8rae2VtdrJ45HKlpIhbDIohxoVfGibNr S4kcyLzulFYZlxMiiStMq6m/z5TQHar4xH+WNOu3nGJmnH1kTt0Z0S7qi0SlBi/uQeiw nPiU6ok9Ks1sxXShH/S9XKWhZ05ncGWkAtPNnMCfVaLbl/qUsPZHBWQCVb7EM9s9ziaK FOxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706727824; x=1707332624; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uCHcg1JGhJ1uDn0/KCMDkISefHyEiFXm2OiWCo3MPgk=; b=nGO7RAmw6/WVgZGd3+YgweBMFCdPhEOMtymcx6VGsnhL8BqWtiFarcBozl168QSt2i iJcEC1sBfZNgsOjYw67Tf2u5fIOZWV0eC5QjYXkFYmHfKDYXyXrOwJD6XfDHxlq5mLZV HwN/YP83CKWcDx6zh4B05bODQux4EFyPnH61UO1HeygYWf9zDuGUrSaEIKtZ2wyfUt7r oVwiM+dvOAlVM2Pv1XfVfXeW/WSNbgIhfkL9YmfwMvQvlcxDD1lBKbKF9Cqxtj9VgBNA YOTUKnaH4RLSK1DkNisFT7EnVrwSBOJZYMNCGRb5oQ4lncoVlkvL66OqyFhGvCvL7/bv rAlg== X-Gm-Message-State: AOJu0YwxwnEckRe9Xuuz1nEBKcINveMMrlg5gzO5sGvVffRqEvnnj2ap 8cjSbfMolKIVGN6Np17UgW+5dHOSN8PK7XezXYa84CNoB18O8yde X-Received: by 2002:a2e:6817:0:b0:2cf:159e:d401 with SMTP id c23-20020a2e6817000000b002cf159ed401mr1766472lja.36.1706727823354; Wed, 31 Jan 2024 11:03:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWkQyUqdEVyHuJ139U8yx76A/GLneo5P9W85xtd5CCIfd3DqSQ4Ikxmunm44Hp49LxHm3OsbPTFNoJgxVNoDByQyAyVDphTVCfjV49UQSAwks61TGDzBZDE4pTcFZScDLFoZas2EMzzx0D3b2NLVJpd8XZW4DvQaGHXL74N1TvBFqKV18ef Received: from localhost.localdomain ([77.222.24.25]) by smtp.gmail.com with ESMTPSA id n2-20020a2e86c2000000b002d06a953a37sm323870ljj.138.2024.01.31.11.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 11:03:42 -0800 (PST) From: Andrew Kanner To: mcgrof@kernel.org Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, mchehab@kernel.org, Andrew Kanner Subject: [PATCH v1] module.h: define __symbol_get_gpl() as a regular __symbol_get() Date: Wed, 31 Jan 2024 22:02:52 +0300 Message-Id: <20240131190251.4668-1-andrew.kanner@gmail.com> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789633855073551222 X-GMAIL-MSGID: 1789633855073551222 Prototype for __symbol_get_gpl() was introduced in the initial git commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), but was not used after that. In commit 9011e49d54dc ("modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules") Christoph Hellwig switched __symbol_get() to process GPL symbols only, most likely this is what __symbol_get_gpl() was designed to do. We might either define __symbol_get_gpl() as __symbol_get() or remove it completely as suggested by Mauro Carvalho Chehab. Link: https://lore.kernel.org/lkml/5f001015990a76c0da35a4c3cf08e457ec353ab2.1652113087.git.mchehab@kernel.org/ Signed-off-by: Andrew Kanner --- include/linux/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/module.h b/include/linux/module.h index 96bc462872c0..8a660c81ac3d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -299,7 +299,7 @@ struct notifier_block; extern int modules_disabled; /* for sysctl */ /* Get/put a kernel symbol (calls must be symmetric) */ void *__symbol_get(const char *symbol); -void *__symbol_get_gpl(const char *symbol); +#define __symbol_get_gpl(x) (__symbol_get(x)) #define symbol_get(x) ((typeof(&x))(__symbol_get(__stringify(x)))) /* modules using other modules: kdb wants to see this. */