]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic
authorJunrui Luo <moonafterrain@outlook.com>
Fri, 19 Dec 2025 08:30:29 +0000 (16:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:33 +0000 (10:14 +0100)
commitd95544ee2bd6641c5bc2afbca24cc7a6aed1d02d
treef7e4569e1c4847b3d9a14d7b50558849ba443e3f
parentb1718c819ffa0cfa4027ac30ee7e04a996a8be26
platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic

[ Upstream commit 15dd100349b8526cbdf2de0ce3e72e700eb6c208 ]

The ibm_rtl_init() function searches for the signature but has a pointer
arithmetic error. The loop counter suggests searching at 4-byte intervals
but the implementation only advances by 1 byte per iteration.

Fix by properly advancing the pointer by sizeof(unsigned int) bytes
each iteration.

Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Reported-by: Junrui Luo <moonafterrain@outlook.com>
Fixes: 35f0ce032b0f ("IBM Real-Time "SMI Free" mode driver -v7")
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB78812D887A92DE3802D0D06EAFA9A@SYBPR01MB7881.ausprd01.prod.outlook.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/ibm_rtl.c