On 11/21/19 3:59 AM, Borislav Petkov wrote:
On Wed, Nov 20, 2019 at 05:10:41PM -0700, Dave Jiang wrote:
I'll add the check on the destination address. The call is modeled after
__iowrite64_copy() / __iowrite32_copy() in lib/iomap_copy.c. Looks like
those functions do not check for the alignment requirements either.
So just because they don't check, you don't need to check either?
No what I mean was those primitives are missing the checks and we should
probably address that at some point.
Can you guarantee that all callers will always do the right thing?
I mean, if you don't care too much, why even write "(must be 512-bit
aligned)"? Who cares then if the data is aligned or not...
+ * @dst: destination, in MMIO space (must be 512-bit aligned)
+ * @src: source
+ * @count: number of 512 bits quantities to submit
Where's that check on the data?
I don't follow?
What do you do if the caller doesn't submit data in 512 bits quantities?
How would I detect that? Add a size (in bytes) parameter for the total
source data?