Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp224823pxb; Wed, 20 Oct 2021 20:46:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuyTwEdErpYD3MKjWPYDnWxHzyNusISInhHVbHOasn2tOUP2EmTT6FBAyOZ2CWNdvswTSS X-Received: by 2002:a17:90b:3b85:: with SMTP id pc5mr3606066pjb.74.1634788009142; Wed, 20 Oct 2021 20:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634788009; cv=none; d=google.com; s=arc-20160816; b=u3r0enyOzRTPxl7xqAPsx2naU6LjUVDMrw3aHDvGTcqFJ2Jgcwss+9IyCggNCe1NK9 TjdDdpoCcaUhl3sU/7wDuPt0Q5rhaScy9fCZZ5BPQRkyLOwtbli18lxlSyRQRaH6qtcg NuH76JGQurr2RobQrl2BihUjebMepwwvjPScqZaXWZvRjDL6rafurt0UrOhev8TN/xUS yLEhPNcAQgxRunGIntGTKzu8F8YtjL5KlHZP+vM1vFeGmpSj9DjM+UI5ib3kSzhAqoS0 /bHdiZuDlVnVOvluktM0OsJ/lE2uyUZbgTaOGNsaUc+uTNSh1AKCKzwlC+5Sgq9TQBKW NvaQ== 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=Yf2NA38E7HKQh3ZYZFbNhGoKPtNwpPAehy4wTF5rYbw=; b=ylwX9U5cMwX6BiLtJOH33nxzvAMYTw5u2+EXup4UmIDp4WMAmwh69B8Vkq8HEdE2V1 oEqbdpzkFT58nSVHNOk+AMN5D1m7hPuqRUo/Ifnmwxze3gaE54uq93xTtiSGS2cpNFqY GZTnDElGn62d7UlKDOxKs3Lv1iCQADOj8G/Tsy8NrF3jiek27gUxIOEuUiPUVwPm7x4e Dx0pNXioApJpzGC8EPX5H+Ulo1rOW/quP8XXSaEMWKodJIABxjg8lMllyJQ0yoAhkfbV VZlJN0BY5kVn2d39wnYBI+jW8UhrTQzJrECw1TTHFm+noK0vMNKhaIET3vSlqBAK0JKm B/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WVDgEDcA; 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 a190si5157568pge.486.2021.10.20.20.46.36; Wed, 20 Oct 2021 20:46:49 -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=WVDgEDcA; 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 S231336AbhJUDrz (ORCPT + 99 others); Wed, 20 Oct 2021 23:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbhJUDrn (ORCPT ); Wed, 20 Oct 2021 23:47:43 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF5C9C06161C; Wed, 20 Oct 2021 20:45:27 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id a15-20020a17090a688f00b001a132a1679bso2130747pjd.0; Wed, 20 Oct 2021 20:45:27 -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=Yf2NA38E7HKQh3ZYZFbNhGoKPtNwpPAehy4wTF5rYbw=; b=WVDgEDcA6KG/3I8xJsCT5rM/9VEakGIavjAQJNDeLjTLTQSb+a+nrxflwc7YKGtx8y xyD8IFwuTFIMqw4o0L6Q1yGVc1WdMnR4+MJlTUaoGw8IRB+smDqlCnlvjiPB5Bfv6IbG arMXnuqzbvvD0+/NYHfkYUbURjxE8zVyqXMixtuBangeQgXt4DsHAnmIfSoxlUGst2w2 yQuOEJmpvKcdCHRxb2QEiYAhZf3rgRnY0PUtRJ9P4Y6bEWpvEV7EBQi745at1CSic/C2 t6FkL3l+AH9p459kgn0orPiPFoILcANQm9P9vFkKlDff7hTs1OatRa1pjJjSnLgUteHR giZA== 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=Yf2NA38E7HKQh3ZYZFbNhGoKPtNwpPAehy4wTF5rYbw=; b=PTonhinuaJRQgwvomji+L/2+/IflpsIRr/XioZFoRi99N6lT0PzD48E7hfNQyG3Wq0 8Co3Qrr7fwAyQCTnVzkKn7FYai7dLCmIsK6oAI+F3vXFlLhEQ06cIeogxGH+eIf6FkBy Rz+j4bs7EG3alUzRED8z3+/gWj1emnyTERvA0cIldQpaHlzwNfpJwyUsf8IpCEgQ6n9W aj/tFO/+RrjjGJrUK69jsywgRKB5E10jHYht7q8z4h0grRf6k/zqMhFZWRexLCDC+SOt XNzrZIQtYRW9pYofFYwpuKG3AC9mpvxlr2N0LO3TQMAU+1ZICMkDfDwX+H4FaTmFFcwK uCgA== X-Gm-Message-State: AOAM530kr9IRQ+skDENR7PYERC3pBM2Xpkdooe2+D2mWhAQ2Bh9VwT9P YZY0jMo3nPn1oH+Ce2uMjws= X-Received: by 2002:a17:90b:4a4d:: with SMTP id lb13mr2877701pjb.122.1634787927391; Wed, 20 Oct 2021 20:45:27 -0700 (PDT) Received: from localhost.localdomain ([140.82.17.67]) by smtp.gmail.com with ESMTPSA id bp19sm3651077pjb.46.2021.10.20.20.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 20:45:27 -0700 (PDT) From: Yafang Shao To: 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, akpm@linux-foundation.org, 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 Cc: 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, Yafang Shao Subject: [PATCH v5 03/15] sched.h: introduce TASK_COMM_LEN_16 Date: Thu, 21 Oct 2021 03:45:10 +0000 Message-Id: <20211021034516.4400-4-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211021034516.4400-1-laoar.shao@gmail.com> References: <20211021034516.4400-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 There're many hard-coded 16 used to store task comm in the kernel, that makes it error prone if we want to change the value of TASK_COMM_LEN. A new marco TASK_COMM_LEN_16 is introduced to replace these old ones, then we can easily grep them. Signed-off-by: Yafang Shao Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Kees Cook Cc: Al Viro Cc: Petr Mladek --- include/linux/sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index c1a927ddec64..62d5b30d310c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -274,6 +274,8 @@ struct task_group; #define get_current_state() READ_ONCE(current->__state) +/* To replace the old hard-coded 16 */ +#define TASK_COMM_LEN_16 16 /* Task command name length: */ #define TASK_COMM_LEN 16 -- 2.17.1