Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2374090iog; Sun, 26 Jun 2022 14:11:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vWIUFKUhiW9j9aMLEQbdXaZSNoS9HLgiNAhK9R/4+KmR+yQYF4gR1qnNSPbLVOI8rJQ/ro X-Received: by 2002:a17:90b:3cd:b0:1ec:a6a0:9c1b with SMTP id go13-20020a17090b03cd00b001eca6a09c1bmr17446057pjb.215.1656277891389; Sun, 26 Jun 2022 14:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656277891; cv=none; d=google.com; s=arc-20160816; b=Hv3yJU4P0BAutjfjvd8gqtLmiZC1j0ZHMCq9HjDkAfB0YqAr2cDpa2QPZwWHr7kOgt RQmtZ4zuaGO+s7XMOs3owKBxiDLXAwNLhIp1bNJv/jOaYjumPhLo7LARML9PfSteFdGr JmmUOQ9cJKAJ9FdcQ/4EYcGqbBswnijRV2nood4SsP+obF4lLNsL3ttEUidRRcB59ezd cJH5PMyz0mP3ZZR1Kvt5Fnc8s4b4vp+MGOXB9Wbvk5fr714qoihhguMbxy7tg0K0Fcc1 ED9hF1gZHKMTlMZJZ3jQTTwR9xFZKTgGJ2vc1iSAfEhDAEPj94Wl3yWw2Akt6+OXl0U5 rntA== 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=F6P3zC7r4qnr1luJY9BEvSQvlGGlGr98+TEUY9WUlLM=; b=KKf/XyHRPHq5aj/2Up+WyxSFGeZuBWvsz3bX8tLcu51qhKfHw8yDdPrjyqZVhHzn7I g1B35fvRYgPCo7w4e5LlbbGzqWR02F7aq27/Ii4RlWpUrPOP4mozlZtd8roQraY6sT/u v1agte2mIrtguPVZiyuEemrLLpps5ohka+eQTNdY00r3QrnYJaDbG5pFwieNe/tstrle dw+fcKTVwmnvu1hYbuvuQ9PbxbbE8Thtb11xlWsb5hGzqatjHmrsroTeay46EWreBk64 bKzGphe+2GsF8tOmeAbFhfBrhgB4k6+a7THxX/22dV2JbPMlbsJXAemzcY30grnRGHQv 6XjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GziGBpi7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n33-20020a635c61000000b00408a85a1cf1si11507166pgm.658.2022.06.26.14.11.17; Sun, 26 Jun 2022 14:11:31 -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=@linux-foundation.org header.s=google header.b=GziGBpi7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbiFZUyt (ORCPT + 99 others); Sun, 26 Jun 2022 16:54:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbiFZUys (ORCPT ); Sun, 26 Jun 2022 16:54:48 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08243883 for ; Sun, 26 Jun 2022 13:54:47 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id z19so10405687edb.11 for ; Sun, 26 Jun 2022 13:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F6P3zC7r4qnr1luJY9BEvSQvlGGlGr98+TEUY9WUlLM=; b=GziGBpi7dQFfIG0Txygu2pnE6fjt94O2OQY6YUkszCaMMnCzFMZfPq2lo472IfIkuQ bIIKuBjGkGUctDV/KawGQViKWjhAkTcGa0dFqgWB1WYmRe/mBZsC4/NvC/RfOKPmqP34 bjs0rruKGrlyoFzy24TAZKfII14+tbtVPmXiE= 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=F6P3zC7r4qnr1luJY9BEvSQvlGGlGr98+TEUY9WUlLM=; b=i5yN5u7o8rpsR7YBrPUzII/9lGmtuj6tmmvRCSW7jAlzAj0HrculklAy99t14UOvw9 a9t6fZOVvp5qSd85Untq2sE5yGl0VZhnTmlYNnLNwCi8i3DfibWi+CWO5yGUo7TEFtom aEF7wqHx6hMZYGwYoy9s7L4uKaWMlp4gS0Xo9jvvSQ/tFCAUOrcZ3dYjMBBQZjrZTHTB J+v7t5+Zf2A/b2LkYlW7/YYCtdaRQh7tLcmcymKkjSa1D2YdjW3yQLBm7Oac+Xgll1vq mYkB2B5s08UcA2jxWt8skPBwgnqRAAt+fa7ZjUSYKyVawZP93PXw9xtU8ej+7XeFEeqT s3NQ== X-Gm-Message-State: AJIora9tf9rBvrBV7UzM59lY/q2pM8dohaoNTKRpVvRBX5l0aQRexYfY MY7NG82VBJUx4CBy8tLM7PujplN6RLjRYPoq X-Received: by 2002:a50:ff0e:0:b0:433:5d15:eada with SMTP id a14-20020a50ff0e000000b004335d15eadamr12739879edu.102.1656276886321; Sun, 26 Jun 2022 13:54:46 -0700 (PDT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id a27-20020a170906275b00b00722e57fa051sm4123837ejd.90.2022.06.26.13.54.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jun 2022 13:54:45 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id w17so10365535wrg.7 for ; Sun, 26 Jun 2022 13:54:44 -0700 (PDT) X-Received: by 2002:a5d:48c1:0:b0:21a:3574:e70c with SMTP id p1-20020a5d48c1000000b0021a3574e70cmr9249733wrs.97.1656276884478; Sun, 26 Jun 2022 13:54:44 -0700 (PDT) MIME-Version: 1.0 References: <20220620004233.3805-1-kent.overstreet@gmail.com> <0a5901f8460f452a89c9b0cda32fb833@AcuMS.aculab.com> <20220620150514.3tjy5dv7pv5frcwd@moria.home.lan> <53d77ae6101a0f24cfb694174d4c7699424c57e8.camel@perches.com> <20220621005752.ohiq5besmy3r5rjo@moria.home.lan> <355e912490dbaef8fe4e12df0201c3f5b439565d.camel@perches.com> <93ab94ec92497af13c563c52fc7e1f7f81dac333.camel@perches.com> In-Reply-To: <93ab94ec92497af13c563c52fc7e1f7f81dac333.camel@perches.com> From: Linus Torvalds Date: Sun, 26 Jun 2022 13:54:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC[ Alloc in vsprintf To: Joe Perches Cc: Andrew Morton , David Laight , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Matthew Wilcox , Miguel Ojeda , Kent Overstreet , Andy Shevchenko , LKML , linux-mm Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sun, Jun 26, 2022 at 1:39 PM Joe Perches wrote: > > OK, and that's true for all the temp stack buffers in every %p. Yup. A lot of them are simply due to it just being simple, and when the temp buffer is of a fairly limited size, "simple is good". But yeah, that KSYM_SYMBOL_LEN thing was questionable before, and as it grows with KSYM_NAME_LEN growing, it's getting pretty ridiculous. For example, the buffer in "number()" looks very reasonable to me, since it's not only pretty small (24 bytes on 64-bit architectures). it has that special alignment requirement too. So I don't think those temporary stack buffers are necessarily wrong in general, but there's a point where they go from "ok, there's being _simple_ and then there's _overly_simplistic_". Linus