Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1301574pxb; Thu, 21 Oct 2021 20:54:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySI4Vtb30ztaM+BBToDUjTcs+mERbpc/LPpYjVsG3jeZCUjVxpd8dMtHdWqISB/H/8Oriv X-Received: by 2002:a63:2c8:: with SMTP id 191mr2488695pgc.293.1634874868706; Thu, 21 Oct 2021 20:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634874868; cv=none; d=google.com; s=arc-20160816; b=jog7lyeBOEfTdjZlR95KNpcVhLoZ3YohUx3zq1w8LaFHuZWfRaFxcRSjMo2T22kkI8 wsx9bfujfQEJfJ1Wbr3z1ghCRB9JmEhUJEDC1uTHU1xig+D6PqmxWDpZMLlojQ7t9Qsq DPry5nxh7UDFN4H0Dm/AA/RV1i5JmgU7dHubfV24t7ETatwgYGZ9YmMLNkE2exa3euwD eSOa3x7fdKc1NUVsKLenFaMC8NOzFmjeuPooHQH5cAIcKZzH+yxwFscbWgTHAWG7PbYF 3MAxkD6HEvz6opQOZujcz8O5GQMVw3DN6S+bNCSXPsAmSKNhDFhxlbSEeox/oAuqNgao yOBA== 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 :dkim-signature; bh=WTm8Ba44AGjY6peS6eWncqZpsJEVn1yPlkYk7BIYyiY=; b=GgflNivRd68E3PjjaU+8kWc7ZJ2aYKG/KbKukKbuuVS+L/zYX+BCkiba45jhc8BmIj 4s5ukb0eotZDauhKB18tD4Xxh0HmtKH84K6K8KWB9P4rLdCz11b/1sSBpCuGuHqrhfhA X82Y0LCAzB8fHJ4BU0lRgg6/Pa612+7LzuE1dYdzFMjYOXZsnjwdtedfWATxWdusJ+HE Qwbk2x0QuyWoeKRBeCisbIpjImVEy6Ro+anZkzgPER8cEDCohbqX7d5CCB9383c6j6be j0Jgt1aa2N4P9CdLZzpB4P5fAHJZQxXBvHNYhyqpFI6ramLFlVkF/hEW32fcaM8PrXKu S8KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="Erv9Pl/4"; 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 ip1si15692233pjb.93.2021.10.21.20.54.05; Thu, 21 Oct 2021 20:54:28 -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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="Erv9Pl/4"; 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 S232638AbhJVDyn (ORCPT + 99 others); Thu, 21 Oct 2021 23:54:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbhJVDym (ORCPT ); Thu, 21 Oct 2021 23:54:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C71CA610CF; Fri, 22 Oct 2021 03:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1634874745; bh=ByPDUyyAdTZE18OJTBUU3plft6+xirKjXsLLJY6EG4E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Erv9Pl/4IB6ddoKt7U+ys6oUmxIw4NAUGcRqjppUmOg1Tet5LoByq/PSYBUnvyyTt kcFdEWENBmrOwRzcMY0+heQRw4xuP9ELySWKXNYreSJSFmHq5kasQ2cTnad+SM2oio 9cugJhs/Hk5wtliuKyETSXFu/rC18+trbWQM37Eo= Date: Thu, 21 Oct 2021 20:52:22 -0700 From: Andrew Morton To: Yafang Shao Cc: keescook@chromium.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, arnaldo.melo@gmail.com, pmladek@suse.com, peterz@infradead.org, viro@zeniv.linux.org.uk, valentin.schneider@arm.com, qiang.zhang@windriver.com, robdclark@chromium.org, christian@brauner.io, dietmar.eggemann@arm.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, davem@davemloft.net, kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, oliver.sang@intel.com, lkp@intel.com Subject: Re: [PATCH v5 00/15] extend task comm from 16 to 24 for CONFIG_BASE_FULL Message-Id: <20211021205222.714a76c854cc0e7a7d6db890@linux-foundation.org> In-Reply-To: <20211021034516.4400-1-laoar.shao@gmail.com> References: <20211021034516.4400-1-laoar.shao@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; 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, 21 Oct 2021 03:45:07 +0000 Yafang Shao wrote: > This patchset changes files among many subsystems. I don't know which > tree it should be applied to, so I just base it on Linus's tree. I can do that ;) > There're many truncated kthreads in the kernel, which may make trouble > for the user, for example, the user can't get detailed device > information from the task comm. That sucked of us. > This patchset tries to improve this problem fundamentally by extending > the task comm size from 16 to 24. In order to do that, we have to do > some cleanups first. It's at v5 and there's no evidence of review activity? C'mon, folks! > 1. Make the copy of task comm always safe no matter what the task > comm size is. For example, > > Unsafe Safe > strlcpy strscpy_pad > strncpy strscpy_pad > bpf_probe_read_kernel bpf_probe_read_kernel_str > bpf_core_read_str > bpf_get_current_comm > perf_event__prepare_comm > prctl(2) > > 2. Replace the old hard-coded 16 with a new macro TASK_COMM_LEN_16 to > make it more grepable. > > 3. Extend the task comm size to 24 for CONFIG_BASE_FULL case and keep it > as 16 for CONFIG_BASE_SMALL. Is this justified? How much simpler/more reliable/more maintainable/ would the code be if we were to make CONFIG_BASE_SMALL suffer with the extra 8 bytes? > 4. Print a warning if the kthread comm is still truncated.