linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Daniel Vetter <daniel@ffwll.ch>,
	Dan Williams <dan.j.williams@intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Keith Packard <keithp@keithp.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-hardening@vger.kernel.org
Subject: Re: [GIT PULL] overflow updates for v5.15-rc1
Date: Sat, 4 Sep 2021 13:47:54 -0700	[thread overview]
Message-ID: <CAHk-=wiPOXS2f90Ykk3V76sJLx0wMVywke8pc=88r1trmDuhmw@mail.gmail.com> (raw)
In-Reply-To: <202109022012.756B6B5B79@keescook>

On Thu, Sep 2, 2021 at 8:22 PM Kees Cook <keescook@chromium.org> wrote:
>
> Please pull these overflow updates for v5.15-rc1.

I pulled and then immediately unpulled again.

You can't add new warnings without fixing them, and this adds some
HORRENDOUSLY ugly new warnings that would most definitely hide other
warnings.

It doesn't matter one whit if the new warnings are from some
test-file, they are not acceptable for a build.

Make any tests separate from a real kernel build, because if "make
allmodconfig" results in hundreds of lines of warning crud, it's
useless garbage.

             Linus

---

warning: unsafe memchr() usage lacked '__read_overflow' warning in
lib/test_fortify/read_overflow-memchr.c
lib/test_fortify/test_fortify.h: In function ‘do_fortify_tests’:
lib/test_fortify/read_overflow-memchr.c:3:9: error: statement with no
effect [-Werror=unused-value]
    3 |         memchr(small, 0x7A, sizeof(small) + 1)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_fortify/test_fortify.h:34:9: note: in expansion of macro ‘TEST’
   34 |         TEST;
      |         ^~~~
In file included from ./include/linux/string.h:253,
                 from ./include/linux/bitmap.h:10,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/cpumask.h:5,
                 from ./arch/x86/include/asm/msr.h:11,
.. lots of noise ..

In function ‘strncpy’,
    inlined from ‘do_fortify_tests’ at lib/test_fortify/test_fortify.h:34:2:
./include/linux/fortify-string.h:56:17: error: call to
‘__write_overflow’ declared with attribute error: detected write
beyond size of object (1st parameter)
   56 |                 __write_overflow();
      |                 ^~~~~~~~~~~~~~~~~~
warning: unsafe strncpy() usage lacked '__write_overflow' warning in
lib/test_fortify/write_overflow-strncpy.c
In file included from ./include/linux/string.h:253,
                 from ./include/linux/bitmap.h:10,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/cpumask.h:5,
                 from ./arch/x86/include/asm/msr.h:11,
                 from ./arch/x86/include/asm/processor.h:22,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:60,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:55,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/slab.h:15,
                 from lib/test_fortify/test_fortify.h:4,
                 from lib/test_fortify/write_overflow-strncpy.c:5:

  reply	other threads:[~2021-09-04 20:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  3:22 [GIT PULL] overflow updates for v5.15-rc1 Kees Cook
2021-09-04 20:47 ` Linus Torvalds [this message]
     [not found]   ` <45312958-B844-4B4C-9808-8205866675A1@chromium.org>
2021-09-05 17:36     ` Linus Torvalds
2021-09-05 18:21       ` Linus Torvalds
2021-09-05 18:31       ` Kees Cook
2021-09-06 11:43         ` Mark Brown
2021-09-06 17:19           ` Kees Cook
2021-09-05 20:52       ` Kees Cook
2021-09-06  5:27       ` Stephen Rothwell
2021-09-06 17:12         ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wiPOXS2f90Ykk3V76sJLx0wMVywke8pc=88r1trmDuhmw@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=keithp@keithp.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).