From patchwork Sat Dec 4 09:52:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12656425 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 7DAE9C433F5 for ; Sat, 4 Dec 2021 09:53:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98DF16B007E; Sat, 4 Dec 2021 04:53:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 93DB36B0080; Sat, 4 Dec 2021 04:53:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8053B6B0081; Sat, 4 Dec 2021 04:53:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id 710FA6B007E for ; Sat, 4 Dec 2021 04:53:18 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 24264183F8699 for ; Sat, 4 Dec 2021 09:53:08 +0000 (UTC) X-FDA: 78879648456.11.F869DE6 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf24.hostedemail.com (Postfix) with ESMTP id C763AB00009E for ; Sat, 4 Dec 2021 09:53:07 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id gt5so4178658pjb.1 for ; Sat, 04 Dec 2021 01:53:07 -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=+JuXsVUnS+mGqaHxKyE0o/YKYrOHZGXxsAcg+PajcAw=; b=iAXXWVOx9HNr6e7AStRCe78OXfyen74stssIx+IspwcnYxedIjo/XrtfOv1040hRjR ImfCvgBr+l0CoPZ+nlbDKQui2IoZZE3KbqgpzcdOD9X0Y6O9Oc2W017XddVHTI/SY45S i3iySAFhXUek0YFLJI9/O4UsrX64RNWBtLux+vCU7IsezQJ1H9Vto5cxfPwnEPNuVsuf 8ApKoHaJFIv/y5H4LXqVe9cSW/By8ffUGcnMi8XWIT6LAfrN1o7JSFeUf3Ov0J06WKKw TYsxSBz/hNkNNdrbVBfuaf82Fj2rHB90VTgcEdkh/7QtHZoOgV6+mUAv2ApSssKR4Hfc GA6g== 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=+JuXsVUnS+mGqaHxKyE0o/YKYrOHZGXxsAcg+PajcAw=; b=Etjf9lSOnTqxUCWsDTrC8fZVtdBI0AsgxjCruk7gPc2Q5Nwn3LrUD5QpA7smPj03SK ZQwBJ8ZZKwJTiPxjJSnRV6yx/xn08SkqCQxztaGb4kMdBPmmZKnTg9PPebs7QhMLsyzP GfBp7+hxxmTbFCQy54c36KqnhcjBzLJGM4ZCqDcHN4JA8r+UIlz0yR8uFYKTxOV4HMTl 9DuVxIyOn21a2ClvaCbmKXk4svuU6biIjFxzzxDFu/xLI6cMj/+lTqvwPpIbpG2/Jntq 7wu//y8i4foSu1gCP9Z+hxdJt8/SIWe85hdsdZTP28YiTEBefPqFsYvTyDxgO8Monkwr WWWg== X-Gm-Message-State: AOAM532XVLbvFcGhJUJuNXtW6vNiA1uhlJ6+OrSEvkkGGA+D7fNTPCCD p0XuUJvJDjXj6HuwkQ6XOBs= X-Google-Smtp-Source: ABdhPJzaXGdpxyp5qIfx9US29iDUhZtFjsXlPg+SLpc8UsVegALcv/ZDWvLIdf1ITkI+JLfT1DRSEw== X-Received: by 2002:a17:90b:38c1:: with SMTP id nn1mr21160422pjb.91.1638611586767; Sat, 04 Dec 2021 01:53:06 -0800 (PST) Received: from vultr.guest ([45.76.74.237]) by smtp.gmail.com with ESMTPSA id ms15sm4343198pjb.26.2021.12.04.01.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 01:53:06 -0800 (PST) From: Yafang Shao To: akpm@linux-foundation.org, rostedt@goodmis.org, keescook@chromium.org, pmladek@suse.com, david@redhat.com, arnaldo.melo@gmail.com, andrii.nakryiko@gmail.com Cc: linux-mm@kvack.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Yafang Shao , Mathieu Desnoyers , Alexei Starovoitov , Michal Miroslaw , Peter Zijlstra , Matthew Wilcox , Al Viro Subject: [PATCH -mm 0/5] Phase 2 of task comm cleanups Date: Sat, 4 Dec 2021 09:52:51 +0000 Message-Id: <20211204095256.78042-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Stat-Signature: 1ioc1sgn8ux13497m5a5ttyfskef717p Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iAXXWVOx; spf=pass (imf24.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: rspam05 X-Rspamd-Queue-Id: C763AB00009E X-HE-Tag: 1638611587-38626 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 is the followup work of task comm cleanups[1]. In this phase, the hard-coded 16 is replaced by either TASK_COMM_LEN or TASK_COMM_LEN_16, to make it grepable. The difference between this two marcos is: - TASK_COMM_LEN The size should be same with the TASK_COMM_LEN defined in linux/sched.h. For the src file which can't include linux/sched.h, a macro with the the same name is defined in this file specifically. - TASK_COMM_LEN_16 The size must be a fixed-size 16. It may be exposed to userspace so we can't change it. In order to include vmlinux.h in bpf progs under sample/bpf or tools/testing/selftests/bpf, some structs are renamed and some included headers are removed. 1. https://lore.kernel.org/lkml/20211120112738.45980-1-laoar.shao@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 (5): elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16 samples/bpf/tracex2: replace hard-coded 16 with TASK_COMM_LEN tools/perf: replace hard-coded 16 with TASK_COMM_LEN bpf/progs: replace hard-coded 16 with TASK_COMM_LEN include/linux/elfcore-compat.h | 8 ++------ include/linux/elfcore.h | 9 ++------- include/linux/sched.h | 5 +++++ include/uapi/linux/cn_proc.h | 4 +++- samples/bpf/tracex2_kern.c | 3 ++- samples/bpf/tracex2_user.c | 3 ++- tools/perf/tests/evsel-tp-sched.c | 8 +++++--- tools/testing/selftests/bpf/prog_tests/ringbuf.c | 9 +++++---- .../testing/selftests/bpf/prog_tests/ringbuf_multi.c | 8 +++++--- .../selftests/bpf/prog_tests/sk_storage_tracing.c | 3 ++- .../testing/selftests/bpf/prog_tests/test_overhead.c | 3 ++- .../selftests/bpf/prog_tests/trampoline_count.c | 3 ++- .../selftests/bpf/progs/test_core_reloc_kernel.c | 11 +++++------ tools/testing/selftests/bpf/progs/test_ringbuf.c | 8 ++++---- .../testing/selftests/bpf/progs/test_ringbuf_multi.c | 8 ++++---- .../selftests/bpf/progs/test_sk_storage_tracing.c | 4 ++-- 16 files changed, 52 insertions(+), 45 deletions(-)