Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6125920yba; Tue, 14 May 2019 02:04:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLeM1RJw5bmERPiI7UaghB6ZNGvG0IH2kyWd237GufpSWbPxQpyQd8mID3zvXIn0zlUZbT X-Received: by 2002:a63:1354:: with SMTP id 20mr36149637pgt.356.1557824648701; Tue, 14 May 2019 02:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557824648; cv=none; d=google.com; s=arc-20160816; b=IqvDrbNdFr0X9ZaRBiSTKDQ6DObLbWSkvNFYEJwL6hnPXzEv8jnZLJxrAjfJXJ48uk hi1OHngNOQ5oXE6C3pUcG+Fcdzn0ObKjiaCuWgu/iWz4nexqhUMiahvnZFtLDpWj/Orx sP1lWbGEMI08XDa/monfcSDA96xhoUfHIiY1lOFivWvmv6GM1oK82duCm2fw/Q0nkd9M cxwKrfcS6eTpePNSL+g5mf5G43f2/4fkTbQL98/qiqPUa4QnFsb20uA1pYmH6vlaC7Kx 9dztwt4c0gIVBlFJn8RHmDa34xKiCRwOhFoaUOQh/nmn6bUdTEBG9/yUAMyoa7EQx4sF 24cw== 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 :in-reply-to:references:mime-version; bh=2QqOosWQeAwRJoNs9Z6x1enYh3cBYDajQeKrzZRmqkc=; b=NICTesmiejwa9bFE0GeQKmRUAk0tnQRiAwMrnRCaqcrX//TDzdLS3rY+mS3I4cAOtS 4pd2Pa8oUtDqSYEek/R5QmX7ciJ0hc117Ex17Kxq/cceyi/JHaCuu+kXmaF1ICk9mC34 8Rl/DOwISg8GdCjGC5EYYcr5NarsTP3+gcDvLwN13RfmIBaKP6apb4zzQnpaJDPIE66v XYattnfXkYjIs5VfPErjwJ6/zZCqbX3rlXSzqKcNwLUcydRHQfLBcoRH/3Tgs8geeF/l G8nS2CNmOBDGT5HdAcGNwHW/Fzy4D245Ej4GJRsH0u5sqPh3U2TriQbxDNNQjGl7nSm1 hM1A== 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 l6si13950978pgp.382.2019.05.14.02.03.53; Tue, 14 May 2019 02:04:08 -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 S1726565AbfENJCc (ORCPT + 99 others); Tue, 14 May 2019 05:02:32 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:33731 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfENJCc (ORCPT ); Tue, 14 May 2019 05:02:32 -0400 Received: by mail-vs1-f65.google.com with SMTP id y6so9842770vsb.0; Tue, 14 May 2019 02:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2QqOosWQeAwRJoNs9Z6x1enYh3cBYDajQeKrzZRmqkc=; b=EBDOKAq49/KDVi0tJPh5n4UU6tXAV6jKZ+fM2FBHezMCMw4tNi7ZjPbmf1xyK4ai4u nONRFQcfVp6ZtxlXlnLIKnE0VgIY+EJ+xycYoVMwH3k65Qoj9C+uWKFB6fvHPPzhmo86 korZpN5bvkdxwJj2h1/o6FXyrMnq18q4vO0aDWdFVpgeBZ4qqgV/fgYRSSD54Xj6yIaD Uz2kaxO4tipBDOTUH4EoDyhi/KtViZ1UStpLk/3JwYhTMgmseOvqLTsopN7/lq1BxYXM xeyS1vOorh37KWUo5RufwnH6k90qs34JxPsqy0eiWuurjiby43p0QNnnDJYUeHhcWclg 4ZAw== X-Gm-Message-State: APjAAAWldPZTH1qR+POgRnAdmForh7sSy+BSR9l0tRTGf/P2WYxKPe/X Nvk1f/e6o4Q04ba/IGFGVlLeru6Anp+R2orjFPY= X-Received: by 2002:a67:7c93:: with SMTP id x141mr8531743vsc.96.1557824550758; Tue, 14 May 2019 02:02:30 -0700 (PDT) MIME-Version: 1.0 References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> <096d6c9c17b3484484d9d9d3f3aa3a7c@AcuMS.aculab.com> <20190513091320.GK9224@smile.fi.intel.com> <20190513124220.wty2qbnz4wo52h3x@pathway.suse.cz> <20190514020730.GA651@jagdpanzerIV> <45348cf615fe40d383c1a25688d4a88f@AcuMS.aculab.com> In-Reply-To: <45348cf615fe40d383c1a25688d4a88f@AcuMS.aculab.com> From: Geert Uytterhoeven Date: Tue, 14 May 2019 11:02:17 +0200 Message-ID: Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses To: David Laight Cc: Sergey Senozhatsky , Petr Mladek , Andy Shevchenko , christophe leroy , Steven Rostedt , Linus Torvalds , Rasmus Villemoes , "Tobin C . Harding" , Michal Hocko , Sergey Senozhatsky , "linux-kernel@vger.kernel.org" , Michael Ellerman , "linuxppc-dev@lists.ozlabs.org" , Russell Currey , Stephen Rothwell , Heiko Carstens , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , Martin Schwidefsky 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 Tue, May 14, 2019 at 10:29 AM David Laight wrote: > > And I like Steven's "(fault)" idea. > > How about this: > > > > if ptr < PAGE_SIZE -> "(null)" > > if IS_ERR_VALUE(ptr) -> "(fault)" > > > > -ss > > Or: > if (ptr < PAGE_SIZE) > return ptr ? "(null+)" : "(null)"; > if IS_ERR_VALUE(ptr) > return "(errno)" Do we care about the value? "(-E%u)"? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds