mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-09 17:22:48 +07:00
![]() On old ARM chips, unaligned accesses to memory are not trapped and fixed. On module load, symbols are relocated, and the relocation of __bug_table symbols is done on a u32 basis. Yet the section is not aligned to a multiple of 4 address, but to a multiple of 2. This triggers an Oops on pxa architecture, where address 0xbf0021ea is the first relocation in the __bug_table section : apply_relocate(): pxa3xx_nand: section 13 reloc 0 sym '' Unable to handle kernel paging request at virtual address bf0021ea pgd = e1cd0000 [bf0021ea] *pgd=c1cce851, *pte=c1cde04f, *ppte=c1cde01f Internal error: Oops: 23 [#1] ARM Modules linked in: CPU: 0 PID: 606 Comm: insmod Not tainted 4.2.0-rc8-next-20150828-cm-x300+ #887 Hardware name: CM-X300 module task: e1c68700 ti: e1c3e000 task.ti: e1c3e000 PC is at apply_relocate+0x2f4/0x3d4 LR is at 0xbf0021ea pc : [<c000e7c8>] lr : [<bf0021ea>] psr: 80000013 sp : e1c3fe30 ip : 60000013 fp : e49e8c60 r10: e49e8fa8 r9 : 00000000 r8 : e49e7c58 r7 : e49e8c38 r6 : e49e8a58 r5 : e49e8920 r4 : e49e8918 r3 : bf0021ea r2 : bf007034 r1 : 00000000 r0 : bf000000 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 0000397f Table: c1cd0018 DAC: 00000051 Process insmod (pid: 606, stack limit = 0xe1c3e198) [<c000e7c8>] (apply_relocate) from [<c005ce5c>] (load_module+0x1248/0x1f5c) [<c005ce5c>] (load_module) from [<c005dc54>] (SyS_init_module+0xe4/0x170) [<c005dc54>] (SyS_init_module) from [<c000a420>] (ret_fast_syscall+0x0/0x38) Fix this by ensuring entries in __bug_table are all aligned to at least of multiple of 4. This transforms a module section __bug_table as : - [12] __bug_table PROGBITS 00000000 002232 000018 00 A 0 0 1 + [12] __bug_table PROGBITS 00000000 002232 000018 00 A 0 0 4 Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> |
||
---|---|---|
.. | ||
hardware | ||
mach | ||
xen | ||
arch_timer.h | ||
arm-cci.h | ||
asm-offsets.h | ||
assembler.h | ||
atomic.h | ||
auxvec.h | ||
barrier.h | ||
bitops.h | ||
bitrev.h | ||
bL_switcher.h | ||
bug.h | ||
bugs.h | ||
cache.h | ||
cacheflush.h | ||
cachetype.h | ||
checksum.h | ||
clkdev.h | ||
cmpxchg.h | ||
compiler.h | ||
cp15.h | ||
cpu.h | ||
cpuidle.h | ||
cputype.h | ||
cti.h | ||
dcc.h | ||
delay.h | ||
device.h | ||
div64.h | ||
dma-contiguous.h | ||
dma-iommu.h | ||
dma-mapping.h | ||
dma.h | ||
domain.h | ||
ecard.h | ||
edac.h | ||
elf.h | ||
entry-macro-multi.S | ||
exception.h | ||
fb.h | ||
fiq.h | ||
firmware.h | ||
fixmap.h | ||
flat.h | ||
floppy.h | ||
fncpy.h | ||
fpstate.h | ||
ftrace.h | ||
futex.h | ||
glue-cache.h | ||
glue-df.h | ||
glue-pf.h | ||
glue-proc.h | ||
glue.h | ||
gpio.h | ||
hardirq.h | ||
highmem.h | ||
hugetlb-3level.h | ||
hugetlb.h | ||
hw_breakpoint.h | ||
hw_irq.h | ||
hwcap.h | ||
hypervisor.h | ||
ide.h | ||
idmap.h | ||
insn.h | ||
io.h | ||
irq_work.h | ||
irq.h | ||
irqflags.h | ||
jump_label.h | ||
Kbuild | ||
kexec.h | ||
kgdb.h | ||
kmap_types.h | ||
kprobes.h | ||
kvm_arm.h | ||
kvm_asm.h | ||
kvm_coproc.h | ||
kvm_emulate.h | ||
kvm_host.h | ||
kvm_mmio.h | ||
kvm_mmu.h | ||
kvm_psci.h | ||
limits.h | ||
linkage.h | ||
mach-types.h | ||
mc146818rtc.h | ||
mcpm.h | ||
mcs_spinlock.h | ||
memblock.h | ||
memory.h | ||
mm-arch-hooks.h | ||
mmu_context.h | ||
mmu.h | ||
module.h | ||
mpu.h | ||
mtd-xip.h | ||
mutex.h | ||
neon.h | ||
nwflash.h | ||
opcodes-sec.h | ||
opcodes-virt.h | ||
opcodes.h | ||
outercache.h | ||
page-nommu.h | ||
page.h | ||
patch.h | ||
pci.h | ||
percpu.h | ||
perf_event.h | ||
pgalloc.h | ||
pgtable-2level-hwdef.h | ||
pgtable-2level-types.h | ||
pgtable-2level.h | ||
pgtable-3level-hwdef.h | ||
pgtable-3level-types.h | ||
pgtable-3level.h | ||
pgtable-hwdef.h | ||
pgtable-nommu.h | ||
pgtable.h | ||
pmu.h | ||
probes.h | ||
proc-fns.h | ||
processor.h | ||
procinfo.h | ||
prom.h | ||
psci.h | ||
ptrace.h | ||
setup.h | ||
shmparam.h | ||
signal.h | ||
smp_plat.h | ||
smp_scu.h | ||
smp_twd.h | ||
smp.h | ||
sparsemem.h | ||
spinlock_types.h | ||
spinlock.h | ||
stackprotector.h | ||
stacktrace.h | ||
string.h | ||
suspend.h | ||
swab.h | ||
switch_to.h | ||
sync_bitops.h | ||
syscall.h | ||
system_info.h | ||
system_misc.h | ||
tcm.h | ||
therm.h | ||
thread_info.h | ||
thread_notify.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
tls.h | ||
topology.h | ||
traps.h | ||
trusted_foundations.h | ||
types.h | ||
uaccess.h | ||
ucontext.h | ||
unified.h | ||
unistd.h | ||
unwind.h | ||
uprobes.h | ||
user.h | ||
v7m.h | ||
vdso_datapage.h | ||
vdso.h | ||
vfp.h | ||
vfpmacros.h | ||
vga.h | ||
virt.h | ||
word-at-a-time.h | ||
xor.h |