Messages in this thread | | | Subject | Re: [PATCH v1 4/4] xen/netback: Fix grant copy across page boundary with KASAN | From | Sergey Dyasli <> | Date | Wed, 15 Jan 2020 11:02:59 +0000 |
| |
On 09/01/2020 10:33, Vlastimil Babka wrote: > On 1/8/20 4:21 PM, Sergey Dyasli wrote: >> From: Ross Lagerwall <ross.lagerwall@citrix.com> >> >> When KASAN (or SLUB_DEBUG) is turned on, the normal expectation that >> allocations are aligned to the next power of 2 of the size does not >> hold. > > Hmm, really? They should after 59bb47985c1d ("mm, sl[aou]b: guarantee > natural alignment for kmalloc(power-of-two)"), i.e. since 5.4. > > But actually the guarantee is only for precise power of two sizes given > to kmalloc(). Allocations of sizes that end up using the 96 or 192 bytes > kmalloc cache have no such guarantee. But those might then cross page > boundary also without SLUB_DEBUG.
That's interesting to know. It's certainly not the case for 4.19 kernel for which PV KASAN was initially developed. But I guess this means that only patch description needs updating.
> >> Therefore, handle grant copies that cross page boundaries. >> >> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> >> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
-- Thanks, Sergey
| |