From patchwork Sat Dec 4 09:52:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12656429 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 7E8BAC433F5 for ; Sat, 4 Dec 2021 09:54:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4853E6B0081; Sat, 4 Dec 2021 04:53:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 434A06B0082; Sat, 4 Dec 2021 04:53:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D5C26B0083; Sat, 4 Dec 2021 04:53:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id 214276B0081 for ; Sat, 4 Dec 2021 04:53:21 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E25B018404103 for ; Sat, 4 Dec 2021 09:53:10 +0000 (UTC) X-FDA: 78879648540.19.68777DA Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by imf02.hostedemail.com (Postfix) with ESMTP id 7E17280006 for ; Sat, 4 Dec 2021 09:53:10 +0000 (UTC) Received: by mail-pl1-f176.google.com with SMTP id z6so3781689plk.6 for ; Sat, 04 Dec 2021 01:53:10 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=y/3OH0dv1UtiAFVROi6oJBNv875tsxlRHeEufUcGAE8=; b=SarWfOANlxY+W1wqzZLUdID9Fc3MKFpV03tydsm+v0n8XUl+dcwUDrvIiMoajZcN/8 VygHDL+xUCD/1rvmo4SnyP2WVPTJltzUxeDFRhWIJHSlIvbTENzg7A49yvMRspqt5kk8 GWVUqC9U/qbUiBA4LeT7O45VG2yDScE5EQzmMgDgJMB5jqBMFmaal7UuUJ8u5dmPdTGJ 83XteKkH/SE6b6jtPaiEtlYD5dVEae4/oo0qaR3E0V++A3XlLVER+QRX6/53iexk+IaZ enzhxKb+F6Nw1Uik2BMvUPFslykGrZv3WzczdX1dvZ252t/S6+BIi0RphSKjA3DDhb8S sXlw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=y/3OH0dv1UtiAFVROi6oJBNv875tsxlRHeEufUcGAE8=; b=S1y8G9npAw+AfNOTueWP/CI/ru4MydHcsERC2EeyvsBVC6JenBCcDS+wJc6DNCeMGm wvPA63Va1oU9EapbQxxeXURqdv8JFIan7qiFS+4rVVALFF/hD6FLOdTHquYVzcs3Qb2z LrW31vLIxL6cnpJiGy4ikuVzJJxMug8mIPRem6JM+WY9pn/r/cXMZxr8uBrl35rixNqv Nd5x0TBDArTJbOYlDOkVVrzczgEsaoQczTTbU1ME+mvbUEaoF07fBIeIxFQ4d8ygoyKB 1lzWKihNN2kAn3BjJQSrjpkjXnF2dEK7Dk5Uq9XwRWnQ4jGz66sdOv9mgBNl3LlYa7hT xrKA== X-Gm-Message-State: AOAM532Bjb2I1yi/taci6U+tebVcJ1hSk/tYXJFdopMWDSNxquKRCrvZ vUROp62mMKHe5/l5KU2kVHw= X-Google-Smtp-Source: ABdhPJyWUyZ8FNI0GA/R20IXskf5Z9SPmJGG1ragdsZ42JEvCLKUvt/9eoB/AkMYg6APTu6I88aWLA== X-Received: by 2002:a17:902:e806:b0:142:830:eaa4 with SMTP id u6-20020a170902e80600b001420830eaa4mr28670068plg.16.1638611589538; Sat, 04 Dec 2021 01:53:09 -0800 (PST) Received: from vultr.guest ([45.76.74.237]) by smtp.gmail.com with ESMTPSA id ms15sm4343198pjb.26.2021.12.04.01.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 01:53:09 -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 2/5] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16 Date: Sat, 4 Dec 2021 09:52:53 +0000 Message-Id: <20211204095256.78042-3-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211204095256.78042-1-laoar.shao@gmail.com> References: <20211204095256.78042-1-laoar.shao@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 7E17280006 X-Stat-Signature: 83w518jb5sachkqu44r63szxr4qd5rmh Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SarWfOAN; spf=pass (imf02.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.214.176 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1638611590-670071 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 TASK_COMM_LEN_16 has the same meaning with the macro defined in linux/sched.h, but we can't include linux/sched.h in a UAPI header, so we should specifically define it in the cn_proc.h. Signed-off-by: Yafang Shao 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 Acked-by: Steven Rostedt (VMware) --- include/uapi/linux/cn_proc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h index db210625cee8..6dcccaed383f 100644 --- a/include/uapi/linux/cn_proc.h +++ b/include/uapi/linux/cn_proc.h @@ -21,6 +21,8 @@ #include +#define TASK_COMM_LEN_16 16 + /* * Userspace sends this enum to register with the kernel that it is listening * for events on the connector. @@ -110,7 +112,7 @@ struct proc_event { struct comm_proc_event { __kernel_pid_t process_pid; __kernel_pid_t process_tgid; - char comm[16]; + char comm[TASK_COMM_LEN_16]; } comm; struct coredump_proc_event {