linux/arch/m68k
Daniel Palmer 89127ac932 m68k: nommu: fix memmove() with differently aligned src and dest for 68000
[ Upstream commit 590fe2f46c ]

68000 has different alignment needs to 68020+.
memcpy() checks if the destination is aligned and does a smaller copy
to fix the alignment and then critically for 68000 it checks if the
source is still unaligned and if it is reverts to smaller copies.

memmove() does not currently do the second part and malfunctions if
one of the pointers is aligned and the other isn't.

This is apparently getting triggered by printk. If I put breakpoints
into the new checks added by this commit the first hit looks like this:

memmove (n=205, src=0x2f3971 <printk_shared_pbufs+205>, dest=0x2f3980 <printk_shared_pbufs+220>) at arch/m68k/lib/memmove.c:82

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
Signed-off-by: Greg Ungerer <gerg@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:15 -05:00
..
68000 m68k: Check syscall_trace_enter() return code 2023-03-10 09:39:49 +01:00
amiga m68k: amiga: Turn off Warp1260 interrupts during boot 2024-08-19 05:45:13 +02:00
apollo asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
atari m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages 2024-08-19 05:44:54 +02:00
bvme6000 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
coldfire m68k: coldfire/device.c: only build FEC when HW macros are defined 2024-12-14 19:51:06 +01:00
configs for-5.15/block-2021-08-30 2021-08-30 18:52:11 -07:00
emu TTY / Serial patches for 5.15-rc1 2021-09-01 09:51:16 -07:00
fpsp040 m68k: Fix invalid .section syntax 2023-09-19 12:22:27 +02:00
hp300 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
ifpsp060 m68k: Fix invalid .section syntax 2023-09-19 12:22:27 +02:00
include m68k: bitops: Fix find_*_bit() signatures 2025-10-29 14:03:10 +01:00
kernel m68k: Fix lost column on framebuffer debug console 2025-08-28 16:24:27 +02:00
lib m68k: nommu: fix memmove() with differently aligned src and dest for 68000 2026-03-04 07:20:15 -05:00
mac m68k: mac: Fix macintosh_config for Mac II 2025-06-27 11:05:11 +01:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 74 2019-05-24 17:36:47 +02:00
mm memblock: allow to specify flags with memblock_add_node() 2023-12-20 15:17:33 +01:00
mvme16x m68k: mvme16x: Add and use "mvme16x.h" 2024-12-14 19:50:43 +01:00
mvme147 m68k: mvme147: Reinstate early console 2024-12-14 19:50:43 +01:00
q40 m68k/q40: Replace q40ide driver with pata_falcon and falconide 2021-06-10 16:30:12 -06:00
sun3 m68k: Remove set_fs() 2021-09-24 13:35:07 +02:00
sun3x m68k: Remove set_fs() 2021-09-24 13:35:07 +02:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Kbuild m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
Kconfig m68k/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:30 +02:00
Kconfig.bus m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch 2021-08-23 08:40:05 +10:00
Kconfig.cpu m68k: math-emu: Fix dependencies of math emulation support 2022-06-09 10:22:59 +02:00
Kconfig.debug m68k: Don't unregister boot console needlessly 2025-08-28 16:24:08 +02:00
Kconfig.devices m68k: /proc/hardware should depend on PROC_FS 2023-03-10 09:39:16 +01:00
Kconfig.machine m68knommu: fix undefined reference to `_init_sp' 2022-06-14 18:36:15 +02:00
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00