Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 798315 - gentoo distro-patch Kconfig is faulty for 5.10.44, 5.10.45 and 5.10.46
Summary: gentoo distro-patch Kconfig is faulty for 5.10.44, 5.10.45 and 5.10.46
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: 5.10.48-r1, 5.12.15 and 5.13.0-r1
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2021-06-24 10:26 UTC by Peter
Modified: 2021-07-11 18:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
distro/Kconfig (Kconfig,7.00 KB, text/plain)
2021-07-03 13:50 UTC, Mike Pagano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2021-06-24 10:26:57 UTC
1. The help-text of the new section for KSPP is in the wrong position. So it does nothing.
2. Let the user decide if he has /dev/mem. I have no /dev/mem and get compile warnings. So I deleted two lines.

My adjusted Kconfig is here
https://forums.gentoo.org/viewtopic-p-8625312.html#8625312

Reproducible: Always

Actual Results:  
Selected KSPP settings in kernel config doesnt set all 

Expected Results:  
Selecting KSPP settings will do what they shall do
Comment 1 Mike Gilbert gentoo-dev 2021-07-02 17:46:59 UTC
I can't really follow what you are trying to propose. It might be easier if you actually provided patches to implement the changes you would like to see.
Comment 2 Peter 2021-07-02 20:26:28 UTC
I provided a complete /usr/src/linux/distro/Kconfig. The differences to our actual Kconfig will be seen with diff. I think you know the difference between [*] and -*-

So, even if you have set all KSPP-settings before they will all be at [*] and not as -*-

If you have done NO one KSPP-setting, the new section in our distro-patch does NOTHING

As I wrote, the help-text is in the wrong position. This leads that no one of all selects will be done. No one of these:
        select BUG
        select STRICT_KERNEL_RWX
        select DEBUG_WX
        select STACKPROTECTOR
        select STACKPROTECTOR_STRONG
        select SYN_COOKIES
        select DEBUG_CREDENTIALS
        select DEBUG_NOTIFIERS
        select DEBUG_LIST
        select DEBUG_SG
        select BUG_ON_DATA_CORRUPTION
        select SCHED_STACK_END_CHECK
        select SECCOMP
        select SECCOMP_FILTER
        select SECURITY_YAMA
        select SLAB_FREELIST_RANDOM
        select SLAB_FREELIST_HARDENED
        select SHUFFLE_PAGE_ALLOCATOR
        select SLUB_DEBUG
        select PAGE_POISONING
        select PAGE_POISONING_NO_SANITY
        select PAGE_POISONING_ZERO
        select INIT_ON_ALLOC_DEFAULT_ON
        select INIT_ON_FREE_DEFAULT_ON
        select VMAP_STACK
        select REFCOUNT_FULL
        select FORTIFY_SOURCE
        select SECURITY_DMESG_RESTRICT
        select PANIC_ON_OOPS
        select CONFIG_GCC_PLUGINS
        select GCC_PLUGIN_LATENT_ENTROPY
        select GCC_PLUGIN_STRUCTLEAK
        select GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
        select GCC_PLUGIN_STACKLEAK
        select GCC_PLUGIN_RANDSTRUCT
        select GCC_PLUGIN_RANDSTRUCT_PERFORMANCE

is be done. You will see these orders if you go into [help] of a "make menuconfig", but it isnt done.

With my Kconfig you see in [help] a complete different content AND ... all selects ARE DONE ...

It is ONLY the POSITION of the help-text.



2. KSPP says: DISABLE /dev/mem. ONLY if you need it, THEN do ...

But IF it is disabled AND you do both selects you get compiler warnings when doing your make all. Therefore these two lines should be deleted.
Comment 3 Peter 2021-07-02 20:39:18 UTC
P.S. Please be patient with my poor school english (I am an old man).
Comment 4 Mike Pagano gentoo-dev 2021-07-03 13:16:31 UTC
(In reply to Peter from comment #3)
> P.S. Please be patient with my poor school english (I am an old man).

No worries, I'll take a look and I appreciate the report.
Comment 5 Mike Pagano gentoo-dev 2021-07-03 13:42:23 UTC
Ok, I think your point on these two :

+       select STRICT_DEVMEM
+       select IO_STRICT_DEVMEM

Is that they only make sense if DEVMEM=y . Which is valid.

But instead of removing those lines, I'm thinking more of something like this:

+       select STRICT_DEVMEM if DEVMEM=y
+       select IO_STRICT_DEVMEM if DEVMEM=y


Can you tell me which help text was modified? It's hard to tell and Google Translating the forums wasn't that helpful.
Comment 6 Mike Pagano gentoo-dev 2021-07-03 13:50:33 UTC
Created attachment 721257 [details]
distro/Kconfig

Never mind, I see.

Can you test this version, please? You can just overwrite distro/Kconfig
Comment 7 Peter 2021-07-03 19:26:13 UTC
I just tested it. Great work !

I didnt know of this:

select ... if ... =y

so I learned again, thank you. IMHO this is the best solution for the two lines.

(I didnt know how to describe that the section with the help-text is in the wrong position; but you got it; thanks again).

Many greetings,
pietinger
Comment 8 Larry the Git Cow gentoo-dev 2021-07-04 15:17:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=71e0b2f98ab6da50c1a530bd2889e449d5950f83

commit 71e0b2f98ab6da50c1a530bd2889e449d5950f83
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2021-07-04 15:16:10 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2021-07-04 15:16:10 +0000

    Fix DEVMEM Select and move help text
    
    Thanks to Peter for reporting
    
    Bug: https://bugs.gentoo.org/798315
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 4567_distro-Gentoo-Kconfig.patch | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
Comment 9 Mike Pagano gentoo-dev 2021-07-04 15:30:30 UTC
This will be in 5.10.48 (and 5.12.15 and 5.13.1)
Comment 10 Peter 2021-07-08 11:56:58 UTC
Oh no ... just looked into 5.10.48 ... and there is the old (and wrong) ..../distro/Kconfig.
Comment 11 Mike Pagano gentoo-dev 2021-07-08 12:29:16 UTC
(In reply to Peter from comment #10)
> Oh no ... just looked into 5.10.48 ... and there is the old (and wrong)
> ..../distro/Kconfig.

Whoops

Queued up for 5.10.49

commit fafbdba1d0c62ba216f0cdbd963cad7c4a9ee612 (HEAD -> 5.10, origin/5.10)
Author: Mike Pagano <mpagano@gentoo.org>
Date:   Thu Jul 8 08:26:29 2021 -0400

    KSPP:Fix DEVMEM Select and move help text
    
    Bug: https://bugs.gentoo.org/798315
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Comment 12 Mike Pagano gentoo-dev 2021-07-08 13:19:12 UTC
Make that 5.10.48-r1
Comment 13 Mike Pagano gentoo-dev 2021-07-11 18:15:59 UTC
This should be in the latest kernels for gentoo-sources 5.10.49,5.12.16 and 5.13.1