Received: by 10.213.65.68 with SMTP id h4csp182337imn; Thu, 15 Mar 2018 13:29:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELuEGipjmsBY/B0r/4kdR4nzO7VPrpZKnMcNrylCHe1eHkbtFGfyIHcOHEZmHdYo2TIOcjld X-Received: by 10.98.31.155 with SMTP id l27mr8855194pfj.176.1521145792317; Thu, 15 Mar 2018 13:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521145792; cv=none; d=google.com; s=arc-20160816; b=URQIz//6yBz6+buhtBoNJaJrsvbKD7P8bSUjMQMeEIh43jKd/6/taJlfx9/duxiDGg L2IdQVs0rr7P0TCHIA/ehyPlgojAWqDl+lFaeGq8kT0lSv2Uz6bVX1w30JQPhnEMrJz0 Yj6wJi86tDmGKXG2snThVFvm3zPN07mtkGy4JT4sVzR7zKtyF3MIWWZBMiLj9dQr4Th1 0VPlj1mU8ryWNj0/LDCLKvgbG1AA/TK3D4JHXbuAETkn1Jdzffw6U8vwy7ZB85XEq3Zp 3OpgXPL9W9AynYWhkKYky/l4sxb+JW5iy3/E/+zdZovIH9QvVnvayaAsF5Tp470ejzuc M9EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=NTvaNgGWE4p1oWRyx9hahy8Wd4k2hirOklpRZkrarp0=; b=H5EbHXYeaAj/BKF3uMmNTC5g8snQ9QFBeZWsGwms9EK1JNCWXCXdIONcgH1/prkHjo cDdfP8KG5r22Dq+1L8SQJTtCH5wlbmPUTQh1KtBLE1HoXVmbRDyJLH3wAXCn9zyMmrk+ ShCQ0jdn+MpXhGugxCALJ215HB5vV7yVzbF8ZxlGZL8sBNrVHoNRBeZhviOH/cJw/HVI h4cn6oGzzZ7xmAcXwln2U2iRPl9twhymlQyXzOOskjZ9diVKbTOfmgAkLpIthuae/CON IFRLZHAnpmfqFfPYliiZJ8IUdYE6ToODNHwiaHLXWiDGoxBt0dcSy9//8OI30yCq0QaO xHDw== 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 33-v6si4663426plu.426.2018.03.15.13.29.33; Thu, 15 Mar 2018 13:29:52 -0700 (PDT) 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 S1752868AbeCOU2O (ORCPT + 99 others); Thu, 15 Mar 2018 16:28:14 -0400 Received: from mga11.intel.com ([192.55.52.93]:63508 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbeCOU2N (ORCPT ); Thu, 15 Mar 2018 16:28:13 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 13:26:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,312,1517904000"; d="scan'208";a="26047757" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga006.jf.intel.com with ESMTP; 15 Mar 2018 13:26:37 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1ewZRK-00028S-Ie; Fri, 16 Mar 2018 04:25:30 +0800 Date: Fri, 16 Mar 2018 04:26:02 +0800 From: kbuild test robot To: Petr Mladek Cc: kbuild-all@01.org, Linus Torvalds , Andy Shevchenko , Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko , Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers Message-ID: <201803160421.Gpw1xNAf%fengguang.wu@intel.com> References: <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Petr, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc5 next-20180314] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Petr-Mladek/vsprintf-Prevent-crash-when-dereferencing-invalid-pointers/20180315-214100 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> lib/vsprintf.c:533:16: sparse: Using plain integer as NULL pointer lib/vsprintf.c:762:18: sparse: Variable length array is used. lib/vsprintf.c:765:38: sparse: cannot size expression lib/vsprintf.c:1532:23: sparse: incorrect type in assignment (different base types) @@ expected unsigned long [unsigned] [assigned] flags @@ got long [unsigned] [assigned] flags @@ lib/vsprintf.c:1532:23: expected unsigned long [unsigned] [assigned] flags lib/vsprintf.c:1532:23: got restricted gfp_t [usertype] vim +533 lib/vsprintf.c 522 523 static const char *check_pointer_access(const void *ptr) 524 { 525 unsigned char byte; 526 527 if (!ptr) 528 return "(null)"; 529 530 if (probe_kernel_read(&byte, ptr, 1)) 531 return "(efault)"; 532 > 533 return 0; 534 } 535 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation