Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3992131imm; Tue, 29 May 2018 19:03:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKILLfmuHNykvDEBtWQn0iksanYOP0NYFuc8UbSaIYnTge8fP6zswrCczBsxxRGszGvty7cG X-Received: by 2002:a17:902:b40f:: with SMTP id x15-v6mr885713plr.270.1527645807391; Tue, 29 May 2018 19:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527645807; cv=none; d=google.com; s=arc-20160816; b=hOZIWX6zWpWehIdShNvJQ8ZelSoQo0A9ijv06B0OtkzSfMrsA5eSDO0ypB2wmwJnqU /fisKlDKr9eQeIait/PE/4XOxwCBK9UpmBLsBQtv1hF8Lj1xe7XxM/ACYyz+8FNEcsSH QKI1tJTJHjmVb6lPcNCTKeHLcRCB7J1P8y9JA9hR05puzmzOczq/AF5p1B/y3lXFxBlh ooZa69TBJNptKq5UISPRA5k46XyErkYOcEbp1eZ5GteYfQafywFAQ3VX7VmAItLZnk/3 XvzMt0pvwAaKSxiCu3sokFuJ6AJXeIyqjWa+++2OlBrDLKVlY+sCnjOB5s+PJbI6md0e JinA== 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 :arc-authentication-results; bh=VYugqqHqChexhz9DYqk3jnVOMmIMwpuvs1wV6Qn89CM=; b=RBNbQi85x5dkGeXovGGU5zbKQMaWrzBVpdsCiGgpqNA6fQdNxg3jUcPNPa89seSJtL SGOiRXsqjucWqYg5H6/c4AToBV6SwdJfJVorCjsLdb6cXTrsbkKnVvLZsfCmlDFmwHFm QO2VurxrO8ZFy5AeBMXASiLr2tgdjE5hRag6znzkafl30nVMLYHuyQDVw9hh+lfxF79k Xssnh0ZDUNOtsqMISVg/vXloKI4sHrVjBiqhTgYrmIHM7fArWSRbqrAAoAqqZoNw+ORk 0OzMchMNqlnIRsKlQcJHfejp6p7RLuhQW3IHH2Jj6YypaufWN52P333LJM0sH4cM0UTs 63AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r9ykHtzj; 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 j8-v6si32818171plk.0.2018.05.29.19.03.13; Tue, 29 May 2018 19:03:27 -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=r9ykHtzj; 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 S968634AbeE3CCc (ORCPT + 99 others); Tue, 29 May 2018 22:02:32 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:40841 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968600AbeE3CCa (ORCPT ); Tue, 29 May 2018 22:02:30 -0400 Received: by mail-ot0-f194.google.com with SMTP id n1-v6so19327520otf.7 for ; Tue, 29 May 2018 19:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VYugqqHqChexhz9DYqk3jnVOMmIMwpuvs1wV6Qn89CM=; b=r9ykHtzj3BolbHPderJicLb1q5V892ewosVcIUH6kooq3v/F2/ZbbCLLaj3fcpj6Pg bTHPbvXkP+tnYf//CPn2na8T4P/HMVTHBCehYm7dpDcrm0gZmq/s/NXBq/tKdg5Shel+ jQLJ4R+MOWf94BhOPUfYNgIB5g5APbiWHfhHNHq6cEsDx9hdbTwQSm1mbId0Hmwu8BYi hsxKeU7nvj8Ox52S/8Yz2DIuXn3oXmfJMtJ2J5fnTZ7T3XweTY++5phZrHmqb4Tth6Q/ TGeIK7fNhZu7SLgLI/IG+PXJuIAm+GSKn1LL7As6xHiiiKlLjvsGyEQGlmSdpLB5p+Kp fcWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VYugqqHqChexhz9DYqk3jnVOMmIMwpuvs1wV6Qn89CM=; b=ucVAtZqNXecuvGcg9KUpR38CivVTLbkLAEw5nK5i6BqKA0MHF3rc9yP746isNqk0Pp cfwwomarxaPVuhV9zvVGWcnwHqoOEeeIdpiM18Nr1blGko1Av+SpvpDsyT8xh+nj/ahN vmJnjWaIzfB5mu7uvgxqyOTJPLYjhWcVqtHQ2cwwbzjketFj2wwv6GTHlJiSrjFV1A2i 8hn8kJrxLdEv/aG+hD6ZKtBVBBSVRVVtMq4QGdXjoRIYYxJBlLS8hcAvJp8kZUmKd5kh uW56PdRNa76wAYsfy8UwzRLO+sBLI2oh1sPw/S394V5pu9BjwKnTyeNNmcfFo+R/kD2E +hSQ== X-Gm-Message-State: APt69E1tGbRtX9gKFrZfd6WcSWMo2ovD6rClxVgf0Y+LfdP+hidMQ1zj vWc6MDUVzGeBDdkuweDHm+/8h9NGT5JQeBC4lFpMUOGL X-Received: by 2002:a9d:b52:: with SMTP id p18-v6mr579469otd.64.1527645750214; Tue, 29 May 2018 19:02:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2451:0:0:0:0:0 with HTTP; Tue, 29 May 2018 19:02:29 -0700 (PDT) In-Reply-To: <20180529081117.GA1416@lst.de> References: <1527576558-26817-1-git-send-email-nick.desaulniers@gmail.com> <20180529081117.GA1416@lst.de> From: Nick Desaulniers Date: Tue, 29 May 2018 19:02:29 -0700 Message-ID: Subject: Re: [PATCH] nvme: prefer strlcpy to strncpy To: Christoph Hellwig Cc: keith.busch@intel.com, axboe@fb.com, sagi@grimberg.me, linux-nvme@lists.infradead.org, Linux Kernel Mailing List , ebiggers@google.com 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 29, 2018 at 1:11 AM, Christoph Hellwig wrote: > On Mon, May 28, 2018 at 11:49:18PM -0700, Nick Desaulniers wrote: >> Fixes a stringop-truncation warning from gcc-8. > > What would that warning be? Maybe it actually is genuinly useful, > and switching to strlcpy just papers over it.. Eric also pointed out to me that strlcpy will not initialize the rest of dest with zeros if size is less than the length of src.