[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZO5M45JsJYzNF59H@bombadil.infradead.org>
Date: Tue, 29 Aug 2023 12:54:11 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-modules@...r.kernel.org
Cc: patches@...ts.linux.dev, linux-modules@...r.kernel.org,
linux-kernel@...r.kernel.org, hch@....de,
gregkh@...uxfoundation.org, manuel.lauss@...il.com,
kuba@...nel.org, kumba@...too.org, palmer@...osinc.com,
masahiroy@...nel.org, rdunlap@...radead.org, zeming@...china.com,
rongtao@...tc.cn, arnd@...db.de, pmladek@...e.com,
chenjiahao16@...wei.com, christian@...cart.de,
peterz@...radead.org, song@...nel.org, keescook@...omium.org,
thunder.leizhen@...wei.com, mcgrof@...nel.org
Subject: [GIT PULL] Modules changes for v6.6-rc1
The following changes since commit 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5:
Linux 6.5-rc1 (2023-07-09 13:53:13 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/modules-6.6-rc1
for you to fetch changes up to a419beac4a070aff63c520f36ebf7cb8a76a8ae5:
module/decompress: use vmalloc() for zstd decompression workspace (2023-08-29 09:39:08 -0700)
I forgot to mention below that most of this except the last couple of minor
patches have been in linux-next for about a month.
----------------------------------------------------------------
Modules changes for v6.6-rc1
Summary of the changes worth highlighting from most interesting to boring below:
* Christoph Hellwig's symbol_get() fix to Nvidia's efforts to circumvent the
protection he put in place in year 2020 to prevent proprietary modules from
using GPL only symbols, and also ensuring proprietary modules which export
symbols grandfather their taint. That was done through year 2020 commit
262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE"). Christoph's new
fix is done by clarifing __symbol_get() was only ever intended to prevent
module reference loops by Linux kernel modules and so making it only find
symbols exported via EXPORT_SYMBOL_GPL(). The circumvention tactic used
by Nvidia was to use symbol_get() to purposely swift through proprietary
module symbols and completley bypass our traditional EXPORT_SYMBOL*()
annotations and community agreed upon restrictions.
A small set of preamble patches fix up a few symbols which just needed
adjusting for this on two modules, the rtc ds1685 and the networking enetc
module. Two other modules just needed some build fixing and removal of use
of __symbol_get() as they can't ever be modular, as was done by Arnd on
the ARM pxa module and Christoph did on the mmc au1xmmc driver.
This is a good reminder to us that symbol_get() is just a hack to address
things which should be fixed through Kconfig at build time as was done in
the later patches, and so ultimately it should just go.
* Extremely late minor fix for old module layout 055f23b74b20 ("module: check
for exit sections in layout_sections() instead of module_init_section()") by
James Morse for arm64. Note that this layout thing is old, it is *not*
Song Liu's commit ac3b43283923 ("module: replace module_layout with
module_memory"). The issue however is very odd to run into and so there was
no hurry to get this in fast.
* Although the fix did not go through the modules tree I'd like to highlight
the fix by Peter Zijlstra in commit 54097309620e ("x86/static_call: Fix
__static_call_fixup()") now merged in your tree which came out of what
was originally suspected to be a fallout of the the newer module layout
changes by Song Liu commit ac3b43283923 ("module: replace module_layout
with module_memory") instead of module_init_section()"). Thanks to the report
by Christian Bricart and the debugging by Song Liu & Peter that turned to
be noted as a kernel regression in place since v5.19 through commit
ee88d363d156 ("x86,static_call: Use alternative RET encoding").
I highlight this to reflect and clarify that we haven't seen more fallout
from ac3b43283923 ("module: replace module_layout with module_memory").
* RISC-V toolchain got mapping symbol support which prefix symbols with "$"
to help with alignment considerations for disassembly. This is used to
differentiate between incompatible instruction encodings when disassembling.
RISC-V just matches what ARM/AARCH64 did for alignment considerations and
Palmer Dabbelt extended is_mapping_symbol() to accept these symbols for
RISC-V. We already had support for this for all architectures but it also
checked for the second character, the RISC-V check Dabbelt added was just
for the "$". After a bit of testing and fallout on linux-next and based on
feedback from Masahiro Yamada it was decided to simplify the check and treat
the first char "$" as unique for all architectures, and so we no make
is_mapping_symbol() for all archs if the symbol starts with "$".
The most relevant commit for this for RISC-V on binutils was:
https://sourceware.org/pipermail/binutils/2021-July/117350.html
* A late fix by Andrea Righi (today) to make module zstd decompression use
vmalloc() instead of kmalloc() to account for large compressed modules. I
suspect we'll see similar things for other decompression algorithms soon.
* samples/hw_breakpoint minor fixes by Rong Tao, Arnd Bergmann and Chen Jiahao
----------------------------------------------------------------
Andrea Righi (1):
module/decompress: use vmalloc() for zstd decompression workspace
Arnd Bergmann (2):
samples/hw_breakpoint: fix building without module unloading
ARM: pxa: remove use of symbol_get()
Chen Jiahao (1):
samples/hw_breakpoint: mark sample_hbp as static
Christoph Hellwig (4):
mmc: au1xmmc: force non-modular build and remove symbol_get usage
net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
James Morse (3):
module: Expose module_init_layout_section()
arm64: module: Use module_init_layout_section() to spot init sections
ARM: module: Use module_init_layout_section() to spot init sections
Kees Cook (1):
kallsyms: Add more debug output for selftest
Li zeming (1):
kernel: params: Remove unnecessary ‘0’ values from err
Palmer Dabbelt (2):
module: Ignore RISC-V mapping symbols too
modpost, kallsyms: Treat add '$'-prefixed symbols as mapping symbols
Rong Tao (1):
samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'
arch/arm/kernel/module-plts.c | 2 +-
arch/arm/mach-pxa/sharpsl_pm.c | 2 --
arch/arm/mach-pxa/spitz.c | 14 +-------------
arch/arm64/kernel/module-plts.c | 2 +-
arch/mips/alchemy/devboards/db1000.c | 8 +-------
arch/mips/alchemy/devboards/db1200.c | 19 ++-----------------
arch/mips/alchemy/devboards/db1300.c | 10 +---------
drivers/mmc/host/Kconfig | 5 +++--
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 2 +-
drivers/rtc/rtc-ds1685.c | 2 +-
include/linux/module_symbol.h | 4 +---
include/linux/moduleloader.h | 5 +++++
kernel/kallsyms_selftest.c | 22 ++++++++++++++++++----
kernel/module/decompress.c | 4 ++--
kernel/module/main.c | 16 ++++++++++++----
kernel/params.c | 2 +-
samples/hw_breakpoint/data_breakpoint.c | 6 ++++--
17 files changed, 55 insertions(+), 70 deletions(-)
Powered by blists - more mailing lists