• Peter Jones's avatar
    efi: Make efivarfs entries immutable by default · 00b4d02a
    Peter Jones authored
    commit ed8b0de5
    
     upstream.
    
    "rm -rf" is bricking some peoples' laptops because of variables being
    used to store non-reinitializable firmware driver data that's required
    to POST the hardware.
    
    These are 100% bugs, and they need to be fixed, but in the mean time it
    shouldn't be easy to *accidentally* brick machines.
    
    We have to have delete working, and picking which variables do and don't
    work for deletion is quite intractable, so instead make everything
    immutable by default (except for a whitelist), and make tools that
    aren't quite so broad-spectrum unset the immutable flag.
    Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
    Tested-by: default avatarLee, Chun-Yi <jlee@suse.com>
    Acked-by: default avatarMatthew Garrett <mjg59@coreos.com>
    Signed-off-by: default avatarMatt Fleming <matt@codeblueprint.co.uk>
    [ luis: backported to 3.16:
      - use mutex_lock/unlock() instead of inode_lock/unlock()
      - use root->d_inode instead of d_inode()  ]
    Signed-off-by: Luis Henriques <luis.hen...
    00b4d02a
super.c 6.13 KB