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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJF2gTQ-LcZ_fxTCkHNBYqZn-C-QVeLp12FysaTjPe6PuTQYxg@mail.gmail.com>
Date:   Tue, 30 Jun 2020 08:12:41 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Palmer Dabbelt <palmerdabbelt@...gle.com>
Cc:     Masami Hiramatsu <mhiramat@...nel.org>,
        Greentime Hu <greentime.hu@...ive.com>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Anup Patel <anup@...infault.org>, linux-csky@...r.kernel.org,
        Zong Li <zong.li@...ive.com>,
        Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH V2] riscv: Fixup compile error BUILD_BUG_ON failed

Hi Palmer,

On Tue, Jun 30, 2020 at 7:22 AM Palmer Dabbelt <palmerdabbelt@...gle.com> wrote:
>
> On Sun, 28 Jun 2020 09:25:24 PDT (-0700), mhiramat@...nel.org wrote:
> > On Sun, 28 Jun 2020 16:07:37 +0000
> > guoren@...nel.org wrote:
> >
> >> From: Guo Ren <guoren@...ux.alibaba.com>
> >>
> >> Unfortunately, the current code couldn't be compiled:
> >>
> >>   CC      arch/riscv/kernel/patch.o
> >> In file included from ./include/linux/kernel.h:11,
> >>                  from ./include/linux/list.h:9,
> >>                  from ./include/linux/preempt.h:11,
> >>                  from ./include/linux/spinlock.h:51,
> >>                  from arch/riscv/kernel/patch.c:6:
> >> In function ‘fix_to_virt’,
> >>     inlined from ‘patch_map’ at arch/riscv/kernel/patch.c:37:17:
> >> ./include/linux/compiler.h:392:38: error: call to ‘__compiletime_assert_205’ declared with attribute error: BUILD_BUG_ON failed: idx >= __end_of_fixed_addresses
> >>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >>                                       ^
> >> ./include/linux/compiler.h:373:4: note: in definition of macro ‘__compiletime_assert’
> >>     prefix ## suffix();    \
> >>     ^~~~~~
> >> ./include/linux/compiler.h:392:2: note: in expansion of macro ‘_compiletime_assert’
> >>   _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >>   ^~~~~~~~~~~~~~~~~~~
> >> ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
> >>  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> >>                                      ^~~~~~~~~~~~~~~~~~
> >> ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
> >>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> >>   ^~~~~~~~~~~~~~~~
> >> ./include/asm-generic/fixmap.h:32:2: note: in expansion of macro ‘BUILD_BUG_ON’
> >>   BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
> >>   ^~~~~~~~~~~~
> >>
> >> Because fix_to_virt(, idx) needs a const value, not a dynamic variable of
> >> reg-a0 or BUILD_BUG_ON failed with "idx >= __end_of_fixed_addresses".
> >
> > Looks good to me :)
> >
> > Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>
>
> Is there a configuration that runs into this bug?  It's not showing up for me,
> and I generally try to add regressions to my test suite.
>
> > Thanks!

KPROBE, I'll send the patch soon.

-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ