* [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst
@ 2024-06-10 5:21 Dragan Simic
2024-06-10 15:18 ` Nicolas Schier
2024-06-10 22:29 ` Masahiro Yamada
0 siblings, 2 replies; 4+ messages in thread
From: Dragan Simic @ 2024-06-10 5:21 UTC (permalink / raw)
To: linux-kbuild
Cc: masahiroy, nathan, nicolas, linux-kernel, gregkh,
Diederik de Haas, stable
The compiled dtb files aren't executable, so install them with 0644 as their
permission mode, instead of defaulting to 0755 for the permission mode and
installing them with the executable bits set.
Some Linux distributions, including Debian, [1][2][3] already include fixes
in their kernel package build recipes to change the dtb file permissions to
0644 in their kernel packages. These changes, when additionally propagated
into the long-term kernel versions, will allow such distributions to remove
their downstream fixes.
[1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/642
[2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/749
[3] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/rules.real?ref_type=heads#L193
Cc: Diederik de Haas <didi.debian@cknow.org>
Cc: stable@vger.kernel.org
Fixes: aefd80307a05 ("kbuild: refactor Makefile.dtbinst more")
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
Notes:
Changes in v2:
- Improved the patch description, to include additional details and
to address the patch submission issues pointed out by Greg K-H [4]
- No changes were made to the patch itself
Link to v1: https://lore.kernel.org/linux-kbuild/ae087ef1715142f606ba6477ace3e4111972cf8b.1717961381.git.dsimic@manjaro.org/T/#u
[4] https://lore.kernel.org/linux-kbuild/2024061006-ladylike-paving-a36b@gregkh/
scripts/Makefile.dtbinst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 67956f6496a5..9d920419a62c 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -17,7 +17,7 @@ include $(srctree)/scripts/Kbuild.include
dst := $(INSTALL_DTBS_PATH)
quiet_cmd_dtb_install = INSTALL $@
- cmd_dtb_install = install -D $< $@
+ cmd_dtb_install = install -D -m 0644 $< $@
$(dst)/%: $(obj)/%
$(call cmd,dtb_install)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst
2024-06-10 5:21 [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst Dragan Simic
@ 2024-06-10 15:18 ` Nicolas Schier
2024-06-10 22:29 ` Masahiro Yamada
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Schier @ 2024-06-10 15:18 UTC (permalink / raw)
To: Dragan Simic
Cc: linux-kbuild, masahiroy, nathan, linux-kernel, gregkh,
Diederik de Haas, stable
[-- Attachment #1: Type: text/plain, Size: 2197 bytes --]
On Mon, Jun 10, 2024 at 07:21:12AM +0200 Dragan Simic wrote:
> The compiled dtb files aren't executable, so install them with 0644 as their
> permission mode, instead of defaulting to 0755 for the permission mode and
> installing them with the executable bits set.
>
> Some Linux distributions, including Debian, [1][2][3] already include fixes
> in their kernel package build recipes to change the dtb file permissions to
> 0644 in their kernel packages. These changes, when additionally propagated
> into the long-term kernel versions, will allow such distributions to remove
> their downstream fixes.
>
> [1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/642
> [2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/749
> [3] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/rules.real?ref_type=heads#L193
>
> Cc: Diederik de Haas <didi.debian@cknow.org>
> Cc: stable@vger.kernel.org
> Fixes: aefd80307a05 ("kbuild: refactor Makefile.dtbinst more")
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
>
> Notes:
> Changes in v2:
> - Improved the patch description, to include additional details and
> to address the patch submission issues pointed out by Greg K-H [4]
> - No changes were made to the patch itself
>
> Link to v1: https://lore.kernel.org/linux-kbuild/ae087ef1715142f606ba6477ace3e4111972cf8b.1717961381.git.dsimic@manjaro.org/T/#u
>
> [4] https://lore.kernel.org/linux-kbuild/2024061006-ladylike-paving-a36b@gregkh/
>
> scripts/Makefile.dtbinst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
> index 67956f6496a5..9d920419a62c 100644
> --- a/scripts/Makefile.dtbinst
> +++ b/scripts/Makefile.dtbinst
> @@ -17,7 +17,7 @@ include $(srctree)/scripts/Kbuild.include
> dst := $(INSTALL_DTBS_PATH)
>
> quiet_cmd_dtb_install = INSTALL $@
> - cmd_dtb_install = install -D $< $@
> + cmd_dtb_install = install -D -m 0644 $< $@
>
> $(dst)/%: $(obj)/%
> $(call cmd,dtb_install)
Thanks for the patch.
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst
2024-06-10 5:21 [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst Dragan Simic
2024-06-10 15:18 ` Nicolas Schier
@ 2024-06-10 22:29 ` Masahiro Yamada
2024-06-11 0:51 ` Dragan Simic
1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2024-06-10 22:29 UTC (permalink / raw)
To: Dragan Simic
Cc: linux-kbuild, nathan, nicolas, linux-kernel, gregkh,
Diederik de Haas, stable
On Mon, Jun 10, 2024 at 2:21 PM Dragan Simic <dsimic@manjaro.org> wrote:
>
> The compiled dtb files aren't executable, so install them with 0644 as their
> permission mode, instead of defaulting to 0755 for the permission mode and
> installing them with the executable bits set.
>
> Some Linux distributions, including Debian, [1][2][3] already include fixes
> in their kernel package build recipes to change the dtb file permissions to
> 0644 in their kernel packages. These changes, when additionally propagated
> into the long-term kernel versions, will allow such distributions to remove
> their downstream fixes.
>
> [1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/642
> [2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/749
> [3] https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/rules.real?ref_type=heads#L193
The 'master' is a moving target.
The line 193 in the future may not point to the correct position
I changed it to this.
[3] https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.8.12-1/debian/rules.real#L193
This references the line 193 from the 'debian/6.8.12-1' tag.
Applied to linux-kbuild.
Thanks!
> Cc: Diederik de Haas <didi.debian@cknow.org>
> Cc: stable@vger.kernel.org
> Fixes: aefd80307a05 ("kbuild: refactor Makefile.dtbinst more")
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
>
> Notes:
> Changes in v2:
> - Improved the patch description, to include additional details and
> to address the patch submission issues pointed out by Greg K-H [4]
> - No changes were made to the patch itself
>
> Link to v1: https://lore.kernel.org/linux-kbuild/ae087ef1715142f606ba6477ace3e4111972cf8b.1717961381.git.dsimic@manjaro.org/T/#u
>
> [4] https://lore.kernel.org/linux-kbuild/2024061006-ladylike-paving-a36b@gregkh/
>
> scripts/Makefile.dtbinst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
> index 67956f6496a5..9d920419a62c 100644
> --- a/scripts/Makefile.dtbinst
> +++ b/scripts/Makefile.dtbinst
> @@ -17,7 +17,7 @@ include $(srctree)/scripts/Kbuild.include
> dst := $(INSTALL_DTBS_PATH)
>
> quiet_cmd_dtb_install = INSTALL $@
> - cmd_dtb_install = install -D $< $@
> + cmd_dtb_install = install -D -m 0644 $< $@
>
> $(dst)/%: $(obj)/%
> $(call cmd,dtb_install)
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst
2024-06-10 22:29 ` Masahiro Yamada
@ 2024-06-11 0:51 ` Dragan Simic
0 siblings, 0 replies; 4+ messages in thread
From: Dragan Simic @ 2024-06-11 0:51 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, nathan, nicolas, linux-kernel, gregkh,
Diederik de Haas, stable
Hello Masahiro,
On 2024-06-11 00:29, Masahiro Yamada wrote:
> On Mon, Jun 10, 2024 at 2:21 PM Dragan Simic <dsimic@manjaro.org>
> wrote:
>>
>> The compiled dtb files aren't executable, so install them with 0644 as
>> their
>> permission mode, instead of defaulting to 0755 for the permission mode
>> and
>> installing them with the executable bits set.
>>
>> Some Linux distributions, including Debian, [1][2][3] already include
>> fixes
>> in their kernel package build recipes to change the dtb file
>> permissions to
>> 0644 in their kernel packages. These changes, when additionally
>> propagated
>> into the long-term kernel versions, will allow such distributions to
>> remove
>> their downstream fixes.
>>
>> [1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/642
>> [2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/749
>> [3]
>> https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/rules.real?ref_type=heads#L193
>
> The 'master' is a moving target.
>
> The line 193 in the future may not point to the correct position
>
> I changed it to this.
>
> [3]
> https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.8.12-1/debian/rules.real#L193
>
> This references the line 193 from the 'debian/6.8.12-1' tag.
Good point, it preserves this reference for the future. The same
thoughts crossed my mind after I sent the patch, but I didn't want
to make noise about it. Thanks for the fix.
> Applied to linux-kbuild.
> Thanks!
Great, thanks!
>> Cc: Diederik de Haas <didi.debian@cknow.org>
>> Cc: stable@vger.kernel.org
>> Fixes: aefd80307a05 ("kbuild: refactor Makefile.dtbinst more")
>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>> ---
>>
>> Notes:
>> Changes in v2:
>> - Improved the patch description, to include additional details
>> and
>> to address the patch submission issues pointed out by Greg K-H
>> [4]
>> - No changes were made to the patch itself
>>
>> Link to v1:
>> https://lore.kernel.org/linux-kbuild/ae087ef1715142f606ba6477ace3e4111972cf8b.1717961381.git.dsimic@manjaro.org/T/#u
>>
>> [4]
>> https://lore.kernel.org/linux-kbuild/2024061006-ladylike-paving-a36b@gregkh/
>>
>> scripts/Makefile.dtbinst | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
>> index 67956f6496a5..9d920419a62c 100644
>> --- a/scripts/Makefile.dtbinst
>> +++ b/scripts/Makefile.dtbinst
>> @@ -17,7 +17,7 @@ include $(srctree)/scripts/Kbuild.include
>> dst := $(INSTALL_DTBS_PATH)
>>
>> quiet_cmd_dtb_install = INSTALL $@
>> - cmd_dtb_install = install -D $< $@
>> + cmd_dtb_install = install -D -m 0644 $< $@
>>
>> $(dst)/%: $(obj)/%
>> $(call cmd,dtb_install)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-11 0:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10 5:21 [PATCH v2] kbuild: Install dtb files as 0644 in Makefile.dtbinst Dragan Simic
2024-06-10 15:18 ` Nicolas Schier
2024-06-10 22:29 ` Masahiro Yamada
2024-06-11 0:51 ` Dragan Simic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox