Skip to content
Snippets Groups Projects
Select Git revision
  • e2a5dca753d1cdc3212519023ed8a13e13f5495b
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

arch

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Borislav Petkov authored and Thomas Gleixner committed
    In order to save on redundant structs definitions
    insn_get_code_seg_params() was made to return two 4-bit values in a char
    but clang complains:
    
      arch/x86/lib/insn-eval.c:780:10: warning: implicit conversion from 'int' to 'char'
    	  changes value from 132 to -124 [-Wconstant-conversion]
                      return INSN_CODE_SEG_PARAMS(4, 8);
                      ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./arch/x86/include/asm/insn-eval.h:16:57: note: expanded from macro 'INSN_CODE_SEG_PARAMS'
      #define INSN_CODE_SEG_PARAMS(oper_sz, addr_sz) (oper_sz | (addr_sz << 4))
    
    Those two values do get picked apart afterwards the opposite way of how
    they were ORed so wrt to the LSByte, the return value is the same.
    
    But this function returns -EINVAL in the error case, which is an int. So
    make it return an int which is the native word size anyway and thus fix
    the clang warning.
    
    Reported-by: default avatarKees Cook <keescook@google.com>
    Reported-by: default avatarNick Desaulniers <nick.desaulniers@gmail.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: ricardo.neri-calderon@linux.intel.com
    Link: https://lkml.kernel.org/r/20171123091951.1462-1-bp@alien8.de
    e2a5dca7
    History
    Name Last commit Last update
    ..