Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1298583pxb; Thu, 7 Oct 2021 05:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrlK6pEssvk8BfFZL85dGRA0a4xJvKQV2R76tkGzwe7FXg2qhKnL4NJmo8xC+TapAqFx/l X-Received: by 2002:a17:902:8494:b0:13b:9365:6f12 with SMTP id c20-20020a170902849400b0013b93656f12mr3626438plo.19.1633608582895; Thu, 07 Oct 2021 05:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633608582; cv=none; d=google.com; s=arc-20160816; b=U1DmU2GVgCLp3YCoAKENZ/uWGsbbMZHDJygWOSiFLt+sAvrDvzQbdwWpk+hfnVaIG6 er57x1TDIhyF+H83u4cuu0ECxEhaHmAyJLHdIozA8c6tJUXrzwthhztoBINYTBjPUKM3 lNUsBpqSBtG9Xw5Fo8xpYd5reEQr4bCIe96vXrqpDVMNED3z0bQ0vkJako69GeQ5Fhph vkwll8sVhL6KuDZA8fyS6+HdBN7ndb1i5/WbfyLCU9cw5ncAGO+Bm7wbNodeeJDGR3iD oSFDpSXzqwAC8hjrvdcKFHHJ04r5sfGfbiMRHuX5ZewhKWW3lxXOuaiwgqf5RZJcVENl d8Vg== 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:date:subject:cc:to:from :dkim-signature; bh=ScG3lgg2A+wioahvAFL/bv14fhjzDHIWorhUIASLWkE=; b=CXeugRtgWjr6bdLT3sqeURWc39TE2e0HtPjrUuackd5BXZEGiUGJjuPOJOi25nenD2 mA5Q4UKiiT5QQ/OdfyvY+clUnlmTtYWAACTWYOX4uQS0VGXwEg+L8qlpFLXQEb7eRzSZ 99ICEJgzYvdTYXSPtNSmcfZFCmI5PTyOqIwYeG22uVEUa79FUObwZGNF3f8s747nXWe7 4K2/rLX8ubciqM9li5XFwKb1L1NN1zVMKZO2EEKkpEjyYUycoANZ5t+FsRLXGp6sRwJe 3z9rmpACXeT6XLQAo+fwL5ngsza5pFZoDpcjYNQNAvJFTsnoaE5tTvNJ3LZwWXT6o5kW pWjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lHKHL5SB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si14508270plm.212.2021.10.07.05.09.14; Thu, 07 Oct 2021 05:09:42 -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=@gmail.com header.s=20210112 header.b=lHKHL5SB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241209AbhJGMKH (ORCPT + 99 others); Thu, 7 Oct 2021 08:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241133AbhJGMJw (ORCPT ); Thu, 7 Oct 2021 08:09:52 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A3A8C061755 for ; Thu, 7 Oct 2021 05:07:59 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id a11so3840953plm.0 for ; Thu, 07 Oct 2021 05:07:59 -0700 (PDT) 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=ScG3lgg2A+wioahvAFL/bv14fhjzDHIWorhUIASLWkE=; b=lHKHL5SBbEI7TFL6lDVTJkVY/BM7rYiDvcwWoburx4U0uaa0wFOUCekZoeCfyA/aIy IkebgAaCUmxkjgJFJ/Wyk0qyKgXYZkQAu5v1w8WQLkeMAgCubjobCR+qle3CrgvFHnlD /T689vWK8u6Xz60dR9svQdTnIiiYeRCLXCvxktCHyT8RHhLG/dXeE6xeu6C/f/2Q758h 3JM/dhrVAkQTG2zu2x22BpA7M6qtJv1iAJcreysBYZ6qSa8rYPDIRAIx1b6hrsdLEdzC kioZUroF70ymumfTuGdqjxGNoJYUJoKRxaDlY+kgnUoDZLpq6p9jf6vD/i33savkeviX CaXA== 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=ScG3lgg2A+wioahvAFL/bv14fhjzDHIWorhUIASLWkE=; b=rSwug8Iuur8I2NQwnCgUP1oh/0kSIUkEBTJcoNLE0vbynqjKOQQSJ5xdsL5+sjkwJE Eg7Df9aBpZ+n+eFyELJXeUqpXKvjU/lKmKNLddxVTmGBS2PWrML/QFO1/HmrtWuztkjb BuS2rmPTiP3BT2jO+NokN5o9Puzp4oaWEuiYZKIsWPOSpYBcCcNNFUd5GCm2CUr4KGDa gbsh4hMDJz/sBlfCta1PCoI8oogy95jEAWLFRG7xlurIfG83F0knaS1W/qoMKfELoH/b 8vYUQq9uapbIJGVsWh8g5bkaX31atCIIr6BTnStqqEpIVJ/VDxlnXvhpDRr9+oiP76lL tAtQ== X-Gm-Message-State: AOAM533p2y7fBxPAcNCMhukc93yY/A3iR/yj8v/M1DID54FCV3CshSTm 8snIGOtohIyJTBtTNRswYMs= X-Received: by 2002:a17:90a:5d8c:: with SMTP id t12mr2065610pji.98.1633608478725; Thu, 07 Oct 2021 05:07:58 -0700 (PDT) Received: from localhost.localdomain ([144.202.123.152]) by smtp.gmail.com with ESMTPSA id c8sm23915582pfj.204.2021.10.07.05.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 05:07:58 -0700 (PDT) From: Yafang Shao To: pmladek@suse.com, keescook@chromium.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, peterz@infradead.org, valentin.schneider@arm.com, mathieu.desnoyers@efficios.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, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com Cc: linux-kernel@vger.kernel.org, Yafang Shao , Vladimir Zapolskiy Subject: [PATCH v2 1/4] cn_proc.h: use TASK_COMM_LEN instread of 16 in struct proc_event Date: Thu, 7 Oct 2021 12:07:49 +0000 Message-Id: <20211007120752.5195-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211007120752.5195-1-laoar.shao@gmail.com> References: <20211007120752.5195-1-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct comm_proc_event was introduced in commit f786ecba4158 ("connector: add comm change event report to proc connector"). It seems that there is no strong reason we must define the comm as a hardcode 16 bytes. So we can use TASK_COMM_LEN instead. Signed-off-by: Yafang Shao Cc: Vladimir Zapolskiy Cc: Kees Cook Cc: Al Viro Cc: Petr Mladek --- include/uapi/linux/cn_proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h index db210625cee8..351d02786350 100644 --- a/include/uapi/linux/cn_proc.h +++ b/include/uapi/linux/cn_proc.h @@ -110,7 +110,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]; } comm; struct coredump_proc_event { -- 2.18.2