Re: [PATCH] x86: entry: flush the cache if syscall error

From: Thomas Gleixner
Date: Thu Oct 11 2018 - 19:21:31 EST


On Thu, 11 Oct 2018, Jann Horn wrote:
> On Thu, Oct 11, 2018 at 10:56 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > Seems like just changing this with "ax == 0" into "ax >= 0" would solve that?
>
> As spender points out on twitter
> (https://twitter.com/grsecurity/status/1050497259937370118 - thanks,
> spender!), struct pt_regs stores register values as "unsigned long",
> and so you'll need to use something like IS_ERR_VALUE().

Ha, so it's not only me who noticed, but then I'm not reading twitter...

Thanks,

tglx