Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1444111pxy; Fri, 23 Apr 2021 08:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl0r9pRqSwHDCVTH7cxhgjzow/y+P9jvZN0IPz0sadWFFBZw0KVJypxgvX5m8+TZe0PeBp X-Received: by 2002:aa7:cd7b:: with SMTP id ca27mr5176642edb.354.1619190718353; Fri, 23 Apr 2021 08:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619190718; cv=none; d=google.com; s=arc-20160816; b=USrQNrdPm95RhWaPiAL++WVOLHnqThirvNlaAfFIH/AORPwcH8YNYeXEKQYoCOHSgU ypdlZT82pZF7EUt4fGoKPg3mvwX3R3ev8JZ+rQd5IzgenyJt6ePCyAt1I+Hx4GBX8a4d R63G53N3zzlsiOTz3TreDFN6b7g8l05gGY+stRZXg+8u0QdhA0RaPYFtCfZKqmSK7tQR dR+IVFfy+HEBtM3BcYyhVsWGWM+O5G4Y3Jcp5Hi0RfOdC3n2NkqVpW7VbyXWeJ1IA92x RR4duxOQRzmHm0lFG8ld1NIkCKouoksKmf1nNgxXVr6T4BmlggqQ1e/9JlsMx3Dx+alW uy1Q== 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=JmQ7Myjvr5caQMjQGq7P6Xo7dPghr5/mLb4Tc4GGKVI=; b=g8UgHy/YirJ/ZTVVuCPH3QpGbVjrgkKLjEWEnWVnNPMGkEet3f/iSD+gT1KtbwzdP8 DmQAJ9/Zxgknk6IZlCqD+4Z171DGHnBusvh4z3LybUegD8AQHWLa5yYui98+r+sIxP5a D5+kKmEgfYmUvbH+KqDewFAkY5Q5Fkb1iJ/hVy+2mzpAKap/sNs8Qik7ozh7TXMIHK9H ewPg90ktYcBJEmp5jj0JeFpKBgSuX+kwbQhWjtlew53coT0VhcS0NbBfoKCnztA/yjkC WWgm96DK9wtPNkYCvQH+LoNA4R7ZJS+ebXDgMgbTz5gPMa64AjpGDWpzKSx/hp1Etfd4 mDnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jAcLp3uM; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd8si5192076edb.453.2021.04.23.08.11.35; Fri, 23 Apr 2021 08:11:58 -0700 (PDT) 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=@suse.com header.s=susede1 header.b=jAcLp3uM; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237271AbhDWPLC (ORCPT + 99 others); Fri, 23 Apr 2021 11:11:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:46356 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbhDWPLA (ORCPT ); Fri, 23 Apr 2021 11:11:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1619190623; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JmQ7Myjvr5caQMjQGq7P6Xo7dPghr5/mLb4Tc4GGKVI=; b=jAcLp3uMRrKzjzYIHYR7wqmVgxFtX2FugozA/di22uZcqg3392F94tU8SyIWf+w6d7blQn hBqerGWQc5EB083PFAOguOAljW6pxiQrKDB35kQEee4V6P1d95IAtktfpeBMYBkT4gRLrv +LcGucv86HrMKtGzPqt9la5KUpq5Tto= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 42B57AFD0; Fri, 23 Apr 2021 15:10:23 +0000 (UTC) Date: Fri, 23 Apr 2021 17:10:22 +0200 From: Petr Mladek To: Rasmus Villemoes Cc: Andrew Morton , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , "Rafael J. Wysocki" , Sakari Ailus , stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf() Message-ID: References: <20210423094529.1862521-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210423094529.1862521-1-linux@rasmusvillemoes.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2021-04-23 11:45:29, Rasmus Villemoes wrote: > Commit 9af7706492f9 ("lib/vsprintf: Remove support for %pF and %pf in > favour of %pS and %ps") removed support for %pF and %pf, and correctly > removed the handling of those cases in vbin_printf(). However, the > corresponding cases in bstr_printf() were left behind. > > In the same series, %pf was re-purposed for dealing with > fwnodes (3bd32d6a2ee6, "lib/vsprintf: Add %pfw conversion specifier > for printing fwnode names"). > > So should anyone use %pf with the binary printf routines, > vbin_printf() would (correctly, as it involves dereferencing the > pointer) do the string formatting to the u32 array, but bstr_printf() > would not copy the string from the u32 array, but instead interpret > the first sizeof(void*) bytes of the formatted string as a pointer - > which generally won't end well (also, all subsequent get_args would be > out of sync). > > Fixes: 9af7706492f9 ("lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps") > Cc: stable@vger.kernel.org > Signed-off-by: Rasmus Villemoes Great catch! The patch is pushed in printk/linux.git, branch for-5.13 now. I did it quickly because the merge window will likely be opened next week and this should get in. Best Regards, Petr