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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Apr 2015 11:20:41 +0200
From:	Markus Trippelsdorf <markus@...ppelsdorf.de>
To:	Hagen Paul Pfeifer <hagen@...u.net>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Borislav Petkov <bp@...en8.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH RFC] x86: enforce inlining for atomics

On 2015.04.22 at 07:58 +0200, Hagen Paul Pfeifer wrote:
> * Markus Trippelsdorf | 2015-04-22 07:24:41 [+0200]:
> >I cannot reproduce this issue with my config with 4.8, 4.9 or 5. Could
> >you please come up with a small testcase and open a gcc bug (with full
> >gcc command line)?
> 
> the attached config file should do the trick. Can you try it?

It is definitely a -O2 vs. -Os issue. With your config:

-Os:
 % nm vmlinux | grep " atomic_" | wc -l
736 

-O2 is fine:
 % nm vmlinux | grep " atomic_"
ffffffff852d8300 r atomic_counters_ops
ffffffff83d66bf0 t atomic_counters_read
ffffffff8119cd30 T atomic_dec_and_mutex_lock
ffffffff81172e10 T atomic_notifier_call_chain
ffffffff81172b90 T atomic_notifier_chain_register
ffffffff81172d70 T atomic_notifier_chain_unregister
ffffffff844b0ef0 t atomic_read_file
ffffffff85a0c260 r atomic_ro_fops
ffffffff87616000 d atomic_rw
ffffffff852d8400 r atomic_stats_ops
ffffffff83d66c50 t atomic_stats_read

The easiest fix would be to force always-inline in
include/linux/compiler-gcc.h when CONFIG_CC_OPTIMIZE_FOR_SIZE is set.

And BTW only x86 and tile define ARCH_SUPPORTS_OPTIMIZED_INLINING, so
the rest of the architectures are not affected anyway.

-- 
Markus
--
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