<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/arm/kernel/module-plts.c, branch v7.0</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ARM: module: Use RCU in all users of __module_text_address().</title>
<updated>2025-03-10T10:54:45+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2025-01-08T09:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=59aa1414bf33bc706d6bc9c4dc2cd57b85862a4c'/>
<id>59aa1414bf33bc706d6bc9c4dc2cd57b85862a4c</id>
<content type='text'>
__module_text_address() can be invoked within a RCU section, there is no
requirement to have preemption disabled.

Replace the preempt_disable() section around __module_text_address()
with RCU.

Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20250108090457.512198-17-bigeasy@linutronix.de
Signed-off-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__module_text_address() can be invoked within a RCU section, there is no
requirement to have preemption disabled.

Replace the preempt_disable() section around __module_text_address()
with RCU.

Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20250108090457.512198-17-bigeasy@linutronix.de
Signed-off-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: module: Use module_init_layout_section() to spot init sections</title>
<updated>2023-08-03T20:42:02+00:00</updated>
<author>
<name>James Morse</name>
<email>james.morse@arm.com</email>
</author>
<published>2023-08-01T14:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a6846234f45801441f0e31a8b37f901ef0abd2df'/>
<id>a6846234f45801441f0e31a8b37f901ef0abd2df</id>
<content type='text'>
Today module_frob_arch_sections() spots init sections from their
'init' prefix, and uses this to keep the init PLTs separate from the rest.

get_module_plt() uses within_module_init() to determine if a
location is in the init text or not, but this depends on whether
core code thought this was an init section.

Naturally the logic is different.

module_init_layout_section() groups the init and exit text together if
module unloading is disabled, as the exit code will never run. The result
is kernels with this configuration can't load all their modules because
there are not enough PLTs for the combined init+exit section.

A previous patch exposed module_init_layout_section(), use that so the
logic is the same.

Fixes: 055f23b74b20 ("module: check for exit sections in layout_sections() instead of module_init_section()")
Cc: stable@vger.kernel.org
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Today module_frob_arch_sections() spots init sections from their
'init' prefix, and uses this to keep the init PLTs separate from the rest.

get_module_plt() uses within_module_init() to determine if a
location is in the init text or not, but this depends on whether
core code thought this was an init section.

Naturally the logic is different.

module_init_layout_section() groups the init and exit text together if
module unloading is disabled, as the exit code will never run. The result
is kernels with this configuration can't load all their modules because
there are not enough PLTs for the combined init+exit section.

A previous patch exposed module_init_layout_section(), use that so the
logic is the same.

Fixes: 055f23b74b20 ("module: check for exit sections in layout_sections() instead of module_init_section()")
Cc: stable@vger.kernel.org
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: replace module_layout with module_memory</title>
<updated>2023-03-09T20:55:15+00:00</updated>
<author>
<name>Song Liu</name>
<email>song@kernel.org</email>
</author>
<published>2023-02-07T00:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ac3b43283923440900b4f36ca5f9f0b1ca43b70e'/>
<id>ac3b43283923440900b4f36ca5f9f0b1ca43b70e</id>
<content type='text'>
module_layout manages different types of memory (text, data, rodata, etc.)
in one allocation, which is problematic for some reasons:

1. It is hard to enable CONFIG_STRICT_MODULE_RWX.
2. It is hard to use huge pages in modules (and not break strict rwx).
3. Many archs uses module_layout for arch-specific data, but it is not
   obvious how these data are used (are they RO, RX, or RW?)

Improve the scenario by replacing 2 (or 3) module_layout per module with
up to 7 module_memory per module:

        MOD_TEXT,
        MOD_DATA,
        MOD_RODATA,
        MOD_RO_AFTER_INIT,
        MOD_INIT_TEXT,
        MOD_INIT_DATA,
        MOD_INIT_RODATA,

and allocating them separately. This adds slightly more entries to
mod_tree (from up to 3 entries per module, to up to 7 entries per
module). However, this at most adds a small constant overhead to
__module_address(), which is expected to be fast.

Various archs use module_layout for different data. These data are put
into different module_memory based on their location in module_layout.
IOW, data that used to go with text is allocated with MOD_MEM_TYPE_TEXT;
data that used to go with data is allocated with MOD_MEM_TYPE_DATA, etc.

module_memory simplifies quite some of the module code. For example,
ARCH_WANTS_MODULES_DATA_IN_VMALLOC is a lot cleaner, as it just uses a
different allocator for the data. kernel/module/strict_rwx.c is also
much cleaner with module_memory.

Signed-off-by: Song Liu &lt;song@kernel.org&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
module_layout manages different types of memory (text, data, rodata, etc.)
in one allocation, which is problematic for some reasons:

1. It is hard to enable CONFIG_STRICT_MODULE_RWX.
2. It is hard to use huge pages in modules (and not break strict rwx).
3. Many archs uses module_layout for arch-specific data, but it is not
   obvious how these data are used (are they RO, RX, or RW?)

Improve the scenario by replacing 2 (or 3) module_layout per module with
up to 7 module_memory per module:

        MOD_TEXT,
        MOD_DATA,
        MOD_RODATA,
        MOD_RO_AFTER_INIT,
        MOD_INIT_TEXT,
        MOD_INIT_DATA,
        MOD_INIT_RODATA,

and allocating them separately. This adds slightly more entries to
mod_tree (from up to 3 entries per module, to up to 7 entries per
module). However, this at most adds a small constant overhead to
__module_address(), which is expected to be fast.

Various archs use module_layout for different data. These data are put
into different module_memory based on their location in module_layout.
IOW, data that used to go with text is allocated with MOD_MEM_TYPE_TEXT;
data that used to go with data is allocated with MOD_MEM_TYPE_DATA, etc.

module_memory simplifies quite some of the module code. For example,
ARCH_WANTS_MODULES_DATA_IN_VMALLOC is a lot cleaner, as it just uses a
different allocator for the data. kernel/module/strict_rwx.c is also
much cleaner with module_memory.

Signed-off-by: Song Liu &lt;song@kernel.org&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 9252/1: module: Teach unwinder about PLTs</title>
<updated>2022-11-07T14:18:59+00:00</updated>
<author>
<name>Alex Sverdlin</name>
<email>alexander.sverdlin@nokia.com</email>
</author>
<published>2022-09-27T12:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4ab07fd3fbe6b6fe5f28e0e2987eb02bedc2b495'/>
<id>4ab07fd3fbe6b6fe5f28e0e2987eb02bedc2b495</id>
<content type='text'>
"unwind: Index not found eef26358" warnings keep popping up on
CONFIG_ARM_MODULE_PLTS-enabled systems if the PC points to a PLT veneer.
Teach the unwinder how to deal with them, taking into account they don't
change state of the stack or register file except loading PC.

Link: https://lore.kernel.org/linux-arm-kernel/20200402153845.30985-1-kursad.oney@broadcom.com/

Tested-by: Kursad Oney &lt;kursad.oney@broadcom.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"unwind: Index not found eef26358" warnings keep popping up on
CONFIG_ARM_MODULE_PLTS-enabled systems if the PC points to a PLT veneer.
Teach the unwinder how to deal with them, taking into account they don't
change state of the stack or register file except loading PC.

Link: https://lore.kernel.org/linux-arm-kernel/20200402153845.30985-1-kursad.oney@broadcom.com/

Tested-by: Kursad Oney &lt;kursad.oney@broadcom.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE</title>
<updated>2021-07-05T10:52:26+00:00</updated>
<author>
<name>Alex Sverdlin</name>
<email>alexander.sverdlin@nokia.com</email>
</author>
<published>2021-07-01T15:20:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6fa630bf473827aee48cbf0efbbdf6f03134e890'/>
<id>6fa630bf473827aee48cbf0efbbdf6f03134e890</id>
<content type='text'>
FTRACE_ADDR is only defined when CONFIG_DYNAMIC_FTRACE is defined, the
latter is even stronger requirement than CONFIG_FUNCTION_TRACER (which is
enough for MCOUNT_ADDR).

Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZUVCQBHDMFVR7CCB7JPESLJEWERZDJ3T/

Fixes: 1f12fb25c5c5d22f ("ARM: 9079/1: ftrace: Add MODULE_PLTS support")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FTRACE_ADDR is only defined when CONFIG_DYNAMIC_FTRACE is defined, the
latter is even stronger requirement than CONFIG_FUNCTION_TRACER (which is
enough for MCOUNT_ADDR).

Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZUVCQBHDMFVR7CCB7JPESLJEWERZDJ3T/

Fixes: 1f12fb25c5c5d22f ("ARM: 9079/1: ftrace: Add MODULE_PLTS support")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 9079/1: ftrace: Add MODULE_PLTS support</title>
<updated>2021-06-07T11:56:20+00:00</updated>
<author>
<name>Alex Sverdlin</name>
<email>alexander.sverdlin@nokia.com</email>
</author>
<published>2021-05-05T06:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=79f32b221b18c15a98507b101ef4beb52444cc6f'/>
<id>79f32b221b18c15a98507b101ef4beb52444cc6f</id>
<content type='text'>
Teach ftrace_make_call() and ftrace_make_nop() about PLTs.
Teach PLT code about FTRACE and all its callbacks.
Otherwise the following might happen:

------------[ cut here ]------------
WARNING: CPU: 14 PID: 2265 at .../arch/arm/kernel/insn.c:14 __arm_gen_branch+0x83/0x8c()
...
Hardware name: LSI Axxia AXM55XX
[&lt;c0314a49&gt;] (unwind_backtrace) from [&lt;c03115e9&gt;] (show_stack+0x11/0x14)
[&lt;c03115e9&gt;] (show_stack) from [&lt;c0519f51&gt;] (dump_stack+0x81/0xa8)
[&lt;c0519f51&gt;] (dump_stack) from [&lt;c032185d&gt;] (warn_slowpath_common+0x69/0x90)
[&lt;c032185d&gt;] (warn_slowpath_common) from [&lt;c03218f3&gt;] (warn_slowpath_null+0x17/0x1c)
[&lt;c03218f3&gt;] (warn_slowpath_null) from [&lt;c03143cf&gt;] (__arm_gen_branch+0x83/0x8c)
[&lt;c03143cf&gt;] (__arm_gen_branch) from [&lt;c0314337&gt;] (ftrace_make_nop+0xf/0x24)
[&lt;c0314337&gt;] (ftrace_make_nop) from [&lt;c038ebcb&gt;] (ftrace_process_locs+0x27b/0x3e8)
[&lt;c038ebcb&gt;] (ftrace_process_locs) from [&lt;c0378d79&gt;] (load_module+0x11e9/0x1a44)
[&lt;c0378d79&gt;] (load_module) from [&lt;c037974d&gt;] (SyS_finit_module+0x59/0x84)
[&lt;c037974d&gt;] (SyS_finit_module) from [&lt;c030e981&gt;] (ret_fast_syscall+0x1/0x18)
---[ end trace e1b64ced7a89adcc ]---
------------[ cut here ]------------
WARNING: CPU: 14 PID: 2265 at .../kernel/trace/ftrace.c:1979 ftrace_bug+0x1b1/0x234()
...
Hardware name: LSI Axxia AXM55XX
[&lt;c0314a49&gt;] (unwind_backtrace) from [&lt;c03115e9&gt;] (show_stack+0x11/0x14)
[&lt;c03115e9&gt;] (show_stack) from [&lt;c0519f51&gt;] (dump_stack+0x81/0xa8)
[&lt;c0519f51&gt;] (dump_stack) from [&lt;c032185d&gt;] (warn_slowpath_common+0x69/0x90)
[&lt;c032185d&gt;] (warn_slowpath_common) from [&lt;c03218f3&gt;] (warn_slowpath_null+0x17/0x1c)
[&lt;c03218f3&gt;] (warn_slowpath_null) from [&lt;c038e87d&gt;] (ftrace_bug+0x1b1/0x234)
[&lt;c038e87d&gt;] (ftrace_bug) from [&lt;c038ebd5&gt;] (ftrace_process_locs+0x285/0x3e8)
[&lt;c038ebd5&gt;] (ftrace_process_locs) from [&lt;c0378d79&gt;] (load_module+0x11e9/0x1a44)
[&lt;c0378d79&gt;] (load_module) from [&lt;c037974d&gt;] (SyS_finit_module+0x59/0x84)
[&lt;c037974d&gt;] (SyS_finit_module) from [&lt;c030e981&gt;] (ret_fast_syscall+0x1/0x18)
---[ end trace e1b64ced7a89adcd ]---
ftrace failed to modify [&lt;e9ef7006&gt;] 0xe9ef7006
actual: 02:f0:3b:fa
ftrace record flags: 0
(0) expected tramp: c0314265

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Teach ftrace_make_call() and ftrace_make_nop() about PLTs.
Teach PLT code about FTRACE and all its callbacks.
Otherwise the following might happen:

------------[ cut here ]------------
WARNING: CPU: 14 PID: 2265 at .../arch/arm/kernel/insn.c:14 __arm_gen_branch+0x83/0x8c()
...
Hardware name: LSI Axxia AXM55XX
[&lt;c0314a49&gt;] (unwind_backtrace) from [&lt;c03115e9&gt;] (show_stack+0x11/0x14)
[&lt;c03115e9&gt;] (show_stack) from [&lt;c0519f51&gt;] (dump_stack+0x81/0xa8)
[&lt;c0519f51&gt;] (dump_stack) from [&lt;c032185d&gt;] (warn_slowpath_common+0x69/0x90)
[&lt;c032185d&gt;] (warn_slowpath_common) from [&lt;c03218f3&gt;] (warn_slowpath_null+0x17/0x1c)
[&lt;c03218f3&gt;] (warn_slowpath_null) from [&lt;c03143cf&gt;] (__arm_gen_branch+0x83/0x8c)
[&lt;c03143cf&gt;] (__arm_gen_branch) from [&lt;c0314337&gt;] (ftrace_make_nop+0xf/0x24)
[&lt;c0314337&gt;] (ftrace_make_nop) from [&lt;c038ebcb&gt;] (ftrace_process_locs+0x27b/0x3e8)
[&lt;c038ebcb&gt;] (ftrace_process_locs) from [&lt;c0378d79&gt;] (load_module+0x11e9/0x1a44)
[&lt;c0378d79&gt;] (load_module) from [&lt;c037974d&gt;] (SyS_finit_module+0x59/0x84)
[&lt;c037974d&gt;] (SyS_finit_module) from [&lt;c030e981&gt;] (ret_fast_syscall+0x1/0x18)
---[ end trace e1b64ced7a89adcc ]---
------------[ cut here ]------------
WARNING: CPU: 14 PID: 2265 at .../kernel/trace/ftrace.c:1979 ftrace_bug+0x1b1/0x234()
...
Hardware name: LSI Axxia AXM55XX
[&lt;c0314a49&gt;] (unwind_backtrace) from [&lt;c03115e9&gt;] (show_stack+0x11/0x14)
[&lt;c03115e9&gt;] (show_stack) from [&lt;c0519f51&gt;] (dump_stack+0x81/0xa8)
[&lt;c0519f51&gt;] (dump_stack) from [&lt;c032185d&gt;] (warn_slowpath_common+0x69/0x90)
[&lt;c032185d&gt;] (warn_slowpath_common) from [&lt;c03218f3&gt;] (warn_slowpath_null+0x17/0x1c)
[&lt;c03218f3&gt;] (warn_slowpath_null) from [&lt;c038e87d&gt;] (ftrace_bug+0x1b1/0x234)
[&lt;c038e87d&gt;] (ftrace_bug) from [&lt;c038ebd5&gt;] (ftrace_process_locs+0x285/0x3e8)
[&lt;c038ebd5&gt;] (ftrace_process_locs) from [&lt;c0378d79&gt;] (load_module+0x11e9/0x1a44)
[&lt;c0378d79&gt;] (load_module) from [&lt;c037974d&gt;] (SyS_finit_module+0x59/0x84)
[&lt;c037974d&gt;] (SyS_finit_module) from [&lt;c030e981&gt;] (ret_fast_syscall+0x1/0x18)
---[ end trace e1b64ced7a89adcd ]---
ftrace failed to modify [&lt;e9ef7006&gt;] 0xe9ef7006
actual: 02:f0:3b:fa
ftrace record flags: 0
(0) expected tramp: c0314265

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 9077/1: PLT: Move struct plt_entries definition to header</title>
<updated>2021-06-07T11:56:20+00:00</updated>
<author>
<name>Alex Sverdlin</name>
<email>alexander.sverdlin@nokia.com</email>
</author>
<published>2021-05-05T06:56:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4e271701c17dee70c6e1351c4d7d42e70405c6a9'/>
<id>4e271701c17dee70c6e1351c4d7d42e70405c6a9</id>
<content type='text'>
No functional change, later it will be re-used in several files.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change, later it will be re-used in several files.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 8910/1: fix missing declartion of module_frob_arch_sections</title>
<updated>2019-10-27T21:14:38+00:00</updated>
<author>
<name>Ben Dooks</name>
<email>ben-linux@fluff.org</email>
</author>
<published>2019-10-07T13:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a959f88735c09e3cea8b229ab86fcb946c41f9e8'/>
<id>a959f88735c09e3cea8b229ab86fcb946c41f9e8</id>
<content type='text'>
The module_frob_arch_sections function is missing the header declaration
which is in &lt;linux/moduleloader.h&gt; so include that to fix the following
sparse warning:

arch/arm/kernel/module-plts.c:188:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static?

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The module_frob_arch_sections function is missing the header declaration
which is in &lt;linux/moduleloader.h&gt; so include that to fix the following
sparse warning:

arch/arm/kernel/module-plts.c:188:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static?

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500</title>
<updated>2019-06-19T15:09:55+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d2912cb15bdda8ba4a5dd73396ad62641af2f520'/>
<id>d2912cb15bdda8ba4a5dd73396ad62641af2f520</id>
<content type='text'>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 8662/1: module: split core and init PLT sections</title>
<updated>2017-03-17T10:01:28+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2017-02-22T18:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b7ede5a1f5905ac394cc8e61712a13e3c5cb7b8f'/>
<id>b7ede5a1f5905ac394cc8e61712a13e3c5cb7b8f</id>
<content type='text'>
Since commit 35fa91eed817 ("ARM: kernel: merge core and init PLTs"),
the ARM module PLT code allocates all PLT entries in a single core
section, since the overhead of having a separate init PLT section is
not justified by the small number of PLT entries usually required for
init code.

However, the core and init module regions are allocated independently,
and there is a corner case where the core region may be allocated from
the VMALLOC region if the dedicated module region is exhausted, but the
init region, being much smaller, can still be allocated from the module
region. This puts the PLT entries out of reach of the relocated branch
instructions, defeating the whole purpose of PLTs.

So split the core and init PLT regions, and name the latter ".init.plt"
so it gets allocated along with (and sufficiently close to) the .init
sections that it serves. Also, given that init PLT entries may need to
be emitted for branches that target the core module, modify the logic
that disregards defined symbols to only disregard symbols that are
defined in the same section.

Fixes: 35fa91eed817 ("ARM: kernel: merge core and init PLTs")
Cc: &lt;stable@vger.kernel.org&gt; # v4.9+
Reported-by: Angus Clark &lt;angus@angusclark.org&gt;
Tested-by: Angus Clark &lt;angus@angusclark.org&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 35fa91eed817 ("ARM: kernel: merge core and init PLTs"),
the ARM module PLT code allocates all PLT entries in a single core
section, since the overhead of having a separate init PLT section is
not justified by the small number of PLT entries usually required for
init code.

However, the core and init module regions are allocated independently,
and there is a corner case where the core region may be allocated from
the VMALLOC region if the dedicated module region is exhausted, but the
init region, being much smaller, can still be allocated from the module
region. This puts the PLT entries out of reach of the relocated branch
instructions, defeating the whole purpose of PLTs.

So split the core and init PLT regions, and name the latter ".init.plt"
so it gets allocated along with (and sufficiently close to) the .init
sections that it serves. Also, given that init PLT entries may need to
be emitted for branches that target the core module, modify the logic
that disregards defined symbols to only disregard symbols that are
defined in the same section.

Fixes: 35fa91eed817 ("ARM: kernel: merge core and init PLTs")
Cc: &lt;stable@vger.kernel.org&gt; # v4.9+
Reported-by: Angus Clark &lt;angus@angusclark.org&gt;
Tested-by: Angus Clark &lt;angus@angusclark.org&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
