Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2354314iog; Sun, 26 Jun 2022 13:34:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sxy+XjnEZxEZnwGM86bAbFzqQq1zlAyQdBXvyoLYvtJd4KETN5wzEsi12SKpsorhQ3F8Yb X-Received: by 2002:a05:6402:40f:b0:436:a6ba:360d with SMTP id q15-20020a056402040f00b00436a6ba360dmr12596744edv.371.1656275655076; Sun, 26 Jun 2022 13:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656275655; cv=none; d=google.com; s=arc-20160816; b=K+RFoi1xLT4Bd9DXmzUrnSS3h5/SMgacKjzZrL7Ogf5u2jXFavvay29HqOSbn/SmvF SzhxEQZ8jl+D5QoW//OK2voF78kjLloDEdOUmVi3LAox6vwIxWEr67GdLknx8kjbWF1A bajnVg7EWBHArxijENml/1HMPgDvWwyYm1/KJ9NRAPX/FzCAJuk6gkH3eDMad8oQxjpL FAwW/C1A+0iAVvxH83kwTz/nmXHdW4BrMrrCE2CC+zzaaGTd4l6ie2d4d+Ht6HSMA75U 18OICYBxanuJp1/eTCgiI3CD60bzRz3raRwT9/5g2sfmmCkFbjfNcNkRbltlPewQLvkg QVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=rcueKupi/lKmV/QxHJsXY5S296wgKqh5SrUBEIdtBjQ=; b=jAZh9UsFaUuzUiANP8qvCEXCVoEpKQa2IVAFj5k+HV/U93mXhTS3SeyiNqE65I4CCk 9QdT18h56YZS88GtrcnEmrKAfX4VW7vraVmTbyTGaqLEpokcg26rBDFJiB+/1YN9G/lj aurYnXN02cQ4Pd46/lCRHERT7VvVenlGJG6FCQkABiiVY3cBSUG0p27jyyHV5ATdtkfE KUdgEFvESxAANJWzMC5cFav5z8OrjLABqrF+uq7GkvEZzh0m683TmaM2O2LetV940Vur PZBL1X6F1YpRe08eYBkasr8LHmIEPwVFgai8YyelbB2adYEw9MQKpQ46kNgAmrPRifb/ 3yfg== ARC-Authentication-Results: i=1; mx.google.com; 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 l8-20020a170906794800b00711fe0e94d3si9554051ejo.524.2022.06.26.13.33.49; Sun, 26 Jun 2022 13:34:15 -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; 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 S232193AbiFZUNa convert rfc822-to-8bit (ORCPT + 99 others); Sun, 26 Jun 2022 16:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231676AbiFZUN3 (ORCPT ); Sun, 26 Jun 2022 16:13:29 -0400 Received: from relay4.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 753E51D6 for ; Sun, 26 Jun 2022 13:13:28 -0700 (PDT) Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id D012C1201EE; Sun, 26 Jun 2022 20:13:26 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA id 642306000B; Sun, 26 Jun 2022 20:13:19 +0000 (UTC) Message-ID: <48797a0c929e87a72fccc48ce5cb95263da23e22.camel@perches.com> Subject: Re: [RFC[ Alloc in vsprintf From: Joe Perches To: Kent Overstreet Cc: Andrew Morton , Linus Torvalds , David Laight , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Matthew Wilcox , Miguel Ojeda , Andy Shevchenko , LKML , linux-mm Date: Sun, 26 Jun 2022 13:13:18 -0700 In-Reply-To: <20220626200618.jhxu5lg4w7o2irhr@moria.home.lan> 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> <20220626200618.jhxu5lg4w7o2irhr@moria.home.lan> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Stat-Signature: 8o99j5gabfgg5nj5pz8mqjhwiu7bprsq X-Rspamd-Server: rspamout07 X-Rspamd-Queue-Id: 642306000B X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, KHOP_HELO_FCRDNS,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+tTOT7eiYgj584PVuGjuFgfb+g9zXp/lI= X-HE-Tag: 1656274399-556557 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, 2022-06-26 at 16:06 -0400, Kent Overstreet wrote: > On Sun, Jun 26, 2022 at 12:53:26PM -0700, Joe Perches wrote: > > In a reply to the printbufs thread, I wrote a proposal to use an > > alloc to reduce stack in vsprintf when CONFIG_KALLSYMS is enabled. > > > > No one has replied to this but I think it's somewhat sensible. > > > > Thoughts? > > As functions get converted to printbufs the separate stack allocated buffers > become unnecessary, because printbufs have helpers that do bounds checking and > make outputting to the vsprintf buffer painless. So it's not necessary - I > haven't fully converted symbol_string() yet but I'll do so by the time I mail > out the next round of patches. _If_ the printfbufs patch series gets applied. I think that series is not great yet. Even if applied via something like the printbufs series, the stack use of this function needs/could use attending. ~700 bytes of stack use here isn't great.