On 06/11/2018 13:03, Peter Maydell wrote: > When can this masking have any effect? These functions are > the read and write ops for lsi_ram_ops, which we register with > memory_region_init_io(&s->ram_io, OBJECT(s), &lsi_ram_ops, s, > "lsi-ram", 0x2000); > which specifies a memory region size of 0x2000. So the input > addr must be in the 0..0x1fff range already -- or have I missed > something ? > > It would probably be helpful (for readers and static analysers) > to assert() that addr is < 0x2000, though.
Indeed, there are cases where the address is used blindly in a memcpy with size>1, but this is not one of them. Paolo