492d322 proc: dont trigger mount error with invalid options on old kernels

1 file Authored by Richard Purdie 2 years ago, Committed by anitazha 2 years ago,
    proc: dont trigger mount error with invalid options on old kernels
    
    As of commit 4e39995371738b04d98d27b0d34ea8fe09ec9fab ("core: introduce
    ProtectProc= and ProcSubset= to expose hidepid= and subset= procfs
    mount options") kernels older than v5.8 generate multple warnings at
    boot, as seen in this Yocto build from today:
    
         qemux86-64 login: root
         [   65.829009] proc: Bad value for 'hidepid'
         root@qemux86-64:~# dmesg|grep proc:
         [   16.990706] proc: Bad value for 'hidepid'
         [   28.060178] proc: Bad value for 'hidepid'
         [   28.874229] proc: Bad value for 'hidepid'
         [   32.685107] proc: Bad value for 'hidepid'
         [   65.829009] proc: Bad value for 'hidepid'
         root@qemux86-64:~#
    
    We see reports of the issue as in general its hard to someone to tell
    the difference between an error in dmesg which they should worry about and
    one that is harmless. This adds support burden to developers so Yocto
    Project has added this patch.
    
    The commit that triggers this is systemd v247-rc1~378^2~3 -- so any
    systemd 247 and above plus kernel v5.7 or older will need this.
    
    As noted in https://github.com/systemd/systemd/issues/16896
    it is possible changes could be backported to different kernel versions
    so the test isn't 100% foolproof but does give better results than a
    continual stream of bug reports.
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    
        
file modified
+20 -2