[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1fa082Vhar2x1DM@kroah.com>
Date: Tue, 25 Oct 2022 14:47:15 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Pavel Machek <pavel@...x.de>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, xen-devel@...ts.xenproject.org,
Kees Cook <keescook@...omium.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 174/229] x86/entry: Work around Clang __bdos() bug
On Mon, Oct 24, 2022 at 07:41:27PM +0200, Pavel Machek wrote:
> Hi!
>
> > From: Kees Cook <keescook@...omium.org>
> >
> > [ Upstream commit 3e1730842f142add55dc658929221521a9ea62b6 ]
> >
> > Clang produces a false positive when building with CONFIG_FORTIFY_SOURCE=y
> > and CONFIG_UBSAN_BOUNDS=y when operating on an array with a dynamic
> > offset. Work around this by using a direct assignment of an empty
> > instance. Avoids this warning:
> >
> > ../include/linux/fortify-string.h:309:4: warning: call to __write_overflow_field declared with 'warn
> > ing' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wat
> > tribute-warning]
> > __write_overflow_field(p_size_field, size);
> > ^
> >
> > which was isolated to the memset() call in xen_load_idt().
> >
> > Note that this looks very much like another bug that was worked around:
> > https://github.com/ClangBuiltLinux/linux/issues/1592
>
> We don't have CONFIG_UBSAN_BOUNDS in 4.19, so maybe we don't need this
> one?
Good point, I'll drop this from 5.4.y and older now, thanks.
greg k-h
Powered by blists - more mailing lists