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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D503FC47092 for ; Tue, 1 Jun 2021 15:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2E1C60E08 for ; Tue, 1 Jun 2021 15:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234142AbhFAPik (ORCPT ); Tue, 1 Jun 2021 11:38:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230385AbhFAPik (ORCPT ); Tue, 1 Jun 2021 11:38:40 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AC08C061574; Tue, 1 Jun 2021 08:36:58 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id jz2-20020a17090b14c2b0290162cf0b5a35so1636730pjb.5; Tue, 01 Jun 2021 08:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l6yW5DU/AhoYfKzgT6R1oCsc3vdq9I6H3gxTWPzLGSU=; b=bUAYYQ76i29MIovpWYhhW6ZM6tYPZpCCZggB4FdqwiID1ehUCOd8PG5eUh9pG1itu+ 9gV/aeExIVsEqfwLAstcjQtDFwW679gjHAfiqrUtnMpF6KeSgc5jzZw6R4z7QHP3/0l0 PI6n/OkH7xpxkA56068hBTOE889lqY0E1GGHhMFTbMkG5RV22ozPc5K+0fOHaI35bmFZ fEVWu2v+hi3aO0aNln+Iueu6O78OM/OCjVSHR6aeo7lmY8d/ATt0Fjf7HY9TFuHXYqiU c4r4GjdJkMg4vswh/O/ZItUb1UpLPqKztv02LGcdMt+zyX/LMfQzf8u5ObhRxFfNlgeb 7fmw== 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=l6yW5DU/AhoYfKzgT6R1oCsc3vdq9I6H3gxTWPzLGSU=; b=CgsrohMnpbb+dL7pq33YSuZa3DJ09rfB3KWx3B8ryU6OIE+iFXRnlQMtW8YJGoZw2F JZOtpgvOpKc1A3A+WzW94akTes+V6+cE8n2S/2aOwy0eon8FjCefCky9CiSs4VM2pMHT IHFtXkno56HzGZJ1C1AtO1Rs/UEKWblL40gGX4vXMvvobLPxgDixyzQhf6TY7UcD8KNz vxiwJWcqKtwrj08cP3BM+BhCGBITJcSYkeqnSJjbEkQh8cDx0cHrkffuQ2fp4XbN8oA9 Ktggx+m8G2noHoPVIe3GNbasM63TKdtKIWqx7hTQLh/JllTOYrzEwZEyc703OAy4Sulp AIzQ== X-Gm-Message-State: AOAM5300YKTS89qEFuCLMwjWLZpmc2Eozb7A1LoOBSiFAevUbtbfHySH VjWHwkmqoFEFgQfwDwkrzIJE2cHiZ3nP4O3tTg9fOtdFbkE= X-Google-Smtp-Source: ABdhPJwEWzYZMZoEqspi1IBxGhE4mEModuAdZgFXgO6x2htKZ6yWx2XzMG/XxHT45bEvtS7W4JgQX+a2PNITZjVLY8E= X-Received: by 2002:a17:90a:17ad:: with SMTP id q42mr445192pja.181.1622561817476; Tue, 01 Jun 2021 08:36:57 -0700 (PDT) MIME-Version: 1.0 References: <20210528113951.6225-1-justin.he@arm.com> <20210528113951.6225-3-justin.he@arm.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 1 Jun 2021 18:36:41 +0300 Message-ID: Subject: Re: [PATCH RFCv2 2/3] lib/vsprintf.c: make %pD print full path for file To: Matthew Wilcox Cc: Justin He , Linus Torvalds , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Alexander Viro , Luca Coelho , Kalle Valo , "David S. Miller" , Jakub Kicinski , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Johannes Berg , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-s390@vger.kernel.org" , Linux FS Devel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, Jun 1, 2021 at 6:32 PM Matthew Wilcox wrote: > On Tue, Jun 01, 2021 at 02:42:15PM +0000, Justin He wrote: ... > Just don't put anything > in the buffer if the user didn't supply enough space. As long as you > get the return value right, they know the string is bad (or they don't > care if the string is bad) It might be that I'm out of context here, but printf() functionality in the kernel (vsprintf() if being precise) and its users consider that it should fill buffer up to the end of whatever space is available. -- With Best Regards, Andy Shevchenko