linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Tj <linux@iam.tj>
Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org,
	Borislav Petkov <bp@suse.de>
Subject: Re: Regression: x86/mm: Add Secure Memory Encryption (SME) support
Date: Mon, 2 Oct 2017 11:30:57 -0500	[thread overview]
Message-ID: <c0528ed8-2d00-dedf-4f90-8aa7eead4b5a@amd.com> (raw)
In-Reply-To: <d5c60048-dbb3-0440-d139-ea325621e654@iam.tj>

On 9/30/2017 5:36 PM, Tj wrote:
> With 4.14.0rc2 on an Intel CPU with an Nvidia GPU the proprietary nvidia
> driver (v340.102) fails to modpost due to:
> 
> FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol
> 'sme_me_mask'
> 
> I think this is due to:
> 
> config ARCH_HAS_MEM_ENCRYPT
>         def_bool y
> 

I think this is more likely because of CONFIG_AMD_MEM_ENCRYPT=y. If
CONFIG_AMD_MEM_ENCRYPT=n then sme_me_mask becomes a #define. I'm
assuming that changing the sme_me_mask in arch/x86/mm/mem_encrypt.c
from EXPORT_SYMBOL_GPL to EXPORT_SYMBOL fixes the issue?

Boris, is it a big deal to make this change if that's the issue?

Thanks,
Tom

> 
> I noticed that a grep of the built kernel for "sme_me_mask" shows the
> symbol imported into more than 300 modules on an Ubuntu mainline build
> of 4.14.0-041400rc2-lowlatency.
> 
> Should the new symbol be referenced so widely and how can it be
> prevented from being included in proprietary modules on systems that
> don't have SME even if the kernel is built with it enabled? >

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-10-02 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 22:36 Tj
2017-10-02 16:30 ` Tom Lendacky [this message]
2017-10-19 19:36   ` Thomas Gleixner

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=c0528ed8-2d00-dedf-4f90-8aa7eead4b5a@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bp@suse.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@iam.tj \
    /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