From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8455FC43381 for ; Tue, 2 Feb 2021 18:45:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 679C764E36 for ; Tue, 2 Feb 2021 18:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238938AbhBBSpa (ORCPT ); Tue, 2 Feb 2021 13:45:30 -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-Google-Smtp-Source: ABdhPJyszm0Fovxs8Faqw0izV1peYSHPFf1e4UR8/ubU5Sy4IxlghvFKxy0dDX0vNZO/byxceLA6nptlOzBLctRSooA= 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