From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51534C43334 for ; Sun, 26 Jun 2022 20:54:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9AD148E0002; Sun, 26 Jun 2022 16:54:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 936378E0001; Sun, 26 Jun 2022 16:54:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D77A8E0002; Sun, 26 Jun 2022 16:54:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6A2BB8E0001 for ; Sun, 26 Jun 2022 16:54:49 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 43B8B80E03 for ; Sun, 26 Jun 2022 20:54:49 +0000 (UTC) X-FDA: 79621591098.01.ABDC4A0 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by imf23.hostedemail.com (Postfix) with ESMTP id EA6EB140020 for ; Sun, 26 Jun 2022 20:54:48 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id d2so3361795ejy.1 for ; Sun, 26 Jun 2022 13:54:48 -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=E7wvojhsyV8XX5zDUle+G8bgwRWprDyGvIJ6Z0AEQMcVqn9dYrR/ctfaceMcLb0DdD DKPnNQQ5UxBW3kJyMJ7WUSAWkRVbIZ7QC1GjMr9COE/jBrs1HU8PV0aAsMAMcVKOq+ZW 2joiXOlt9W2WKBFbp5kU4hf1ybHrl1ORNbAPEm6Sylkbtg6WHx/Rk6JZDv/2fKGBW2of /wU8V764ECWYrxQXXJHmi45UyarKPiitWDzoonsCT4jEubstCJFpaO/bPjIeZAOWUliO aqMblKaTovaaunH0rbpFmI2tbyAcph1OOGbaZCsWmX5Pf6EoIczl45NG9w7g7Wnaa3Pw Kugw== X-Gm-Message-State: AJIora8syOTW3FmRAr/9o9Ht5uEAgmOB30qKn2AkuplDyg9rOt08xBR1 SM7WyfkyMNoSzYqoiQRWOEc78IK2HVWtTAFO X-Google-Smtp-Source: AGRyM1vhNKTVjWEzPa0d2mrISp0OIYqWZPANsF6HPXPQSBmuDeqP+Hok+VvxDHToC465nlIF+MUt8g== X-Received: by 2002:a17:906:72cd:b0:722:d84b:30e3 with SMTP id m13-20020a17090672cd00b00722d84b30e3mr9645129ejl.726.1656276887506; Sun, 26 Jun 2022 13:54:47 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id ml22-20020a170906cc1600b006febce7081bsm4140294ejb.163.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-f45.google.com with SMTP id s1so10345163wra.9 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656276889; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=F6P3zC7r4qnr1luJY9BEvSQvlGGlGr98+TEUY9WUlLM=; b=lbz2dUZ6HXGrCu76cazAYicHVYGF8dpkTtIMBDVIfkZQRA3R+As22mtsqR8U5ae0aYRpqK RrlMm78DHRFE7fRzliyP53mPwy0vYaWZ+n9kCdN6oEkUNp6/5e2A+MN8OtdHmWPYF6y7wE pzBMqnNzbvaw71XyhspSsfaxeLRca+A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656276889; a=rsa-sha256; cv=none; b=AvOXofxvw/qeQ2X9kCSvU/AyKJqYCBh/GkigT9hNA4/RykCrAgRDYLZjksYExui4EPBmP5 ndmOI8R4epHA3xATdaQea9ofDD2lubsPJEekEQmzW0uQbXqbekNu58nF/umxXrnPPNzkT4 D/wUN1aC+JK4sd3u8Qv1QsHiNxrBVp0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=GziGBpi7; spf=pass (imf23.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.218.42 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=GziGBpi7; spf=pass (imf23.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.218.42 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EA6EB140020 X-Stat-Signature: bnupn6pubene1iio14gwfg456kbgg768 X-HE-Tag: 1656276888-773638 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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