lkml.org 
[lkml]   [2021]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 00/10] raise minimum GCC version to 5.1
On Sat, Sep 11, 2021 at 1:41 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> commit fad7cd3310db ("nbd: add the check to prevent overflow in
> __nbd_ioctl()")
>
> raised an issue from the fallback helpers added in
>
> commit f0907827a8a9 ("compiler.h: enable builtin overflow checkers and add fallback code")
>
> Specifically, the helpers for checking whether the results of a
> multiplication overflowed (__unsigned_mul_overflow,
> __signed_add_overflow) use the division operator when
> !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW. This is problematic for 64b
> operands on 32b hosts.
>
> Also, because the macro is type agnostic, it is very difficult to write
> a similarly type generic macro that dispatches to one of:
> * div64_s64
> * div64_u64
> * div_s64
> * div_u64
>
> Raising the minimum supported versions allows us to remove all of the
> fallback helpers for !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW, instead
> dispatching the compiler builtins.
>
> arm64 has already raised the minimum supported GCC version to 5.1, do
> this for all targets now. See the link below for the previous
> discussion.
>
> Additional patches cleaning up a few obsolete version checks.

Agreed, I think this is a good time for removing gcc-4.9 support, with
the tradeoff between the number of remaining users of that compiler and
the number of problems that are solved in gcc-5.1.

After this, I think we can also change the --std=gnu89 to --std=gnu11,
as an additional benefit.

According to distrowatch, this will lose support for the distro gcc version
of Debian 8 (Jessie), Ubuntu 15.04, and older Android AOSP (new versions
use clang to build kernels, old versions also need older kernels).
I think that is acceptable.

For reference, the following distro releases use

Centos 8: gcc-8.3
Debian 9: gcc-6.3
RHEL 8: gcc-8.4
Slackware-14.2: gcc-5.3
SLES15: gcc-10.2
Ubuntu 16.04: gcc-5.3

Most older releases of these already don't support building current kernels.
I expect the number of users of Ubuntu 16.04 and Slackware-14.2 that
want to build their own mainline kernels instead of running what was
provided by the distro to be really low.

The other case that always gets brought up are embedded users that
want to use an ancient user space that is only validated with an old gcc,
but need a new kernel without revalidating user space. The only answer
for those is to use two different compilers.

Arnd

\
 
 \ /
  Last update: 2021-09-13 13:29    [W:0.566 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site