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-next>] [day] [month] [year] [list]
Date:	Wed, 27 Jul 2016 16:00:54 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: warning: calling ‘__builtin_return_address’ with a nonzero argument is unsafe

So almost all of our __builtin_return_address() users use a zero
argument, but we have a couple in-tree. They all seem to be related to
tracing:

  kernel/trace/trace_irqsoff.c
  kernel/trace/trace_sched_wakeup.c

and it causes a fair number of lines of warning noise on current
kernels with at least gcc-6.1.1. See

    https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

that says

   "-Wframe-address:
        Warn when the ‘__builtin_frame_address’ or
‘__builtin_return_address’ is called with an argument greater than 0.
Such calls may return indeterminate values or crash the program. The
warning is included in -Wall"

I can just add a

  KBUILD_CFLAGS  += $(call cc-disable-warning,frame-address,)

in the main Makefile, and that is indeed what I have in my tree right
now and will likely commit soon. The warning isn't actually helpful
for us, and there doesn't seem to be any other way to turn it off. At
the same time, there is a somewhat valid reason for that warning
existing, so I'm wondering if the tracing code could perhaps try to
change.

I detest having lots of warnings when doing my test builds, because
the uninteresting warnings often hide real ones that might actually
matter.

Comments?

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ