[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 4/6] xen: Switch to byteswap
On 10/05/2022 12:17, Julien Grall wrote: >> >>> >>>> diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h >>>> index 0a2b16d05d..16b2e6f5f0 100644 >>>> --- a/xen/include/xen/unaligned.h >>>> +++ b/xen/include/xen/unaligned.h >>>> @@ -20,62 +20,62 @@ >>>> static inline uint16_t get_unaligned_be16(const void *p) >>>> { >>>> - return be16_to_cpup(p); >>>> + return be16_to_cpu(*(const uint16_t *)p) >>> >>> I haven't checked the existing implementation of be16_to_cpup(). >> >> It's a plain dereference, just like this. AFAICT, it wasn't unaligned >> safe before, either. > > Well, technically an architecture could provide an override for the > copy. I agree that arm32 is already bogus but... > >> >> It should be reasonably easy to fix in a followup patch. Just memcpy() >> to/from the void pointer to a stack variable of the appropriate type. > ... I disagree that it should be fixed in a follow-up patch. It should > be fixed now as this is where the badness is spread to any architecture. No. That is an inappropriate request to make. Lin's patch does not alter the broken-ness of unaligned on arm32, and does improve the aspect of the hypervisor that it pertains to. It therefore stands on its own merit. Your choices are to either fix it yourself (after all, you are the maintainer who cares about this unrelated bug), or you ask Lin kindly if he has time to look into fixing the unrelated bug after this series is complete. It is not reasonable to say "this unrelated thing is broken, and you need to fix it first to get your series in". Requests like that are, I'm sure, part of what Bertrand raised in the community call as unnecessary fiction getting work submitted. ~Andrew
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |