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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3DA1C433EF for ; Thu, 10 Mar 2022 16:26:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7B0B8D0002; Thu, 10 Mar 2022 11:26:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E288C8D0001; Thu, 10 Mar 2022 11:26:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3DA28D0002; Thu, 10 Mar 2022 11:26:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id C57D18D0001 for ; Thu, 10 Mar 2022 11:26:45 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 993CD245C4 for ; Thu, 10 Mar 2022 16:26:45 +0000 (UTC) X-FDA: 79229005170.10.BD11891 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id 08F6BA0015 for ; Thu, 10 Mar 2022 16:26:44 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2521561BFD; Thu, 10 Mar 2022 16:26:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F40C0C340E8; Thu, 10 Mar 2022 16:26:42 +0000 (UTC) Date: Thu, 10 Mar 2022 11:26:41 -0500 From: Steven Rostedt To: Tom Zanussi Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 4605/11713] kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' specified bound depends on the length of the source argument Message-ID: <20220310112641.2b42fd54@gandalf.local.home> In-Reply-To: <93ac51c2b0aa9d5a3777bce935990d7b9da176f4.camel@kernel.org> References: <202203092349.i2I1pdlw-lkp@intel.com> <93bb0a79331882df8ce2bf704b3d4ac28c8cbc3d.camel@kernel.org> <20220310104951.60d0adb6@gandalf.local.home> <93ac51c2b0aa9d5a3777bce935990d7b9da176f4.camel@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 08F6BA0015 X-Stat-Signature: 6fkw4p3rif8ctxyb99jftx9kte6du1qo Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf15.hostedemail.com: domain of "SRS0=xcyr=TV=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=xcyr=TV=goodmis.org=rostedt@kernel.org" X-HE-Tag: 1646929604-420950 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 10 Mar 2022 10:08:18 -0600 Tom Zanussi wrote: > This patch is for the last_cmd_set() in trace_events_synth.c, yours is > for trace_events_hist.c, which also has last_cmd_set(). Ug, name confusion :-p > > The one in trace_events_synth.c is much simpler, so it seemed to me > that strcpy() would be ok there. If you are only copying the string, why not just use kstrdup()? -- Steve