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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 22 Nov 2017 23:32:52 -0800
From:   Nick Desaulniers <nick.desaulniers@...il.com>
To:     ricardo.neri-calderon@...ux.intel.com
Cc:     bp@...e.de, Thomas Gleixner <tglx@...utronix.de>, mst@...hat.com,
        dave.hansen@...ux.intel.com, ricardo.neri@...el.com,
        adrian.hunter@...el.com, paul.gortmaker@...driver.com,
        ray.huang@....com, qiaowei.ren@...el.com, shuah@...nel.org,
        Kees Cook <keescook@...omium.org>, corbet@....net,
        jslaby@...e.cz, dvyukov@...gle.com, ravi.v.shankar@...el.com,
        cmetcalf@...lanox.com, brgerst@...il.com, acme@...hat.com,
        luto@...nel.org, colin.king@...onical.com, slaoub@...il.com,
        adam.buchbinder@...il.com, vbabka@...e.cz,
        Lorenzo Stoakes <lstoakes@...il.com>, mhiramat@...nel.org,
        Paolo Bonzini <pbonzini@...hat.com>, akpm@...ux-foundation.org,
        thgarnie@...gle.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: constant conversion warning in umip

Pulling down ToT, I'm seeing the following warning when building with clang:

  CC      arch/x86/lib/insn.o
arch/x86/lib/insn-eval.c:780:10: error: implicit conversion from 'int'
to 'char' changes value from 132 to -124
[-Werror,-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))
                                                ~~~~~~~~^~~~~~~~~~~~~~~~

seems to be coming from commit 4efea85fb56fa "x86/insn-eval: Add
function to get default params of code segment".  Should this be an
unsigned char (as well as seg_defs in arch/x86/kernel/umip.c?  That
might be an issue for returning -EINVAL, maybe an in/out parameter
would be better?

Powered by blists - more mailing lists