Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5768746imu; Tue, 13 Nov 2018 11:25:24 -0800 (PST) X-Google-Smtp-Source: AJdET5e7CYzKSCL6bRxBk60p1iseXThzfiCFV0unUgkBM0CnbkEsBrfpv+Qjmn5VBvIhOHwsuAQW X-Received: by 2002:a62:5343:: with SMTP id h64-v6mr6369112pfb.226.1542137124313; Tue, 13 Nov 2018 11:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542137124; cv=none; d=google.com; s=arc-20160816; b=sGAkl9rxM9Gv2jRXCx+aK5Aqb6/Kq97WPeSc5gB5wI74BnT362kPqjXZF3GEnmSLYl rmN1kY4DjtGPo1EBnZRhIs6Pi9/SWMI3bvQn5xBN2z3AKgFHAPO58g+vY7yVSj/3biuW xG/hF6SD7zSEmFksy3sE7NUjLv0FVFJAw7jpQSKS8zy3TN1rIlom1gDMwzwpckW0JL5a EPpz/3R5O0EH5UlBcJlvC1kusm0lV8OJp2qXa129iCShRttGq/I5cK2qvAdZk83saCrX POMg4sZk0HH3jaPokoLNLjt1GwT+9rPdqw5iDFPh3mwqmT+RAOW3153Di8/Q0BNC+WkP XmaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6r+AFR/gtkWaiPdF2fTUlYhLKaKoyf1b0UzjHRAjGPs=; b=WcKVYqGO9qQDTwkedD2ECFSG7HfRKawaNd/AgPqQ0WZzSO/MyBElTqn+Qa759ko7qG PeI1E3F4ytNqjA5vBeM80MA79ufNXe8hLOO/6EW7fLySmWvdHbssM8lYy+ArGJi20yUf PMDb8kRCK348A6EMrYx6OHDfTAcEMDeVMc+TxDhOj+Ce3sPR6f9HTUnbbVkVWGxGUiqZ ikp/v/Q5Skr2nIW2XrlRBTDqgBRNxItgM0W+1x8tOa1b4ejtv16b8JBHyVKTldzLd01y JJ1DHJTFWmmgnnH/fT0dgpx8itVi2vB8JMu64OA1dpr19Sba0j4X5ywNC7X+4oxathFi Ovww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16-v6si21020908pgh.383.2018.11.13.11.25.08; Tue, 13 Nov 2018 11:25:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbeKNFWt convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Nov 2018 00:22:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:54598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725748AbeKNFWt (ORCPT ); Wed, 14 Nov 2018 00:22:49 -0500 Received: from vmware.local.home (unknown [64.114.255.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B35AF20896; Tue, 13 Nov 2018 19:23:18 +0000 (UTC) Date: Tue, 13 Nov 2018 14:23:17 -0500 From: Steven Rostedt To: Qian Cai Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, Petr Mladek , "Tobin C. Harding" , Geert Uytterhoeven , Rasmus Villemoes Subject: Re: WARNING: CPU: 26 PID: 64391 at lib/vsprintf.c:2193 set_precision+0x84/0x90 Message-ID: <20181113142317.379dbaf7@vmware.local.home> In-Reply-To: <1542135498.12945.20.camel@gmx.us> References: <1542128132.12945.19.camel@gmx.us> <20181113172920.GI10650@smile.fi.intel.com> <1542135498.12945.20.camel@gmx.us> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Nov 2018 13:58:18 -0500 Qian Cai wrote: > > Care to print the len and name parameters before this line? > len = 60612; name = How big are pages on arm64? Because we shouldn't get to this path if the string is bigger than PAGE_SIZE. But I know that on PPC64, PAGE_SIZE can be 64K, and 60612 is less than that. Thus, if we get there, the test is against signed int:16 (16 bit signed integer) that can go up to most 32768. If the string size is bigger than that, you would get this error. I would just say to ignore it. The only thing that can happen if someone does this is to trigger the warning. Unless if it is considered a form of DOS, where userspace just bombards the console by triggering this waring. But I don't see a problem with the actual design. There's no reason we should be processing string variables bigger than 32768 in vsprintf. -- Steve > %d%d%d%d%d%d%s%s%s%d%s%d%d%d%s%s%s%s%s%d%s%d%s%s%s%d%s%d%d%s%s%d%s%s%d%d%s%s%s%s > %s%d%s%d%d%s%s%s%d%d%d%d%d%s%s%s%s%d%s%s%s%s%d%d%d%d%d%d%d%s%s%s%s%d%s%d%s%d%s%d > %s%s%d%s%d%s%s%s%s%d%s%d%s%s%d%d%s%s%d%s%d%s%s%d%s%d%d%s%s%s%s%d%s%s%s%s%d%d%s%s > %s%d%s%d%s%s%d%d%d%d%d%s%s%s%s%s%s%s%d%d%d%s%d%s%d%d%s%d%d%d%s%s%d%d%d%s%s%d%s%d > %s%s%s%d%d%d%s%d%s%s%d%s%d%s%s%d%s%d%d%s%d%s%s%d%s%s%s%s%s%d%s%d%d%d%s%d%d%d%d%s > %d%s%d%d%d%s%s%s%s%s%d%s%s%s%s%d%d%d%s%d%s%d%d%s%d%s%s%d%d%d%s%d%s%d%d%s%s%s%d%s > %s%d%d%d%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