Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp582668pxb; Wed, 11 Nov 2020 10:51:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxczxrKAII8H/aSTJmei2n8GZgYp3uHNJfYaZxCof77/Lc5nxpRZr8nAw6Xb8dKwTzP3FwN X-Received: by 2002:a17:906:7cc:: with SMTP id m12mr25205398ejc.365.1605120662718; Wed, 11 Nov 2020 10:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605120662; cv=none; d=google.com; s=arc-20160816; b=t4kG/ZOymUNRxrAiSbWGhPRQ4JDFMk56wW+XXCDGyBhtHFHG9I34pvVPMYtM5ccPQo KsOqI+eVuLTqP+TZ89X22tdlW07uutsO5UBL6dqS0sIppWSZYjPPdwdlhWZ+8Dnzo3sf qbhPDM/AQf0nA0w1bqYp9ikITPrbu3QyOgE7irUPCaPQtCa+PyLFZrk2mtWa5p/Ouho1 VMvWQ3D47Ff9ylntYEz0yowFGPQNZmTKDPKsrHOF+1dz+obOJkeRqcThTKpJHdu3OHBM N4eivxuSbNxZ7oIO2fNOzSt6nej3wqQf4+9PBMIryl6rvziLJZQ3QPGaQqNhQ1J5QkBf Npew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y30nQOc9Erw1djQyyLfK/qeAvjp84VdQVely6oznPn8=; b=m4+sKcBe972lg7hWZBrmy2/99U+nEu/cMs4ewFPOGWv837InGUd4vjMXURnVsuYjSi 0k/tEaiLqCo42pljApclxFPlXm/48eKY0Ad7fGmXAMhFds/lscj9MFzEaJfUinML+D+l INCaMQmzR18geNXstMiYeGGnybgN4oRvhGFCZW325303fi9xmG1p72+drputpBp29jcB NAYIELVxVSrb3DkZGDsMsUA1a9UKF+jDe+XgUrQ87NpJxd0wRYJfkkROu6pgQH2awSLW ScZSiAUsYajeqE5N04rT5JvFZofiJa7Nhd7UamZKpmf4P2Esz3w/4tjcopw1aHpJxIrp 9Fwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=F4hURf+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si1855684eje.619.2020.11.11.10.50.37; Wed, 11 Nov 2020 10:51:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=F4hURf+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbgKKSsC (ORCPT + 99 others); Wed, 11 Nov 2020 13:48:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgKKSsB (ORCPT ); Wed, 11 Nov 2020 13:48:01 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C5C3C0613D1 for ; Wed, 11 Nov 2020 10:48:00 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id g21so1144117pjv.2 for ; Wed, 11 Nov 2020 10:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y30nQOc9Erw1djQyyLfK/qeAvjp84VdQVely6oznPn8=; b=F4hURf+RTl0225vrWEfSZbmk7Bq//Kjebnui8EwY/qNqYqonykgLg+oX5/8q2RUpEa IBKu+B6Kjr8csyGFXKQLcXMl1wFQdLHM3PjHQLOdnm6UhmEv3LEkoQC1hc6wUq/Sthvd TKw6SUMvaRqBMi1QFlABZaiIxDsHx05tvJXz8c1HFxNl9P/2CzA8p1rvts3Uvo+LoG68 uCGnYptuf0HoaOHyOLerQOQxr5IGVfv57rGUGC4eQT2+dPNT2l4atE0UI4tpZjl9bxTT eKkIy362bjYc5GOqF7YWK3NoSOxBfeVbQHVn4uO1DrVZkDh2AmOoAE92dRVl8mTd0Hog 1v7w== 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=Y30nQOc9Erw1djQyyLfK/qeAvjp84VdQVely6oznPn8=; b=unHaxXn0p5+obubVgBaDX6fw2xXqKgS/jiElHYolqPnNHep5EJTTVEQVX/XsIf5mU3 B8W41maru6ruuJaelsfq5/erTUXGmXu2/gYQTAqFZnSgisPxHjXVvFtbh9xb8IUFJJh0 iHMrJd0RToTOdssNGvK1VmRHwcRJYaSca/1Bn6wj1xKE3bQQuoTvcIIY7NOrd9zguqVk 6TwEjGQl62tvKA+30v408+HmLgdYmTjevaPbSKF4nUCOOx01zp6zQrcTQIinkB5Jj5H1 LtjF0+jgnnHVKr0GsQcnyFNlvyivLG4WV8jd5UrZeblIoPxvXk9lwFobItVEVcYAoVUP q6RQ== X-Gm-Message-State: AOAM532k41wMCfDvJvoLS76Fu0FpQE5zWMh6KjKoLBJIaeDRSKj1N00Y 053XwinGCb1AxlprOc0QwdFI2TJWC3yRDJrmZlL2Xg== X-Received: by 2002:a17:90b:3111:: with SMTP id gc17mr5116219pjb.41.1605120479739; Wed, 11 Nov 2020 10:47:59 -0800 (PST) MIME-Version: 1.0 References: <85aba371903b749412fac34e44e54c89e5ddae30.1605046192.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Wed, 11 Nov 2020 19:47:48 +0100 Message-ID: Subject: Re: [PATCH v9 10/44] kasan: define KASAN_GRANULE_PAGE To: Alexander Potapenko Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2020 at 3:13 PM Alexander Potapenko wrote: > > On Tue, Nov 10, 2020 at 11:11 PM Andrey Konovalov wrote: > > > > Define KASAN_GRANULE_PAGE as (KASAN_GRANULE_SIZE << PAGE_SHIFT), which is > > the same as (KASAN_GRANULE_SIZE * PAGE_SIZE), and use it across KASAN code > > to simplify it. > > What's the physical sense behind KASAN_GRANULE_PAGE? Is it something > more than just a product of two constants? No, just a product. > The name suggests it might be something page-sized, but in reality it is not. What name would you prefer?