This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8d8ab1bbf5572c66a2bb52bff2ea56305c3aee4d Author: anpeiyun <[email protected]> AuthorDate: Tue Aug 25 10:58:43 2026 +0800 drivers/rptun/rptun_ivshmem: fix the rpmb carveout length after alignment The rpmb carveout address is aligned up to 8 bytes, but its length was still the full rpmb_shm size, so the carveout ran past rpmb_shm by the alignment padding. Subtract the padding from the length. Signed-off-by: anpeiyun <[email protected]> --- drivers/rptun/rptun_ivshmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rptun/rptun_ivshmem.c b/drivers/rptun/rptun_ivshmem.c index 271434913a2..fb444e66cc3 100644 --- a/drivers/rptun/rptun_ivshmem.c +++ b/drivers/rptun/rptun_ivshmem.c @@ -530,7 +530,9 @@ static const struct rptun_ivshmem_rsc_s g_rsc_table = .da = ALIGN_UP(offsetof(struct rptun_ivshmem_rsc_s, rpmb_shm) + offsetof(struct rptun_ivshmem_mem_s, rsc_table), 8), .pa = (uint32_t)METAL_BAD_PHYS, - .len = sizeof(g_rsc_table.rpmb_shm), + .len = sizeof(g_rsc_table.rpmb_shm) - + (ALIGN_UP(offsetof(struct rptun_ivshmem_rsc_s, rpmb_shm), 8) - + offsetof(struct rptun_ivshmem_rsc_s, rpmb_shm)), }, #endif };
