Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp331180rwb; Wed, 28 Sep 2022 03:24:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Zudy/lAp1WmCnOK7tzdgqtN8zN9A8SaFamH8+A//WDzhyXJLWAqU2ld9WgdfIQaAMKoLB X-Received: by 2002:a05:6402:26d6:b0:451:24da:f8cf with SMTP id x22-20020a05640226d600b0045124daf8cfmr32996550edd.385.1664360685990; Wed, 28 Sep 2022 03:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664360685; cv=none; d=google.com; s=arc-20160816; b=sGnjhm779fSb7pdzJ8rUzDLiS3kD9pnGHfCGXz+rCfxvq0NHSfcVWvFJZdpLqrFIsk S79+GOBTqM8uJ+H3K9qJg0O5enJLpzd5ApRiRG5T2ya0bQ5sH5m7TrSKr40lolH6NTOS 4KfluK8d9Y+9ab6SUag7McOz4btC6S0R02FZ+iURKxrA769m8u/gfGtQBjAFvxPKehfW ulXNQaf2obYeNh+//gSDKfUUKVEpYVLwbOmXBdaIgbMlSBFExF0QUOJMCRfjQaHKPxyA GZVQ0xOECMgvcPv4GkdkmnM1OTftBXjKIsecAafxX4x2KTKMs2Yszuu1hiONt8ivfjxA 3GWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=duP8xfDehjxwwRzMlO+xIkuofiVIyjCnJ39OqEBZnvg=; b=UJ4hsXQkOu5P2x1be3BlSw0Y9iNiBqxK3cifEP1gzFG4PQoBewuSd6V3KZoxetpEe4 YtvYBL7QtB+wQWA5sjr7UX4jmEzcVDV9yL/20F7wMsXnfZOt2yMuPKUGG9B96PGKxlAT 8bbYp7b3mUk2j5MIr4yz7gdro7fBmtM9rArPClMobAGxdQ45ZANmC2Faap51yVVVREg2 40u+qplyNyWi6MRJi4UZ4Jkg3tUVhyYk64fYyo5FpfFyXD4mZMISNt4KuQ4tHLo9xPOe KlXgqRTXmAqAyWYEVUzLA1c632XO3VvRMkbFo2/Q6+YhMUmObphCFFIXtKxEUSsvXK7v 5kjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lib6B2mM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn6-20020a17090794c600b0076fb816dae7si4696408ejc.97.2022.09.28.03.24.19; Wed, 28 Sep 2022 03:24:45 -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=@chromium.org header.s=google header.b=lib6B2mM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232140AbiI1KKD (ORCPT + 99 others); Wed, 28 Sep 2022 06:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiI1KKA (ORCPT ); Wed, 28 Sep 2022 06:10:00 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 076E98FD55 for ; Wed, 28 Sep 2022 03:09:58 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id w10so11365531pll.11 for ; Wed, 28 Sep 2022 03:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=duP8xfDehjxwwRzMlO+xIkuofiVIyjCnJ39OqEBZnvg=; b=lib6B2mMxl5NxnINW0OzG0zC66Z3LCxS8m+inz3s790XzYWfBXOcjpz79BlYtXU+zC hfchdOgWGjEq9QbwDqw2agsx5TcvvzkUpGqDh/OymxIaA0trvTvjbAlv2j422Heo/mhf CHZYlO8o6iKNhyTtuCByT1TiWNNIHXygpcP6s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=duP8xfDehjxwwRzMlO+xIkuofiVIyjCnJ39OqEBZnvg=; b=3gEIFzj3sg0lQy7NweLfrpqD4yulvGSXWCwWr3MthikZ9A+MrB2DVek8Bp/tp2QfzU +wSSSZIht1B6g6O8/Kg3Xuj3vWMb8UqXAdypFerjz0d2zQchMyIoFrBrqTCrdH3lx3nu r4mRltJ6H99OnJw6pwlv2RlRBXP+1rtEIF2Uohqhi1441zclgjvye66ou9Xcvt/i74Wa T1qmkIfBBEExM7925ZH4wvn4Iw3jChXjdcGCVJDzziMV4kUpiVT8zFNQhRMdlmdPZCX3 7Y5GzXIhAlC/TkoavqW+3z8sdZCxl7pQTmaHJHBPMdVnZbdzpLcCiBToGJZRYlbZYg4k epAQ== X-Gm-Message-State: ACrzQf0ZRlYNmqS/BxJh+0TJ5yHwT1FC7wlf2RyCqZFzRP1kY7RMXXu2 3vKe1zbApHe16cPUyH1z8bCL+Q== X-Received: by 2002:a17:902:bd8e:b0:178:25ab:56cc with SMTP id q14-20020a170902bd8e00b0017825ab56ccmr31062254pls.86.1664359797576; Wed, 28 Sep 2022 03:09:57 -0700 (PDT) Received: from google.com ([240f:75:7537:3187:d8e5:5ceb:cc0c:18ad]) by smtp.gmail.com with ESMTPSA id u16-20020a170902e5d000b00172f6726d8esm3285144plf.277.2022.09.28.03.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 03:09:57 -0700 (PDT) Date: Wed, 28 Sep 2022 19:09:50 +0900 From: Sergey Senozhatsky To: Miguel Ojeda Cc: Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Gary Guo , Kees Cook , Petr Mladek , Alex Gaynor , Wedson Almeida Filho , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , linux-doc@vger.kernel.org Subject: Re: [PATCH v10 14/27] vsprintf: add new `%pA` format specifier Message-ID: References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-15-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220927131518.30000-15-ojeda@kernel.org> X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 (22/09/27 15:14), Miguel Ojeda wrote: > This patch adds a format specifier `%pA` to `vsprintf` which formats > a pointer as `core::fmt::Arguments`. Doing so allows us to directly > format to the internal buffer of `printf`, so we do not have to use > a temporary buffer on the stack to pre-assemble the message on > the Rust side. > > This specifier is intended only to be used from Rust and not for C, so > `checkpatch.pl` is intentionally unchanged to catch any misuse. > > Reviewed-by: Kees Cook > Acked-by: Petr Mladek > Co-developed-by: Alex Gaynor > Signed-off-by: Alex Gaynor > Co-developed-by: Wedson Almeida Filho > Signed-off-by: Wedson Almeida Filho > Signed-off-by: Gary Guo > Co-developed-by: Miguel Ojeda > Signed-off-by: Miguel Ojeda Reviewed-by: Sergey Senozhatsky