[MSAN] extend ioctl interceptor to support BLKSSZGET

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D120693
This commit is contained in:
Kevin Athey 2022-03-04 14:08:36 -08:00
parent 9c9a431735
commit 7fbc1f7ebe
3 changed files with 25 additions and 1 deletions

View File

@ -115,11 +115,19 @@ static void ioctl_table_fill() {
// _(SOUND_MIXER_WRITE_MUTE, WRITE, sizeof(int)); // same as ...WRITE_ENHANCE // _(SOUND_MIXER_WRITE_MUTE, WRITE, sizeof(int)); // same as ...WRITE_ENHANCE
_(BLKFLSBUF, NONE, 0); _(BLKFLSBUF, NONE, 0);
_(BLKGETSIZE, WRITE, sizeof(uptr)); _(BLKGETSIZE, WRITE, sizeof(uptr));
_(BLKRAGET, WRITE, sizeof(int)); _(BLKRAGET, WRITE, sizeof(uptr));
_(BLKRASET, NONE, 0); _(BLKRASET, NONE, 0);
_(BLKROGET, WRITE, sizeof(int)); _(BLKROGET, WRITE, sizeof(int));
_(BLKROSET, READ, sizeof(int)); _(BLKROSET, READ, sizeof(int));
_(BLKRRPART, NONE, 0); _(BLKRRPART, NONE, 0);
_(BLKFRASET, NONE, 0);
_(BLKFRAGET, WRITE, sizeof(uptr));
_(BLKSECTSET, READ, sizeof(short));
_(BLKSECTGET, WRITE, sizeof(short));
_(BLKSSZGET, WRITE, sizeof(int));
_(BLKBSZGET, WRITE, sizeof(int));
_(BLKBSZSET, READ, sizeof(uptr));
_(BLKGETSIZE64, WRITE, sizeof(u64));
_(CDROMEJECT, NONE, 0); _(CDROMEJECT, NONE, 0);
_(CDROMEJECT_SW, NONE, 0); _(CDROMEJECT_SW, NONE, 0);
_(CDROMMULTISESSION, WRITE, struct_cdrom_multisession_sz); _(CDROMMULTISESSION, WRITE, struct_cdrom_multisession_sz);

View File

@ -590,6 +590,14 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned IOCTL_BLKROGET = BLKROGET; unsigned IOCTL_BLKROGET = BLKROGET;
unsigned IOCTL_BLKROSET = BLKROSET; unsigned IOCTL_BLKROSET = BLKROSET;
unsigned IOCTL_BLKRRPART = BLKRRPART; unsigned IOCTL_BLKRRPART = BLKRRPART;
unsigned IOCTL_BLKFRASET = BLKFRASET;
unsigned IOCTL_BLKFRAGET = BLKFRAGET;
unsigned IOCTL_BLKSECTSET = BLKSECTSET;
unsigned IOCTL_BLKSECTGET = BLKSECTGET;
unsigned IOCTL_BLKSSZGET = BLKSSZGET;
unsigned IOCTL_BLKBSZGET = BLKBSZGET;
unsigned IOCTL_BLKBSZSET = BLKBSZSET;
unsigned IOCTL_BLKGETSIZE64 = BLKGETSIZE64;
unsigned IOCTL_CDROMAUDIOBUFSIZ = CDROMAUDIOBUFSIZ; unsigned IOCTL_CDROMAUDIOBUFSIZ = CDROMAUDIOBUFSIZ;
unsigned IOCTL_CDROMEJECT = CDROMEJECT; unsigned IOCTL_CDROMEJECT = CDROMEJECT;
unsigned IOCTL_CDROMEJECT_SW = CDROMEJECT_SW; unsigned IOCTL_CDROMEJECT_SW = CDROMEJECT_SW;

View File

@ -1108,6 +1108,14 @@ extern unsigned IOCTL_BLKRASET;
extern unsigned IOCTL_BLKROGET; extern unsigned IOCTL_BLKROGET;
extern unsigned IOCTL_BLKROSET; extern unsigned IOCTL_BLKROSET;
extern unsigned IOCTL_BLKRRPART; extern unsigned IOCTL_BLKRRPART;
extern unsigned IOCTL_BLKFRASET;
extern unsigned IOCTL_BLKFRAGET;
extern unsigned IOCTL_BLKSECTSET;
extern unsigned IOCTL_BLKSECTGET;
extern unsigned IOCTL_BLKSSZGET;
extern unsigned IOCTL_BLKBSZGET;
extern unsigned IOCTL_BLKBSZSET;
extern unsigned IOCTL_BLKGETSIZE64;
extern unsigned IOCTL_CDROMAUDIOBUFSIZ; extern unsigned IOCTL_CDROMAUDIOBUFSIZ;
extern unsigned IOCTL_CDROMEJECT; extern unsigned IOCTL_CDROMEJECT;
extern unsigned IOCTL_CDROMEJECT_SW; extern unsigned IOCTL_CDROMEJECT_SW;