Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2379962iog; Sun, 26 Jun 2022 14:23:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vBRJiCShM4yYG5yb/K+4qT/BEYVWV2MD8ZnmtRXwP1HCkgFeZfUrU1CZrUn5JMTOGU2owT X-Received: by 2002:aa7:cf87:0:b0:435:65c0:f59b with SMTP id z7-20020aa7cf87000000b0043565c0f59bmr12940557edx.214.1656278610729; Sun, 26 Jun 2022 14:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656278610; cv=none; d=google.com; s=arc-20160816; b=l8o+VrgjZ9PVCnl912ASQYlThhrer+4xwqJnWpD2gofuA6ZoI8qdxosOYAn0xa9FAD xJD9TijmVFPlybcvMXgXhybg6RgWUooZVflcZemECYjV+wbqcZx7fMWnygAmhzQmWySV +ycrN8ha0Opthnh6Dx4LJp8oo+gUKddiQL8MeZA0DpBsD4h3WRcYASpbOvsaEAyHObvm IXTMGcQntNI1V5yLc+KMFxh+B8WBA4LWxVV7VZsBvPsyUhOW+W4fGUM4kHSfyyB4wK/u TYlfYLES7Nb9MU/xq1kVlcEm5+WjzAmhOSd3F5Y0+6+oK06NahPfE/xS2KJ/nY4ExF/g /BSw== 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=BL9P7fH5cx8pa4/vCA5k8eteZBQswPB4DYvsAJ/k3ws=; b=XI0ggV1lzkudMhSWaFxSvFRCWoNKaD4BmvdudE5HmiYgSPMrLdB+PGhUprCvPGPiuk 4CPgIz0KTN0DxNzud74SXDDFN1io0xSRUkoDW/O9aa8XgETJXHan8V8y8vJICb+BG0Zs i3RUAFeFsFqSAoaC2zCJ+oi3qoG90t9onQ4z8Uy8ruD3biPDZg/HO/Y681e4UHEPwcLS 4c3xUC1LqQUeoL2YoSxIR13cJT5Uul0V5tCW3Wu3p4mO5aKx8OL+hLvsSx+QboWDEB// n2khKJr6m4lgQoOUC3kl0ZR9rJT5BYfNtE1NnwNU9m4lyNU52WV3y3sI38rilyBNI3w1 aVLw== 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 ke20-20020a17090798f400b00722f9287520si9262133ejc.636.2022.06.26.14.22.56; Sun, 26 Jun 2022 14:23:30 -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 S232266AbiFZVCl convert rfc822-to-8bit (ORCPT + 99 others); Sun, 26 Jun 2022 17:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232124AbiFZVCk (ORCPT ); Sun, 26 Jun 2022 17:02:40 -0400 Received: from relay4.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FEC388D for ; Sun, 26 Jun 2022 14:02:38 -0700 (PDT) Received: from omf02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1C5C76077D; Sun, 26 Jun 2022 21:02:37 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA id A762F8000D; Sun, 26 Jun 2022 21:02:32 +0000 (UTC) Message-ID: <20e7ca5f3b7b5b473afe891e8b28c83de62bc6d6.camel@perches.com> Subject: Re: [RFC[ Alloc in vsprintf From: Joe Perches To: Kent Overstreet Cc: Linus Torvalds , Andrew Morton , David Laight , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Matthew Wilcox , Miguel Ojeda , Andy Shevchenko , LKML , linux-mm Date: Sun, 26 Jun 2022 14:02:31 -0700 In-Reply-To: <20220626205158.bqeyetui3cromscp@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> <93ab94ec92497af13c563c52fc7e1f7f81dac333.camel@perches.com> <20220626205158.bqeyetui3cromscp@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: utcy8ffawdp8eazsjjuun81kku5n1chr X-Rspamd-Server: rspamout07 X-Rspamd-Queue-Id: A762F8000D X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19dTAM/tGp+XPWuoAl7IzFSwvdBH7J6rlo= X-HE-Tag: 1656277352-34782 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:51 -0400, Kent Overstreet wrote: > On Sun, Jun 26, 2022 at 01:39:01PM -0700, Joe Perches wrote: > > On Sun, 2022-06-26 at 13:19 -0700, Linus Torvalds wrote: > > > On Sun, Jun 26, 2022 at 12:53 PM 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. > > > > > > I think that's a bad idea. > > > > Somewhat sensible not sensible... > > > > > Those things are *literally* called from panic situations, which may > > > be while holding core memory allocation locks, or similar. > > > > True, and special_hex_number was used on alloc failure. > > > > > Now, you are correct that the stack buffer is annoying. But I think > > > the proper way to fix that is to say "we already *have* the target > > > buffer, let's use it". > > > > OK, and that's true for all the temp stack buffers in every %p. > > Serious question: why are you trying to half-ass just _one_ of these functions > when I've been working on solving stack allocations in all of them? Because the stack use in _this_ function is quite large. Backporting to stable would be trivial. No so with printbufs. > if you want to help out instead of just slag what I'm > doing... well, it'd be nice... Also nice to _be_ nice. Honestly Kent, I haven't seen much of that from you.