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: <CAPAsAGzSEEEogyzpNOfXAEiv8=kt8CLVDvyJKBmgYLeEVKopEA@mail.gmail.com>
Date:	Mon, 5 Oct 2015 15:10:46 +0300
From:	Andrey Ryabinin <ryabinin.a.a@...il.com>
To:	Fengguang Wu <fengguang.wu@...el.com>
Cc:	Abylay Ospan <aospan@...up.ru>,
	Mauro Carvalho Chehab <m.chehab@...sung.com>,
	Kozlov Sergey <serjk@...up.ru>, kbuild-all@...org,
	linux-media <linux-media@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [kbuild-all] drivers/media/dvb-frontends/cxd2841er.c:2393:1:
 warning: the frame size of 2992 bytes is larger than 2048 bytes

2015-10-05 14:09 GMT+03:00 Fengguang Wu <fengguang.wu@...el.com>:
> Hi Abylay,
>
>> cause of this 'Kernel Address sanitizer (KASan)' is enabled in your
>> config. With gcc-4.9 kasan was disabled in compile time because of:
>> "scripts/Makefile.kasan:23: CONFIG_KASAN: compiler does not support
>> all options. Trying minimal configuration"
>>
>> but with gcc-5 it's enabled.
>>
>> and
>> objdump -d drivers/media/dvb-frontends/cxd2841er.o
>>
>> shows that KASan adds some instructions to 'cxd2841er_sleep_tc' which
>> writes necessary data to -fasan-shadow-offset=0xdffffc0000000000:
>>     1476:       48 b8 00 00 00 00 00    movabs $0xdffffc0000000000,%rax
>> ...
>>     14d3:       c7 00 f1 f1 f1 f1       movl   $0xf1f1f1f1,(%rax)
>>     14d9:       c7 40 04 01 f4 f4 f4    movl   $0xf4f4f401,0x4(%rax)
>>     14e0:       c7 40 08 f2 f2 f2 f2    movl   $0xf2f2f2f2,0x8(%rax)
>>     14e7:       c7 40 0c 01 f4 f4 f4    movl   $0xf4f4f401,0xc(%rax)
>> ...
>>
>> and function will grow and we get '-Wframe-larger-than=2048' warnings.
>>
>> So, this warning looks normal  (until they less than 8K I think) for
>> configurations with KASan enabled.
>>
>> I can suggest:
>> * ignore this warning if KASan enabled
>
> Yes I can easily teach the kbuild robot to ignore this warning when
> KASan enabled. Thanks for the explanations!
>
>> * Increase -Wframe-larger-than=2048 to -Wframe-larger-than=8192 if
>> KASan enabled ( CONFIG_FRAME_WARN=8192 in kernel .config)
>
> Would it be possible to auto increase the threshold (in below Kconfig) when
> KASan is enabled, so that all other developers/testers won't get the warnings,
> too?
>

Makes sense, although 8K is too much, I think. 6K probably enough.

> lib/Kconfig.debug
>
> config FRAME_WARN
>         int "Warn for stack frames larger than (needs gcc 4.4)"
>         range 0 8192
>         default 1024 if !64BIT
>         default 2048 if 64BIT
>
> Thanks,
> Fengguang
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ