* [PATCH] Makefile: mrproper deletes signing_key.x509
@ 2025-08-12 2:24 longguang.yue
2025-08-12 9:37 ` Nicolas Schier
0 siblings, 1 reply; 8+ messages in thread
From: longguang.yue @ 2025-08-12 2:24 UTC (permalink / raw)
To: linux-kbuild; +Cc: nathan, nicolas.schier, masahiroy, longguang.yue
delete temporary signing_key.x509
Signed-off-by: longguang.yue <bigclouds@163.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 6bfe776bf3c5..7c45fa8e44ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1589,6 +1589,7 @@ MRPROPER_FILES += include/config include/generated \
.config .config.old .version \
Module.symvers \
certs/signing_key.pem \
+ certs/signing_key.x509 \
certs/x509.genkey \
vmlinux-gdb.py \
rpmbuild \
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-12 2:24 [PATCH] Makefile: mrproper deletes signing_key.x509 longguang.yue
@ 2025-08-12 9:37 ` Nicolas Schier
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Schier @ 2025-08-12 9:37 UTC (permalink / raw)
To: longguang.yue; +Cc: linux-kbuild, nathan, masahiroy
On Tue, Aug 12, 2025 at 10:24:29AM +0800, longguang.yue wrote:
> delete temporary signing_key.x509
>
> Signed-off-by: longguang.yue <bigclouds@163.com>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 6bfe776bf3c5..7c45fa8e44ef 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1589,6 +1589,7 @@ MRPROPER_FILES += include/config include/generated \
> .config .config.old .version \
> Module.symvers \
> certs/signing_key.pem \
> + certs/signing_key.x509 \
> certs/x509.genkey \
> vmlinux-gdb.py \
> rpmbuild \
> --
> 2.34.1
signing_key.x509 is part of 'targets' make variable in certs/Makefile
and thus removed during 'make clean'. As 'clean' is a dependency of
'mrproper', it always runs before. Cp. [1].
Can you please re-check, if you can reproduce this on your site:
$ touch certs/signing_key.x509
$ ls certs/signing_key.x509
certs/signing_key.x509
$ make clean
CLEAN certs
$ ls certs/signing_key.x509
ls: cannot access 'certs/signing_key.x509': No such file or directory
$ touch certs/signing_key.x509
$ ls certs/signing_key.x509
certs/signing_key.x509
$ make mrproper
CLEAN certs
$ ls certs/signing_key.x509
ls: cannot access 'certs/signing_key.x509': No such file or directory
Kind regards,
Nicolas
[1]: https://git.kernel.org/stable/c/5cca36069d4c2942a46f98f47b9e7160fd547e03
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: mrproper deletes signing_key.x509
@ 2025-08-09 12:04 longguang.yue
2025-08-09 20:11 ` Nicolas Schier
0 siblings, 1 reply; 8+ messages in thread
From: longguang.yue @ 2025-08-09 12:04 UTC (permalink / raw)
To: linux-kbuild; +Cc: nathan, nicolas.schier, masahiroy, longguang.yue
deletes temporary signing_key.x509 and reserves user-defined x509.genkey
Signed-off-by: longguang.yue <bigclouds@163.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 37e37565515e..7ad2679fa1ab 100644
--- a/Makefile
+++ b/Makefile
@@ -1589,7 +1589,7 @@ MRPROPER_FILES += include/config include/generated \
.config .config.old .version \
Module.symvers \
certs/signing_key.pem \
- certs/x509.genkey \
+ certs/signing_key.x509 \
vmlinux-gdb.py \
rpmbuild \
rust/libmacros.so rust/libmacros.dylib
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-09 12:04 longguang.yue
@ 2025-08-09 20:11 ` Nicolas Schier
2025-08-11 6:28 ` longguang.yue
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Schier @ 2025-08-09 20:11 UTC (permalink / raw)
To: longguang.yue; +Cc: linux-kbuild, nathan, masahiroy
On Sat, Aug 09, 2025 at 08:04:05PM +0800 longguang.yue wrote:
> deletes temporary signing_key.x509 and reserves user-defined x509.genkey
can you elaborate the actual problem with some more details?
certs/signing_key.x509 is removed during 'make clean' which is a dependency
of 'mrproper'.
'mrproper' is meant to remove everything that might influence a subsequent
call of kbuild for the sane architecture.
Without further details I cannot see any problem here.
Kind regards,
Nicolas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re:Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-09 20:11 ` Nicolas Schier
@ 2025-08-11 6:28 ` longguang.yue
2025-08-11 13:59 ` Nicolas Schier
0 siblings, 1 reply; 8+ messages in thread
From: longguang.yue @ 2025-08-11 6:28 UTC (permalink / raw)
To: Nicolas Schier; +Cc: linux-kbuild, nathan, masahiroy
Nicolas Schier, Hi:
It should not delete x509.genkey because of its exsitence in gitignore.
Normally, users want to keep a self-defined x509.genkey, but mrproper deletes it, only default_x509.genkey is effective.
After applying this patch, users just need to copy self-defined x509.genkey into certs directory once.
Thanks.
At 2025-08-10 04:11:57, "Nicolas Schier" <nicolas.schier@linux.dev> wrote:
>On Sat, Aug 09, 2025 at 08:04:05PM +0800 longguang.yue wrote:
>> deletes temporary signing_key.x509 and reserves user-defined x509.genkey
>
>can you elaborate the actual problem with some more details?
>
>certs/signing_key.x509 is removed during 'make clean' which is a dependency
>of 'mrproper'.
>
>'mrproper' is meant to remove everything that might influence a subsequent
>call of kbuild for the sane architecture.
>
>Without further details I cannot see any problem here.
>
>Kind regards,
>Nicolas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-11 6:28 ` longguang.yue
@ 2025-08-11 13:59 ` Nicolas Schier
2025-08-11 19:14 ` Nathan Chancellor
2025-08-12 9:31 ` David Howells
0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Schier @ 2025-08-11 13:59 UTC (permalink / raw)
To: longguang.yue
Cc: linux-kbuild, nathan, masahiroy, David Howells, David Woodhouse,
keyrings
[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]
Cc: certs/ people
[re-ordered quote]
On Mon, Aug 11, 2025 at 02:28:56PM +0800, longguang.yue wrote:
> At 2025-08-10 04:11:57, "Nicolas Schier" <nicolas.schier@linux.dev> wrote:
> > On Sat, Aug 09, 2025 at 08:04:05PM +0800 longguang.yue wrote:
> > > deletes temporary signing_key.x509 and reserves user-defined x509.genkey
> >
> > can you elaborate the actual problem with some more details?
> >
> > certs/signing_key.x509 is removed during 'make clean' which is a dependency
> > of 'mrproper'.
> >
> > 'mrproper' is meant to remove everything that might influence a subsequent
> > call of kbuild for the sane architecture.
> >
> > Without further details I cannot see any problem here.
> >
> > Kind regards,
> > Nicolas
[...]
>
> It should not delete x509.genkey because of its exsitence in gitignore.
> Normally, users want to keep a self-defined x509.genkey, but mrproper deletes it, only default_x509.genkey is effective.
> After applying this patch, users just need to copy self-defined x509.genkey into certs directory once.
'make mrproper' is meant to prepare the source tree to be as pristine as
possible for the given architecture. This includes removal of any
configuration file(s) that influence subsequent builds. From kbuild
point of view, certs/x509.genkey is also a kind of a configuration file,
as leaving it in tree after mrproper creates different build results
compared to a build from a really pristine source tree.
Iff the certs/ maintainers think that retaining a user x509.genkey file
over a mrproper makes sense, then we should probably adjust the rule for
generating $(objtree)/certs/x509.genkey, e.g. by allowing to provide one
by environment variable.
David or David, do you have an opinion on this?
Kind regards,
Nicolas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-11 13:59 ` Nicolas Schier
@ 2025-08-11 19:14 ` Nathan Chancellor
2025-08-12 9:31 ` David Howells
1 sibling, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2025-08-11 19:14 UTC (permalink / raw)
To: Nicolas Schier
Cc: longguang.yue, linux-kbuild, masahiroy, David Howells,
David Woodhouse, keyrings
On Mon, Aug 11, 2025 at 03:59:23PM +0200, Nicolas Schier wrote:
> Cc: certs/ people
>
> [re-ordered quote]
> On Mon, Aug 11, 2025 at 02:28:56PM +0800, longguang.yue wrote:
> > At 2025-08-10 04:11:57, "Nicolas Schier" <nicolas.schier@linux.dev> wrote:
> > > On Sat, Aug 09, 2025 at 08:04:05PM +0800 longguang.yue wrote:
> > > > deletes temporary signing_key.x509 and reserves user-defined x509.genkey
> > >
> > > can you elaborate the actual problem with some more details?
> > >
> > > certs/signing_key.x509 is removed during 'make clean' which is a dependency
> > > of 'mrproper'.
> > >
> > > 'mrproper' is meant to remove everything that might influence a subsequent
> > > call of kbuild for the sane architecture.
> > >
> > > Without further details I cannot see any problem here.
> > >
> > > Kind regards,
> > > Nicolas
> [...]
> >
> > It should not delete x509.genkey because of its exsitence in gitignore.
> > Normally, users want to keep a self-defined x509.genkey, but mrproper deletes it, only default_x509.genkey is effective.
> > After applying this patch, users just need to copy self-defined x509.genkey into certs directory once.
>
> 'make mrproper' is meant to prepare the source tree to be as pristine as
> possible for the given architecture. This includes removal of any
> configuration file(s) that influence subsequent builds. From kbuild
> point of view, certs/x509.genkey is also a kind of a configuration file,
> as leaving it in tree after mrproper creates different build results
> compared to a build from a really pristine source tree.
Agreed, I think it is intentional that this is in mrproper and not
clean, so I don't think we can accept this change as is, but I am happy
to be told otherwise from the certs maintainers.
> Iff the certs/ maintainers think that retaining a user x509.genkey file
> over a mrproper makes sense, then we should probably adjust the rule for
> generating $(objtree)/certs/x509.genkey, e.g. by allowing to provide one
> by environment variable.
>
> David or David, do you have an opinion on this?
Furthermore, if the user wanted to use a predefined x509 configuration,
why can't they generate their own signing key and provide it via
CONFIG_MODULE_SIG_KEY, instead of hijacking the default logic of
certs/signing_key.pem? Based on my reading of certs/Makefile, it sounds
like the default logic is mostly there just for allyesconfig or
randconfig.
Cheers,
Nathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Makefile: mrproper deletes signing_key.x509
2025-08-11 13:59 ` Nicolas Schier
2025-08-11 19:14 ` Nathan Chancellor
@ 2025-08-12 9:31 ` David Howells
1 sibling, 0 replies; 8+ messages in thread
From: David Howells @ 2025-08-12 9:31 UTC (permalink / raw)
To: Nicolas Schier
Cc: dhowells, longguang.yue, linux-kbuild, nathan, masahiroy,
David Woodhouse, keyrings
Nicolas Schier <nicolas.schier@linux.dev> wrote:
> 'make mrproper' is meant to prepare the source tree to be as pristine as
> possible for the given architecture. This includes removal of any
> configuration file(s) that influence subsequent builds. From kbuild
> point of view, certs/x509.genkey is also a kind of a configuration file,
> as leaving it in tree after mrproper creates different build results
> compared to a build from a really pristine source tree.
>
> Iff the certs/ maintainers think that retaining a user x509.genkey file
> over a mrproper makes sense, then we should probably adjust the rule for
> generating $(objtree)/certs/x509.genkey, e.g. by allowing to provide one
> by environment variable.
>
> David or David, do you have an opinion on this?
make distclean or make mrproper should delete the key. As you say, it's
thoroughly cleaning out the source tree - it used to be so that you could more
easily diff it for prepping a patch, I guess. make clean, OTOH, should not.
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: mrproper deletes signing_key.x509
@ 2025-08-07 3:33 longguang.yue
0 siblings, 0 replies; 8+ messages in thread
From: longguang.yue @ 2025-08-07 3:33 UTC (permalink / raw)
To: linux-kernel; +Cc: longguang.yue
deletes temporary signing_key.x509 and reserves user-defined x509.genkey
Signed-off-by: longguang.yue <bigclouds@163.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 37e37565515e..7ad2679fa1ab 100644
--- a/Makefile
+++ b/Makefile
@@ -1589,7 +1589,7 @@ MRPROPER_FILES += include/config include/generated \
.config .config.old .version \
Module.symvers \
certs/signing_key.pem \
- certs/x509.genkey \
+ certs/signing_key.x509 \
vmlinux-gdb.py \
rpmbuild \
rust/libmacros.so rust/libmacros.dylib
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-08-12 9:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 2:24 [PATCH] Makefile: mrproper deletes signing_key.x509 longguang.yue
2025-08-12 9:37 ` Nicolas Schier
-- strict thread matches above, loose matches on Subject: below --
2025-08-09 12:04 longguang.yue
2025-08-09 20:11 ` Nicolas Schier
2025-08-11 6:28 ` longguang.yue
2025-08-11 13:59 ` Nicolas Schier
2025-08-11 19:14 ` Nathan Chancellor
2025-08-12 9:31 ` David Howells
2025-08-07 3:33 longguang.yue
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.