Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4105214imm; Tue, 29 May 2018 22:17:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLvhxWH1SLhQL2zBc3seLIBt3OlnejfY+LWG8z6wqkbN/WFpR2al9pDeLFCe6C35uT0J5rt X-Received: by 2002:a63:7c12:: with SMTP id x18-v6mr1070751pgc.220.1527657441675; Tue, 29 May 2018 22:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527657441; cv=none; d=google.com; s=arc-20160816; b=GU64Rt1ASLJ+ojL2vm3eo3mJX5OZjIUyxTihCmvQUplohv6kmj8VC8MyETOBkldv9G MSMHCNmmwnnXSFEZd7Ch7VKxFbp/vk+5y38qW40dXww9W9RJ1+6YtJFChzZnd8ZYSOmJ r6u3j7h+c2g4vTHfBnBaa1tChBaCUAfqDikxD23U3b9ekKK4Xqvw9+kxpf4ZWtgPcG06 RHi1FaLe7CBZ4WkNJpNrjsaJfLHJzvyrm79SyG+CrPXgMJcSXn3z5LQ/2gbhvNIQUlK8 IVjz1M5yERFPOfKDsH2sue/Igxiqz2ksHzH0VenIEmeld/5qx6tqYd4P9s6KqtrPx5cN +jNg== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=3vXXop0WZdnu503JhlBlFtyGKQL0fpeICvQwViVz/FI=; b=XOa01F9eCPGMn8+bXRfTvC3CWcKoWehUTRa/gNL30CSxuyDs1CcVIBFRV/ZaPGgpAX N7Yyfxi2N+gqGU0PR9snly1WI2NighFWW7s+jvnkiOdbFdqFnrTWakNbLFiyAkHVoRlE Hk4Zy84k6lt7D4u+vntqTolomWLFyyQjYhcY8Mn0fidnWcSEiI0iPqzfa12TK59hhBWa Sqjovksnotjwt2nj4J5SGyvi8l54QkdCdph5ieA8WGgrRuhEBOUZwcmHGeToSbNZJwxU Q833jlx6asKWanRnf4ct51LGxO31J4l+aD+r64wCGa9t37SduJPLgtvPWN2CqgjIALRs nGDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=r83XDhUJ; 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 j18-v6si13256444pgv.575.2018.05.29.22.17.07; Tue, 29 May 2018 22:17:21 -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=fail header.i=@thunk.org header.s=ef5046eb header.b=r83XDhUJ; 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 S1755446AbeE3FPF (ORCPT + 99 others); Wed, 30 May 2018 01:15:05 -0400 Received: from imap.thunk.org ([74.207.234.97]:43418 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755330AbeE3FPB (ORCPT ); Wed, 30 May 2018 01:15:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3vXXop0WZdnu503JhlBlFtyGKQL0fpeICvQwViVz/FI=; b=r83XDhUJob7DmInYE+W9Bh/2dC sadNxJmq0QonkbXSGnruvKv6SiI1NXZzzkiY0/NJgLga1lve4L/PIEaJKW1NB5DK1MEln4avagspk cy5oQdY0mW7rqm5bh/MyYa9gUCgyDzr8b3+uiApVZ7RpsNfTTkXJuBxvzXJzZzSgQgcA=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fNtRs-0000Nt-7v; Wed, 30 May 2018 05:15:00 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 03D167A60B0; Wed, 30 May 2018 01:14:58 -0400 (EDT) Date: Wed, 30 May 2018 01:14:58 -0400 From: "Theodore Y. Ts'o" To: Nick Desaulniers Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: prefer strlcpy to strncpy Message-ID: <20180530051458.GB27959@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Nick Desaulniers , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <1527574913-10561-1-git-send-email-nick.desaulniers@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527574913-10561-1-git-send-email-nick.desaulniers@gmail.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 28, 2018 at 11:21:53PM -0700, Nick Desaulniers wrote: > Fixes a stringop-truncation warning from gcc-8. > > Signed-off-by: Nick Desaulniers I'll note that the ext4 superblock fields are *not* guaranteed to be NULL terminated. Code that references them must, and do, deal with this appropriately. See for example: https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/lib/e2p/ls.c#n436 GCC-8 may whine about it, but the whine is, in fact, not correct. It's making assumptions about all strings being null terminated, which is often, but not always, the case. Cheers, - Ted