Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2834371imb; Mon, 4 Mar 2019 15:46:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyO0CD9OckTZGl5k2bhYoWFwSzeR2RD4dP2pO1m7tbPnVk7cNPLdA/XTlWeuOWI46oUs/vs X-Received: by 2002:a17:902:5a5:: with SMTP id f34mr23137275plf.78.1551743170227; Mon, 04 Mar 2019 15:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551743170; cv=none; d=google.com; s=arc-20160816; b=mYUNnvC3MWVfLctTQAZV6z/uGstQ8mpIOpjPYGkwMPSfAi0I92Qy+dRdP6W6kGiL5z EFQhhIKJG5dmv5Ym7TqYg/qEfAHK/kN+hcNZNPpPXImhYYmbcIRwoWbBt4o4p5ZD+5DR qcr5WkO3cMSbA8olmjmYB83TUGT0OjEwzwS70ObzqhcoFGzBzSBBw24UFY/CkhK6u24P BMcUatilYYevw+xCIKoMXqNOez7l7WcNbVOVNk/NvNipG2T1uO+irZHyMOpSSt+mf/rm H9aP5j/IWO/Rq+R4GXLo5PMAMbQhoLi1R/yjRUiqDbskk1fBHXjeJDbZkX+CF4Qc0mwA tqug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=txPf/4CnkLtTtWboFfSTE082y7RmkXIAMmpsJO2agtg=; b=FEesyqZM7S62lRs2XPy/C1f8w6TL8xapXreyQcDnVdNbKlvnNLAI2S8MR2dv6TO2y3 JsnqmbZjsDLRIR9eaBcoHr2/8Av8UZhoS6u1iel28y/TBANRcI0OgJRuWzYkd4xfSdBc 14RhaKesR/AVJ0gvpaDx1pMu1kfWEDDLUUGKkBiHOneyGZvP9lvU2mO9i4ehOfO4Jku1 kksb+Ey5/thCdIUhROl1b4t4vWoS5icJI0yxn+HR0OH83z42g04ApU+1877GmgWvV8x1 TsR31G+ujTb5AavF9xDvZiRhtcBEzKHnESklYXBHKGhH7fgf5KWiANmt/HxLv65u+DCJ s7bA== ARC-Authentication-Results: i=1; mx.google.com; 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 x5si6175464pgr.149.2019.03.04.15.45.55; Mon, 04 Mar 2019 15:46:10 -0800 (PST) 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; 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 S1726683AbfCDXpe (ORCPT + 99 others); Mon, 4 Mar 2019 18:45:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:36186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfCDXpd (ORCPT ); Mon, 4 Mar 2019 18:45:33 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D94F206B6; Mon, 4 Mar 2019 23:45:32 +0000 (UTC) Date: Mon, 4 Mar 2019 18:45:30 -0500 From: Steven Rostedt To: Tom Zanussi Cc: Tom Zanussi , linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Namhyung Kim Subject: Re: [PATCH 2/2] tracing: Use strncpy instead of memcpy for string keys in hist triggers Message-ID: <20190304184530.7e819698@gandalf.local.home> In-Reply-To: <5c978b4b0d629e5a914c512c14f99f6a24241407.camel@linux.intel.com> References: <50c35ae1267d64eee975b8125e151e600071d4dc.1549309756.git.tom.zanussi@linux.intel.com> <20190304165000.0ce0fbdd@gandalf.local.home> <20190304165653.17699f9f@gandalf.local.home> <5643a1971831ce2d01a947f0f07cefa002bbdc25.camel@linux.intel.com> <5c978b4b0d629e5a914c512c14f99f6a24241407.camel@linux.intel.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Mar 2019 16:31:40 -0600 Tom Zanussi wrote: > > Hmm, I don't think it's really necessary - it's not used in a key so > > don't care about anything after the null, and TASK_COMM_LEN is used > > in > > the memcpy. > > Never mind, yeah, it would make sense to do this, will create another > patch... And probably should change the memcpy() of comm in kernel/trace/trace.c too. It could be that memcpy() is a little bit faster than strncpy(), and this is done on scheduling switches when tracing is active, but still, I'm starting to think that isn't a good choice. -- Steve