[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACCGGhCGcdEq7CC3J0201ETvAd+PZ2fTDNUS3mo599Tuf-61yA@mail.gmail.com>
Date: Thu, 9 Jan 2020 13:36:22 +0000
From: Paul Durrant <pdurrant@...il.com>
To: Sergey Dyasli <sergey.dyasli@...rix.com>
Cc: xen-devel@...ts.xen.org, kasan-dev@...glegroups.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
George Dunlap <george.dunlap@...rix.com>,
Ross Lagerwall <ross.lagerwall@...rix.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Wei Liu <wei.liu@...nel.org>
Subject: Re: [PATCH v1 4/4] xen/netback: Fix grant copy across page boundary
with KASAN
On Wed, 8 Jan 2020 at 15:21, Sergey Dyasli <sergey.dyasli@...rix.com> wrote:
>
> From: Ross Lagerwall <ross.lagerwall@...rix.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. Therefore, handle grant copies that cross page boundaries.
>
> Signed-off-by: Ross Lagerwall <ross.lagerwall@...rix.com>
> Signed-off-by: Sergey Dyasli <sergey.dyasli@...rix.com>
> ---
> RFC --> v1:
> - Added BUILD_BUG_ON to the netback patch
> - xenvif_idx_release() now located outside the loop
>
> CC: Wei Liu <wei.liu@...nel.org>
> CC: Paul Durrant <paul@....org>
[snip]
>
> +static void __init __maybe_unused build_assertions(void)
> +{
> + BUILD_BUG_ON(sizeof(struct xenvif_tx_cb) > 48);
FIELD_SIZEOF(struct sk_buff, cb) rather than a magic '48' I think.
Paul
> +}
> +
> MODULE_LICENSE("Dual BSD/GPL");
> MODULE_ALIAS("xen-backend:vif");
> --
> 2.17.1
>
Powered by blists - more mailing lists