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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e90603ee-61e0-4530-34dc-087e40c94aa1@linux.com>
Date:   Thu, 19 Aug 2021 23:51:43 +0300
From:   Denis Efremov <efremov@...ux.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-block@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Jiri Kosina <jkosina@...e.cz>, Willy Tarreau <w@....eu>
Subject: Re: [RFC PATCH 2/5] gen_initramfs.sh: use absolute path for
 gen_init_cpio



On 8/19/21 3:24 AM, Masahiro Yamada wrote:
> On Thu, Aug 19, 2021 at 12:47 AM Denis Efremov <efremov@...ux.com> wrote:
>>
>> Use absolute path to call gen_init_cpio. This allows one
>> to use gen_initramfs.sh from any directory.
> 
> I do not mind this, but $(dirname "$0")
> is not necessarily an absolute path, is it?
> 
> 
> I added test code:
> 
>    echo dirname is $(dirname $0)
> 
> in this script, and I saw
> 
>    dirname is usr

Oh, sorry, commit message is wrong. Would that be ok for you if I will change
it in v2 to something like:

Prepend gen_init_cpio call with the same path as gen_initramfs.sh called. This
allows one to use gen_initramfs.sh from any directory, not only from the
kernel's topdir.

> 
> 
> 
> 
>>
>> Cc: Masahiro Yamada <masahiroy@...nel.org>
>> Signed-off-by: Denis Efremov <efremov@...ux.com>
>> ---
>>  usr/gen_initramfs.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/usr/gen_initramfs.sh b/usr/gen_initramfs.sh
>> index 63476bb70b41..2e4a86181c79 100755
>> --- a/usr/gen_initramfs.sh
>> +++ b/usr/gen_initramfs.sh
>> @@ -244,4 +244,4 @@ if test -n "$KBUILD_BUILD_TIMESTAMP"; then
>>                 timestamp="-t $timestamp"
>>         fi
>>  fi
>> -usr/gen_init_cpio $timestamp $cpio_list > $output
>> +"$(dirname "$0")"/gen_init_cpio $timestamp $cpio_list > $output
>> --
>> 2.31.1
>>
> 
> 
> --
> Best Regards
> Masahiro Yamada
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ