From mboxrd@z Thu Jan 1 00:00:00 1970 From: joeyli Subject: Re: [PATCH] efivars: allow efi pstore variable when validate filename Date: Tue, 12 Mar 2013 11:06:19 +0800 Message-ID: <1363057579.13754.46.camel@linux-s257.site> References: <1363028428-27976-1-git-send-email-jlee@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1363028428-27976-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Seiji Aguchi , Matthew Garrett , Al Viro , Lingzhu Xiang List-Id: linux-efi@vger.kernel.org Hi Matt,=20 Sorry for I didn't aware your 123abd76edf patch fixed issue. Please ignore my patch. Thanks a lot! Joey Lee =E6=96=BC =E4=BA=8C=EF=BC=8C2013-03-12 =E6=96=BC 03:00 +0800=EF=BC=8CLe= e, Chun-Yi =E6=8F=90=E5=88=B0=EF=BC=9A > We mount efivarfs fail after pstore generated 'dump-type*' variables = and > reboot. >=20 > This issue introduced by commit 47f531e8ba3bc3901a0c493f4252826c41dea= 1a1 > (efivarfs: Validate filenames much more aggressively) >=20 > The pstore variable is 'dump-type*-*-*-*-GUID'style, it could not pas= s > the "GUID should be right after the first '-'" check. This patch allo= w > the variable name that has 'dump-type' pass the name check. >=20 > Cc: Matt Fleming > Cc: Seiji Aguchi > Cc: Matthew Garrett > Cc: Al Viro > Cc: Lingzhu Xiang > Signed-off-by: Lee, Chun-Yi > --- > drivers/firmware/efivars.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > 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; > =20 > /* GUID should be right after the first '-' */ > - if (s - 1 !=3D strchr(str, '-')) > + if (s - 1 !=3D strchr(str, '-') && !strstarts(str, "dump-type")) > return false; > =20 > /*