* [PATCH 1/2] s390: export memory encryption helper functions
@ 2026-05-26 10:20 Arnd Bergmann
2026-05-26 10:20 ` [PATCH 2/2] powerpc: " Arnd Bergmann
2026-05-26 10:59 ` [PATCH 1/2] s390: " Claudio Imbrenda
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-05-26 10:20 UTC (permalink / raw)
To: Alexander Gordeev, Gerald Schaefer, Heiko Carstens, Vasily Gorbik,
T.J. Mercier, Sumit Semwal, Maxime Ripard, Andrew Davis
Cc: Arnd Bergmann, Christian Borntraeger, Sven Schnelle,
Andrew Morton, Mike Rapoport (Microsoft), David Hildenbrand (Arm),
Liam R. Howlett, Claudio Imbrenda, linux-s390, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The set_memory_encrypted/set_memory_decrypted functions are exported
on x86 and arm64 but not on s390, which leads to a new build failure
because they are now used in a loadable module:
ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
Export these the same way we do on the other architectures.
Fixes: fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/s390/mm/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index f07168a0d3dd..d589c5e4d388 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -124,6 +124,7 @@ int set_memory_encrypted(unsigned long vaddr, int numpages)
}
return 0;
}
+EXPORT_SYMBOL_GPL(set_memory_encrypted);
int set_memory_decrypted(unsigned long vaddr, int numpages)
{
@@ -135,6 +136,7 @@ int set_memory_decrypted(unsigned long vaddr, int numpages)
}
return 0;
}
+EXPORT_SYMBOL_GPL(set_memory_decrypted);
/* are we a protected virtualization guest? */
bool force_dma_unencrypted(struct device *dev)
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] powerpc: export memory encryption helper functions
2026-05-26 10:20 [PATCH 1/2] s390: export memory encryption helper functions Arnd Bergmann
@ 2026-05-26 10:20 ` Arnd Bergmann
2026-05-26 11:53 ` Christophe Leroy (CS GROUP)
2026-05-26 10:59 ` [PATCH 1/2] s390: " Claudio Imbrenda
1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2026-05-26 10:20 UTC (permalink / raw)
To: Madhavan Srinivasan, Michael Ellerman, T.J. Mercier,
Maxime Ripard, Sumit Semwal, Andrew Davis
Cc: Arnd Bergmann, Nicholas Piggin, Christophe Leroy (CS GROUP),
linuxppc-dev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The set_memory_encrypted/set_memory_decrypted functions are exported
on x86 and arm64 but not on powerpc, which leads to a new build failure
because they are now used in a loadable module:
ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
Export these the same way we do on the other architectures.
Fixes: fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/powerpc/platforms/pseries/svm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/svm.c b/arch/powerpc/platforms/pseries/svm.c
index 384c9dc1899a..ab8f8c722741 100644
--- a/arch/powerpc/platforms/pseries/svm.c
+++ b/arch/powerpc/platforms/pseries/svm.c
@@ -6,6 +6,7 @@
* Author: Anshuman Khandual <khandual@linux.vnet.ibm.com>
*/
+#include <linux/export.h>
#include <linux/mm.h>
#include <linux/memblock.h>
#include <linux/mem_encrypt.h>
@@ -50,6 +51,7 @@ int set_memory_encrypted(unsigned long addr, int numpages)
return 0;
}
+EXPORT_SYMBOL_GPL(set_memory_encrypted);
int set_memory_decrypted(unsigned long addr, int numpages)
{
@@ -63,6 +65,7 @@ int set_memory_decrypted(unsigned long addr, int numpages)
return 0;
}
+EXPORT_SYMBOL_GPL(set_memory_decrypted);
/* There's one dispatch log per CPU. */
#define NR_DTL_PAGE (DISPATCH_LOG_BYTES * CONFIG_NR_CPUS / PAGE_SIZE)
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] s390: export memory encryption helper functions
2026-05-26 10:20 [PATCH 1/2] s390: export memory encryption helper functions Arnd Bergmann
2026-05-26 10:20 ` [PATCH 2/2] powerpc: " Arnd Bergmann
@ 2026-05-26 10:59 ` Claudio Imbrenda
1 sibling, 0 replies; 4+ messages in thread
From: Claudio Imbrenda @ 2026-05-26 10:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexander Gordeev, Gerald Schaefer, Heiko Carstens, Vasily Gorbik,
T.J. Mercier, Sumit Semwal, Maxime Ripard, Andrew Davis,
Arnd Bergmann, Christian Borntraeger, Sven Schnelle,
Andrew Morton, Mike Rapoport (Microsoft), David Hildenbrand (Arm),
Liam R. Howlett, linux-s390, linux-kernel
On Tue, 26 May 2026 12:20:37 +0200
Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The set_memory_encrypted/set_memory_decrypted functions are exported
> on x86 and arm64 but not on s390, which leads to a new build failure
> because they are now used in a loadable module:
>
> ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
> ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
>
> Export these the same way we do on the other architectures.
>
> Fixes: fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> arch/s390/mm/init.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
> index f07168a0d3dd..d589c5e4d388 100644
> --- a/arch/s390/mm/init.c
> +++ b/arch/s390/mm/init.c
> @@ -124,6 +124,7 @@ int set_memory_encrypted(unsigned long vaddr, int numpages)
> }
> return 0;
> }
> +EXPORT_SYMBOL_GPL(set_memory_encrypted);
>
> int set_memory_decrypted(unsigned long vaddr, int numpages)
> {
> @@ -135,6 +136,7 @@ int set_memory_decrypted(unsigned long vaddr, int numpages)
> }
> return 0;
> }
> +EXPORT_SYMBOL_GPL(set_memory_decrypted);
>
> /* are we a protected virtualization guest? */
> bool force_dma_unencrypted(struct device *dev)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] powerpc: export memory encryption helper functions
2026-05-26 10:20 ` [PATCH 2/2] powerpc: " Arnd Bergmann
@ 2026-05-26 11:53 ` Christophe Leroy (CS GROUP)
0 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-05-26 11:53 UTC (permalink / raw)
To: Arnd Bergmann, Madhavan Srinivasan, Michael Ellerman,
T.J. Mercier, Maxime Ripard, Sumit Semwal, Andrew Davis,
Christoph Hellwig
Cc: Arnd Bergmann, Nicholas Piggin, linuxppc-dev, linux-kernel
Hi Arnd,
Le 26/05/2026 à 12:20, Arnd Bergmann a écrit :
> From: Arnd Bergmann <arnd@arndb.de>
>
> The set_memory_encrypted/set_memory_decrypted functions are exported
> on x86 and arm64 but not on powerpc, which leads to a new build failure
> because they are now used in a loadable module:
>
> ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
> ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
>
> Export these the same way we do on the other architectures.
The same fix was rejected already, see
https://lore.kernel.org/all/ahPqbfH54R3JJyaV@infradead.org/
Christophe
>
> Fixes: fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/powerpc/platforms/pseries/svm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/platforms/pseries/svm.c b/arch/powerpc/platforms/pseries/svm.c
> index 384c9dc1899a..ab8f8c722741 100644
> --- a/arch/powerpc/platforms/pseries/svm.c
> +++ b/arch/powerpc/platforms/pseries/svm.c
> @@ -6,6 +6,7 @@
> * Author: Anshuman Khandual <khandual@linux.vnet.ibm.com>
> */
>
> +#include <linux/export.h>
> #include <linux/mm.h>
> #include <linux/memblock.h>
> #include <linux/mem_encrypt.h>
> @@ -50,6 +51,7 @@ int set_memory_encrypted(unsigned long addr, int numpages)
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(set_memory_encrypted);
>
> int set_memory_decrypted(unsigned long addr, int numpages)
> {
> @@ -63,6 +65,7 @@ int set_memory_decrypted(unsigned long addr, int numpages)
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(set_memory_decrypted);
>
> /* There's one dispatch log per CPU. */
> #define NR_DTL_PAGE (DISPATCH_LOG_BYTES * CONFIG_NR_CPUS / PAGE_SIZE)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-26 11:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 10:20 [PATCH 1/2] s390: export memory encryption helper functions Arnd Bergmann
2026-05-26 10:20 ` [PATCH 2/2] powerpc: " Arnd Bergmann
2026-05-26 11:53 ` Christophe Leroy (CS GROUP)
2026-05-26 10:59 ` [PATCH 1/2] s390: " Claudio Imbrenda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.