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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cca9cab0-09a4-bc2f-9322-54b523d04bcf@infradead.org>
Date:   Mon, 30 Mar 2020 19:10:03 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        richard -rw- weinberger <richard.weinberger@...il.com>,
        Al Viro <viro@...IV.linux.org.uk>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: Re: linux-next: Tree for Mar 27 (kbuild)

On 3/27/20 8:52 AM, Randy Dunlap wrote:
> On 3/27/20 1:07 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Changes since 20200326:
>>
> 
> on i386, UML defconfig build fails with: (mostly get_user() variants)
> 

Hi Yamada-san,

Al Viro identified these build errors as due to:

Buggered-by: 1a908babcb144 (x86: replace arch macros from compiler with CONFIG_X86_{32,64})

    If the intention is to check i386/x86_64 excluding UML, testing
    CONFIG_X86_{32,64} is simpler.

Which is not true, since uml/x86 configs bloody well *do* have CONFIG_X86_{32,64}
defined.  See arch/x86/um/Kconfig; and yes, it does need those, as well as
arch/x86/Kconfig.cpu.


and they are still happening (on UML on i386 defconfig).


> 
>   CC      kernel/signal.o
> In file included from ../include/linux/kernel.h:15:0,
>                  from ../include/asm-generic/bug.h:19,
>                  from ./arch/um/include/generated/asm/bug.h:1,
>                  from ../include/linux/bug.h:5,
>                  from ../include/linux/mmdebug.h:5,
>                  from ../include/linux/gfp.h:5,
>                  from ../include/linux/slab.h:15,
>                  from ../kernel/signal.c:14:
> ../kernel/signal.c: In function 'print_fatal_signal':
> ../kernel/signal.c:1250:33: error: 'struct pt_regs' has no member named 'ip'
>   pr_info("code at %08lx: ", regs->ip);
>                                  ^
> ../include/linux/printk.h:310:34: note: in definition of macro 'pr_info'
>   printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>                                   ^~~~~~~~~~~
> In file included from ../arch/um/include/asm/uaccess.h:39:0,
>                  from ../include/linux/uaccess.h:11,
>                  from ../include/linux/sched/task.h:11,
>                  from ../kernel/signal.c:20:
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:196:28: note: in definition of macro 'get_user'
>   const void __user *__p = (ptr);    \
>                             ^~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:93:66: note: in definition of macro 'access_ok'
>  #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
>                                                                   ^~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:158:19: note: in definition of macro '__get_user'
>   switch (sizeof(*(ptr))) {    \
>                    ^~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:47: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                ^~
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:51: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                    ^
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:163:32: note: in definition of macro '__get_user'
>    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
>                                 ^~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:47: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                ^~
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:51: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                    ^
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:170:32: note: in definition of macro '__get_user'
>    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
>                                 ^~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:47: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                ^~
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:51: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                    ^
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:177:32: note: in definition of macro '__get_user'
>    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
>                                 ^~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:47: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                ^~
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:209:51: note: in definition of macro '__get_user_fn'
>  #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
>                                                    ^
> ../include/asm-generic/uaccess.h:199:3: note: in expansion of macro '__get_user'
>    __get_user((x), (__typeof__(*(ptr)) __user *)__p) :\
>    ^~~~~~~~~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:184:32: note: in definition of macro '__get_user'
>    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
>                                 ^~~
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> ../kernel/signal.c:1256:45: error: 'struct pt_regs' has no member named 'ip'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>                                              ^
> ../include/asm-generic/uaccess.h:200:24: note: in definition of macro 'get_user'
>    ((x) = (__typeof__(*(ptr)))0,-EFAULT);  \
>                         ^~~
> ../include/asm-generic/uaccess.h:200:31: warning: left-hand operand of comma expression has no effect [-Wunused-value]
>    ((x) = (__typeof__(*(ptr)))0,-EFAULT);  \
>                                ^
> ../kernel/signal.c:1256:8: note: in expansion of macro 'get_user'
>     if (get_user(insn, (unsigned char *)(regs->ip + i)))
>         ^~~~~~~~
> 
> 


-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ