nuttx/drivers/misc
dongjiuzhu1 e2f1ccdefc drivers/misc/rwbuffer: fix rwbuffer overflow issue
issue:
in rwb_wrflush():
memmove(rwb->wrbuffer + padblocks * rwb->blocksize,
rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize);

when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater
than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.

fix:
Let us ensure that the wrblockstart in rwbuffer must be aligned according to
wralignblocks after writing, so there is no need to perform memmove when flushing

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 10:28:52 +08:00
..
addrenv.c
CMakeLists.txt cmake: add include path for special source 2023-11-07 17:39:03 +01:00
dev_ascii.c
dev_null.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
dev_zero.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
Kconfig rpmsg: make all the rpmsg services deponds on RPMSG 2024-02-18 04:09:34 -08:00
lwl_console.c
Make.defs driver/tee: add optee client driver module 2023-11-23 06:25:48 -08:00
mkrd.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
optee_msg.h Remove @ and % tag from all comments 2023-12-11 17:00:10 -03:00
optee.c driver/tee: add some comments and document files in LICENSE 2023-11-23 06:25:48 -08:00
ramdisk.c drivers/ramdisk: add missing 'FAR' 2023-09-16 14:17:47 +08:00
rpmsgblk_server.c rpmsgblk: split mmc_ioc_multi_cmd to mmc_ioc_cmd for less share memory allocation 2023-11-22 08:08:12 -08:00
rpmsgblk.c rpmsgblk: split mmc_ioc_multi_cmd to mmc_ioc_cmd for less share memory allocation 2023-11-22 08:08:12 -08:00
rpmsgblk.h rpmsgblk: use a fixed length struct to transfer between two cpus 2023-11-22 08:08:12 -08:00
rpmsgdev_server.c nuttx/list: rename container_of to list_container_of from public header 2024-02-29 19:44:54 +08:00
rpmsgdev.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
rpmsgdev.h rpmsgdev: support single read/write mode device 2023-08-11 15:29:32 +08:00
rwbuffer.c drivers/misc/rwbuffer: fix rwbuffer overflow issue 2024-04-23 10:28:52 +08:00