Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4616299pxb; Thu, 14 Oct 2021 08:38:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv//gtNXkeVifRm1fy4ZR/QViukkGs6XXhFi4G0Srcx6FHiYkrCFJi8cXOn6vL32GnWicF X-Received: by 2002:a17:90b:3ecc:: with SMTP id rm12mr6996570pjb.48.1634225919544; Thu, 14 Oct 2021 08:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634225919; cv=none; d=google.com; s=arc-20160816; b=qCt1zzew3lbNzALVDwe5uc51N2mYDC0m9evb4gSQmudx/641mge0+hAASdMn9kJrgN vAHK41K9e8PYFeX5Eq3MfNu7w6MPwbUSjJJVuMXIKzqkGfjwG0eSTUfjJrCQYNzaW/li m5CdAQXiCN4X81wTBVUQstwfeAGhTAMmSC3MzvQ0ZZ6jkz4J/oagIog9HuNNrIfMeljK 7RC1M3vFM17/Kyp5x92yZE3wKvUsyAZXhXblgQt8PpvQKzA3wJ4G00WUnvIirNDpfMN0 V/n5c1Oz9Q5MFIt/hLvs6EJ2Dl03IhGNdRXh1v18GEIDT5BOn2HMxtOQWfg+TFvvaSk8 vLRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=j39Z3hV8uVtOZU5GfRA7U+cu6NSp3LCDdXp06xKz90E=; b=nX9mnMG5eqXU9QiCcaylGhhKpg9DC9gRalUG0BFXqLDpybCBmfC9WoAeONZueF9zKZ Gt9neev76Dui4ECuQKYngtRzsUa97h6zwNTfBAVKEUQPCgk4RlxhkQKNuhDQxtP6QLCY ZjPBURULKmqwmpwmU+TtAyUt5fQnJgEenR7ggNNt8S27a2cja0xHy+K0ApU9OhD6LKtE f9n3N/upVy5W72yHXred7tpQJj31ApK76rYcDfm88yiDLRAj7Nj4Yym/3x+Nth8njOYn TShdORo1i9zM3W38c9kckszb50rlohrHmflLFZn/k/NZq127yMzLXqxYesytjBCQNH9i nvFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v184si2425762pgd.60.2021.10.14.08.38.26; Thu, 14 Oct 2021 08:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230305AbhJNNdU (ORCPT + 99 others); Thu, 14 Oct 2021 09:33:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbhJNNdR (ORCPT ); Thu, 14 Oct 2021 09:33:17 -0400 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 749B360EE9; Thu, 14 Oct 2021 13:31:10 +0000 (UTC) Date: Thu, 14 Oct 2021 09:31:08 -0400 From: Steven Rostedt To: Yafang Shao Cc: Kees Cook , Peter Zijlstra , Petr Mladek , Al Viro , Andrew Morton , Valentin Schneider , Mathieu Desnoyers , qiang.zhang@windriver.com, robdclark@chromium.org, christian@brauner.io, Dietmar Eggemann , Ingo Molnar , Juri Lelli , Vincent Guittot , Benjamin Segall , Mel Gorman , Daniel Bristot de Oliveira , David Miller , kuba@kernel.org, LKML , Vladimir Zapolskiy , David Howells Subject: Re: [PATCH v4 2/5] connector: use __get_task_comm in proc_comm_connector Message-ID: <20211014093108.3fdf22bd@gandalf.local.home> In-Reply-To: References: <20211013102346.179642-1-laoar.shao@gmail.com> <20211013102346.179642-3-laoar.shao@gmail.com> <20211013101921.0843aaf0@gandalf.local.home> <20211013222418.7ea9727d@oasis.local.home> <202110132148.523C3EA@keescook> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Oct 2021 17:26:16 +0800 Yafang Shao wrote: > > > But that should probably be a separate patch. > > > > strscpy_pad() is the right thing here -- it'll retain the NUL-fill > > properties of strncpy and terminate correctly. > > > > strscpy_pad() can also work, and seems more simple. I'm fine either way. As long as the string that is updated is terminated. -- Steve