This change adds a few initial efivarfs tests to the
tools/testing/selftests directory.
The open-unlink test is based on code from
Lingzhu Xiang .
Signed-off-by: Jeremy Kerr
---
tools/testing/selftests/Makefile |2
tools/testing/selftests/efivarfs/Makefile | 12
Signed-off-by: Jeremy Kerr
---
tools/testing/selftests/efivarfs/efivarfs.sh | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh
b/tools/testing/selftests/efivarfs/efivarfs.sh
index e8c0d27..3af4b37 100755
--- a/tools/testing
Signed-off-by: Jeremy Kerr j...@ozlabs.org
---
tools/testing/selftests/efivarfs/efivarfs.sh | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh
b/tools/testing/selftests/efivarfs/efivarfs.sh
index e8c0d27..3af4b37 100755
--- a/tools
This change adds a few initial efivarfs tests to the
tools/testing/selftests directory.
The open-unlink test is based on code from
Lingzhu Xiang lxi...@redhat.com.
Signed-off-by: Jeremy Kerr j...@ozlabs.org
---
tools/testing/selftests/Makefile |2
tools/testing/selftests
covered by these.
Cheers,
Jeremy
--
v2: Remove qemu check, add a couple of tests
v3: Change expected empty read() behaviour to return EOF
---
Jeremy Kerr (3):
selftests: Add tests for efivarfs
selftests/efivarfs: Add empty file creation test
selftests/efivarfs: Add create-read
Test that reads from a newly-created efivarfs file (with no data
written) will return EOF.
Signed-off-by: Jeremy Kerr j...@ozlabs.org
---
tools/testing/selftests/efivarfs/Makefile |2
tools/testing/selftests/efivarfs/create-read.c | 38 +
tools/testing/selftests
ock *sb)
{
kill_litter_super(sb);
efivarfs_sb = NULL;
}
Which I believe will clean them up.
Awesome, thanks for that. Looks good to me.
Acked-by: Jeremy Kerr
Cheers,
Jeremy Kerr
--
To unsubscribe from this list: send the line "unsubscribe linux-efi&
)
{
kill_litter_super(sb);
efivarfs_sb = NULL;
}
Which I believe will clean them up.
Awesome, thanks for that. Looks good to me.
Acked-by: Jeremy Kerr jeremy.k...@canonical.com
Cheers,
Jeremy Kerr
--
To unsubscribe from this list: send the line unsubscribe linux
Hi Greg,
Should this be backported to the stable kernels?
No, the efivarfs code that this touches was only recently committed; it
won't be in any of the stable series.
Cheers,
Jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to
Hi Andy,
Looks good. Thanks for taking the time to review the efivarfs changes.
Acked-by: Jeremy Kerr
Cheers,
Jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo inf
Hi Andy,
When d_make_root() fails it will automatically drop the reference
on the root inode. We should not be doing so as well.
Looks good:
Acked-by: Jeremy Kerr
Cheers,
Jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of
Hi Andy,
@@ -969,16 +970,18 @@
return -ENOMEM;
list_for_each_entry_safe(entry, n, >list, list) {
- struct inode *inode;
struct dentry *dentry, *root = efivarfs_sb->s_root;
- char *name;
unsigned long size = 0;
Hi Andy,
d_alloc_name() copies the passed name to new storage, once complete we
no longer need our name.
Acked-by: Jeremy Kerr
Cheers,
Jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More
Hi Andy,
> Signed-off-by: Andy Whitcroft
> ---
> drivers/firmware/efivars.c |6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Looks good to me.
Acked-by: Jeremy Kerr
Cheers,
Jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux
rfs paths.
Signed-off-by: Jeremy Kerr
---
drivers/firmware/efivars.c | 68 +++--
1 file changed, 43 insertions(+), 25 deletions(-)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 5765664..a86eb55 100644
--- a/drivers/firmware/efivar
paths.
Signed-off-by: Jeremy Kerr jeremy.k...@canonical.com
---
drivers/firmware/efivars.c | 68 +++--
1 file changed, 43 insertions(+), 25 deletions(-)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 5765664..a86eb55 100644
Hi Andy,
Signed-off-by: Andy Whitcroft a...@canonical.com
---
drivers/firmware/efivars.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Looks good to me.
Acked-by: Jeremy Kerr jeremy.k...@canonical.com
Cheers,
Jeremy
--
To unsubscribe from this list: send the line
Hi Andy,
d_alloc_name() copies the passed name to new storage, once complete we
no longer need our name.
Acked-by: Jeremy Kerr jeremy.k...@canonical.com
Cheers,
Jeremy
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
Hi Andy,
@@ -969,16 +970,18 @@
return -ENOMEM;
list_for_each_entry_safe(entry, n, efivars-list, list) {
- struct inode *inode;
struct dentry *dentry, *root = efivarfs_sb-s_root;
- char *name;
unsigned long size
Hi Andy,
When d_make_root() fails it will automatically drop the reference
on the root inode. We should not be doing so as well.
Looks good:
Acked-by: Jeremy Kerr jeremy.k...@canonical.com
Cheers,
Jeremy
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
Hi Andy,
Looks good. Thanks for taking the time to review the efivarfs changes.
Acked-by: Jeremy Kerr jeremy.k...@canonical.com
Cheers,
Jeremy
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info
Hi Greg,
Should this be backported to the stable kernels?
No, the efivarfs code that this touches was only recently committed; it
won't be in any of the stable series.
Cheers,
Jeremy
--
To unsubscribe from this list: send the line unsubscribe linux-efi in
the body of a message to
Hi Joey,
Since more people prefer to use "efivarfs", so, I modified the patch for
replace "efivars" to "efivarfs" like following:
I'd intentionally left this patch as-is. I think that the filesystem
should be called "efivarfs", while the directory should be called
"efivars". Same style as
datasize).
This change re-reads the updated variable from firmware, to check for
size changes and deletions. In the latter case, we need to drop the
dentry.
Signed-off-by: Jeremy Kerr
---
drivers/firmware/efivars.c | 49 +
1 file changed, 39 insertions(+), 10
for this. So,
instead, let's add a filesystem. Variables can be read, written and
created, with the first 4 bytes of each variable representing its UEFI
attributes. The create() method doesn't actually commit to flash since
zero-length variables can't exist per-spec.
Updates from Jeremy Kerr .
Signed
From: Lee, Chun-Yi
UEFI variable filesystem need a new mount point, so this patch add
efivars kobject to efi_kobj for create a /sys/firmware/efi/efivars
folder.
Cc: Matt Fleming
Cc: Jeremy Kerr
Cc: Matthew Garrett
Cc: H. Peter Anvin
Signed-off-by: Lee, Chun-Yi
Signed-off-by: Jeremy Kerr
From: Lee, Chun-Yi joeyli.ker...@gmail.com
UEFI variable filesystem need a new mount point, so this patch add
efivars kobject to efi_kobj for create a /sys/firmware/efi/efivars
folder.
Cc: Matt Fleming matt.flem...@intel.com
Cc: Jeremy Kerr jeremy.k...@canonical.com
Cc: Matthew Garrett m
Kerr jeremy.k...@canonical.com.
Signed-off-by: Matthew Garrett m...@redhat.com
Signed-off-by: Jeremy Kerr jeremy.k...@canonical.com
---
drivers/firmware/efivars.c | 384 -
include/linux/efi.h|5
2 files changed, 383 insertions(+), 6 deletions
datasize).
This change re-reads the updated variable from firmware, to check for
size changes and deletions. In the latter case, we need to drop the
dentry.
Signed-off-by: Jeremy Kerr jeremy.k...@canonical.com
---
drivers/firmware/efivars.c | 49 +
1 file
Hi Joey,
Since more people prefer to use efivarfs, so, I modified the patch for
replace efivars to efivarfs like following:
I'd intentionally left this patch as-is. I think that the filesystem
should be called efivarfs, while the directory should be called
efivars. Same style as sysfs -
Hi Matt,
Jeremy, did you want to pick this up as part of your series?
I have this in my series, yes. I'm just working on the authenticated
delete code, then will send out the next revision.
Speaking of which - Peter: I've realised that doing a GetVariable()
after the SetVariable is a much
Hi Matt,
Jeremy, did you want to pick this up as part of your series?
I have this in my series, yes. I'm just working on the authenticated
delete code, then will send out the next revision.
Speaking of which - Peter: I've realised that doing a GetVariable()
after the SetVariable is a much
Hi Matt,
I think this is the problematic chunk of code,
static int efivars_unlink(struct inode *dir, struct dentry *dentry)
{
struct efivar_entry *var = dentry->d_inode->i_private;
struct efivars *efivars = var->efivars;
efi_status_t status;
Hi Matt,
Am I correct in thinking that this filesystem doesn't handle deletion of
authenticated variables?
Unless I'm missing something, this should work fine; we just pass the
EFI_VARIABLE_AUTHENTICATION_2 descriptor (with the usual attribute
header), but no data following the descriptor.
for this. So,
instead, let's add a filesystem. Variables can be read, written and
created, with the first 4 bytes of each variable representing its UEFI
attributes. The create() method doesn't actually commit to flash since
zero-length variables can't exist per-spec.
Updates from Jeremy Kerr .
Signed
Kerr jeremy.k...@canonical.com.
Signed-off-by: Matthew Garrett m...@redhat.com
Signed-off-by: Jeremy Kerr jeremy.k...@canonical.com
---
v2: Add check for 4-byte writes
---
drivers/firmware/efivars.c | 384 -
include/linux/efi.h|5
2 files
Hi Matt,
Am I correct in thinking that this filesystem doesn't handle deletion of
authenticated variables?
Unless I'm missing something, this should work fine; we just pass the
EFI_VARIABLE_AUTHENTICATION_2 descriptor (with the usual attribute
header), but no data following the descriptor.
Hi Matt,
I think this is the problematic chunk of code,
static int efivars_unlink(struct inode *dir, struct dentry *dentry)
{
struct efivar_entry *var = dentry-d_inode-i_private;
struct efivars *efivars = var-efivars;
efi_status_t status;
Hi hpa,
> Well, appending is an action, not really a property of the variable
> that sticks around, no?
True, but they're still all defined as the same thing in the UEFI spec.
If you're looking to define which attributes to pass, you now need to
know the extra information that you pass most of
hi hpa,
> Wouldn't that be better handled by O_APPEND?
Possibly, but this then means that there are now two "interfaces" that
specify the variable attributes.
[Also, in that case we should support the same mechanism through open();
llseek(0, SEEK_END) then, right?]
In general, I think the
hi hpa,
Wouldn't that be better handled by O_APPEND?
Possibly, but this then means that there are now two interfaces that
specify the variable attributes.
[Also, in that case we should support the same mechanism through open();
llseek(0, SEEK_END) then, right?]
In general, I think the
Hi hpa,
Well, appending is an action, not really a property of the variable
that sticks around, no?
True, but they're still all defined as the same thing in the UEFI spec.
If you're looking to define which attributes to pass, you now need to
know the extra information that you pass most of the
Hi hpa,
Thanks for the review!
However, I have a question... rather than putting the attributes as the
first data bytes, would it be better to make it either part of the
filename (assuming there is at least one character other than / which
can be reasonably relied upon to not be part of the
Hi hpa,
Thanks for the review!
However, I have a question... rather than putting the attributes as the
first data bytes, would it be better to make it either part of the
filename (assuming there is at least one character other than / which
can be reasonably relied upon to not be part of the
Hi Andrew,
> Perhaps export it from within a powerpc-specific C file (along with
> suitable comment) to prevent people from generally relying upon the
> export?
Even better, I'll export it from a Cell-specific C file. I'll follow
this up in my own spufs series for .25.
Cheers,
Jeremy
-
Hi Andrew,
Perhaps export it from within a powerpc-specific C file (along with
suitable comment) to prevent people from generally relying upon the
export?
Even better, I'll export it from a Cell-specific C file. I'll follow
this up in my own spufs series for .25.
Cheers,
Jeremy
-
To
This change allows force_sig_info to be called from modules.
Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
--
Any objections to exporting this symbol? I'm planning to move some
SPU fault-handling code from the kernel to the spufs.ko object.
---
kernel/signal.c |1 +
1 file chan
This change allows force_sig_info to be called from modules.
Signed-off-by: Jeremy Kerr [EMAIL PROTECTED]
--
Any objections to exporting this symbol? I'm planning to move some
SPU fault-handling code from the kernel to the spufs.ko object.
---
kernel/signal.c |1 +
1 file changed, 1
Hi Michael,
This series looks good to me, thanks for the fixes. I'll do some testing
tomorrow but it looks like it'll be fine as-is.
Andrew - almost all of these are for spufs, the notable exception being:
[PATCH 12/15] Cleanup ELF coredump extra notes logic
which touches the generic
Hi Michael,
This series looks good to me, thanks for the fixes. I'll do some testing
tomorrow but it looks like it'll be fine as-is.
Andrew - almost all of these are for spufs, the notable exception being:
[PATCH 12/15] Cleanup ELF coredump extra notes logic
which touches the generic
> Mismerge in
> commit 8b6f50ef1d5cc86b278eb42bc91630fad455fb10
> Author: Jeremy Kerr <[EMAIL PROTECTED]>
> Date: Sat Jul 21 04:37:51 2007 -0700
> spufs: make signal-notification files readonly for NOSCHED
> contexts
>
> structs got duplicated.
>
Mismerge in
commit 8b6f50ef1d5cc86b278eb42bc91630fad455fb10
Author: Jeremy Kerr [EMAIL PROTECTED]
Date: Sat Jul 21 04:37:51 2007 -0700
spufs: make signal-notification files readonly for NOSCHED
contexts
structs got duplicated.
Signed-off-by: Al Viro [EMAIL PROTECTED]
Yep
101 - 152 of 152 matches
Mail list logo