[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202306212011.435B7C8ED@keescook>
Date: Wed, 21 Jun 2023 20:11:17 -0700
From: Kees Cook <keescook@...omium.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Marco Elver <elver@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nicolas Schier <nicolas@...sle.eu>, Tom Rix <trix@...hat.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Miroslav Benes <mbenes@...e.cz>, linux-kbuild@...r.kernel.org,
llvm@...ts.linux.dev, Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] ubsan: Tighten UBSAN_BOUNDS on GCC
On Wed, Jun 21, 2023 at 05:50:53PM -0700, Guenter Roeck wrote:
> On 6/21/23 10:52, Kees Cook wrote:
> > On Wed, Jun 21, 2023 at 09:42:01AM -0700, Guenter Roeck wrote:
> > > Hi,
> > >
> > > On Tue, Apr 04, 2023 at 07:23:59PM -0700, Kees Cook wrote:
> > > > The use of -fsanitize=bounds on GCC will ignore some trailing arrays,
> > > > leaving a gap in coverage. Switch to using -fsanitize=bounds-strict to
> > > > match Clang's stricter behavior.
> > > >
> > > > Cc: Marco Elver <elver@...gle.com>
> > > > Cc: Masahiro Yamada <masahiroy@...nel.org>
> > > > Cc: Nathan Chancellor <nathan@...nel.org>
> > > > Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> > > > Cc: Nicolas Schier <nicolas@...sle.eu>
> > > > Cc: Tom Rix <trix@...hat.com>
> > > > Cc: Josh Poimboeuf <jpoimboe@...nel.org>
> > > > Cc: Miroslav Benes <mbenes@...e.cz>
> > > > Cc: linux-kbuild@...r.kernel.org
> > > > Cc: llvm@...ts.linux.dev
> > > > Signed-off-by: Kees Cook <keescook@...omium.org>
> > > > ---
> > >
> > > This patch, presumably as side effect, enables CONFIG_ARCH_STM32
> > > for arm64:allmodconfig. As consequence, CONFIG_STM32_RPROC is enabled
> > > as well. This in turn results in the following build error.
> > >
> > > Building arm64:allmodconfig ... failed
> > > --------------
> > > Error log:
> > > In file included from include/linux/printk.h:564,
> > > from include/asm-generic/bug.h:22,
> > > from arch/arm64/include/asm/bug.h:26,
> > > from include/linux/bug.h:5,
> > > from include/linux/fortify-string.h:5,
> > > from include/linux/string.h:254,
> > > from include/linux/dma-mapping.h:7,
> > > from drivers/remoteproc/stm32_rproc.c:9:
> > > drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_mem_alloc':
> > > drivers/remoteproc/stm32_rproc.c:122:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t'
> > >
> > > I did not try to understand what is going on, but reverting this
> > > patch fixes the problem.
> >
> > Well that is really weird! I will investigate... this patch should be
> > pretty self-contained...
> >
> Meh, it is. Sorry for the noise. My bisect script was wrong.
Oh, okay; whew! I was really scratching my head. :)
--
Kees Cook
Powered by blists - more mailing lists