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]
Date:   Sun, 23 Apr 2023 20:52:45 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Yifan Hong <elsk@...gle.com>
Cc:     Nicolas Schier <nicolas@...sle.eu>,
        Thomas Weißschuh <linux@...ssschuh.net>,
        Matthias Maennich <maennich@...gle.com>,
        Daniel Mentz <danielmentz@...gle.com>, kernel-team@...roid.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kheaders: Follow symlinks to source files.

On Thu, Apr 20, 2023 at 10:01 AM Yifan Hong <elsk@...gle.com> wrote:
>
> When the kernel is built inside a sandbox container,
> a forest of symlinks to the source files may be
> created in the container. In this case, the generated
> kheaders.tar.xz should follow these symlinks
> to access the source files, instead of packing
> the symlinks themselves.
>
> Signed-off-by: Yifan Hong <elsk@...gle.com>
> Reviewed-by: Matthias Maennich <maennich@...gle.com>



Please teach me how to reproduce your problem.



I built the kernel inside a container,
but I do not see any difference.



We have some symbolic links in include/,
but those reference relative paths.
How building the kernel in a container
makes a difference?


masahiro@...c2c958b53:/tmp/foo$ tar Jxf kheaders_data.tar.xz
masahiro@...c2c958b53:/tmp/foo$ find . -type l
./include/dt-bindings/clock/qcom,dispcc-sm8350.h
./include/dt-bindings/clock/qcom,dispcc-sm8150.h
./include/dt-bindings/input/linux-event-codes.h
masahiro@...c2c958b53:/tmp/foo$ find . -type l | xargs ls -l
lrwxrwxrwx 1 masahiro masahiro 20 Apr 23 11:47
./include/dt-bindings/clock/qcom,dispcc-sm8150.h ->
qcom,dispcc-sm8250.h
lrwxrwxrwx 1 masahiro masahiro 20 Apr 23 11:47
./include/dt-bindings/clock/qcom,dispcc-sm8350.h ->
qcom,dispcc-sm8250.h
lrwxrwxrwx 1 masahiro masahiro 36 Apr 23 11:47
./include/dt-bindings/input/linux-event-codes.h ->
../../uapi/linux/input-event-codes.h












> ---
>  kernel/gen_kheaders.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
> index 1ef9a87511f5..70a75a9a7535 100755
> --- a/kernel/gen_kheaders.sh
> +++ b/kernel/gen_kheaders.sh
> @@ -87,7 +87,7 @@ find $cpio_dir -type f -print0 |
>  # pre-sorted, as --sort=name might not be available.
>  find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \
>      tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
> -    --owner=0 --group=0 --numeric-owner --no-recursion \
> +    --owner=0 --group=0 --numeric-owner --no-recursion --dereference \
>      -I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null
>
>  echo $headers_md5 > kernel/kheaders.md5
> --
> 2.40.0.634.g4ca3ef3211-goog
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ