linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kees Cook <keescook@chromium.org>,
	Max Filippov <jcmvbkbc@gmail.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	Marco Elver <elver@google.com>
Subject: Re: Linux 6.2-rc1
Date: Mon, 26 Dec 2022 23:41:52 +0100	[thread overview]
Message-ID: <abeeda98-e6ed-fb88-f838-6b61d43e07e5@suse.cz> (raw)
In-Reply-To: <CAHk-=whD1zMyt4c7g6-+tWvVweyb-6oHMT_+ZVHqe1EXwtFpCQ@mail.gmail.com>

On 12/26/22 21:56, Linus Torvalds wrote:
> On Mon, Dec 26, 2022 at 11:52 AM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> fs/f2fs/inline.c: In function 'f2fs_move_inline_dirents':
>> include/linux/fortify-string.h:59:33: error: '__builtin_memset' pointer overflow between offset [28, 898293814] and size [-898293787, -1] [-Werror=array-bounds]
>> fs/f2fs/inline.c:430:9: note: in expansion of macro 'memset'
>>   430 |         memset(dst.bitmap + src.nr_bitmap, 0, dst.nr_bitmap - src.nr_bitmap);
>>       |         ^~~~~~
> 
> Well, that's unfortunate.
> 
>> kernel/kcsan/kcsan_test.c: In function '__report_matches':
>> kernel/kcsan/kcsan_test.c:257:1: error: the frame size of 1680 bytes is larger than 1536 bytes
>>
>> Bisect for both points to commit e240e53ae0abb08 ("mm, slub: add
>> CONFIG_SLUB_TINY").  Reverting it on its own is not possible, but
>> reverting the following two patches fixes the problem.
>>
>> 149b6fa228ed mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED
>> e240e53ae0ab mm, slub: add CONFIG_SLUB_TINY
> 
> No, I think CONFIG_SLUB_TINY should probably have a
> 
>      depends on !COMPILE_TEST
> 
> or something like that instead.

We can do that, although if things are on track to be fixed, maybe it's
unnecessary?

> It already has a
> 
>         depends on SLUB && EXPERT
> 
> which is basically supposed to disable it for any normal builds, but
> obviously allmodconfig will enable EXPERT etc anyway.
> 
> That said, that f2fs case also sounds like this code triggers the
> compiler being unhappy, so it might be worth having some clarification
> from the f2fs people.
> 
> I'm not sure what triggers that problem just on powerpc, and only with
> that CONFIG_SLUB_TINY option. Maybe those make_dentry_ptr_inline() and

I think it's because e240e53ae0ab makes KASAN depend on !SLUB_TINY, because
KASAN does "select SLUB_DEBUG" which depends on !SLUB_TINY; but kconfig will
still honor the select even with dependencies unmet and only warn about it
(and the build would fail) so I prevented it this way. (maybe instead
SLUB_TINY depend on !KASAN would have worked better in retrospect?) So now
allmodconfig will have SLUB_TINY enabled and KASAN thus disabled.

On the other hand there are configs like KCSAN and KMSAN that depend on
!KASAN, so with KASAN disabled, now those become enabled. KCSAN becoming
enabled would be relevant for the xtensa problem. For the powerpc issue I'm
not sure as the macro expansion lines for include/linux/fortify-string.h in
Guenter's report make no sense in my 6.2-rc1 checkout for some reason. But
the header does test for KASAN and KMSAN at several points, to perhaps it's
also related to that?

> make_dentry_ptr_block() functions don't get inlined in that case, and
> that then makes gcc not see the values for those bitmap sizes?
> 
> Does changing the "inline" to "always_inline" perhaps fix the compiler
> unpahhiness too?
> 


  parent reply	other threads:[~2022-12-26 22:42 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-25 22:07 Linux 6.2-rc1 Linus Torvalds
2022-12-26 19:52 ` Guenter Roeck
2022-12-26 20:56   ` Linus Torvalds
2022-12-26 21:03     ` Kees Cook
2022-12-26 22:10       ` Guenter Roeck
2022-12-27  0:29       ` Guenter Roeck
2022-12-27  1:32         ` Kees Cook
2022-12-27  5:52           ` Guenter Roeck
2022-12-28  3:40             ` Kees Cook
2022-12-28 14:44               ` Guenter Roeck
2023-01-07  0:06                 ` Jaegeuk Kim
2022-12-26 22:41     ` Vlastimil Babka [this message]
2022-12-26 21:10   ` Max Filippov
2022-12-26 22:08     ` Guenter Roeck
2022-12-27  8:29 ` Build regressions/improvements in v6.2-rc1 Geert Uytterhoeven
2022-12-27  8:35   ` Geert Uytterhoeven
2023-01-01  1:33     ` Rob Landley
2023-01-01 12:24       ` Geert Uytterhoeven
2023-01-04  6:32         ` Michael Ellerman
2023-01-06 15:10     ` John Paul Adrian Glaubitz
2023-01-06 15:17       ` Geert Uytterhoeven
2023-01-06 15:18         ` Geert Uytterhoeven
2023-01-17 16:42         ` Calculating array sizes in C - was: " John Paul Adrian Glaubitz
2023-01-17 17:01           ` Geert Uytterhoeven
2023-01-17 17:06             ` John Paul Adrian Glaubitz
2023-01-17 20:05               ` Geert Uytterhoeven
2023-01-17 20:37                 ` John Paul Adrian Glaubitz
2023-01-19 22:11                   ` Michael.Karcher
2023-01-20  3:31                     ` Rob Landley
2023-01-20 10:53                       ` Segher Boessenkool
2023-01-20 18:29                         ` Michael.Karcher
2023-01-20  8:49                     ` John Paul Adrian Glaubitz
2023-01-20 19:29                       ` Michael Karcher
2023-01-21 21:26                         ` John Paul Adrian Glaubitz
2023-01-06 15:39     ` Alex Deucher
2023-01-04 19:01 ` Linux 6.2-rc1 Pali Rohár
2023-01-04 19:25   ` Linus Torvalds
2023-01-04 20:56     ` Pali Rohár
2023-01-04 21:27       ` Pali Rohár
2023-01-04 21:32       ` Linus Torvalds
2023-01-04 21:43         ` Jens Axboe
2023-01-05 11:25           ` Greg Kroah-Hartman
2023-01-05 15:26             ` Jens Axboe
2023-01-05 17:42           ` Pali Rohár
2023-01-05 17:45             ` Jens Axboe
2023-01-05 19:06               ` Linus Torvalds
2023-01-05 19:22                 ` Pali Rohár
2023-01-05 19:40                 ` Jens Axboe
2023-01-05 20:03                   ` Linus Torvalds
2023-01-05 20:33                     ` Jens Axboe
2023-01-06 16:58                       ` Pali Rohár
2023-01-06 17:04                         ` Jens Axboe
2023-01-28 19:34                           ` pktcdvd Pali Rohár
2023-01-28 19:43                             ` pktcdvd Linus Torvalds
2023-01-29 21:53                               ` pktcdvd Jens Axboe
2023-01-29 21:55                             ` pktcdvd Jens Axboe
2023-01-29 22:21                               ` pktcdvd Pali Rohár
2023-01-29 22:34                                 ` pktcdvd Jens Axboe

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=abeeda98-e6ed-fb88-f838-6b61d43e07e5@suse.cz \
    --to=vbabka@suse.cz \
    --cc=chao@kernel.org \
    --cc=elver@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    /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).