[PATCH] [sanitizer] Implement ioctl decoding.

Evgeniy Stepanov eugenis at google.com
Tue Feb 4 08:56:39 PST 2014


On Tue, Feb 4, 2014 at 7:53 PM, Sergey Matveev <earthdok at google.com> wrote:
>
>
> ================
> Comment at: lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc:496
> @@ -495,3 +495,3 @@
>  #if SANITIZER_LINUX
>    if ((req & ~0x3fff001fU) == IOCTL_EVIOCGBIT)
>      return IOCTL_EVIOCGBIT;
> ----------------
> Evgeniy Stepanov wrote:
>> Please rewrite this using new macros.
> I would if I understood those masks. What do they represent?
>
> ================
> Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:522
> @@ +521,3 @@
> +#define IOC_TYPEBITS 8
> +#define IOC_SIZEBITS 14
> +#define IOC_DIRBITS 2
> ----------------
> Evgeniy Stepanov wrote:
>> What about powerpc?
> Do we build any of this on PPC right now? If not, I'd prefer to deal with this when we do. After all I only have second-hand knowledge that it's different on PPC.
>
> We have compiler checks so there won't be any silent breakage.

You've seen the headers. I'm pretty sure it will break, so why not
make it right from the start. And if we are wrong, there are compiler
checks.

>
>
> http://llvm-reviews.chandlerc.com/D2689



More information about the llvm-commits mailing list