All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Tom Saeger <tom.saeger@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH 5.15 5.10 5.4 v2] kbuild: fix Build ID if CONFIG_MODVERSIONS
Date: Tue, 10 Jan 2023 15:58:11 +0900	[thread overview]
Message-ID: <CAK7LNAT3NP2gH1JxjeX_m-bhu7kqqUcBMALr_ZpAh_FW6r35FA@mail.gmail.com> (raw)
In-Reply-To: <20230109183615.zxe7o7fowdpeqlj3@oracle.com>

On Tue, Jan 10, 2023 at 3:36 AM Tom Saeger <tom.saeger@oracle.com> wrote:
>
> On Thu, Dec 22, 2022 at 07:01:11AM +0100, Greg Kroah-Hartman wrote:
> > On Wed, Dec 21, 2022 at 02:52:10PM -0600, Tom Saeger wrote:
> > > On Wed, Dec 21, 2022 at 05:31:51PM +0100, Greg Kroah-Hartman wrote:
> > > > On Thu, Dec 15, 2022 at 04:18:18PM -0700, Tom Saeger wrote:
> > > > > Backport of:
> > > > > commit 0d362be5b142 ("Makefile: link with -z noexecstack --no-warn-rwx-segments")
> > > > > breaks arm64 Build ID when CONFIG_MODVERSIONS=y for all kernels
> > > > > from: commit e4484a495586 ("Merge tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild")
> > > > > until: commit df202b452fe6 ("Merge tag 'kbuild-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild")
> > > > >
> > > > > Linus's tree doesn't have this issue since 0d362be5b142 was merged
> > > > > after df202b452fe6 which included:
> > > > > commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS")
> > > >
> > > > Why can't we add this one instead of a custom change?
> > >
> > > I quickly abandoned that route - there are too many dependencies.
> >
> > How many?  Why?  Whenever we add a "this is not upstream" patch, 90% of
> > the time it is incorrect and causes problems (merge issues included.)
> > So please please please let's try to keep in sync with what is in
> > Linus's tree.
> >
> > thanks,
> >
> > greg k-h
>
> Ok - I spent some time on this.
>
> The haystack I searched:
>
>   git rev-list --grep="masahiroy/linux-kbuild" v5.15..v5.19-rc1 | while read -r CID ; do git rev-list "${CID}^-" ; done | wc -l
>   182
>
> I have 54 of those 182 applied to 5.15.85, and this works in my
> limited build testing (x86_64 gcc, arm64 gcc, arm64 clang).
>
> Specifically:
>
>
> cbfc9bf3223f genksyms: adjust the output format to modpost
> e7c9c2630e59 kbuild: stop merging *.symversions
> 1d788aa800c7 kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
> 8a01c770955b modpost: extract symbol versions from *.cmd files
> a8ade6b33772 modpost: add sym_find_with_module() helper
> a9639fe6b516 modpost: change the license of EXPORT_SYMBOL to bool type
> 04804878f631 modpost: remove left-over cross_compile declaration
> 3388b8af9698 kbuild: record symbol versions in *.cmd files
> 4ff3946463a0 kbuild: generate a list of objects in vmlinux
> 074617e2ad6a modpost: move *.mod.c generation to write_mod_c_files()
> 81b78cb6e821 modpost: merge add_{intree_flag,retpoline,staging_flag} to add_header
> 9df4f00b53b4 modpost: split new_symbol() to symbol allocation and hash table addition
> 85728bcbc500 modpost: make sym_add_exported() always allocate a new symbol
> 82aa2b4d30af modpost: make multiple export error
> 6cc962f0a175 modpost: dump Module.symvers in the same order of modules.order
> 39db82cea373 modpost: traverse the namespace_list in order
> 45dc7b236dcb modpost: use doubly linked list for dump_lists
> 2a322506403a modpost: traverse unresolved symbols in order
> a85718443348 modpost: add sym_add_unresolved() helper
> 5c44b0f89c82 modpost: traverse modules in order
> a0b68f6655f2 modpost: import include/linux/list.h
> ce9f4d32be4e modpost: change mod->gpl_compatible to bool type
> f9fe36a515ca modpost: use bool type where appropriate
> 46f6334d7055 modpost: move struct namespace_list to modpost.c
> afa24c45af49 modpost: retrieve the module dependency and CRCs in check_exports()
> a8f687dc3ac2 modpost: add a separate error for exported symbols without definition
> f97f0e32b230 modpost: remove stale comment about sym_add_exported()
> 0af2ad9d11c3 modpost: do not write out any file when error occurred
> 09eac5681c02 modpost: use snprintf() instead of sprintf() for safety
> ee07380110f2 kbuild: read *.mod to get objects passed to $(LD) or $(AR)
> 97976e5c6d55 kbuild: make *.mod not depend on *.o
> 0d4368c8da07 kbuild: get rid of duplication in *.mod files
> 55f602f00903 kbuild: split the second line of *.mod into *.usyms
> ea9730eb0788 kbuild: reuse real-search to simplify cmd_mod
> 1eacf71f885a kbuild: make multi_depend work with targets in subdirectory
> 19c2b5b6f769 kbuild: reuse suffix-search to refactor multi_depend
> 75df07a9133d kbuild: refactor cmd_modversions_S
> 53257fbea174 kbuild: refactor cmd_modversions_c
> b6e50682c261 modpost: remove annoying namespace_from_kstrtabns()
> 1002d8f060b0 modpost: remove redundant initializes for static variables
> 921fbb7ab714 modpost: move export_from_secname() call to more relevant place
> f49c0989e01b modpost: remove useless export_from_sec()
> 7a98501a77db kbuild: do not remove empty *.symtypes explicitly
> 500f1b31c16f kbuild: factor out genksyms command from cmd_gensymtypes_{c,S}
> e04fcad29aa3 kallsyms: ignore all local labels prefixed by '.L'
> 9e01f7ef15d2 kbuild: drop $(size_append) from cmd_zstd
> 054133567480 kbuild: do not include include/config/auto.conf from shell scripts
> 34d14831eecb kbuild: stop using config_filename in scripts/Makefile.modsign
> 75155bda5498 kbuild: use more subdir- for visiting subdirectories while cleaning
> 1a3f00cd3be8 kbuild: reuse $(cmd_objtool) for cmd_cc_lto_link_modules
> 47704d10e997 kbuild: detect objtool update without using .SECONDEXPANSION
> 7a89d034ccc6 kbuild: factor out OBJECT_FILES_NON_STANDARD check into a macro
> 3cbbf4b9d188 kbuild: store the objtool command in *.cmd files
> 467f0d0aa6b4 kbuild: rename __objtool_obj and reuse it for cmd_cc_lto_link_modules
>
> There may be a few more patches post v5.19-rc1 for Fixes.
> I haven't tried minimizing the 54.


It is up to Greg.


Indeed, 7b4537199a4a requires a lot of prerequisite commits.
I do not remember which ones are exactly mandatory.






> Greg - is 54 too many?
>
> Regards,
>
> --Tom



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2023-01-10  6:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 23:18 [PATCH 5.15 5.10 5.4 v2] kbuild: fix Build ID if CONFIG_MODVERSIONS Tom Saeger
2022-12-21 16:31 ` Greg Kroah-Hartman
2022-12-21 20:52   ` Tom Saeger
2022-12-22  6:01     ` Greg Kroah-Hartman
2023-01-09 18:36       ` Tom Saeger
2023-01-10  6:58         ` Masahiro Yamada [this message]
2023-01-10 16:27           ` Tom Saeger
2023-01-12 12:00         ` Greg Kroah-Hartman
2023-01-12 21:20           ` Tom Saeger
2023-01-13 15:06             ` Tom Saeger
2023-01-14 13:53               ` Greg Kroah-Hartman
2023-01-17 23:50                 ` Tom Saeger
2023-01-18  6:14                   ` Greg Kroah-Hartman
2023-01-22 14:21                   ` Greg Kroah-Hartman
2023-01-22 14:40                     ` Greg Kroah-Hartman
2023-01-23  7:26                       ` Greg Kroah-Hartman
2022-12-21 19:56 ` Nick Desaulniers
2022-12-21 20:42   ` Tom Saeger
2022-12-21 21:23     ` Nick Desaulniers
2022-12-21 23:54       ` Tom Saeger
2022-12-22  0:03         ` Tom Saeger
2022-12-31 11:53           ` Greg Kroah-Hartman
2023-01-05 20:30             ` Tom Saeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAT3NP2gH1JxjeX_m-bhu7kqqUcBMALr_ZpAh_FW6r35FA@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=npiggin@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tom.saeger@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.