Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3841721imw; Mon, 18 Jul 2022 15:46:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uT/Bti6MsZ7KMM/hGVGF4MksXBIdPD7iHlWs4CcAe87LtyJV5wu3heMxdYF5cLgD9PYeqe X-Received: by 2002:a17:907:16ab:b0:72c:7533:7262 with SMTP id hc43-20020a17090716ab00b0072c75337262mr26031683ejc.288.1658184417137; Mon, 18 Jul 2022 15:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658184417; cv=none; d=google.com; s=arc-20160816; b=wDu+kMzBALPo+PhxakPvZeANsL55h3nTVl8iCqj59KzvseI5MHxzgEDmgBmpyw3NER IJ0xGyOZ+eNae75X5xHXjyUs5wJj0x+pdXbZlEci79B3mxJrcB/zFGSPZk7gBhYDbhYe UZ9VWCDWWDJOEZwqi1OOz3wRLneSt070ZsnVt80Ov4uXS1vG58F66NuVwBpcbCS8s5wB lhxI4ZIJ+BDNa/ffpn8yHHXQ+3ivIdboNl0CsbElZtX4d1rD39deHcB+yYKz2uJthm7Q qFefUrOLhuk1GFq/un5hYcWS0mrynNiL8nMI2b2xF4wpznNUMl0DS9kIrceQzvDqBy8c PWPw== 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=ISQEQ+fIU3xAcRWcqutk61dQJfgUByc+o/p0/o9VaqQ=; b=zw8XB+41JCudhRBomPkRTNnWhArKCII6Gxxws27/81TsV9kNOBUBFYMo5TG08fDc+m bvz3Smds41q/lvUJDimdpOdAuCCVtqoopzV44cjFOU5rBza+z0eg6Z/Ig4hT1gnSfEDw /BnbKruR5zQTFLm+pEBsn9lT5B1ea51UbYXB8P4hQO/o+XQD7j2zlTyotej6Fj1z15I6 VLRJvfA64Xo3WegGY6E95PkqZr5zfVZ9Xu9KUQqOhT3aK24FobwPjzbkk1kyazeW8oCb f0IV+I26730zAm2mv1q7S7dp6qLXrPrnPoQjq6sgCVwIRzgOJV3mADnhkcPwhwBnAVRn y+uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="IH/FZ8Sr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho8-20020a1709070e8800b0072cd463e0d0si19115068ejc.587.2022.07.18.15.46.32; Mon, 18 Jul 2022 15:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="IH/FZ8Sr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235533AbiGRWld (ORCPT + 99 others); Mon, 18 Jul 2022 18:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234596AbiGRWlc (ORCPT ); Mon, 18 Jul 2022 18:41:32 -0400 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B492DA9C for ; Mon, 18 Jul 2022 15:41:31 -0700 (PDT) Received: by mail-qk1-x72d.google.com with SMTP id n2so8566890qkk.8 for ; Mon, 18 Jul 2022 15:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ISQEQ+fIU3xAcRWcqutk61dQJfgUByc+o/p0/o9VaqQ=; b=IH/FZ8SrUXP2dDYcRxYo5hHvEHRDVPafx35U/9ZnUzKdYONMPijudkIJgyNp/P1eqS Vz+6KL7fWpehsS1cZaRejfGyFWa9vLodhJW54WnzQEK190wK7fzCpe4PgSrQWHAWy7LD 7P0Jn3c54BPUPIYPFib731YYvXf1TFuRIGIS/T7kyWo5aD/jaGyK+zZC7wKvmgenhRkO V1YUIwQj5br4kxCvuQZPcJDR4aEDHWvE+ePOZLsmgkHnzwZjCXOvCQ/99BF64hkTG7qd eJEAXPCtQMqIXm1OH4M7jazorAiFE6SEzkdjAGKvnw7iGZ69My6Qo5IOfomFGWEVisqU vo6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ISQEQ+fIU3xAcRWcqutk61dQJfgUByc+o/p0/o9VaqQ=; b=1L9c6rmXXKt8U+1hSCaOqFjpz6VhgY8lw7yEWUbEHWSfK++sDtGdHbhpwX9lFDdvti 9agKRrs+S0eb6+6a51842OiNVZBgdkVWFFA8jkV3yMTBiGtpHvLuquZ7AmT3XAXBbaLW 0wZ8XPUIrnz5s1VQOB01rtXS7t+09KXbbB0r5JJEvXCgvEPET7oB9HXDTKhBv5AApkIe TBOrDewdHJiPQ6WCyp+Mfrp5SXmb++aoMBOANzZMH1FT9q25HJuZcV9bdykjPreo8ank /lkeG+5DBdfJsfq0kcE/RLflf6U3iUy0Fc/P5EnVlHCkPM9gHxmyGHqnXzhCZXPwDb4b In1g== X-Gm-Message-State: AJIora+2Fe0rtnCOB+7mScSXWblTys4dIRWDE+3bLsve+rDF++InwYIY 8vh9DWoI8uG1/0D1FN6wXUvaZ0iKpHbV+snPuBY= X-Received: by 2002:a05:620a:2807:b0:6a6:6ef1:fb9d with SMTP id f7-20020a05620a280700b006a66ef1fb9dmr19234367qkp.146.1658184090436; Mon, 18 Jul 2022 15:41:30 -0700 (PDT) MIME-Version: 1.0 References: <11a7bfb5ed5de141b50db8c08e9c6ad37ef3febc.1655150842.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Tue, 19 Jul 2022 00:41:19 +0200 Message-ID: Subject: Re: [PATCH 06/32] kasan: introduce kasan_print_aux_stacks To: Marco Elver Cc: andrey.konovalov@linux.dev, Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Peter Collingbourne , Evgenii Stepanov , Florian Mayer , Andrew Morton , Linux Memory Management List , LKML , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2022 at 1:35 PM Marco Elver wrote: > > > diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h > > index aa6b43936f8d..bcea5ed15631 100644 > > --- a/mm/kasan/kasan.h > > +++ b/mm/kasan/kasan.h > > @@ -265,6 +265,12 @@ void kasan_print_address_stack_frame(const void *addr); > > static inline void kasan_print_address_stack_frame(const void *addr) { } > > #endif > > > > +#ifdef CONFIG_KASAN_GENERIC > > +void kasan_print_aux_stacks(struct kmem_cache *cache, const void *object); > > +#else > > +static inline void kasan_print_aux_stacks(struct kmem_cache *cache, const void *object) { } > > +#endif > > Why not put this into one of the existing "#ifdef > CONFIG_KASAN_GENERIC" blocks? There are several; probably the one 10 > lines down might be ok? The idea was to group functions based on their purpose, not on which mode uses them. Here, kasan_print_aux_stacks() is related to printing reports, so it goes next to other such functions. We could rework the order of functions in this file, but I'd rather keep it as is in this change. Thanks!