[v2,0/3] modules: few of alignment fixes

Message ID 20240129192644.3359978-1-mcgrof@kernel.org
Headers
Series modules: few of alignment fixes |

Message

Luis Chamberlain Jan. 29, 2024, 7:26 p.m. UTC
  Helge Deller had written a series of patches to fix a few 
misalignemnt annotations in the kernel [0]. Three of these
patches were tagged as being stable candidates. Because of these
annotation I suggested proof of the imapact, however we did not
easily have a way to verify the value / impact of fixing a few
misaligment changes in the kernel for modules.

For the more hotpath alignment fix Helge had I suggested we could
easily test this by stress testing find_symbol() with a few set of
modules. This adds such tests to allow us to both allow us to test
the impact of such possible fix, and also while at it, let's us
test future improvements on the find_symbol() path.

Changes on this v2:

 - Adds new selftest for kallsyms
 - Drops patch #1 as Masahiro Yamada already applied it to linux-kbuild/fixes
 - Removes stable tags
 - Drops patch #3 as it was not needed
 - Adds a new patch with the issues noted by Helge as a fix
   to commit f3304ecd7f06 ("linux/export: use inline assembler to
   populate symbol CRCs") as noted by Masahiro Yamada
 - Adds selftest impact on x86_64 for patch #2, this really should
   be tested on parisc though as that's an example architecture
   where we could see perhaps more improvement

[0] https://lkml.kernel.org/r/20231122221814.139916-1-deller@kernel.org

Masahiro, if there no issues feel free to take this or I can take them in
too via the modules-next tree. Lemme know!

Helge Deller (2):
  modules: Ensure 64-bit alignment on __ksymtab_* sections
  modules: Add missing entry for __ex_table

Luis Chamberlain (2):
  selftests: add new kallsyms selftests
  vmlinux.lds.h: add missing alignment for symbol CRCs

 include/linux/export-internal.h               |   1 +
 lib/Kconfig.debug                             | 103 ++++++++++++++
 lib/Makefile                                  |   1 +
 lib/tests/Makefile                            |   1 +
 lib/tests/module/.gitignore                   |   4 +
 lib/tests/module/Makefile                     |  15 ++
 lib/tests/module/gen_test_kallsyms.sh         | 128 ++++++++++++++++++
 scripts/module.lds.S                          |   9 +-
 tools/testing/selftests/module/Makefile       |  12 ++
 tools/testing/selftests/module/config         |   3 +
 tools/testing/selftests/module/find_symbol.sh |  81 +++++++++++
 11 files changed, 354 insertions(+), 4 deletions(-)
 create mode 100644 lib/tests/Makefile
 create mode 100644 lib/tests/module/.gitignore
 create mode 100644 lib/tests/module/Makefile
 create mode 100755 lib/tests/module/gen_test_kallsyms.sh
 create mode 100644 tools/testing/selftests/module/Makefile
 create mode 100644 tools/testing/selftests/module/config
 create mode 100755 tools/testing/selftests/module/find_symbol.sh
  

Comments

Luis Chamberlain Jan. 31, 2024, 10:11 p.m. UTC | #1
On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote:
> Masahiro, if there no issues feel free to take this or I can take them in
> too via the modules-next tree. Lemme know!

I've queued this onto modules-testing to get winder testing [0]

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=modules-testing

  Luis
  
Luis Chamberlain Feb. 1, 2024, 6:05 p.m. UTC | #2
On Wed, Jan 31, 2024 at 02:11:44PM -0800, Luis Chamberlain wrote:
> On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote:
> > Masahiro, if there no issues feel free to take this or I can take them in
> > too via the modules-next tree. Lemme know!
> 
> I've queued this onto modules-testing to get winder testing [0]

I've moved it to modules-next as I've found no issues.

  Luis
  
Masahiro Yamada Feb. 2, 2024, 3:20 p.m. UTC | #3
On Fri, Feb 2, 2024 at 3:05 AM Luis Chamberlain <mcgrof@kernel.org> wrote:
>
> On Wed, Jan 31, 2024 at 02:11:44PM -0800, Luis Chamberlain wrote:
> > On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote:
> > > Masahiro, if there no issues feel free to take this or I can take them in
> > > too via the modules-next tree. Lemme know!
> >
> > I've queued this onto modules-testing to get winder testing [0]
>
> I've moved it to modules-next as I've found no issues.
>
>   Luis


I believe this patch series is wrong.



I thought we agreed that the alignment must be added to
individual asm code, not to the linker script.

I am surprised that you came back to this.







--
Best Regards
Masahiro Yamada
  
Luis Chamberlain Feb. 2, 2024, 6:23 p.m. UTC | #4
On Sat, Feb 03, 2024 at 12:20:38AM +0900, Masahiro Yamada wrote:
> On Fri, Feb 2, 2024 at 3:05 AM Luis Chamberlain <mcgrof@kernel.org> wrote:
> >
> > On Wed, Jan 31, 2024 at 02:11:44PM -0800, Luis Chamberlain wrote:
> > > On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote:
> > > > Masahiro, if there no issues feel free to take this or I can take them in
> > > > too via the modules-next tree. Lemme know!
> > >
> > > I've queued this onto modules-testing to get winder testing [0]
> >
> > I've moved it to modules-next as I've found no issues.
> >
> >   Luis
> 
> 
> I believe this patch series is wrong.
> 
> I thought we agreed that the alignment must be added to
> individual asm code, not to the linker script.
>
> I am surprised that you came back to this.

I misseed the dialog on the old cover letter, sorry. I've yanked these patches
out. I'd expect a respin from Helge.

  Luis