lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110120517.KnczQXSR-lkp@intel.com>
Date:   Tue, 12 Oct 2021 05:07:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mark:arm64/uaccess/rework 11/19] arch/arm64/kernel/traps.c:413:7:
 warning: value size does not match register size specified by the constraint
 and modifier

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/uaccess/rework
head:   692de878f919de31942d0d28571b5e6f32c7135e
commit: c3579cc9e5be2d67027753c6bc44a28168f6377c [11/19] arm64: add fixup handler for uaccess primitives
config: arm64-randconfig-r033-20211011 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f95d9c95bbf4cf662b9a181245fc6dcede39f590)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=c3579cc9e5be2d67027753c6bc44a28168f6377c
        git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
        git fetch --no-tags mark arm64/uaccess/rework
        git checkout c3579cc9e5be2d67027753c6bc44a28168f6377c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:267:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "b", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:10:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:270:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "h", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:20:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:273:45: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%w", __gu_val, (ptr), (err));       \
                                                             ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:30:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:276:46: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%x",  __gu_val, (ptr), (err));      \
                                                              ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:40:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:267:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "b", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:10:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:270:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "h", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:20:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:273:45: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%w", __gu_val, (ptr), (err));       \
                                                             ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:30:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:276:46: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%x",  __gu_val, (ptr), (err));      \
                                                              ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:40:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:267:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "b", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:10:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:270:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "h", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:20:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:273:45: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%w", __gu_val, (ptr), (err));       \
                                                             ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:30:2: note: expanded from here
   "%0"
    ^
>> arch/arm64/kernel/traps.c:413:7: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   if (get_user(instr_le, (__le16 __user *)pc))
                       ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:276:46: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr, "%x",  __gu_val, (ptr), (err));      \
                                                              ^
   arch/arm64/kernel/traps.c:413:7: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:40:2: note: expanded from here
   "%0"
    ^
   arch/arm64/kernel/traps.c:419:8: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                           if (get_user(instr_le, (__le16 __user *)(pc + 2)))
                               ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:267:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "b", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:419:8: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
                             "(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
                                 ^
   arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
           "((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
                            ^
   <scratch space>:63:2: note: expanded from here
   "%0"
    ^
   arch/arm64/kernel/traps.c:419:8: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                           if (get_user(instr_le, (__le16 __user *)(pc + 2)))
                               ^
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
   arch/arm64/include/asm/uaccess.h:298:3: note: expanded from macro '__get_user_error'
                   __raw_get_user((x), __p, (err));                        \
                   ^
   arch/arm64/include/asm/uaccess.h:288:2: note: expanded from macro '__raw_get_user'
           __raw_get_mem("ldtr", x, ptr, err);                             \
           ^
   arch/arm64/include/asm/uaccess.h:270:49: note: expanded from macro '__raw_get_mem'
                   __get_mem_asm(ldr "h", "%w", __gu_val, (ptr), (err));   \
                                                                 ^
   arch/arm64/kernel/traps.c:419:8: note: use constraint modifier "w"
   arch/arm64/include/asm/uaccess.h:311:18: note: expanded from macro 'get_user'
   #define get_user        __get_user
                           ^
   arch/arm64/include/asm/uaccess.h:307:2: note: expanded from macro '__get_user'
           __get_user_error((x), (ptr), __gu_err);                         \
           ^
..


vim +413 arch/arm64/kernel/traps.c

9b79f52d1a702d Punit Agrawal      2014-11-18  396  
9b79f52d1a702d Punit Agrawal      2014-11-18  397  static int call_undef_hook(struct pt_regs *regs)
9b79f52d1a702d Punit Agrawal      2014-11-18  398  {
9b79f52d1a702d Punit Agrawal      2014-11-18  399  	struct undef_hook *hook;
9b79f52d1a702d Punit Agrawal      2014-11-18  400  	unsigned long flags;
9b79f52d1a702d Punit Agrawal      2014-11-18  401  	u32 instr;
9b79f52d1a702d Punit Agrawal      2014-11-18  402  	int (*fn)(struct pt_regs *regs, u32 instr) = NULL;
9b79f52d1a702d Punit Agrawal      2014-11-18  403  	void __user *pc = (void __user *)instruction_pointer(regs);
9b79f52d1a702d Punit Agrawal      2014-11-18  404  
0bf0f444b2c492 Will Deacon        2018-08-07  405  	if (!user_mode(regs)) {
0bf0f444b2c492 Will Deacon        2018-08-07  406  		__le32 instr_le;
25f12ae45fc193 Christoph Hellwig  2020-06-17  407  		if (get_kernel_nofault(instr_le, (__force __le32 *)pc))
0bf0f444b2c492 Will Deacon        2018-08-07  408  			goto exit;
0bf0f444b2c492 Will Deacon        2018-08-07  409  		instr = le32_to_cpu(instr_le);
0bf0f444b2c492 Will Deacon        2018-08-07  410  	} else if (compat_thumb_mode(regs)) {
9b79f52d1a702d Punit Agrawal      2014-11-18  411  		/* 16-bit Thumb instruction */
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  412  		__le16 instr_le;
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28 @413  		if (get_user(instr_le, (__le16 __user *)pc))
9b79f52d1a702d Punit Agrawal      2014-11-18  414  			goto exit;
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  415  		instr = le16_to_cpu(instr_le);
9b79f52d1a702d Punit Agrawal      2014-11-18  416  		if (aarch32_insn_is_wide(instr)) {
9b79f52d1a702d Punit Agrawal      2014-11-18  417  			u32 instr2;
9b79f52d1a702d Punit Agrawal      2014-11-18  418  
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  419  			if (get_user(instr_le, (__le16 __user *)(pc + 2)))
9b79f52d1a702d Punit Agrawal      2014-11-18  420  				goto exit;
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  421  			instr2 = le16_to_cpu(instr_le);
9b79f52d1a702d Punit Agrawal      2014-11-18  422  			instr = (instr << 16) | instr2;
9b79f52d1a702d Punit Agrawal      2014-11-18  423  		}
9b79f52d1a702d Punit Agrawal      2014-11-18  424  	} else {
9b79f52d1a702d Punit Agrawal      2014-11-18  425  		/* 32-bit ARM instruction */
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  426  		__le32 instr_le;
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  427  		if (get_user(instr_le, (__le32 __user *)pc))
9b79f52d1a702d Punit Agrawal      2014-11-18  428  			goto exit;
6cf5d4af83e04f Luc Van Oostenryck 2017-06-28  429  		instr = le32_to_cpu(instr_le);
9b79f52d1a702d Punit Agrawal      2014-11-18  430  	}
9b79f52d1a702d Punit Agrawal      2014-11-18  431  
9b79f52d1a702d Punit Agrawal      2014-11-18  432  	raw_spin_lock_irqsave(&undef_lock, flags);
9b79f52d1a702d Punit Agrawal      2014-11-18  433  	list_for_each_entry(hook, &undef_hook, node)
9b79f52d1a702d Punit Agrawal      2014-11-18  434  		if ((instr & hook->instr_mask) == hook->instr_val &&
9b79f52d1a702d Punit Agrawal      2014-11-18  435  			(regs->pstate & hook->pstate_mask) == hook->pstate_val)
9b79f52d1a702d Punit Agrawal      2014-11-18  436  			fn = hook->fn;
9b79f52d1a702d Punit Agrawal      2014-11-18  437  
9b79f52d1a702d Punit Agrawal      2014-11-18  438  	raw_spin_unlock_irqrestore(&undef_lock, flags);
9b79f52d1a702d Punit Agrawal      2014-11-18  439  exit:
9b79f52d1a702d Punit Agrawal      2014-11-18  440  	return fn ? fn(regs, instr) : 1;
9b79f52d1a702d Punit Agrawal      2014-11-18  441  }
9b79f52d1a702d Punit Agrawal      2014-11-18  442  

:::::: The code at line 413 was first introduced by commit
:::::: 6cf5d4af83e04f4cfae91bfdefd9d4d6949c09b2 arm64: fix endianness annotation in call_undef_hook()

:::::: TO: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
:::::: CC: Will Deacon <will.deacon@....com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (39215 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ