Re: [PATCH 1/2] s390: export memory encryption helper functions

From: Christian Borntraeger

Date: Tue Jun 09 2026 - 08:39:30 EST


Am 26.05.26 um 12:20 schrieb Arnd Bergmann:
From: Arnd Bergmann <arnd@xxxxxxxx>

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")

This commit id was from an next tree? Seems to be no longer valid.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Acked-by: Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>

@Alexander/vasily/Heiko, can you maybe queue that via the s390 fixes tree?> ---
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)