[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG48ez2PVMs-CeLoZtvPq2EeQqOg05mm3AuvEE_pr9Sog0O5og@mail.gmail.com>
Date: Tue, 14 Jun 2022 22:28:36 +0200
From: Jann Horn <jannh@...gle.com>
To: Federico Di Pierro <nierro92@...il.com>
Cc: linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
Tom Lendacky <thomas.lendacky@....com>, x86@...nel.org
Subject: Re: pgprot_encrypted macro is broken
On Tue, Jun 14, 2022 at 3:15 PM Federico Di Pierro <nierro92@...il.com> wrote:
> In our kmod we use the `pgprot_encrypted` macro.
> It seems like the macro cannot be used on 5.18+ kernels because commit
> b577f542f93cbba57f8d6185ef1fb13a41ddf162 broke it.
>
> Basically, the macro definition was:
> `__pgprot(__sme_set(pgprot_val(prot)))`
>
> but after the commit, it was changed to:
> `__pgprot(cc_mkenc(pgprot_val(prot)))`.
>
> But `cc_mkenc` symbol is not exported!
>
> This leads to build issues:
> > ERROR: modpost: "cc_mkenc" undefined!
>
> Is this a bug?
> Is there any workaround?
Why does your driver need to use that macro? pgprot_encrypted() is
mostly only directly used by core kernel code, not by drivers... and
if memory encryption is enabled, almost all memory mappings created by
the kernel should be marked as encrypted automatically.
Powered by blists - more mailing lists