linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Christoph Hellwig <hch@lst.de>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Manuel Lauss <manuel.lauss@gmail.com>,
	Yangbo Lu <yangbo.lu@nxp.com>, Joshua Kinard <kumba@gentoo.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	open list <linux-kernel@vger.kernel.org>,
	linux-mmc@vger.kernel.org, netdev@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-modules@vger.kernel.org
Subject: Re: [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
Date: Wed, 18 Oct 2023 01:30:18 +0100	[thread overview]
Message-ID: <bf555c2a4df5196533b6e614cc57638004dfb426.camel@infradead.org> (raw)
In-Reply-To: <20230801173544.1929519-6-hch@lst.de>

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

On Tue, 2023-08-01 at 19:35 +0200, Christoph Hellwig wrote:
> It has recently come to my attention that nvidia is circumventing the
> protection added in 262e6ae7081d ("modules: inherit
> TAINT_PROPRIETARY_MODULE") by importing exports from their proprietary
> modules into an allegedly GPL licensed module and then rexporting them.
> 
> Given that symbol_get was only ever intended for tightly cooperating
> modules using very internal symbols it is logical to restrict it to
> being used on EXPORT_SYMBOL_GPL and prevent nvidia from costly DMCA
> Circumvention of Access Controls law suites.

I'm all for insisting that everything be exported with
EXPORT_SYMBOL_GPL and nothing at all ever be exported with just
EXPORT_SYMBOL.

But if we're going to tolerate the core kernel still exporting some
stuff with EXPORT_SYMBOL, why isn't OK for a GPL-licensed module do to
the same? Even an *in-tree* GPL-licensed module now can't export
functionality with EXPORT_SYMBOL and have it used with symbol_get().

We're forced to *either* allow direct linking by non-GPL modules, or
allow symbol_get(), but not both?

> Fixes: 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")

Hm, the condition we really need to fix *that* is "symbol_get() will
only import symbols from GPL-licensed modules", isn't it?

As long as that property is correctly transitive, why does the symbol
itself have to be EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL? Am I
missing another potential loophole?

I suppose there's now scope for a different type of shim which
*directly* imports an EXPORT_SYMBOL function in order to export it
again as EXPORT_SYMBOL_GPL and thus allow the GPL export to be found
with symbol_get()?

That's the *converse* of the problematic shim that was being used
before, and from a licensing point of view it seems fine... it's just
working around the unintended side-effects of this patch?

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

  reply	other threads:[~2023-10-18  0:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 17:35 require EXPORT_SYMBOL_GPL symbols for symbol_get v2 Christoph Hellwig
2023-08-01 17:35 ` [PATCH 1/5] ARM: pxa: remove use of symbol_get() Christoph Hellwig
2023-08-01 17:35 ` [PATCH 2/5] mmc: au1xmmc: force non-modular build and remove symbol_get usage Christoph Hellwig
2023-08-02  7:12   ` Manuel Lauss
2023-08-02  8:31   ` Arnd Bergmann
2023-08-08  9:15   ` Ulf Hansson
2023-08-01 17:35 ` [PATCH 3/5] net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index Christoph Hellwig
2023-08-01 17:35 ` [PATCH 4/5] rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff Christoph Hellwig
2023-08-01 17:35 ` [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules Christoph Hellwig
2023-10-18  0:30   ` David Woodhouse [this message]
2023-10-18  5:31     ` Christoph Hellwig
2023-10-18 18:25       ` Luis Chamberlain
2023-08-01 17:45 ` require EXPORT_SYMBOL_GPL symbols for symbol_get v2 Luis Chamberlain
2023-08-02 11:56   ` Christoph Hellwig
2023-08-02 18:19     ` Luis Chamberlain
  -- strict thread matches above, loose matches on Subject: below --
2023-07-31  8:38 require EXPORT_SYMBOL_GPL symbols for symbol_get Christoph Hellwig
2023-07-31  8:38 ` [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules Christoph Hellwig
2023-07-31 11:05   ` Greg Kroah-Hartman
2023-07-31 18:11   ` Simon Horman
2023-07-31 20:38   ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf555c2a4df5196533b6e614cc57638004dfb426.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=arnd@arndb.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@zonque.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=hch@lst.de \
    --cc=kumba@gentoo.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=mcgrof@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=ulf.hansson@linaro.org \
    --cc=yangbo.lu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).