Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp364144rdb; Fri, 5 Jan 2024 12:25:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZOKC6I69xVqB4bL47GRcMaSp0oNEoVR9XPw71N9K3aNnLiOAju9vChbLHL62kw6+JKAuw X-Received: by 2002:a17:90b:1bcd:b0:28c:61de:754a with SMTP id oa13-20020a17090b1bcd00b0028c61de754amr30931pjb.13.1704486335656; Fri, 05 Jan 2024 12:25:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704486335; cv=none; d=google.com; s=arc-20160816; b=ye25srVf3MA8gcgJJxkAnY1yVmXgIVs8BIVMQsO6swCFTQK7EiBUWgXjGnrEBrwnBX XFI1Dlk8VkkwR6o5JT78s/JXebAVlcwphJjuseLAVN3zKZM/bjLo1azTaU+eRrbPtZoW YtSzLriU/SOrLOPee4Ij5stDxNbeUfHEiGV9bLVVYf9SxdRXSR5CSCykJQT33L28BShr MsDKJBHP9DIst2kWF/HCO7d87gTnCDj74ipJk/kWeOW97whXJoDuNOfenWn8ywI1rjL7 YerNqwTsyzREvqabIv8rbhSSg5BvsKZFCAGsIRt+4w1rf/KYnE6zf0311iacU0yOShgc jSow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Qey7+/Metc7y9NM7Oohh9zmN0tveATjj7VtIkKLd/jk=; fh=dexyIFr85AC1no5agZs0Lg5Ae3mpsqO+fDI4pGEMI3E=; b=JD2Ebql2WhTjwru00vuN8mM/tUe0zGJmtgMhM8HKWh6c8oLi2jjPOnAE/SSsOLIq5b T8HtT3n2qzepBTk5m6MS4ZTG4q/3fjygEoFIB6f1THVSzk67S0YRsFDKkfMX4fDLIAhD lTE8dOSq6J9RLogzs9s+4o+yT4aLKZGvX7PTibJ4lIcLUYk5iXJRA6rbyzqcJh6ozku/ 2bfzGfSEIt+NhQr/wjHHHIS373OhcxsDPsxnGZh33QP39Y2wPgTSbrC2I0Iq8CJUQfw1 RBRSPyhri1fOKsME/XJJxLE+k4XlXZS6/zxugnLbb83gzpLv7oe2A7Gi7wewVUbdLHtB 3ANA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gUV3A2sx; spf=pass (google.com: domain of linux-kernel+bounces-18324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id mi1-20020a17090b4b4100b0028d19cbc9d6si671421pjb.156.2024.01.05.12.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 12:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gUV3A2sx; spf=pass (google.com: domain of linux-kernel+bounces-18324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 89DAFB23BAD for ; Fri, 5 Jan 2024 20:25:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47C3035F12; Fri, 5 Jan 2024 20:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gUV3A2sx" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78ED63608A for ; Fri, 5 Jan 2024 20:25:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7112CC433C8; Fri, 5 Jan 2024 20:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704486315; bh=bAZttlTQMZlhQC6CNZBZC3zQ6+w00XhSfvWG1FFDVUs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUV3A2sx8AH0megKnsNxucQs1h21xGk3A/pWRHNqKOhLfNWoSIL/yUIqaMY01VE2p vvv5DSmr64xBG+1mvJFzxMBCPMNMmEABKKeCpD5IBykBYa9hvo6s+08dvPJQZp1u4h gI+wqSrdug2BY75/P3vkQKM29PLAX4ElpZup9+3hUk88/hjtfr2rwHqSil7LmVXSBe TiM1E6xf7ebVNZKumSOF/WJYvXbjijsASAlBt8amZpIvW20qj/Epu+XPh7XhTq7Wod iejiRK7EqwaR9aD+CLJZqm1trUGc+pM/GZv+R04cPx0aIggY1wlAp1UCR3eGIPKkFj G6iFNZhJNBX1w== Date: Fri, 5 Jan 2024 13:25:12 -0700 From: Keith Busch To: Arnd Bergmann Cc: Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Arnd Bergmann , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] nvme: trace: avoid memcpy overflow warning Message-ID: References: <20240103155702.4045835-1-arnd@kernel.org> <20240103155702.4045835-2-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240103155702.4045835-2-arnd@kernel.org> On Wed, Jan 03, 2024 at 04:56:56PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > A previous patch introduced a struct_group() in nvme_common_command to help > stringop fortification figure out the length of the fields, but one function > is not currently using them: > > In file included from drivers/nvme/target/core.c:7: > In file included from include/linux/string.h:254: > include/linux/fortify-string.h:592:4: error: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror,-Wattribute-warning] > __read_overflow2_field(q_size_field, size); > ^ > > Change this one to use the correct field name to avoid the warning. > > Fixes: 5c629dc9609dc ("nvme: use struct group for generic command dwords") > Signed-off-by: Arnd Bergmann Thanks, applied to nvme-6.8 with Christoph's line-wrap suggestion.