Re: Add support for TCG2 log format on UEFI systems

2019-03-14 Thread Matthew Garrett
On Thu, Mar 14, 2019 at 2:35 AM Jarkko Sakkinen
 wrote:
>
> On Wed, Feb 27, 2019 at 12:26:54PM -0800, Matthew Garrett wrote:
> > Identical to V4, but based on tpmdd-next
>
> This is not found /sys/kernel/security/tpm0/ascii_bios_measurements

That's expected - the existing kernel TCG2 log code doesn't expose
ascii_bios_measurements, only binary_bios_measurements. This patchset
doesn't change that.


[PATCH 26/38] vfs: Convert efivarfs to fs_context

2019-03-14 Thread David Howells
Signed-off-by: David Howells 
cc: Matthew Garrett 
cc: Jeremy Kerr 
cc: Ard Biesheuvel 
cc: linux-efi@vger.kernel.org
---

 fs/efivarfs/super.c |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
index 5b68e4294faa..1ea25c7a329a 100644
--- a/fs/efivarfs/super.c
+++ b/fs/efivarfs/super.c
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -191,7 +192,7 @@ static int efivarfs_destroy(struct efivar_entry *entry, 
void *data)
return 0;
 }
 
-static int efivarfs_fill_super(struct super_block *sb, void *data, int silent)
+static int efivarfs_fill_super(struct super_block *sb, struct fs_context *fc)
 {
struct inode *inode = NULL;
struct dentry *root;
@@ -226,10 +227,19 @@ static int efivarfs_fill_super(struct super_block *sb, 
void *data, int silent)
return err;
 }
 
-static struct dentry *efivarfs_mount(struct file_system_type *fs_type,
-   int flags, const char *dev_name, void *data)
+static int efivarfs_get_tree(struct fs_context *fc)
 {
-   return mount_single(fs_type, flags, data, efivarfs_fill_super);
+   return vfs_get_super(fc, vfs_get_single_super, efivarfs_fill_super);
+}
+
+static const struct fs_context_operations efivarfs_context_ops = {
+   .get_tree   = efivarfs_get_tree,
+};
+
+static int efivarfs_init_fs_context(struct fs_context *fc)
+{
+   fc->ops = _context_ops;
+   return 0;
 }
 
 static void efivarfs_kill_sb(struct super_block *sb)
@@ -244,7 +254,7 @@ static void efivarfs_kill_sb(struct super_block *sb)
 static struct file_system_type efivarfs_type = {
.owner   = THIS_MODULE,
.name= "efivarfs",
-   .mount   = efivarfs_mount,
+   .init_fs_context = efivarfs_init_fs_context,
.kill_sb = efivarfs_kill_sb,
 };
 



Re: Add support for TCG2 log format on UEFI systems

2019-03-14 Thread Jarkko Sakkinen
On Wed, Feb 27, 2019 at 12:26:54PM -0800, Matthew Garrett wrote:
> Identical to V4, but based on tpmdd-next

This is not found /sys/kernel/security/tpm0/ascii_bios_measurements

But still

[0.00] efi:  ACPI 2.0=0x69ca2000  ACPI=0x69ca2000  
TPMFinalLog=0x69ce4000  SMBIOS=0x69f63000  SMBIOS 3.0=0x69f62000  
ESRT=0x69f3e818  MEMATTR=0x63448018

Tried this with too machines now.

I wonder if anyone else has had success...

/Jarkko