Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp322791pxb; Thu, 27 Jan 2022 23:10:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyC2gS/MM+SEPRaiGI8hPlkwF6SYAWKtd/5juGsakHOWz0kmTf1nhKjPFW3YTRz1jq0RFaf X-Received: by 2002:a17:907:3f8b:: with SMTP id hr11mr5907691ejc.602.1643353852444; Thu, 27 Jan 2022 23:10:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643353852; cv=none; d=google.com; s=arc-20160816; b=lWRa1qJJzjWrLqTJ+oE2NDmlYaaNfvzshoMgEEogj5Xj8WgG5jzgV42UFFe8zlkt5Y om4lwu0uoyddYCkX+1Vrp9OXg/9BkxMZM4F+0aGWPphuPbZUVdEna+NwLrzkYXgc0pPF f0NAeU2WAhFiHTLQV+Bnfd2r6obmJQrQXsggJC0xNcQTeNOFRbB/fq4hkfjXBGmAqEKm dCS5BspETY0bIrl5n78JTXTRR0pOvDTSmbP3bjEJGIBBug1ejVLEysyI+s0E8V0j9ZY0 rNstbDfGT2R2oywvbEdr1yLUQ/UHBn9TM1fHFvJzECaAsV8Vhb400oe43V9htOBeGEH+ KIiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=A2uo5fXSd7OqKxwGZIjNF9qeDNymn0jpKYU9mCNvEx0=; b=HoxsCkabPVqCoy8qcZwOR9gDDcGszxjNjjneJJdOEpN8JjhvmDT5aFwLzmv8kds/wK UoncMy91IGo95bpw85zoBbcVDqP05e2BX/nRkzeXORIUk+a4WYhh7mYYyDEuWtJx+cG6 q3cgq1Fp/7WiSj3XFaFEDSs2Z2hlD6Ux9M59mUCmyQN+cf6oOUPOWkd6Veb8mNc2cONo bQTm6eLVPdASk6PRu3PmHnicr8h9bj9AncNQH17ZXTCuvS1ZL2OPSU+oRkA+VhxXUCdx FhZUM8J9ZcMUFKRh3rUEJFfCGT5MGegXWO4Ln86nrFz92BKUfOqTF7YugpY3nsOpq/Wq hNUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Fcx+XxXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si2465687ejm.107.2022.01.27.23.10.28; Thu, 27 Jan 2022 23:10:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Fcx+XxXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240667AbiA0O6K (ORCPT + 99 others); Thu, 27 Jan 2022 09:58:10 -0500 Received: from mga01.intel.com ([192.55.52.88]:28832 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234362AbiA0O6J (ORCPT ); Thu, 27 Jan 2022 09:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643295489; x=1674831489; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/3XEtJaxLuq1L25kvcnhdlIwMrA/HbaNIC1yWdkEF8s=; b=Fcx+XxXdWBRzSf+bRafVIAB5j9tniH9MX26MvYL8UzliTxNWcL6SlYSh wCp+tAEpBm+1rkNsX167J0wGaqWsmgwmloGRpZQjJvnztuMH1bcQwm/70 jgfMYq4QxpFjYy606Wp18+9OjN4EHItiNEhAGjG/jdhQVywUYK/5sB1SU O4hPrweRyRS9Kb0aebESemhqKRFRNKGbYHxQy1jzWnYcBow6XpqzdFnln l+mEME4TpHnNJLv5Bod+ByVURaEuq2jdJYesV8QULU3JNIgDQYPv8LxGI cphjg12B3nTaeqGSCv/o6ijbDyQhBxCseB7P5FegJWJ0GTm7gx0bamkwT w==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="271333047" X-IronPort-AV: E=Sophos;i="5.88,321,1635231600"; d="scan'208";a="271333047" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 06:58:09 -0800 X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="628712758" Received: from smile.fi.intel.com ([10.237.72.61]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 06:58:06 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nD6Cq-00F10o-Qh; Thu, 27 Jan 2022 16:57:00 +0200 Date: Thu, 27 Jan 2022 16:57:00 +0200 From: Andy Shevchenko To: Kees Cook Cc: Francis Laniel , Petr Mladek , linux-kernel@vger.kernel.org, Andy Shevchenko , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Sakari Ailus Subject: Re: [PATCH v3 3/3] vsprintf: Move space out of string literals in fourcc_string() Message-ID: References: <20220126141917.75399-1-andriy.shevchenko@linux.intel.com> <20220126141917.75399-3-andriy.shevchenko@linux.intel.com> <202201261321.34794CCF3@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202201261321.34794CCF3@keescook> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 01:22:32PM -0800, Kees Cook wrote: > On Wed, Jan 26, 2022 at 04:19:17PM +0200, Andy Shevchenko wrote: ... > > *p++ = ' '; > > *p++ = '('; > > No need for any of the manual construction nor stpcpy(): No, we are better to avoid recursive printf() calls. Entire vsprintf.c is written keeping that in mind. -- With Best Regards, Andy Shevchenko