Summary: | [PATCH] add support for BLKIO{MIN,OPT} and BLKALIGNOFF ioctls | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Nick Black <dankamongmen> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch to bring blk ioctls up to speed with 5.2.5 |
Description
Nick Black
2019-08-04 01:27:12 UTC
From 0fe56735ca5ddad378126bd2954d93f5dcfbc876 Mon Sep 17 00:00:00 2001 From: nick black <dankamongmen@gmail.com> Date: Sat, 3 Aug 2019 20:43:30 -0400 Subject: [PATCH] linux-ioctl: add BLKIO{MIN,OPT} and BLKALIGNOFF Signed-off-by: nick black <dankamongmen@gmail.com> --- coregrind/m_syswrap/syswrap-linux.c | 18 ++++++++++++++++++ include/vki/vki-linux.h | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 9d9a1d4ea..a7bc9732b 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -7236,6 +7236,15 @@ PRE(sys_ioctl) case VKI_BLKPBSZGET: PRE_MEM_WRITE( "ioctl(BLKPBSZGET)", ARG3, sizeof(int)); break; + case VKI_BLKIOMIN: + PRE_MEM_WRITE( "ioctl(BLKIOMIN)", ARG3, sizeof(vki_uint)); + break; + case VKI_BLKIOOPT: + PRE_MEM_WRITE( "ioctl(BLKIOOPT)", ARG3, sizeof(vki_uint)); + break; + case VKI_BLKALIGNOFF: + PRE_MEM_WRITE( "ioctl(BLKALIGNOFF)", ARG3, sizeof(int)); + break; case VKI_BLKDISCARDZEROES: PRE_MEM_WRITE( "ioctl(BLKDISCARDZEROES)", ARG3, sizeof(vki_uint)); break; @@ -10072,6 +10081,15 @@ POST(sys_ioctl) case VKI_BLKPBSZGET: POST_MEM_WRITE(ARG3, sizeof(int)); break; + case VKI_BLKIOMIN: + POST_MEM_WRITE(ARG3, sizeof(vki_uint)); + break; + case VKI_BLKIOOPT: + POST_MEM_WRITE(ARG3, sizeof(vki_uint)); + break; + case VKI_BLKALIGNOFF: + POST_MEM_WRITE(ARG3, sizeof(int)); + break; case VKI_BLKDISCARDZEROES: POST_MEM_WRITE(ARG3, sizeof(vki_uint)); break; diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 76bc7837b..a9bfb1ad0 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -1813,7 +1813,7 @@ struct vki_ppdev_frob_struct { #define VKI_PPSETFLAGS _VKI_IOW(VKI_PP_IOCTL, 0x9b, int) //---------------------------------------------------------------------- -// From linux-3.16/include/uapi/linux/fs.h +// From linux-5.2.5/include/uapi/linux/fs.h //---------------------------------------------------------------------- #define VKI_BLKROSET _VKI_IO(0x12,93) /* set device read-only (0 = read-write) */ @@ -1832,6 +1832,9 @@ struct vki_ppdev_frob_struct { #define VKI_BLKBSZSET _VKI_IOW(0x12,113,vki_size_t) #define VKI_BLKGETSIZE64 _VKI_IOR(0x12,114,vki_size_t) /* return device size in bytes (u64 *arg) */ #define VKI_BLKDISCARD _VKI_IO(0x12,119) +#define VKI_BLKIOMIN _VKI_IO(0x12,120) +#define VKI_BLKIOOPT _VKI_IO(0x12,121) +#define VKI_BLKALIGNOFF _VKI_IO(0x12,122) #define VKI_BLKPBSZGET _VKI_IO(0x12,123) #define VKI_BLKDISCARDZEROES _VKI_IO(0x12,124) #define VKI_BLKZEROOUT _VKI_IO(0x12,127) -- 2.23.0.rc1 Hey there! Any chance this can get merged? It seems to work pretty well. Will be merged in the next month or so, providing it doesn't break anything. Committed as 11b7891a8a39b0dae39c97cfcd039a708f83a69a. Thanks for the patch. |