Received: by 10.223.185.116 with SMTP id b49csp6521916wrg; Thu, 8 Mar 2018 08:46:58 -0800 (PST) X-Google-Smtp-Source: AG47ELvVBUU5oqsBmxxhBw9kkMc8i587yA0K33/ghRkWnAaohtP0VGBxW3Xfw8UrZ4TWIWJEe25j X-Received: by 10.101.82.12 with SMTP id o12mr21384173pgp.126.1520527618545; Thu, 08 Mar 2018 08:46:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520527618; cv=none; d=google.com; s=arc-20160816; b=u1F4Uo4huuDXXVfHlWWvkEokWJODdn/qacPJSgFVMjJdqS9ujAtSDWlitMIqiQeaKX EJWTqZISlzzKCkx7l1vn6w4xCvASeH3SrP+skmPqrgD6OjPOAPHbBRD7hqbAh6wPWFV8 BLfY9LJXazjWX42nYHee9JnL1YvjWvA19F19r7u8cJQMzeoF7fCP5tkmp9Fm+Lqhnle+ bL6wD56GQsYthYko+g5OQAnj1a/xDu3/9HGXIYbEWVz1p/lWKm3W8e38/6zrepHmDD3i g4+AXQnkHPJ1pa0dTrg3sx4IAFLlzZlgBo/DrDEZf0ZLGVSTWDC8bYZRsgVFoNt+QpSE eabQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=78J6cEJ3Z/9ZHunE7jdXmrymk7avN33l5ZNdvx4dZys=; b=ljxI7woJMkq/Av3qHKBP34vTSQR59gsSTWBdau2uxTGa6pBEaslVaBS4P9dLLsURAT 3y+gF1H26Wk2BUbMCG3bFAiOAHsWmNzvfuAubUrQqZT5J5tNTNZ5tAikJ/eEh4z222nT 37LxO6TqfbPoCjUd7sXwzp9TMv76cu0B1ZG/9v7KiV5nerhswkbCsGW1b7GuuVUIUzuM 8FmBFJQQdwNXWzph119/2cEyx/ohWOsF225JTXJpPdiGrH+YbRsbIpdt1hnWMI0ylITI rZFWXKJ6MdNggHE/ci61L60Gp9CPkEG3VfWDOppj9BIR2oeDzCZ9UHoyoLgR8nqh2nzJ +jCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oMXNVywr; dkim=fail header.i=@linux-foundation.org header.s=google header.b=d4/YgSXx; 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 1-v6si15109624ply.22.2018.03.08.08.46.43; Thu, 08 Mar 2018 08:46:58 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oMXNVywr; dkim=fail header.i=@linux-foundation.org header.s=google header.b=d4/YgSXx; 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 S1752210AbeCHQpW (ORCPT + 99 others); Thu, 8 Mar 2018 11:45:22 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:46363 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052AbeCHQpV (ORCPT ); Thu, 8 Mar 2018 11:45:21 -0500 Received: by mail-io0-f196.google.com with SMTP id p78so318210iod.13 for ; Thu, 08 Mar 2018 08:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=78J6cEJ3Z/9ZHunE7jdXmrymk7avN33l5ZNdvx4dZys=; b=oMXNVywrMit9Or4YRjJbmg7c1wzAsNZOIcHWJJtP/eJnTX//mBsv52zgitzIYUWgU4 8oBRydLn6mhvEYM81+YcLE+Lt9s8pbJ7S6UxOk4r7LuuC6VSuUm2MUi3duXoi94QaxYv Xa8xltzaXT84Q5fm/u765RUZZXxOUaCMOTniXsD7T6/WhicAYTWyY79ZsmSbOW3moXVF pkvK3bpO23lMUH2E4PUZjxpZGiR5q0jyTU0Fu+ka7hpou70KKKs4kJzshGmi7rKPh0yV 1G30GrDVhM2eT439XvujtKcMVtPf8dGBZJPAed/JM51s5YGTAjvY2oTmLGtA2W538BzX qRxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=78J6cEJ3Z/9ZHunE7jdXmrymk7avN33l5ZNdvx4dZys=; b=d4/YgSXx92ThLJHnHdQRRZduael+mSgbOFu7T+wQoztUq0ijA3o3Zc/gg+NuH9TjJq GRBxREDgY2DvDEqPxtvxudF9IcgiqsbHsr23w/DILd8kn5btTHl0KIea6aCVKAOzU0B8 jclvuqgOL9vlVwF7JERG0+shUllpHHZ+ZZUGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=78J6cEJ3Z/9ZHunE7jdXmrymk7avN33l5ZNdvx4dZys=; b=Gkm/iT2wKczU1FyYUXILDe2dmqcZm3sZLbPlEG2y288KJ5eTUjAriHYDU6yeffKxgh 4q55L3UMOR6kFTV6+glng7voAVRTQw2873k703L7ZeGlNxa5IkKG2a/opAV8nmH4lOn4 iy/MtgCiLtB5mqg2qtAlDQsc7sE1/YK9E6YNY8gdpTHMyR3kKuF2VzAmAPVRbvLaA6JP 3wvZAipAvAeqkMcG2HrZbCiCwhgKhg8DMmU6qRsSa1uXklLs+hWtHWVcgYAehOGtvyXs 3ot+p+AajVMMZYWCURMbtHCVLK/a885j6TYodACA9GvwSDLqle0TD2e2STRK6sgl3/hV HB9w== X-Gm-Message-State: AElRT7GlbO8Hx4fi1YNIVAw9l5QcdQ44O32qoltBlvj4rl5mMmuDkeBH wvrkVJLHuFWVOP8w3I8SyojQ17Y+KA1aZ4wpqRQ= X-Received: by 10.107.82.1 with SMTP id g1mr33352963iob.203.1520527520250; Thu, 08 Mar 2018 08:45:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Thu, 8 Mar 2018 08:45:19 -0800 (PST) In-Reply-To: <20180308141824.bfk2pr6wmjh4ytdi@pathway.suse.cz> References: <1519752950.10722.231.camel@linux.intel.com> <20180228100437.o4juwxbzomkqjvjx@pathway.suse.cz> <1519814544.10722.266.camel@linux.intel.com> <20180302125118.bjd3tbuu72vgfczo@pathway.suse.cz> <20180302125359.szbin2kznxvoq7sc@pathway.suse.cz> <20180306092513.ibodfsnv4xrxdlub@pathway.suse.cz> <1520330185.10722.401.camel@linux.intel.com> <20180307155244.b45c3fb5vcxb4q2l@pathway.suse.cz> <20180308141824.bfk2pr6wmjh4ytdi@pathway.suse.cz> From: Linus Torvalds Date: Thu, 8 Mar 2018 08:45:19 -0800 X-Google-Sender-Auth: 1sbSPSNTvpESP1XhKc80Zt0lZko Message-ID: Subject: Re: [PATCH] vsprintf: Make "null" pointer dereference more robust To: Petr Mladek Cc: Andy Shevchenko , Rasmus Villemoes , "Tobin C . Harding" , Joe Perches , Linux Kernel Mailing List , Andrew Morton , Michal Hocko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 8, 2018 at 6:18 AM, Petr Mladek wrote: > On Wed 2018-03-07 10:34:17, Linus Torvalds wrote: >> >> Guess what happens now to any crash report if it uses %p and there is >> anything wrong with the VM? > > This patch does _not_ affect plain %p, %px, and %pK! Umm. Look again. It _does_ affect plain %p. You're correct that it doesn't affect %px and %pK, since those never printed out (null) in the first place. > It affects %s and %p* modifiers that need to read data from the > given address. _If_ that was what the patch did, it would be fine. But it isn't. It not only affects %p, but it also affects %pS and friends (sSfFB), that do not access the location (well, on some architectures those might, to dereference a function descriptor, but then they will check the address range). So that patch really is completely broken for the reasons I outlined. Now, if it was fixed to what you apparently *intended* to do, then that would be ok. Linus