Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH] s390/cmf: Fix virtual vs physical address confusion
@ 2026-09-18 16:12 Peter Oberparleiter
  2026-09-18 16:20 ` sashiko-bot
  2026-09-20 16:15 ` Heiko Carstens
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Oberparleiter @ 2026-09-18 16:12 UTC (permalink / raw)
  To: Vineeth Vijayan
  Cc: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, linux-s390,
	Peter Oberparleiter

The measurement block address is an absolute address; therefore add a
missing virt_to_phys() translation.

Without this fix, a wrong address will be used by firmware when storing
extended format channel measurement data on kernels built with
CONFIG_RANDOMIZE_IDENTITY_BASE=y.

Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
---
 drivers/s390/cio/cmf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c
index 92ab3d546fe4..5f57a12762d2 100644
--- a/drivers/s390/cio/cmf.c
+++ b/drivers/s390/cio/cmf.c
@@ -183,7 +183,7 @@ static int set_schib(struct ccw_device *cdev, u32 mme, int mbfc,
 	sch->config.mbfc = mbfc;
 	/* address can be either a block address or a block index */
 	if (mbfc)
-		sch->config.mba = address;
+		sch->config.mba = address ? virt_to_phys((void *)address) : 0;
 	else
 		sch->config.mbi = address;
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-21 10:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 16:12 [PATCH] s390/cmf: Fix virtual vs physical address confusion Peter Oberparleiter
2026-09-18 16:20 ` sashiko-bot
2026-09-20 16:15 ` Heiko Carstens
2026-09-21 10:58   ` Peter Oberparleiter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox