Received: by 10.213.65.68 with SMTP id h4csp3550076imn; Tue, 3 Apr 2018 06:58:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49H9lfZBZrXTGrDNW+OX0ENjcAqR0TV/V48nHiSY/goREFUjQB3qN0IM/Ap+RWR74hg050s X-Received: by 10.98.228.5 with SMTP id r5mr1753665pfh.93.1522763939179; Tue, 03 Apr 2018 06:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522763939; cv=none; d=google.com; s=arc-20160816; b=xmrYpelDytFtQMWN5Ovi26Y8EcTZcqzzLgwWRFBgcNEeAiPG9aKH+ZMjcTBqNSLpg/ /lteABEzqMG4qJ8QMd1jc6AnzjxPXuU94lQsr2MWxxYYenEz7JBETRrAz/IY3Ji3tlwv 0ogOolu6BRe+NpoveGN5WWbG1OYth1nAyamTNewtjQjbfviQWvLVwdZJYAag06DVOUWG WnTbYP6Nc9qXasHiLv1LK9j9SjM536C9TSRjIMXFMSBYn8/sKPbFxMUBAQRNQ+NMV2ut 29W88xbf02URBbEFzMPZutv8rKc4RPUlUXNeB5s8js0aQYLYWW04lfyH0GFO0GJQkJS+ 5BQw== 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:dkim-signature:arc-authentication-results; bh=bu+epn80gv0/ZKxkxYQDE4XicGwmFKsUoS09fXaJ044=; b=oWWk6M+Lk8z+xkkHpFNrDjWM/B82fhhgk1S1Ps+pGZJqG/XIsF6E2h+Itr13EO/J2h 4LLjPVpFcx8Ny7eqZh3+HQlsIkNoEWFPqsrcft0+qLXMOi51cAzu0j8auiYAz3G2vubO 67nrJbE2AV10bwOgvEbPOvGPHsUzGqxInaztp9t2mqfqXBqN+wAF09SaAtWoPw+qB2X0 0KDT1/AKsoDxFalSWlZztIgEYaF61sO616kMw07vLKiUNSd5b2NmfJY+hqRCm3I9YX+q y967ed/3amseuq9sy2oqfjUFaXBiOflm8Eli8DqGLRzuffl0wbyNmUQWErG1tdRvLWgQ hWuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IGs5emUz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si367377plm.590.2018.04.03.06.58.44; Tue, 03 Apr 2018 06:58:59 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IGs5emUz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeDCN53 (ORCPT + 99 others); Tue, 3 Apr 2018 09:57:29 -0400 Received: from mail-pl0-f53.google.com ([209.85.160.53]:44417 "EHLO mail-pl0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeDCN52 (ORCPT ); Tue, 3 Apr 2018 09:57:28 -0400 Received: by mail-pl0-f53.google.com with SMTP id b6-v6so6918822pla.11 for ; Tue, 03 Apr 2018 06:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bu+epn80gv0/ZKxkxYQDE4XicGwmFKsUoS09fXaJ044=; b=IGs5emUzACaC7hu0HQLCc8wJzNsuHNKldt5ypmgRtOudKw0p+nUwELLsvwpbSPrUmY beH8QgBSF+BwJtBFIYFfxsvF1dcBw8T4xIghEwwf13ktXqzLk8nYMvSQV0tMSkxzhM9T wVo2JsXqy2A81luUGbhMIzmTKzV2Zw+wPmcuUZAfZqaKqTTgicvahPwaeoV0n+ck2b6S LAeAp/FMIdUF5rNlrF5b3AhIznZjYcGOd5P0kc2Wolc1V4if6Anu/sVAfNKBWEygPTz5 rJX/saEnF/WGQQ9sP/PRrjDkhG0rdCZkJrWL3VjDwAdkZLa8f2Pd31Q4bLb/w5A75ajb wynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bu+epn80gv0/ZKxkxYQDE4XicGwmFKsUoS09fXaJ044=; b=eba+cP3Xw/MYL1VuqdG1AY7LjXvQCSE5ZQ7raydLkcZh/YMSRYq8oiyUZw9/JsNnVV Tis0xoQnFIxgQsXo8QT21Pi6j6t2QoUi7alGLFaytZqM3vFkRi+jTHcEJzD7srHevQWO tYmKopEsCCWRe/zuRC9cDbUM2EeZTrqY3+bI+ZwKRaU4lLqs1Es+KKQDFVNVOd9Oe2i7 NxWMubwfh1CuTepZPkb4oX3/hDkFIYjqhHnuCYmwRQMN6m+01FqCH1Q59K1OV7jJZmjl 6izYanHBBGkrXYIiXvH77TLbYjk8GA15sMFp17U/gfQnPIMzn1+EpnxjLtKVb6x2Uqy3 5rBA== X-Gm-Message-State: AElRT7Hz4grkEeZPo2SHSr85eiWdS2YpZzuQ7M9LPoP72dxaMZt3G3/I 5M+DfPVIisJQFXkz89DDRyo= X-Received: by 10.99.123.78 with SMTP id k14mr9048519pgn.67.1522763847664; Tue, 03 Apr 2018 06:57:27 -0700 (PDT) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id b187sm5388733pfg.164.2018.04.03.06.57.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Apr 2018 06:57:26 -0700 (PDT) Date: Tue, 3 Apr 2018 22:57:23 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Andy Shevchenko , Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko , Sergey Senozhatsky , Steven Rostedt Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers Message-ID: <20180403135723.GA7593@tigerII.localdomain> References: <20180309150153.3sxbbpd6jdn2d5yy@pathway.suse.cz> <20180314140947.rs3b6i5gguzzu5wi@pathway.suse.cz> <1521119343.10722.665.camel@linux.intel.com> <20180315152607.xgzjmj5as6lg42dy@pathway.suse.cz> <1521224375.23017.41.camel@linux.intel.com> <20180329145312.4uqygrjqy3fqyl26@pathway.suse.cz> <1522678523.21176.178.camel@linux.intel.com> <20180403011237.GA7129@jagdpanzerIV> <20180403115216.mgq3omvl4up24uic@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180403115216.mgq3omvl4up24uic@pathway.suse.cz> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (04/03/18 13:52), Petr Mladek wrote: > On Tue 2018-04-03 10:12:37, Sergey Senozhatsky wrote: > > On (04/02/18 17:15), Andy Shevchenko wrote: > > > > > > > > Hmm, I have never seen the error code in this form. > > > > > > We have limited space to print it and error numbers currently can be up > > > to 0xfff (4095). So, I have no better idea how to squeeze them while > > > thinking that "(efault)" is much harder to parse in case of error > > > > 'efault' looks to me like a misspelled 'default', for some reason. > > I wonder if (-efault) would help a bit. Dunno. If the pointer is invalid and -EFAULTS then I guess we are not leaking anything critical and may be can just print it out. May be I'm wrong. -ss