public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Savchenko <bircoph@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] newsitem: openrc-0.28 mounts efivars read only
Date: Thu, 13 Jul 2017 14:43:08 +0300	[thread overview]
Message-ID: <20170713144308.3e0dd3139d5be936e28c3e7d@gentoo.org> (raw)
In-Reply-To: <CAGfcS_=fdA3HBr-tFw02tSGkC+yNBCAZBBapEw7oPej-89ix4g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

On Thu, 13 Jul 2017 07:09:45 -0400 Rich Freeman wrote:
> On Thu, Jul 13, 2017 at 2:30 AM, Andrew Savchenko <bircoph@gentoo.org> wrote:
> > On Wed, 12 Jul 2017 17:42:50 -0700 Matt Turner wrote:
> >> On Wed, Jul 12, 2017 at 5:29 PM, Lucas Ramage <ramage.lucas94@gmail.com> wrote:
> >> > What needs to be changed for the bootloaders? I may be able to assist.
> >>
> >> The documentation should be updated to say that with OpenRC 0.28 that
> >> you'll have to remount efivars as RW before you can install the
> >> bootloader (e.g., grub-install)
> >>
> >> The command I use locally to remount rw (since I have configured
> >> efivars to be mounted read-only in fstab) is
> >>
> >> mount -o remount,rw /sys/firmware/efi/efivars
> >
> > We don't have that much efi bootloaders. Maybe it will be better
> > to update their scripting to remount efivars rw and back ro when
> > needed? The same way we have non-efi bootloaders to mount /boot
> > partition when needed.
> >
> 
> Presumably you'd only want to remount it if it was mounted ro to
> start, since it sounds like openrc will be diverging from systemd
> behavior here.
> 
> While it seems like a good idea I'm not sure how big an improvement it
> is in the larger scheme.  We're worried about root accidentially
> modifying efivars, but we have no safeguards against root writing to
> /dev/sda, and the latter seems much more likely to cause harm, and is
> harder to fix.

Writing to /dev/sda may kill data stored there, but hardware itself
will survive. Writing to efivars kills hardware and this is the
motivation for this change. See [1] and [2] for details. Poettering
says this is OK to hard brick device, well fine, this is systemd
way. OpenRC is smarter here and protects users from unintended
disaster.

Data can be restored from backup, but hard bricked hardware may
become completely dead beyond repair or require a very complicated
soldering. So I see this issue much more serious than writing
to /dev/sda.

[1] https://github.com/openrc/openrc/issues/134
[2] https://github.com/systemd/systemd/issues/2402

Best regards,
Andrew Savchenko

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-07-13 11:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 15:42 [gentoo-dev] newsitem: openrc-0.28 mounts efivars read only William Hubbs
2017-07-12 15:50 ` M. J. Everitt
2017-07-12 20:03 ` Mike Gilbert
2017-07-12 21:44   ` William Hubbs
2017-07-12 23:04     ` Matt Turner
2017-07-13  0:29       ` Lucas Ramage
2017-07-13  0:42         ` Matt Turner
2017-07-13  1:27           ` Lucas Ramage
2017-07-13  6:30           ` Andrew Savchenko
2017-07-13 11:09             ` Rich Freeman
2017-07-13 11:35               ` M. J. Everitt
2017-07-13 12:17                 ` Andrew Savchenko
2017-07-13 14:29                 ` Mike Gilbert
2017-07-13 14:35                   ` Ben Kohler
2017-07-13 14:58                   ` Andrew Savchenko
2017-07-13 15:06                     ` Andrew Savchenko
2017-07-13 15:40                     ` Rich Freeman
2017-07-13 16:45                     ` Mike Gilbert
2017-07-13 16:47                       ` Mike Gilbert
2017-07-13 11:43               ` Andrew Savchenko [this message]
2017-07-13 11:54                 ` Rich Freeman
2017-07-13 12:14                   ` Andrew Savchenko
2017-07-13 12:45                     ` Rich Freeman
2017-07-13  2:38     ` Mike Gilbert
2017-07-14  0:09   ` DarKRaveR
2017-07-14 11:02     ` Lucas Ramage
2017-07-13 10:30 ` Kristian Fiskerstrand
2017-07-13 13:52   ` William Hubbs
2017-07-13 23:30     ` William Hubbs
     [not found]       ` <CAJ0EP434FLFWQCTTqNr16oij=VfYem4ARr+C_-9NoQPBucWKmw@mail.gmail.com>
2017-07-14  0:05         ` Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170713144308.3e0dd3139d5be936e28c3e7d@gentoo.org \
    --to=bircoph@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox