Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2024979ybl; Thu, 9 Jan 2020 05:43:25 -0800 (PST) X-Google-Smtp-Source: APXvYqw6ZrTg6nhSBmWNShDv+tZAUAaamFv3b1axaDJ9JjquZMfBz4o7vKayLcIOjoKSduvjmFMR X-Received: by 2002:aca:388:: with SMTP id 130mr2934801oid.89.1578577405601; Thu, 09 Jan 2020 05:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578577405; cv=none; d=google.com; s=arc-20160816; b=YrogCsmSw2anqzZAvnvMytpJfmb2ieo8Ya8Fzt7Gle7i+/nIrVJk7S9wyH7yZ6OrdG S1SmHW3KJwKQSfhUIgICacITlmCz/4m7lilD5HPq2R5XaB8bDfcqI2bH/vMVDd/B40O7 fUYuJw+a4Fr68jBhpzSHkRzmS+aLazC5cJSIdKk9A8Hv6DfCkOC1IuVe5wNoUibq0cbW p1FT1+XjBTeLgyORCbpb3AyVPk9+G/h+unuyZFd1NIJHhLUciJvgw3gqlMOjDbif7psZ 9UMO825dhvvZ1MuKgcRSwpI/TNyQ6mRMp7mEYkvnqOZi2UAPXpA5XCuZ73z32hpUURtB DWIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cf95WORT6GX1WJSn8Af/G1OCB1Irn/cMBwQxwXC43X4=; b=R06QOE8lPL1tqnDNBNbICUFik9TLc1ABJH37fE2L5rBKKONIm02PQpEjD8QrnTaGYP PKurpPBr+mLn9R05WCHpJaIRobxdN92+fvP3stXHoCxNueUzij+UnjHRCc9koNNNU7A0 SeCgGBCx9GA5X5zCtkV1BFaOxEBxvas9KKL4Adjb++DN5BUyDg8gGNPiIT/6nrY/MnoX EI5eVjX4mS1QgeHVBjJARJtpwrnwURW/TVOIJLLrP7T3lW8S1j8cvTSj6HhGU1r+zVbY 5qOXgZV9DOEUipuFfHqzfNLqa8yxUD+cKt5m7OCGVI/EFkxcUrw629uUozdAki6WpUY1 HUFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rmPFqplF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si4051716otp.106.2020.01.09.05.43.13; Thu, 09 Jan 2020 05:43:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rmPFqplF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731191AbgAINgf (ORCPT + 99 others); Thu, 9 Jan 2020 08:36:35 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36041 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728974AbgAINge (ORCPT ); Thu, 9 Jan 2020 08:36:34 -0500 Received: by mail-pf1-f195.google.com with SMTP id x184so3410092pfb.3 for ; Thu, 09 Jan 2020 05:36:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cf95WORT6GX1WJSn8Af/G1OCB1Irn/cMBwQxwXC43X4=; b=rmPFqplFiG2J23km4wRX/Ng/4kLCh6mrZt9F0tbMq9Fkk952L8sqSIO4o7LgYULfwU 1KtC1gWAKTfa0XSUUAQOR/AmiotKOiyRCtMVmsyZgWl7wiNros6lsyIzVBKk/lEPxX0N 5O4IjgJWkFY0lyOJzBgBeSNBDQagktLXZMzfFMLURXzGXfLJjyf9u7JhjvdvJVIPPoIV +FpzI1GmzdsT0mwz6RfBwpQvN5KYst18bnDXEZX/R66raaG4xngUb7fMMFDFr4XRrHLC HS0EaXm5BYy8/MMd3k9yPgsTCotJx3MtIWFki3GxVm5+umLuLYzDRu1kI/QqXQdGnzea 4fzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cf95WORT6GX1WJSn8Af/G1OCB1Irn/cMBwQxwXC43X4=; b=ESoiF44ANtBrD2REWUY99BRe3TRL3cTTuQKjwlGy1oGtiDvosD9C6KdCu5euc7C/D5 6kSr1U701C/DqciSlHTLlyCfTIyWuvVB/JzC9ZUkKaLxA9XFZ2BdzP++y634GbfvBBjn 2sisN3TyVvwx9QBun5Xop7N7Z996gwXNplFMaFIqVZg9JHO/erp6EsfMh/gFUGTe8rYZ aMoY60g+FnU0X4crnrK/61CsipqTDx6yExdmU0x8OmzsHT0qhDd6QQQVQPvSVERbgwPG iJ8GKCqSlMlTirTkEe0NGc4c3+vUllDITWMCS9uykbxk4g8/zrACUx3kGI3X45GoY/qM H4Tw== X-Gm-Message-State: APjAAAVExdD493MjGGKdIj86Tyv0tvYA1mRyA30+hdiPiV2jyEauEwoq maMv8YEf8YND0pAR0P7p8DHhUV8dtXuASl2mIGU= X-Received: by 2002:a63:3dc6:: with SMTP id k189mr10954174pga.396.1578576993895; Thu, 09 Jan 2020 05:36:33 -0800 (PST) MIME-Version: 1.0 References: <20200108152100.7630-1-sergey.dyasli@citrix.com> <20200108152100.7630-5-sergey.dyasli@citrix.com> In-Reply-To: <20200108152100.7630-5-sergey.dyasli@citrix.com> From: Paul Durrant Date: Thu, 9 Jan 2020 13:36:22 +0000 Message-ID: Subject: Re: [PATCH v1 4/4] xen/netback: Fix grant copy across page boundary with KASAN To: Sergey Dyasli Cc: xen-devel@lists.xen.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , George Dunlap , Ross Lagerwall , Andrew Morton , Wei Liu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Jan 2020 at 15:21, Sergey Dyasli wrote: > > From: Ross Lagerwall > > 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 > Signed-off-by: Sergey Dyasli > --- > RFC --> v1: > - Added BUILD_BUG_ON to the netback patch > - xenvif_idx_release() now located outside the loop > > CC: Wei Liu > CC: Paul Durrant [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 >