Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382758 > unrolled thread

KASAN can't change FRAME_WARN

Started by"Shi, Yang" <yang.shi@linaro.org>
First post2016-04-19 19:50 +0200
Last post2016-04-20 18:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  KASAN can't change FRAME_WARN "Shi, Yang" <yang.shi@linaro.org> - 2016-04-19 19:50 +0200
    Re: KASAN can't change FRAME_WARN Andrey Ryabinin <aryabinin@virtuozzo.com> - 2016-04-20 18:10 +0200

#1382758 — KASAN can't change FRAME_WARN

From"Shi, Yang" <yang.shi@linaro.org>
Date2016-04-19 19:50 +0200
SubjectKASAN can't change FRAME_WARN
Message-ID<rpHWG-27J-13@gated-at.bofh.it>
Hi Andrey,

When I enable KASAN for 4.5 and 4.6 (I didn't try with older versions), 
I got FRAME_WARN warning for frame size exceeds 2048 bytes.

Then I found the kconfig looks like:

range 0 8192
default 0 if KASAN
default 1024 if !64BIT
default 2048 if 64BIT

In my understanding, FRAME_WARN should be 0 once KASAN is enabled, but 
it is still 2048. I tried a couple of fixes, i.e.

default 0 if KASAN
default 1024 if (!KASAN && !64BIT)
default 2048 if (!KASAN && 64BIT)

But, nothing works, so I have to add "depends on !KASAN" to disable 
FRAME_WARN completely, but it causes the kernel image size increased.

Any hint is appreciated.

Thanks,
Yang

[toc] | [next] | [standalone]


#1383535

FromAndrey Ryabinin <aryabinin@virtuozzo.com>
Date2016-04-20 18:10 +0200
Message-ID<rq2Rs-29W-11@gated-at.bofh.it>
In reply to#1382758

On 04/19/2016 08:48 PM, Shi, Yang wrote:
> Hi Andrey,
> 
> When I enable KASAN for 4.5 and 4.6 (I didn't try with older versions), I got FRAME_WARN warning for frame size exceeds 2048 bytes.
> 
> Then I found the kconfig looks like:
> 
> range 0 8192
> default 0 if KASAN
> default 1024 if !64BIT
> default 2048 if 64BIT
> 
> In my understanding, FRAME_WARN should be 0 once KASAN is enabled, but it is still 2048. I tried a couple of fixes, i.e.
> 
> default 0 if KASAN
> default 1024 if (!KASAN && !64BIT)
> default 2048 if (!KASAN && 64BIT)
> 
> But, nothing works, so I have to add "depends on !KASAN" to disable FRAME_WARN completely, but it causes the kernel image size increased.
> 
> Any hint is appreciated.

make menuconfig/nconfig/whatever ?
And set FRAME_WARN to zero.

In kconfig we define only default FRAME_WARN value, but allow to change it.
Note that the default value is only assigned to the config symbol if no other
value was set by the user.

The main point of default here is to silence warning in build testing.
E.g. when 'make randconfig' enables KASAN, FRAME_WARN becomes 0 and silences warnings.



> Thanks,
> Yang

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web