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, 21 Aug 2018 00:03:08 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Andrzej Pietrasiewicz <andrzej.p@...sung.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bjørn Forsman <bjorn.forsman@...il.com>
Subject: Re: [PATCH] kbuild: make sorting initramfs contents independent of locale

2018-08-17 21:03 GMT+09:00 Andrzej Pietrasiewicz <andrzej.p@...sung.com>:
> Some LANG values (e.g. pl_PL.UTF-8) cause the sort command to output
> files before their parent directories, which makes them inaccessible for
> the kernel. In other words, when the kernel populates the rootfs, it is
> unable to create files whose parent directories have not been yet created.
>
> This patch makes sorting use the default (LANG=C) locale, which results in
> correctly laid out initramfs images (parent directories before files).
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...sung.com>
> ---


Applied to linux-kbuild. Thanks!


>  scripts/gen_initramfs_list.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
> index 10e528b..0aad760 100755
> --- a/scripts/gen_initramfs_list.sh
> +++ b/scripts/gen_initramfs_list.sh
> @@ -174,7 +174,7 @@ dir_filelist() {
>         ${dep_list}header "$1"
>
>         srcdir=$(echo "$1" | sed -e 's://*:/:g')
> -       dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | sort)
> +       dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort)
>
>         # If $dirlist is only one line, then the directory is empty
>         if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
> --
> 2.7.4
>



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ