Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp738778rdf; Fri, 3 Nov 2023 13:37:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGooz/hshKdVD+PsApRyW70W3u/8fKAlIkRNjL5fAYDnpQ++v30XtNuM81uYQRfR0LHQrY9 X-Received: by 2002:a05:6871:2b04:b0:1e9:beae:947d with SMTP id dr4-20020a0568712b0400b001e9beae947dmr27763394oac.19.1699043866514; Fri, 03 Nov 2023 13:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699043866; cv=none; d=google.com; s=arc-20160816; b=kIddD5R24krAZeHFZZmryIXRrRBPo8L4yz+ngcroLnTRQtQMIUgeJVf1JsshB2jdIz Z1R8vpDVX3Gdqz63EjWmjJzcsTylFdPnILfo6U6PMalCkN3BojoN1ZyD/Ygxo+JcwNm9 D0D4NNe6Q6YZjCcZH/sT7oy73gUrIgUCYIRoY7hsZ/Ef/Uk4KPCX8nXARAd6bM38kkGM epUV3ciKcqc884oOYY7nkPohSTQHTJAt3ECtB2yoayk1CRO+iBehf9hauoJ55rpSz8+H yaItd5eOyBlrJGvnC6DYnbhN2cAiT+o53zQIHDhIZ8Nz5o2+9uHfHQRe3P5qdxajpS2U Y92A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=qzjEyUYLHZleIDTS6RTLkKtGAiXZ2AH99d7iJ1I6V2Q=; fh=vhyMgzwtVf8Cd+Xluz+kIPeaZIksHpPCItLJmpWVnQM=; b=jDWErAJDnaq/zGW+1ni0Hi3bhjBck8GFnYulZ9dexdXbYfRW6WrqNBN8iol2RF1QoM brCoT3nMi/A8PFBFguBIqe4gGJxaSjigAWxJ7sXbr9PVhZPlCXHov5S96tXzeFrOx7gy s5nGvE1Xn+mc9WM6vMJiC7RC/LzXTCev0OMHLSpE4R5O8BRNd/37KT5//URwxWsUZ9A+ NcmaY865nfmStUxklHG/jw5awfXUa0clxBERMTn1CC9dABdslonER0sM726V39kodHWy vcp00SDqCrhTruShle7jBp8FT+HMasv42TDMGMvJqseMuI9DyViHELSwnCa1ToW8f1u/ V9/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZvhIKpAR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l185-20020a6388c2000000b005b837dc0b4fsi2092164pgd.445.2023.11.03.13.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 13:37:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZvhIKpAR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 63D4F8379462; Fri, 3 Nov 2023 13:37:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235056AbjKCUhg (ORCPT + 99 others); Fri, 3 Nov 2023 16:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235049AbjKCUhe (ORCPT ); Fri, 3 Nov 2023 16:37:34 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5811A194 for ; Fri, 3 Nov 2023 13:37:32 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-28094a3b760so2986931a91.3 for ; Fri, 03 Nov 2023 13:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699043852; x=1699648652; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qzjEyUYLHZleIDTS6RTLkKtGAiXZ2AH99d7iJ1I6V2Q=; b=ZvhIKpARGrfHAXTfzkI8P40CoAiPbcW0Xpd/meJNvihvqTA3ewVPTpFo2VyFUtEkUm n0/K+VeVjzitBNkerEbOkExwK6bxK7ubX4q4H/mKbcEsUtSfdOMFw8Bb1T2p6RLvdrhl y6+SYT2lC/JfGEvHS0ljb008qXgLcYEBLjrsbbJkiXBGC9o0BGndqKk2bgKU5s1+cEg5 TMagd6Uc5ubjyEtnGdXCdwbKoXRcsrjMBQ5Ms1AretHr4+jvGaVMzSD65BcV9yK+fo5o mQHTTpA7L5Hk6xLiuNUQvRoboYS4QdGQS9k4CxghvDcp9+DN2R3Rp+eJ2Le3Dv094oVu Ez1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699043852; x=1699648652; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qzjEyUYLHZleIDTS6RTLkKtGAiXZ2AH99d7iJ1I6V2Q=; b=S3fmvSDb5SYqYH8yDRhsPZQdrVfs0c3+WTbHLiL3lnYLkIHnqyKKtJkS5Q1ZArifdo 7DVZUm2zCmb8a0gIZHZnaPy8OxId7jg46aeC3gaq2DJZLN13Zg3747YiESyuwsr0Kd+v zclFfwJ1t5bUX0GIA2BodEyY0k2XVCIblRCUSfOnKiHzJuJWDN1JCcNcXBSKGRCD9R0j xPtb8Wz2QYnUB/QV9LSzQ8dXWjhNQGicj095FnGnelDsKT7KATp3+DXpmxZQ84dM+M/O xDzYmI/J4YVHvqCm4ijZ/FIPI6jiymOtJCF4eNp1CFKn86eIeIlS+sUiGbrolb1WFUQW 2QPA== X-Gm-Message-State: AOJu0Yw+X7eLzFbXlrvTHcslEuqYuAmr68xLWTiZxWm+U31qQFfkckk1 r+dRgxTZXXI3CtfErU+5X5MrwQkEo6cl0VdUs5QCA6ue X-Received: by 2002:a17:90b:f92:b0:280:bb7:9fa0 with SMTP id ft18-20020a17090b0f9200b002800bb79fa0mr18749245pjb.43.1699043851766; Fri, 03 Nov 2023 13:37:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Fri, 3 Nov 2023 21:37:20 +0100 Message-ID: Subject: Re: [PATCH 1/1] lib/stackdepot: print disabled message only if truly disabled To: Marco Elver Cc: andrey.konovalov@linux.dev, Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 13:37:44 -0700 (PDT) On Fri, Oct 27, 2023 at 2:54=E2=80=AFPM Marco Elver wrot= e: > > stack_bucket_number_order seems like a redundant variable, that should > at least be __ro_after_init. All code that does "if > (stack_bucket_number_order) ..." could just do "if (kasan_enabled()) > ..." and use STACK_BUCKET_NUMBER_ORDER_MAX constant directly instead. > > The code here could be simplified if it was removed. No idea why it > was introduced in the first place. I think f9987921cb541 introduced it > and there it said "complemented with a boot-time kernel parameter", > but that never happened. > > So I'd be in favor of removing that variable, which will also simplify > this code. On the first thought, this seems reasonable with the current code. On the second though, I think I will soon add a command-line parameter to allow controlling how much memory is used for the stack depot hash table. I propose we keep the code as is for now, but I've taken a note to either drop this variable or mark it as __ro_after_init when implementing memory bounding controls for stack depot. Thanks!