Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp722127pxb; Tue, 2 Feb 2021 16:42:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwj6fDCu0BbjW4ToDqWDwr93iohOoywkT5R99Atge133Csca6vZ6CmmAYssVPP3g5b/Sdzj X-Received: by 2002:a17:906:5002:: with SMTP id s2mr608222ejj.16.1612312936031; Tue, 02 Feb 2021 16:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612312936; cv=none; d=google.com; s=arc-20160816; b=v+8a0qr35VVCAoO7M7/MRfU12jUF6gyPAK7cTc2UkpVKAoj2LSEHQG6bZEgDyTKfjZ NlTG+4Kc++Q6RlMuSjE5a34yUUMuazt3X7fpDGS/spwtRbxEGP3LlW3m882YBUkeKVqK mYyucsJ2SG0Au1jEdyIzy9d7oJcGvr6nLIQ5Txf3yMQqj5EwkFWTx/N0OgxQhKFex/Sb rtqAT2l7Qk4S/Z+lQnQrlr9xBbc+ZpM6Y0hMHmzsV4J++HTLCTL64xSLV3go4hpQRR3+ e3lffz8zoTGbie/8cNPDAY/7b99uxk4lRFxZd3NsRmC+QxEc+1VV4FW+afMgUceC32f2 7lCw== 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=AM9+VMIDUzwgmsYBk9umRY0HUzM3XXRBDO1nka7d3og=; b=wWxHzvzd9Tn3uHHbOKhEolGGRfHn/6GPKxgt36xxk19rNJdGfAQIV1N0U2T9nOXeZ1 /rJC9PqV6iwnmVzAdab7N0R05A6OBCj3KoOvnwZydaVoAgAEag3Y7DLomLMcu4L65HJg dhUxtsn6LIETJFeL+wkHWnLah82wqPnP8Kt1aS7mMMmse/X1KOqPmG2fb/TO11X21YV6 S10LSJ79okuUttBfXMaHn6O8eqsIB7NJexAOUu9C4UpZq3nW+MMIOVueoavF6cVeZNYE ca4YxRs9QvYqz9Hz1e8yCx0fvL2lBnB7B9GOVBOFlzmMWCLraqawyETyVL72ANtAp/Qu mg3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=s9rHW2e0; 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 sb11si315332ejb.0.2021.02.02.16.41.52; Tue, 02 Feb 2021 16:42:16 -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=s9rHW2e0; 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 S237474AbhBBSpW (ORCPT + 99 others); Tue, 2 Feb 2021 13:45:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233733AbhBBSlt (ORCPT ); Tue, 2 Feb 2021 13:41:49 -0500 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E29C061573 for ; Tue, 2 Feb 2021 10:41:08 -0800 (PST) Received: by mail-ot1-x333.google.com with SMTP id 63so20865683oty.0 for ; Tue, 02 Feb 2021 10:41:08 -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=AM9+VMIDUzwgmsYBk9umRY0HUzM3XXRBDO1nka7d3og=; b=s9rHW2e0Nrv0tmYo6Fias3UCwRvC3sycwUaSoUl5TmWaf7y8UPYAxbNoId0ZKFyV0G EZRTqAviAAx5h3M44XGhYBG7ijYHRbr+315nDi089h86Yj5vloULaaOOAK2KH28RQOrB GaTXje2AzkUQdSI+viwvcwTy2ZZgWhjXVHK/cy89VtqVx5fFo2pFcC/a7OWRANkca9NF OowcE6XVOkVJWncAxyUJn3c2Cy2PkqvUo/+P2u7G1aA4mrsmYIrt6Ul+WCARvBon8jtn pw00h/M4Wu+7kjmIC+9lQNtnS0ZY2UtNEuGr2pWq971W/PdOnHLz0XELsnqBX1sjt+2Z J33w== 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=AM9+VMIDUzwgmsYBk9umRY0HUzM3XXRBDO1nka7d3og=; b=Et12wYYY5d4Tq3qCMl0UJi95QHl8bKFqxTyc1LQ0rrfOUEtUULN61n/fVe2DIzx3uc rue33nhKgFjZKB+zrfWGoPEiXAgFafuN7MDjgWUgCf3Qf8/DNo5eNHNhiQXF1K0K+Fc8 dCHWtQhpQGH5luNBkWnrNJVPt2QthgO86ZxCGglhFJ9nQCTnSclB8Kfz4Z1LMLw63OYa qrTOnzIG7SZRt/uM+FFtNKGtqI/p+i/ZHWg+umI6BPtUoQ57e9v0QY43CeFmgfB4aIdG Zn+KUxTGAQSUtIIz6LxNG3HpTnMrncApTMIL2XcNN+wQR5jl+R281EAWRAa8S1VG2AK8 xrDA== X-Gm-Message-State: AOAM5330DlpLiv2iKVQoHL1c86QJ6Bir7r2pxdV1biluWetzAHj0yZIY Cb02cqini6bpTXUOzZFx9SGTooFP4xt32IyiQSkkEw== X-Received: by 2002:a05:6830:1d79:: with SMTP id l25mr15633121oti.17.1612291267706; Tue, 02 Feb 2021 10:41:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Marco Elver Date: Tue, 2 Feb 2021 19:40:56 +0100 Message-ID: Subject: Re: [PATCH 01/12] kasan, mm: don't save alloc stacks twice To: Andrey Konovalov Cc: Catalin Marinas , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Andrew Morton , Will Deacon , Andrey Ryabinin , Peter Collingbourne , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , 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 Tue, 2 Feb 2021 at 19:01, 'Andrey Konovalov' via kasan-dev wrote: [...] > > > @@ -83,6 +83,7 @@ static inline void kasan_disable_current(void) {} > > > struct kasan_cache { > > > int alloc_meta_offset; > > > int free_meta_offset; > > > + bool is_kmalloc; [...] > > > if (kasan_stack_collection_enabled()) > > > - set_alloc_info(cache, (void *)object, flags); > > > + set_alloc_info(cache, (void *)object, flags, kmalloc); > > > > It doesn't bother me too much, but: 'bool kmalloc' shadows function > > 'kmalloc' so this is technically fine, but using 'kmalloc' as the > > variable name here might be confusing and there is a small chance it > > might cause problems in a future refactor. > > Good point. Does "is_kmalloc" sound good? Sure, that's also consistent with the new struct field. Thanks, -- Marco