[PATCH 14/16] kexec: Export sysfs attributes for secureboot and secure modules to user space

Vivek Goyal vgoyal at redhat.com
Wed Sep 11 09:51:37 EDT 2013


On Tue, Sep 10, 2013 at 06:57:55PM -0400, Josh Boyer wrote:

[..]
> > +static ssize_t secureboot_enabled_show(struct kobject *kobj,
> > +                                      struct kobj_attribute *attr, char *buf)
> > +{
> > +       /* TODO: Change it once secureboot patches are in */
> > +       return sprintf(buf, "%d\n", 1);
> > +}
> > +KERNEL_ATTR_RO(secureboot_enabled);
> 
> You're defaulting this to enabled, even on machines where SB isn't
> possible.  I realize there are TODOs there, but you might want to
> default it to off if you really intend this on going upstream before
> any of the other secure_* infrastructure does.

I defaulted it to 1 because I wanted to artificially simulate that
secureboot is enabled and make sure kexec-tools verifies signature
of bzImage.

This is just an RFC series to show what's cooking and get early feedback
about design. I am not expecting any of this to get in before secureboot/
secure_modules/securelevel patches get in.

First some set of patches need to block kexec loading, only then these
patches make sense.

So don't read too much into current default values. Idea is to show
that kernel will export 1-2 knobs to user space which will signal
kexec-tools to verify signature of bzImage and also set "secureboot"
in bootparams for next kernel as needed.

Thanks
Vivek



More information about the kexec mailing list