[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

Kees Cook via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 6 07:43:09 PST 2019


kees added a comment.

I reduced the C code to this:

  volatile int mystery = 0;
  
  static int noinline demo(int klen)
  {
          int err;
          int len;
  
          err = mystery * klen;
          if (err)
                  return err;
          if (len > klen)
                  len = klen;
          if (len < 0)
                  return -EINVAL;
          if (len)
                  return -ENOMEM;
          return __put_user(klen, (int __user *)NULL);
  }

Something in the __put_user() use of asm-goto is broken.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56571/new/

https://reviews.llvm.org/D56571





More information about the cfe-commits mailing list