lkml.org 
[lkml]   [2012]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v2 3/4] firmware: Add support for signature checks
At Fri, 23 Nov 2012 14:56:11 +0800,
joeyli wrote:
>
> 於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
> > +#ifdef CONFIG_FIRMWARE_SIG
> > +static int verify_sig_file(struct firmware_buf *buf, const char
> > *path)
> > +{
> > + const unsigned long markerlen = sizeof(FIRMWARE_SIG_STRING) -
> > 1;
> > + struct file *file;
> > + void *sig_data;
> > + size_t sig_size;
> > + int ret;
> > +
> > + file = filp_open(path, O_RDONLY, 0);
> > + if (IS_ERR(file))
> > + return -ENOKEY;
>
> I think there should return '-ENOENT', otherwise the firmware will show
> 'Invalid firmware signature' even didn't find the sig file.

Actually this is the intentional behavior.
In the secure boot mode, unsigned firmware should be rejected.

In the normal boot mode, the -ENOKEY error is ignored. (Whether we
should taint the kernel with such an unsigned firmware is a bit
different question, though.)


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-11-23 09:01    [W:0.367 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site