Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3345946imm; Sun, 30 Sep 2018 18:23:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV60m+gCQd+aKK7neaqLwzUSWUuGQyIRuVWSFsSQUcTNjSEjmg+jedpea9n98V7GFpS8Ar41U X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr9044684pfa.119.1538356998976; Sun, 30 Sep 2018 18:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538356998; cv=none; d=google.com; s=arc-20160816; b=bIllS16BCdHRm7j2OxzK4+rLrqMYi19TfOtXngtjHI1tFBMMwFd8IWY0Qa6OTyx0hG Vs6x2gUBGtvrxr8eg6oUCxc7ddxZhGoAxw7ji/3/VgQ+U34s+JjabJD+6G7ktbOYSRTb w1B+38oUqzaiInzGs7wwSLY6QgxdX8RqSy8BukcPLURpn4PhEJAlY4bvOxzj5WHf9/gY bcorOmYAaIdbJqMtfOaMa5ROp67ULPq17xZTomvnygjDzuAZcRB1bFi8mT2oMFfmeKNx xQ0rYkxEOsdRvhOjiwO8ArOO4WT/kharqo5lkA22x+EUHOxcmLNZGMkbbYkVK+Flw3VG LfBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=xSmYtRSjx3QTVvQvzhm/xdvU5MLeMc97/UuJ8o/K4PU=; b=HwqFmV0rrJgLyGhnZ3/jjdZY9Mru/gKIPXyDfoQnuPnAKnRWPjD0zUuwhhiaKnmpTa zUaZyjuc5ZGXXtPRe7jEVXbHKjJtwxv7Bv890u0fX1Nib2MNTjttqIngjzOAx833/DZC Gu5TxF6jjPgFNWqDLJu12ga7tTQGRLS9tqr1KtN1yxtHrNcgClO7DvMyX7wAmXjhslYJ ukPiYRl+OdOdMhp9/wfmUQPVO17isWzG2ZWwD1OfybJh45xGcDddcKvA6M5LPi9K48Td 9C8e13sOslRVMLZSqXsYIoYi7w1hD3g+5eo6+NEl5Mirvd+KlwjePPzepSl00/++2qLg dtXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=dqIwlVvW; 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 8-v6si10218303pgr.205.2018.09.30.18.23.04; Sun, 30 Sep 2018 18:23:18 -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=@canb.auug.org.au header.s=201702 header.b=dqIwlVvW; 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 S1727693AbeJAH6H (ORCPT + 99 others); Mon, 1 Oct 2018 03:58:07 -0400 Received: from ozlabs.org ([203.11.71.1]:49181 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbeJAH6H (ORCPT ); Mon, 1 Oct 2018 03:58:07 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42Nkzq4Qwjz9s3C; Mon, 1 Oct 2018 11:22:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1538356967; bh=y23vuuEddFZzlqpDsxDAv5Pns1bo8I6X87C7XwSmCLs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dqIwlVvWaql9ZpP5/t1SCMyA5tOd4yTYRDPHcGz4dq+5A9nPKVr8SOKNfHJvGTKda K6k0vHeAXXk3lkV+xil1rgoufFs/B4tecRv0r3BnsRbB7RHw+xFJ0XaDSGj+r5IbJO 9IorXbCha0AL5qLy4sAAlxHFP2oxfw4mDUYuqa3jCW+0URobjEmbQsV/HvjjIgtA3N c6dW59rKx0IXAm4G4Tfdr3pn7xQztsWpliR1YLT0Q6ybMltMviDfCaVxKSNDXE8VjP HWeEAXV25ax/A/OEGf7Kr8UtpbHDgo0wLHLDopTeBlW+p456A0DgONj5wYUavy98Eo XfW3Y8FaK22XQ== Date: Mon, 1 Oct 2018 11:22:46 +1000 From: Stephen Rothwell To: Sasha Levin Cc: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Steven French Subject: Re: [PATCH AUTOSEL 4.18 39/65] fs/cifs: suppress a string overflow warning Message-ID: <20181001112246.4dcbc4fd@canb.auug.org.au> In-Reply-To: <20181001003754.146961-39-alexander.levin@microsoft.com> References: <20181001003754.146961-1-alexander.levin@microsoft.com> <20181001003754.146961-39-alexander.levin@microsoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/FB.wSKEEne+ng3sjN0gw3au"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/FB.wSKEEne+ng3sjN0gw3au Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Sasha, On Mon, 1 Oct 2018 00:38:27 +0000 Sasha Levin wrote: > > From: Stephen Rothwell >=20 > [ Upstream commit bcfb84a996f6fa90b5e6e2954b2accb7a4711097 ] >=20 > A powerpc build of cifs with gcc v8.2.0 produces this warning: >=20 > fs/cifs/cifssmb.c: In function =E2=80=98CIFSSMBNegotiate=E2=80=99: > fs/cifs/cifssmb.c:605:3: warning: =E2=80=98strncpy=E2=80=99 writing 16 by= tes into a region of size 1 overflows the destination [-Wstringop-overflow= =3D] > strncpy(pSMB->DialectsArray+count, protocols[i].name, 16); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Since we are already doing a strlen() on the source, change the strncpy > to a memcpy(). >=20 > Signed-off-by: Stephen Rothwell > Signed-off-by: Steve French > Signed-off-by: Sasha Levin Just wondering if this should be included as it only fixes a build warning, there is no actual bug. Same for the 4.9 and 4.14 versions. --=20 Cheers, Stephen Rothwell --Sig_/FB.wSKEEne+ng3sjN0gw3au Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAluxduYACgkQAVBC80lX 0Gx2Vgf/Uj49VQIpbqz6RklI7JG/+T6uaGbCoiHF5pM56P7nSI6sfo5uNUscI0pc nmmHrkiyR8jtps79hcyaaqjsQU5hPzxD108ruKMJaOQmDeyKTmsgqPUS8hcaa1vd RNvrktZ/76h/TJzn1Cb9VA8B/ylUIIKq8oS5M3cUc698vUhuZruCUTiIiHlFFB8N DSPpaB+KJbsQZUoBIXQ/J1WKGYJ0tN16xutpsaYXgLXZanhudBDtoQRh6lpvxsnB +nu/P7M96Rk4zs5mXhQFEkNVR8gQlDUf5E0zOsA0D+shR6XyetNlUwIvNdml3kjs bhagg+KCUlO9h4DzODmW02mzli4Ryg== =KRsJ -----END PGP SIGNATURE----- --Sig_/FB.wSKEEne+ng3sjN0gw3au--