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 X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 145E3C43441 for ; Tue, 13 Nov 2018 23:05:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B31CB2175B for ; Tue, 13 Nov 2018 23:05:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B31CB2175B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731649AbeKNJFl (ORCPT ); Wed, 14 Nov 2018 04:05:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:45216 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726531AbeKNJFl (ORCPT ); Wed, 14 Nov 2018 04:05:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EBD09AFBB; Tue, 13 Nov 2018 23:05:14 +0000 (UTC) Date: Wed, 14 Nov 2018 00:05:12 +0100 From: Petr Mladek To: Steven Rostedt Cc: Qian Cai , Andy Shevchenko , linux-kernel@vger.kernel.org, "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: <20181113230511.5di75uyht7ecdcvl@pathway.suse.cz> References: <1542128132.12945.19.camel@gmx.us> <20181113172920.GI10650@smile.fi.intel.com> <1542135498.12945.20.camel@gmx.us> <20181113142317.379dbaf7@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181113142317.379dbaf7@vmware.local.home> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2018-11-13 14:23:17, Steven Rostedt wrote: > 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. I tend to agree. > 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. We are actually on the safe side because it is WARN_ONCE(). > 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. It is not even needed in this case. The string is limited also by MODULE_NAME_LEN. Best Regards, Petr