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]
Message-Id: <20180730213412.242849-1-ndesaulniers@google.com>
Date:   Mon, 30 Jul 2018 14:34:10 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     akpm@...ux-foundation.org, natechancellor@...il.com
Cc:     arnd@...db.de, paul.burton@...s.com, christophe.leroy@....fr,
        shorne@...il.com, yamada.masahiro@...ionext.com,
        keescook@...omium.org, mingo@...nel.org,
        gregkh@...uxfoundation.org, tglx@...utronix.de,
        rdunlap@...radead.org, bp@...e.de, neilb@...e.com,
        linux-kernel@...r.kernel.org, aryabinin@...tuozzo.com,
        dwmw@...zon.co.uk, sandipan@...ux.vnet.ibm.com,
        linux@...musvillemoes.dk, paullawrence@...gle.com,
        andreyknvl@...gle.com, will.deacon@....com, ghackmann@...roid.com,
        stable@...r.kernel.org, ghackmann@...gle.com, mka@...omium.org,
        jpoimboe@...hat.com, wvw@...gle.com, avagin@...nvz.org,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: [PATCH v2 0/2] CLANG_VERSION and __diag macros

clang-7 has a new warning (-Wreturn-stack-address) for warning when a
function returns the address of a local variable.  This is in general a
good warning, but the kernel has a few places where GNU statement
expressions return the address of a label in order to get the current
instruction pointer (see _THIS_IP_ and current_text_addr).

In order to disable a warning at a single call site, the kernel already
has __diag macros for inserting compiler and compiler-version specific
_Pragma's.

This series adds CLANG_VERSION macros necessary for proper __diag
support, and whitelists the case in _THIS_IP_. current_text_addr will be
consolidated in a follow up series.

Nick Desaulniers (2):
  compiler-clang.h: Add CLANG_VERSION and __diag macros
  kernel.h: Disable -Wreturn-stack-address for _THIS_IP_

 include/linux/compiler-clang.h | 19 +++++++++++++++++++
 include/linux/compiler_types.h |  4 ++++
 include/linux/kernel.h         | 10 +++++++++-
 3 files changed, 32 insertions(+), 1 deletion(-)

-- 
2.18.0.345.g5c9ce644c3-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ