Re: [PATCH RFC] m68k: Handle __generic_copy_to_user faults more carefully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 17.4.2024 9.59, Geert Uytterhoeven wrote:
On Tue, Apr 16, 2024 at 10:36 PM Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
I have tested this fault scenario with a transfer beginning
at a single byte at the end of a mapped page only, which IMO
does violate m68k alignment rules. I cannot remember ever
seeing such faults reported from conforming software before.

68020+ does support unaligned data accesses, so IMHO such transfers
are valid.

But is that valid also across page boundaries?

I vaguely remember (from 15-20 years ago) there being ARM errata about some things being undefined when doing unaligned 16/32-bit data access across page boundary, so maybe it's not so clear cut on m68k either?


For compatibility with 68000/68008/68010/68012, data is
recommended to be 2-byte aligned.
Instructions must always be aligned to 2 bytes, though.


	- Eero

PS. Quick googling found following ARM spec comment "a watchpoint might be undetected if it occurs on the second part of an unaligned access that crosses a 4K page boundary", but I remember issue being not just with watchpoints back then.




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux