From patchwork Mon Nov 8 08:38:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12608047 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA576C433EF for ; Mon, 8 Nov 2021 08:39:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 907E461163 for ; Mon, 8 Nov 2021 08:39:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 907E461163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 24B7A6B0071; Mon, 8 Nov 2021 03:39:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1FA906B0072; Mon, 8 Nov 2021 03:39:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C3016B0073; Mon, 8 Nov 2021 03:39:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id EEF2E6B0071 for ; Mon, 8 Nov 2021 03:39:25 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9DB273017B for ; Mon, 8 Nov 2021 08:39:25 +0000 (UTC) X-FDA: 78785113764.19.359AF10 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf20.hostedemail.com (Postfix) with ESMTP id 178BFD000670 for ; Mon, 8 Nov 2021 08:39:14 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id h24so6521496pjq.2 for ; Mon, 08 Nov 2021 00:39:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xlgz5f/1O7j1fYQGwZaGYM2sPo7uBwCryb9I1PFva10=; b=mu+nQO3yTipG+EFeCqkGRpcXAHGb/8gxmZo+EDH9ytABe13PJCvj7yg40gSQ6BtopL W9cd7aLMbBxdIqQBDagjm5iSOLlZY5z016L1Wv/9B4M9HPspxdxK3cSEeNdPyAvXHC+t sescGDiM5vgOCBS7t2DeIhrjjZ14RQft4d+NRhEok4L8unqGF8CcIcek+xBmrSsRjVN8 nVO3O2hheXB7EEmUUFvxj8JoJ/3FMtFdQaZfBpn/+hZmAIg1DMcsPC8f5Acm3rIaAQRS IiilGsYGP4yID21gz87Lttl9qljFoCNit3ACWlNxRWSR+Vi3ScaMIpQKr8HyhPtTG4T3 kTEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xlgz5f/1O7j1fYQGwZaGYM2sPo7uBwCryb9I1PFva10=; b=5FgoQ79O4gnN1wj8dcXnS5P0m5rImG/SNQUyy9nk2aBtBlf9z5kAqTi/ZEZHNhae0S qPTa/OgNJQbO1Pc+1/Y6M51Fz2IN4ySbfP91d7muTX9tWryU4zZG5BVlSKUbH6AmQofi Sl9vhle/F6PJ2ye86n2qBsjcS0bzYeNJEZ4R7Mt+7pCwt6yt1xqimYI84uApLqN8yGBw UZJ0rPBh+R5LXCriAlY1qAqxM8J6vGatWSSgmlpKBZX6a+3nKoHLAKvPb7SUFjUMMh7B A38f3rkPvH1ezUZYmebmPLPY4dq18b5v+odtb+jevKkSvwGlQ42AtCyhRhi8ZVPBeDaC qx1g== X-Gm-Message-State: AOAM532qwJew7ei5T+J+Hwzln2peZhgvxv8J5zxFwhFJGKtp03SD4cJ0 SRhbhSY1yYQiW0L5ZPPU8GA= X-Google-Smtp-Source: ABdhPJy1+50gPKAmCT9Y0ZwuuPEAhduRynsf7+l9Q3TeWobNCHK2T8eiL59YlBTlGbJV4bZzZldAdA== X-Received: by 2002:a17:90a:5986:: with SMTP id l6mr50152993pji.215.1636360764275; Mon, 08 Nov 2021 00:39:24 -0800 (PST) Received: from localhost.localdomain ([45.63.124.202]) by smtp.gmail.com with ESMTPSA id w3sm12253206pfd.195.2021.11.08.00.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:39:23 -0800 (PST) From: Yafang Shao To: akpm@linux-foundation.org Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, oliver.sang@intel.com, lkp@intel.com, Yafang Shao , Mathieu Desnoyers , Arnaldo Carvalho de Melo , Alexei Starovoitov , Andrii Nakryiko , Michal Miroslaw , Peter Zijlstra , Steven Rostedt , Matthew Wilcox , David Hildenbrand , Al Viro , Kees Cook , Petr Mladek Subject: [PATCH 0/7] task comm cleanups Date: Mon, 8 Nov 2021 08:38:33 +0000 Message-Id: <20211108083840.4627-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mu+nQO3y; spf=pass (imf20.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.216.47 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 178BFD000670 X-Stat-Signature: y1f4ucjuqikhn9yf1tiqk9spnsz7rih7 X-HE-Tag: 1636360754-550399 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: This patchset is part of the patchset "extend task comm from 16 to 24"[1]. Now we have different opinion that dynamically allocates memory to store kthread's long name into a separate pointer, so I decide to take the useful cleanups apart from the original patchset and send it separately[2]. These useful cleanups can make the usage around task comm less error-prone. Furthermore, it will be useful if we want to extend task comm in the future. All of the patches except patch #4 have either a reviewed-by or a acked-by now. I have verfied that the vmcore/crash works well after patch #4. [1]. https://lore.kernel.org/lkml/20211101060419.4682-1-laoar.shao@gmail.com/ [2]. https://lore.kernel.org/lkml/CALOAHbAx55AUo3bm8ZepZSZnw7A08cvKPdPyNTf=E_tPqmw5hw@mail.gmail.com/ Cc: Mathieu Desnoyers Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Michal Miroslaw Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Matthew Wilcox Cc: David Hildenbrand Cc: Al Viro Cc: Kees Cook Cc: Petr Mladek Yafang Shao (7): fs/exec: make __set_task_comm always set a nul terminated string fs/exec: make __get_task_comm always get a nul terminated string drivers/infiniband: use get_task_comm instead of open-coded string copy fs/binfmt_elf: use get_task_comm instead of open-coded string copy samples/bpf/test_overhead_kprobe_kern: make it adopt to task comm size change tools/bpf/bpftool/skeleton: use bpf_probe_read_kernel_str to get task comm tools/testing/selftests/bpf: make it adopt to task comm size change drivers/infiniband/hw/qib/qib.h | 2 +- drivers/infiniband/hw/qib/qib_file_ops.c | 2 +- fs/binfmt_elf.c | 2 +- fs/exec.c | 5 +++-- include/linux/sched.h | 9 +++++++-- samples/bpf/offwaketime_kern.c | 4 ++-- samples/bpf/test_overhead_kprobe_kern.c | 11 ++++++----- samples/bpf/test_overhead_tp_kern.c | 5 +++-- tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 4 ++-- .../testing/selftests/bpf/progs/test_stacktrace_map.c | 6 +++--- tools/testing/selftests/bpf/progs/test_tracepoint.c | 6 +++--- 11 files changed, 32 insertions(+), 24 deletions(-)