lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 14 Oct 2014 08:41:00 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Valdis Kletnieks <Valdis.Kletnieks@...edu>
Cc:	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH[ fix duplicate console-efi entries in pstore

On Sun, Oct 12, 2014 at 8:09 PM, Valdis Kletnieks
<Valdis.Kletnieks@...edu> wrote:
> The pstore filesystem still creates duplicate filename/inode pairs for
> some pstore types.  Add the id to the filename to prevent that.

Looks good to me, thanks!

Acked-by: Kees Cook <keescook@...omium.org>

-Kees

>
> Before patch:
>
> [/sys/fs/pstore] ls -li
> total 0
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
> 1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
>
>
> After:
>
> [/sys/fs/pstore] ls -li
> total 0
> 1232 -r--r--r--. 1 root root 148 Sep 29 17:09 console-efi-141202499100000
> 1231 -r--r--r--. 1 root root  67 Sep 29 17:09 console-efi-141202499200000
> 1230 -r--r--r--. 1 root root 148 Sep 29 17:44 console-efi-141202705400000
> 1229 -r--r--r--. 1 root root  67 Sep 29 17:44 console-efi-141202705500000
> 1228 -r--r--r--. 1 root root  67 Sep 29 20:42 console-efi-141203772600000
> 1227 -r--r--r--. 1 root root 148 Sep 29 23:42 console-efi-141204854900000
> 1226 -r--r--r--. 1 root root  67 Sep 29 23:42 console-efi-141204855000000
> 1225 -r--r--r--. 1 root root 148 Sep 29 23:59 console-efi-141204954200000
> 1224 -r--r--r--. 1 root root  67 Sep 29 23:59 console-efi-141204954400000
>
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>
>
> --- linux-next/fs/pstore/inode.c.orig   2014-10-03 23:58:00.440386528 -0400
> +++ linux-next/fs/pstore/inode.c        2014-10-09 17:50:50.613829841 -0400
> @@ -320,10 +320,10 @@ int pstore_mkfile(enum pstore_type_id ty
>                                                 compressed ? ".enc.z" : "");
>                 break;
>         case PSTORE_TYPE_CONSOLE:
> -               sprintf(name, "console-%s", psname);
> +               sprintf(name, "console-%s-%lld", psname, id);
>                 break;
>         case PSTORE_TYPE_FTRACE:
> -               sprintf(name, "ftrace-%s", psname);
> +               sprintf(name, "ftrace-%s-%lld", psname, id);
>                 break;
>         case PSTORE_TYPE_MCE:
>                 sprintf(name, "mce-%s-%lld", psname, id);
>



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ