History

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM updates from Russell King: - remove a now unnecessary usage of the KERNEL_DS for sys_oabi_epoll_ctl() - update my email address in a number of drivers - decompressor EFI updates from Ard Biesheuvel - module unwind section handling updates - sparsemem Kconfig cleanups - make act_mm macro respect THREAD_SIZE * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8980/1: Allow either FLATMEM or SPARSEMEM on the multiplatform build ARM: 8979/1: Remove redundant ARCH_SPARSEMEM_DEFAULT setting ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE ARM: decompressor: run decompressor in place if loaded via UEFI ARM: decompressor: move GOT into .data for EFI enabled builds ARM: decompressor: defer loading of the contents of the LC0 structure ARM: decompressor: split off _edata and stack base into separate object ARM: decompressor: move headroom variable out of LC0 ARM: 8976/1: module: allow arch overrides for .init section names ARM: 8975/1: module: fix handling of unwind init sections ARM: 8974/1: use SPARSMEM_STATIC when SPARSEMEM is enabled ARM: 8971/1: replace the sole use of a symbol with its definition ARM: 8969/1: decompressor: simplify libfdt builds Update rmk's email address in various drivers ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()

Linus Torvalds committed 6 years ago

Commit c2b0fc82 parents 533b220 fb597f224 files · +122 −170Browse files

Unified · Split

24 files
  1. arch/arm/Kconfig +10 −3
  2. arch/arm/boot/compressed/.gitignore +0 −9
  3. arch/arm/boot/compressed/Makefile +15 −23
  4. arch/arm/boot/compressed/atags_to_fdt.c +1 −0
  5. arch/arm/boot/compressed/fdt.c +2 −0
  6. arch/arm/boot/compressed/fdt_ro.c +2 −0
  7. arch/arm/boot/compressed/fdt_rw.c +2 −0
  8. arch/arm/boot/compressed/fdt_wip.c +2 −0
  9. arch/arm/boot/compressed/head.S +32 −48
  10. arch/arm/boot/compressed/libfdt_env.h +0 −24
  11. arch/arm/boot/compressed/vmlinux.lds.S +5 −0
  12. arch/arm/include/asm/assembler.h +1 −2
  13. arch/arm/kernel/module.c +19 −3
  14. arch/arm/kernel/sys_oabi-compat.c +5 −10
  15. arch/arm/mm/proc-macros.S +2 −1
  16. drivers/firmware/efi/libstub/arm32-stub.c +6 −39
  17. drivers/gpu/drm/armada/armada_drv.c +1 −1
  18. drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +1 −1
  19. drivers/gpu/drm/etnaviv/etnaviv_drv.c +1 −1
  20. drivers/media/cec/cec-notifier.c +1 −1
  21. drivers/net/phy/swphy.c +1 −1
  22. include/linux/moduleloader.h +5 −0
  23. include/media/cec-notifier.h +1 −1
  24. kernel/module.c +7 −2
arch/arm/Kconfig+10−3
@@ -313,6 +313,9 @@ choice · 312 unmodified lines
313313 config ARCH_MULTIPLATFORM
314314 bool "Allow multiple platforms to be selected"
315315 depends on MMU
316+ select ARCH_FLATMEM_ENABLE
317+ select ARCH_SPARSEMEM_ENABLE
318+ select ARCH_SELECT_MEMORY_MODEL
316319 select ARM_HAS_SG_CHAIN
317320 select ARM_PATCH_PHYS_VIRT
318321 select AUTO_ZRELADDR
@@ -1516,11 +1519,15 @@ config OABI_COMPAT · 1197 unmodified lines
15161519 config ARCH_HAS_HOLES_MEMORYMODEL
15171520 bool
15181521
1519−config ARCH_SPARSEMEM_ENABLE
1522+config ARCH_SELECT_MEMORY_MODEL
1523+ bool
1524+
1525+config ARCH_FLATMEM_ENABLE
15201526 bool
15211527
1522−config ARCH_SPARSEMEM_DEFAULT
1523− def_bool ARCH_SPARSEMEM_ENABLE
1528+config ARCH_SPARSEMEM_ENABLE
1529+ bool
1530+ select SPARSEMEM_STATIC if SPARSEMEM
15241531
15251532 config HAVE_ARCH_PFN_VALID
15261533 def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
arch/arm/boot/compressed/.gitignore+0−9
@@ -7,12 +7,3 @@ hyp-stub.S · 6 unmodified lines
77 piggy_data
88 vmlinux
99 vmlinux.lds
10−
11−# borrowed libfdt files
12−fdt.c
13−fdt.h
14−fdt_ro.c
15−fdt_rw.c
16−fdt_wip.c
17−libfdt.h
18−libfdt_internal.h
arch/arm/boot/compressed/Makefile+15−23
@@ -76,29 +76,30 @@ compress-$(CONFIG_KERNEL_LZMA) = lzma · 75 unmodified lines
7676 compress-$(CONFIG_KERNEL_XZ) = xzkern
7777 compress-$(CONFIG_KERNEL_LZ4) = lz4
7878
79−# Borrowed libfdt files for the ATAG compatibility mode
80−
81−libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
82−libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
83−
84−libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
85−
86−$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
87− $(call cmd,shipped)
88−
89−$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
90− $(addprefix $(obj)/,$(libfdt_hdrs))
79+libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
9180
9281 ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
9382 OBJS += $(libfdt_objs) atags_to_fdt.o
9483 endif
9584
85+# -fstack-protector-strong triggers protection checks in this code,
86+# but it is being used too early to link to meaningful stack_chk logic.
87+nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
88+$(foreach o, $(libfdt_objs) atags_to_fdt.o, \
89+ $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt $(nossp-flags-y)))
90+
91+# These were previously generated C files. When you are building the kernel
92+# with O=, make sure to remove the stale files in the output tree. Otherwise,
93+# the build system wrongly compiles the stale ones.
94+ifdef building_out_of_srctree
95+$(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c))
96+endif
97+
9698 targets := vmlinux vmlinux.lds piggy_data piggy.o \
9799 lib1funcs.o ashldi3.o bswapsdi2.o \
98100 head.o $(OBJS)
99101
100−clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \
101− $(libfdt) $(libfdt_hdrs) hyp-stub.S
102+clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
102103
103104 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
104105
@@ -107,15 +108,6 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS) · 2 unmodified lines
107108 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
108109 endif
109110
110−# -fstack-protector-strong triggers protection checks in this code,
111−# but it is being used too early to link to meaningful stack_chk logic.
112−nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
113−CFLAGS_atags_to_fdt.o := $(nossp-flags-y)
114−CFLAGS_fdt.o := $(nossp-flags-y)
115−CFLAGS_fdt_ro.o := $(nossp-flags-y)
116−CFLAGS_fdt_rw.o := $(nossp-flags-y)
117−CFLAGS_fdt_wip.o := $(nossp-flags-y)
118−
119111 ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
120112 -I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
121113 asflags-y := -DZIMAGE
arch/arm/boot/compressed/atags_to_fdt.c+1−0
@@ -1,4 +1,5 @@
11 // SPDX-License-Identifier: GPL-2.0
2+#include <linux/libfdt_env.h>
23 #include <asm/setup.h>
34 #include <libfdt.h>
45
arch/arm/boot/compressed/fdt.c+2−0
@@ -0,0 +1,2 @@
1+// SPDX-License-Identifier: GPL-2.0-only
2+#include "../../../../lib/fdt.c"
arch/arm/boot/compressed/fdt_ro.c+2−0
@@ -0,0 +1,2 @@
1+// SPDX-License-Identifier: GPL-2.0-only
2+#include "../../../../lib/fdt_ro.c"
arch/arm/boot/compressed/fdt_rw.c+2−0
@@ -0,0 +1,2 @@
1+// SPDX-License-Identifier: GPL-2.0-only
2+#include "../../../../lib/fdt_rw.c"
arch/arm/boot/compressed/fdt_wip.c+2−0
@@ -0,0 +1,2 @@
1+// SPDX-License-Identifier: GPL-2.0-only
2+#include "../../../../lib/fdt_wip.c"
arch/arm/boot/compressed/head.S+32−48
@@ -287,28 +287,22 @@ not_angel: · 286 unmodified lines
287287 */
288288 mov r0, pc
289289 cmp r0, r4
290− ldrcc r0, LC0+28
290+ ldrcc r0, .Lheadroom
291291 addcc r0, r0, pc
292292 cmpcc r4, r0
293293 orrcc r4, r4, #1 @ remember we skipped cache_on
294294 blcs cache_on
295295
296−restart: adr r0, LC0
297− ldmia r0, {r1, r2, r3, r6, r11, r12}
298− ldr sp, [r0, #24]
299−
300− /*
301− * We might be running at a different address. We need
302− * to fix up various pointers.
303− */
304− sub r0, r0, r1 @ calculate the delta offset
305− add r6, r6, r0 @ _edata
296+restart: adr r0, LC1
297+ ldr sp, [r0]
298+ ldr r6, [r0, #4]
299+ add sp, sp, r0
300+ add r6, r6, r0
306301
307302 get_inflated_image_size r9, r10, lr
308303
309304 #ifndef CONFIG_ZBOOT_ROM
310305 /* malloc space is above the relocated stack (64k max) */
311− add sp, sp, r0
312306 add r10, sp, #0x10000
313307 #else
314308 /*
@@ -322,9 +316,6 @@ restart: adr r0, LC0 · 7 unmodified lines
322316 mov r5, #0 @ init dtb size to 0
323317 #ifdef CONFIG_ARM_APPENDED_DTB
324318 /*
325− * r0 = delta
326− * r2 = BSS start
327− * r3 = BSS end
328319 * r4 = final kernel address (possibly with LSB set)
329320 * r5 = appended dtb size (still unknown)
330321 * r6 = _edata
@@ -332,8 +323,6 @@ restart: adr r0, LC0 · 1 unmodified line
332323 * r8 = atags/device tree pointer
333324 * r9 = size of decompressed image
334325 * r10 = end of this image, including bss/stack/malloc space if non XIP
335− * r11 = GOT start
336− * r12 = GOT end
337326 * sp = stack pointer
338327 *
339328 * if there are device trees (dtb) appended to zImage, advance r10 so that the
@@ -381,7 +370,6 @@ restart: adr r0, LC0 · 41 unmodified lines
381370 /* temporarily relocate the stack past the DTB work space */
382371 add sp, sp, r5
383372
384− stmfd sp!, {r0-r3, ip, lr}
385373 mov r0, r8
386374 mov r1, r6
387375 mov r2, r5
@@ -400,7 +388,6 @@ restart: adr r0, LC0 · 12 unmodified lines
400388 mov r2, r5
401389 bleq atags_to_fdt
402390
403− ldmfd sp!, {r0-r3, ip, lr}
404391 sub sp, sp, r5
405392 #endif
406393
@@ -537,6 +524,10 @@ dtb_check_done: · 130 unmodified lines
537524 mov pc, r0
538525
539526 wont_overwrite:
527+ adr r0, LC0
528+ ldmia r0, {r1, r2, r3, r11, r12}
529+ sub r0, r0, r1 @ calculate the delta offset
530+
540531 /*
541532 * If delta is zero, we are running at the address we were linked at.
542533 * r0 = delta
@@ -660,13 +651,18 @@ not_relocated: mov r0, #0 · 117 unmodified lines
660651 LC0: .word LC0 @ r1
661652 .word __bss_start @ r2
662653 .word _end @ r3
663− .word _edata @ r6
664654 .word _got_start @ r11
665655 .word _got_end @ ip
666− .word .L_user_stack_end @ sp
667− .word _end - restart + 16384 + 1024*1024
668656 .size LC0, . - LC0
669657
658+ .type LC1, #object
659+LC1: .word .L_user_stack_end - LC1 @ sp
660+ .word _edata - LC1 @ r6
661+ .size LC1, . - LC1
662+
663+.Lheadroom:
664+ .word _end - restart + 16384 + 1024*1024
665+
670666 .Linflated_image_size_offset:
671667 .long (input_data_end - 4) - .
672668
@@ -1434,38 +1430,26 @@ reloc_code_end: · 761 unmodified lines
14341430
14351431 #ifdef CONFIG_EFI_STUB
14361432 ENTRY(efi_enter_kernel)
1437− mov r7, r0 @ preserve image base
1438− mov r4, r1 @ preserve DT pointer
1433+ mov r4, r0 @ preserve image base
1434+ mov r8, r1 @ preserve DT pointer
14391435
1440− mov r0, r4 @ DT start
1441− add r1, r4, r2 @ DT end
1442− bl cache_clean_flush
1436+ mrc p15, 0, r0, c1, c0, 0 @ read SCTLR
1437+ tst r0, #0x1 @ MMU enabled?
1438+ orreq r4, r4, #1 @ set LSB if not
14431439
1444− mov r0, r7 @ relocated zImage
1445− ldr r1, =_edata @ size of zImage
1446− add r1, r1, r0 @ end of zImage
1440+ mov r0, r8 @ DT start
1441+ add r1, r8, r2 @ DT end
14471442 bl cache_clean_flush
14481443
1449− @ The PE/COFF loader might not have cleaned the code we are
1450− @ running beyond the PoU, and so calling cache_off below from
1451− @ inside the PE/COFF loader allocated region is unsafe unless
1452− @ we explicitly clean it to the PoC.
1453− ARM( adrl r0, call_cache_fn )
1454− THUMB( adr r0, call_cache_fn ) @ region of code we will
1455− adr r1, 0f @ run with MMU off
1456− bl cache_clean_flush
1457− bl cache_off
1444+ adr r0, 0f @ switch to our stack
1445+ ldr sp, [r0]
1446+ add sp, sp, r0
14581447
1459− @ Set parameters for booting zImage according to boot protocol
1460− @ put FDT address in r2, it was returned by efi_entry()
1461− @ r1 is the machine type, and r0 needs to be 0
1462− mov r0, #0
1463− mov r1, #0xFFFFFFFF
1464− mov r2, r4
1465− add r7, r7, #(__efi_start - start)
1466− mov pc, r7 @ no mode switch
1448+ mov r5, #0 @ appended DTB size
1449+ mov r7, #0xFFFFFFFF @ machine ID
1450+ b wont_overwrite
14671451 ENDPROC(efi_enter_kernel)
1468−0:
1452+0: .long .L_user_stack_end - .
14691453 #endif
14701454
14711455 .align
arch/arm/boot/compressed/libfdt_env.h+0−24
@@ -1,24 +0,0 @@
1−/* SPDX-License-Identifier: GPL-2.0 */
2−#ifndef _ARM_LIBFDT_ENV_H
3−#define _ARM_LIBFDT_ENV_H
4−
5−#include <linux/limits.h>
6−#include <linux/types.h>
7−#include <linux/string.h>
8−#include <asm/byteorder.h>
9−
10−#define INT32_MAX S32_MAX
11−#define UINT32_MAX U32_MAX
12−
13−typedef __be16 fdt16_t;
14−typedef __be32 fdt32_t;
15−typedef __be64 fdt64_t;
16−
17−#define fdt16_to_cpu(x) be16_to_cpu(x)
18−#define cpu_to_fdt16(x) cpu_to_be16(x)
19−#define fdt32_to_cpu(x) be32_to_cpu(x)
20−#define cpu_to_fdt32(x) cpu_to_be32(x)
21−#define fdt64_to_cpu(x) be64_to_cpu(x)
22−#define cpu_to_fdt64(x) cpu_to_be64(x)
23−
24−#endif
arch/arm/boot/compressed/vmlinux.lds.S+5−0
@@ -63,9 +63,11 @@ SECTIONS · 62 unmodified lines
6363 _etext = .;
6464
6565 .got.plt : { *(.got.plt) }
66+#ifndef CONFIG_EFI_STUB
6667 _got_start = .;
6768 .got : { *(.got) }
6869 _got_end = .;
70+#endif
6971
7072 /* ensure the zImage file size is always a multiple of 64 bits */
7173 /* (without a dummy byte, ld just ignores the empty section) */
@@ -74,6 +76,9 @@ SECTIONS · 2 unmodified lines
7476 #ifdef CONFIG_EFI_STUB
7577 .data : ALIGN(4096) {
7678 __pecoff_data_start = .;
79+ _got_start = .;
80+ *(.got)
81+ _got_end = .;
7782 /*
7883 * The EFI stub always executes from RAM, and runs strictly before the
7984 * decompressor, so we can make an exception for its r/w data, and keep it
arch/arm/include/asm/assembler.h+1−2
@@ -269,10 +269,9 @@ · 268 unmodified lines
269269 .endif ;\
270270 .popsection
271271 #define ALT_UP_B(label) \
272− .equ up_b_offset, label - 9998b ;\
273272 .pushsection ".alt.smp.init", "a" ;\
274273 .long 9998b ;\
275− W(b) . + up_b_offset ;\
274+ W(b) . + (label - 9998b) ;\
276275 .popsection
277276 #else
278277 #define ALT_SMP(instr...)
arch/arm/kernel/module.c+19−3
@@ -55,6 +55,13 @@ void *module_alloc(unsigned long size) · 54 unmodified lines
5555 }
5656 #endif
5757
58+bool module_init_section(const char *name)
59+{
60+ return strstarts(name, ".init") ||
61+ strstarts(name, ".ARM.extab.init") ||
62+ strstarts(name, ".ARM.exidx.init");
63+}
64+
5865 bool module_exit_section(const char *name)
5966 {
6067 return strstarts(name, ".exit") ||
@@ -409,8 +416,17 @@ module_arch_cleanup(struct module *mod) · 348 unmodified lines
409416 #ifdef CONFIG_ARM_UNWIND
410417 int i;
411418
412− for (i = 0; i < ARM_SEC_MAX; i++)
413− if (mod->arch.unwind[i])
414− unwind_table_del(mod->arch.unwind[i]);
419+ for (i = 0; i < ARM_SEC_MAX; i++) {
420+ unwind_table_del(mod->arch.unwind[i]);
421+ mod->arch.unwind[i] = NULL;
422+ }
423+#endif
424+}
425+
426+void __weak module_arch_freeing_init(struct module *mod)
427+{
428+#ifdef CONFIG_ARM_UNWIND
429+ unwind_table_del(mod->arch.unwind[ARM_SEC_INIT]);
430+ mod->arch.unwind[ARM_SEC_INIT] = NULL;
415431 #endif
416432 }
arch/arm/kernel/sys_oabi-compat.c+5−10
@@ -253,20 +253,15 @@ asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, · 252 unmodified lines
253253 {
254254 struct oabi_epoll_event user;
255255 struct epoll_event kernel;
256− mm_segment_t fs;
257− long ret;
258256
259− if (op == EPOLL_CTL_DEL)
260− return sys_epoll_ctl(epfd, op, fd, NULL);
261− if (copy_from_user(&user, event, sizeof(user)))
257+ if (ep_op_has_event(op) &&
258+ copy_from_user(&user, event, sizeof(user)))
262259 return -EFAULT;
260+
263261 kernel.events = user.events;
264262 kernel.data = user.data;
265− fs = get_fs();
266− set_fs(KERNEL_DS);
267− ret = sys_epoll_ctl(epfd, op, fd, &kernel);
268− set_fs(fs);
269− return ret;
263+
264+ return do_epoll_ctl(epfd, op, fd, &kernel, false);
270265 }
271266
272267 asmlinkage long sys_oabi_epoll_wait(int epfd,
arch/arm/mm/proc-macros.S+2−1
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 * VMA_VM_FLAGS
66 * VM_EXEC
77 */
8+#include <linux/const.h>
89 #include <asm/asm-offsets.h>
910 #include <asm/thread_info.h>
1011
@@ -30,7 +31,7 @@ · 19 unmodified lines
3031 * act_mm - get current->active_mm
3132 */
3233 .macro act_mm, rd
33− bic \rd, sp, #8128
34+ bic \rd, sp, #(THREAD_SIZE - 1) & ~63
3435 bic \rd, \rd, #63
3536 ldr \rd, [\rd, #TI_TASK]
3637 .if (TSK_ACTIVE_MM > IMM12_MASK)
drivers/firmware/efi/libstub/arm32-stub.c+6−39
@@ -199,14 +199,8 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, · 198 unmodified lines
199199 unsigned long kernel_base;
200200 efi_status_t status;
201201
202− /*
203− * Verify that the DRAM base address is compatible with the ARM
204− * boot protocol, which determines the base of DRAM by masking
205− * off the low 27 bits of the address at which the zImage is
206− * loaded. These assumptions are made by the decompressor,
207− * before any memory map is available.
208− */
209− kernel_base = round_up(dram_base, SZ_128M);
202+ /* use a 16 MiB aligned base for the decompressed kernel */
203+ kernel_base = round_up(dram_base, SZ_16M) + TEXT_OFFSET;
210204
211205 /*
212206 * Note that some platforms (notably, the Raspberry Pi 2) put
@@ -215,41 +209,14 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, · 2 unmodified lines
215209 * base of the kernel image is only partially used at the moment.
216210 * (Up to 5 pages are used for the swapper page tables)
217211 */
218− kernel_base += TEXT_OFFSET - 5 * PAGE_SIZE;
219−
220− status = reserve_kernel_base(kernel_base, reserve_addr, reserve_size);
212+ status = reserve_kernel_base(kernel_base - 5 * PAGE_SIZE, reserve_addr,
213+ reserve_size);
221214 if (status != EFI_SUCCESS) {
222215 efi_err("Unable to allocate memory for uncompressed kernel.\n");
223216 return status;
224217 }
225218
226− /*
227− * Relocate the zImage, so that it appears in the lowest 128 MB
228− * memory window.
229− */
230− *image_addr = (unsigned long)image->image_base;
231− *image_size = image->image_size;
232− status = efi_relocate_kernel(image_addr, *image_size, *image_size,
233− kernel_base + MAX_UNCOMP_KERNEL_SIZE, 0, 0);
234− if (status != EFI_SUCCESS) {
235− efi_err("Failed to relocate kernel.\n");
236− efi_free(*reserve_size, *reserve_addr);
237− *reserve_size = 0;
238− return status;
239− }
240−
241− /*
242− * Check to see if we were able to allocate memory low enough
243− * in memory. The kernel determines the base of DRAM from the
244− * address at which the zImage is loaded.
245− */
246− if (*image_addr + *image_size > dram_base + ZIMAGE_OFFSET_LIMIT) {
247− efi_err("Failed to relocate kernel, no low memory available.\n");
248− efi_free(*reserve_size, *reserve_addr);
249− *reserve_size = 0;
250− efi_free(*image_size, *image_addr);
251− *image_size = 0;
252− return EFI_LOAD_ERROR;
253− }
219+ *image_addr = kernel_base;
220+ *image_size = 0;
254221 return EFI_SUCCESS;
255222 }
drivers/gpu/drm/armada/armada_drv.c+1−1
@@ -311,7 +311,7 @@ static void __exit armada_drm_exit(void) · 310 unmodified lines
311311 }
312312 module_exit(armada_drm_exit);
313313
314−MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");
314+MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
315315 MODULE_DESCRIPTION("Armada DRM Driver");
316316 MODULE_LICENSE("GPL");
317317 MODULE_ALIAS("platform:armada-drm");
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c+1−1
@@ -630,7 +630,7 @@ static struct platform_driver snd_dw_hdmi_driver = { · 629 unmodified lines
630630
631631 module_platform_driver(snd_dw_hdmi_driver);
632632
633−MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");
633+MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
634634 MODULE_DESCRIPTION("Synopsis Designware HDMI AHB ALSA interface");
635635 MODULE_LICENSE("GPL v2");
636636 MODULE_ALIAS("platform:" DRIVER_NAME);
drivers/gpu/drm/etnaviv/etnaviv_drv.c+1−1
@@ -736,7 +736,7 @@ static void __exit etnaviv_exit(void) · 735 unmodified lines
736736 module_exit(etnaviv_exit);
737737
738738 MODULE_AUTHOR("Christian Gmeiner <christian.gmeiner@gmail.com>");
739−MODULE_AUTHOR("Russell King <rmk+kernel@arm.linux.org.uk>");
739+MODULE_AUTHOR("Russell King <rmk+kernel@armlinux.org.uk>");
740740 MODULE_AUTHOR("Lucas Stach <l.stach@pengutronix.de>");
741741 MODULE_DESCRIPTION("etnaviv DRM Driver");
742742 MODULE_LICENSE("GPL v2");
drivers/media/cec/cec-notifier.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * cec-notifier.c - notify CEC drivers of physical address changes
44 *
5− * Copyright 2016 Russell King <rmk+kernel@arm.linux.org.uk>
5+ * Copyright 2016 Russell King.
66 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
77 */
88
drivers/net/phy/swphy.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * Software PHY emulation
44 *
5− * Code taken from fixed_phy.c by Russell King <rmk+kernel@arm.linux.org.uk>
5+ * Code taken from fixed_phy.c by Russell King.
66 *
77 * Author: Vitaly Bordug <vbordug@ru.mvista.com>
88 * Anton Vorontsov <avorontsov@ru.mvista.com>
include/linux/moduleloader.h+5−0
@@ -29,6 +29,11 @@ void *module_alloc(unsigned long size); · 28 unmodified lines
2929 /* Free memory returned from module_alloc. */
3030 void module_memfree(void *module_region);
3131
32+/* Determines if the section name is an init section (that is only used during
33+ * module loading).
34+ */
35+bool module_init_section(const char *name);
36+
3237 /* Determines if the section name is an exit section (that is only used during
3338 * module unloading)
3439 */
include/media/cec-notifier.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * cec-notifier.h - notify CEC drivers of physical address changes
44 *
5− * Copyright 2016 Russell King <rmk+kernel@arm.linux.org.uk>
5+ * Copyright 2016 Russell King.
66 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
77 */
88
kernel/module.c+7−2
@@ -2400,7 +2400,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 2399 unmodified lines
24002400 if ((s->sh_flags & masks[m][0]) != masks[m][0]
24012401 || (s->sh_flags & masks[m][1])
24022402 || s->sh_entsize != ~0UL
2403− || strstarts(sname, ".init"))
2403+ || module_init_section(sname))
24042404 continue;
24052405 s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);
24062406 pr_debug("\t%s\n", sname);
@@ -2433,7 +2433,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 26 unmodified lines
24332433 if ((s->sh_flags & masks[m][0]) != masks[m][0]
24342434 || (s->sh_flags & masks[m][1])
24352435 || s->sh_entsize != ~0UL
2436− || !strstarts(sname, ".init"))
2436+ || !module_init_section(sname))
24372437 continue;
24382438 s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)
24392439 | INIT_OFFSET_MASK);
@@ -2768,6 +2768,11 @@ void * __weak module_alloc(unsigned long size) · 328 unmodified lines
27682768 return vmalloc_exec(size);
27692769 }
27702770
2771+bool __weak module_init_section(const char *name)
2772+{
2773+ return strstarts(name, ".init");
2774+}
2775+
27712776 bool __weak module_exit_section(const char *name)
27722777 {
27732778 return strstarts(name, ".exit");