lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210206143115.GX4035784@sasha-vm>
Date:   Sat, 6 Feb 2021 09:31:15 -0500
From:   Sasha Levin <sashal@...nel.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...nel.org
Subject: Re: [PATCH 3/3] kbuild: introduce KERNEL_VERSION2 and
 LINUX_VERSION_CODE2

On Sat, Feb 06, 2021 at 09:45:44PM +0900, Masahiro Yamada wrote:
>On Sat, Feb 6, 2021 at 12:50 PM Sasha Levin <sashal@...nel.org> wrote:
>> -       ((c) > 255 ? 255 : (c)))'
>> +       ((c) > 255 ? 255 : (c)))';                                       \
>> +       echo \#define LINUX_VERSION_CODE2 $(shell                        \
>> +       expr $(VERSION) \* 16777216 + 0$(PATCHLEVEL) \* 65536 + 0$(SUBLEVEL)); \
>
>
>Is this needed?
>No one in this patch uses LINUX_VERSION_CODE2.
>
>The in-kernel code can use
>LINUX_VERSION_MAJOR/PATCHLEVEL/SUBLEVEL directly.
>
>
>Userspace does not need LINUX_VERSION_CODE2 either.
>
>Your comment in 2/3 states that
>userspace only decodes MAJOR and PATCHLEVEL fields,
>so LINUX_VERSION_CODE will still do well.

Yes, that's fair. I wanted to have that to make it easy for out of tree
code to handle in-kernel ABI changes but as we don't care about such
code there's no strict need for LINUX_VERSION_CODE2. I'll drop it.

>> index ab4b98b3165db..a56bf381335e9 100644
>> --- a/tools/perf/tests/bpf-script-example.c
>> +++ b/tools/perf/tests/bpf-script-example.c
>> @@ -5,7 +5,7 @@
>>   */
>>  #ifndef LINUX_VERSION_CODE
>>  # error Need LINUX_VERSION_CODE
>> -# error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig'
>> +# error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x4020000" into llvm section of ~/.perfconfig'
>
>
>Is this change needed?

Good point, no. I'll resend.

-- 
Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ