* [PATCH] efivars: allow efi pstore variable when validate filename
@ 2013-03-11 18:57 Lee, Chun-Yi
0 siblings, 0 replies; 3+ messages in thread
From: Lee, Chun-Yi @ 2013-03-11 18:57 UTC (permalink / raw)
To: matt
Cc: linux-efi, linux-kernel, Lee, Chun-Yi, Seiji Aguchi,
Matthew Garrett, Al Viro, Lingzhu Xiang
We mount efivarfs fail after pstore generated 'dump-type*' variables and
reboot.
This issue introduced by commit 47f531e8ba3bc3901a0c493f4252826c41dea1a1
(efivarfs: Validate filenames much more aggressively)
The pstore variable is 'dump-type*-*-*-*-GUID'style, it could not pass
the "GUID should be right after the first '-'" check. This patch allow
the variable name that has 'dump-type' pass the name check.
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Lingzhu Xiang <lxiang@redhat.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/firmware/efivars.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 3edade0..ab07f7f 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -930,7 +930,7 @@ static bool efivarfs_valid_name(const char *str, int len)
return false;
/* GUID should be right after the first '-' */
- if (s - 1 != strchr(str, '-'))
+ if (s - 1 != strchr(str, '-') && !strstarts(str, "dump-type"))
return false;
/*
--
1.6.4.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] efivars: allow efi pstore variable when validate filename
@ 2013-03-11 19:00 Lee, Chun-Yi
2013-03-12 3:06 ` joeyli
0 siblings, 1 reply; 3+ messages in thread
From: Lee, Chun-Yi @ 2013-03-11 19:00 UTC (permalink / raw)
To: matt.fleming
Cc: linux-efi, linux-kernel, Lee, Chun-Yi, Seiji Aguchi,
Matthew Garrett, Al Viro, Lingzhu Xiang
We mount efivarfs fail after pstore generated 'dump-type*' variables and
reboot.
This issue introduced by commit 47f531e8ba3bc3901a0c493f4252826c41dea1a1
(efivarfs: Validate filenames much more aggressively)
The pstore variable is 'dump-type*-*-*-*-GUID'style, it could not pass
the "GUID should be right after the first '-'" check. This patch allow
the variable name that has 'dump-type' pass the name check.
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Lingzhu Xiang <lxiang@redhat.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
drivers/firmware/efivars.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 3edade0..ab07f7f 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -930,7 +930,7 @@ static bool efivarfs_valid_name(const char *str, int len)
return false;
/* GUID should be right after the first '-' */
- if (s - 1 != strchr(str, '-'))
+ if (s - 1 != strchr(str, '-') && !strstarts(str, "dump-type"))
return false;
/*
--
1.6.4.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] efivars: allow efi pstore variable when validate filename
2013-03-11 19:00 Lee, Chun-Yi
@ 2013-03-12 3:06 ` joeyli
0 siblings, 0 replies; 3+ messages in thread
From: joeyli @ 2013-03-12 3:06 UTC (permalink / raw)
To: matt.fleming
Cc: linux-efi, linux-kernel, Seiji Aguchi, Matthew Garrett, Al Viro,
Lingzhu Xiang
Hi Matt,
Sorry for I didn't aware your 123abd76edf patch fixed issue.
Please ignore my patch.
Thanks a lot!
Joey Lee
於 二,2013-03-12 於 03:00 +0800,Lee, Chun-Yi 提到:
> We mount efivarfs fail after pstore generated 'dump-type*' variables and
> reboot.
>
> This issue introduced by commit 47f531e8ba3bc3901a0c493f4252826c41dea1a1
> (efivarfs: Validate filenames much more aggressively)
>
> The pstore variable is 'dump-type*-*-*-*-GUID'style, it could not pass
> the "GUID should be right after the first '-'" check. This patch allow
> the variable name that has 'dump-type' pass the name check.
>
> Cc: Matt Fleming <matt.fleming@intel.com>
> Cc: Seiji Aguchi <seiji.aguchi@hds.com>
> Cc: Matthew Garrett <mjg59@srcf.ucam.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Lingzhu Xiang <lxiang@redhat.com>
> Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
> ---
> drivers/firmware/efivars.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
> index 3edade0..ab07f7f 100644
> --- a/drivers/firmware/efivars.c
> +++ b/drivers/firmware/efivars.c
> @@ -930,7 +930,7 @@ static bool efivarfs_valid_name(const char *str, int len)
> return false;
>
> /* GUID should be right after the first '-' */
> - if (s - 1 != strchr(str, '-'))
> + if (s - 1 != strchr(str, '-') && !strstarts(str, "dump-type"))
> return false;
>
> /*
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-12 3:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 18:57 [PATCH] efivars: allow efi pstore variable when validate filename Lee, Chun-Yi
-- strict thread matches above, loose matches on Subject: below --
2013-03-11 19:00 Lee, Chun-Yi
2013-03-12 3:06 ` joeyli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox