From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796010505; b=HXIcdrNS9M6cGfWM6EtcKBQCoALuf/foLVCj+t0H4FYCIHB65e987BH1lSHZIvLFnQLs mjCcLeKGjRzp0R1SK7MfjpmsE9Bklm/c3LGz5zVgwokrhcC9Jbdd4ox0EEeeJiv2XHGEE S4TmFLI1jWFdA/Dhwzvc+Ks3ANcGhyq5pH2S+bQnIjia2Eqm+ebK0PVPMVkWKRkPQgjTS hpT61tWrPRCibQBjObCm4TROwChvk3k5jlDW14QPLk/RqiFdtIkR5ULi0qdweXx7gFAKT Z5L7cZcLEKYxaTlsegZRI5goH1E9cjbzmEmiA7gAnHgAQhK/s5M/LDV0Vuc3Aw8rEwg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796010505; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:In-Reply-To:References:From:Subject:To:Cc: MIME-Version:Content-Type:Content-Disposition:User-Agent; bh=DeLi+QXt0okG28buVrGSQd+bvV3qA1PMwKWbOSMOHHU=; b=FHqOh3QN71t7hRqumprnM7e7S13HRgx8ANgG7lNAcEPxTK1a4g1yDpnzczNU6L8GLc1K lubAOr3V3fIV5vpOxhOFPgxdHlzknTZYCcLqzTf/q5Amk3FMSTLuHtyOjAL8XR3joJw6h YLor19WRJjNyYpughR0AKWiinxrDf3AH5V7+2DAZ/u3suC+hRjMD5wJsCJLjRmXJVKlqH yyGuPuhbKR9UDF1IrFmQVVXPZDC5A3NBV3e9twK2IlxjxyxQkw0A70eyW7iFm8tB2LurC /pnfWA1ya8QaLGPC/TkbLkXGe/SQtltIzvzJXG1VyzO9gpH5djYeTzCtaNEYH1DUR1A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=VzllPFP7; arc=none smtp.remote-ip=74.125.224.42 Received: from mail-yx1-f42.google.com (mail-yx1-f42.google.com [74.125.224.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13D3E606A68E for ; Mon, 30 Nov 2026 03:48:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 13D3E606A68E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=VzllPFP7 Received: by mail-yx1-f42.google.com with SMTP id 956f58d0204a3-6798eb0d190so7897914d50.3 for ; Sun, 29 Nov 2026 19:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1796010504; x=1796615304; darn=vger.kernel.org; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:references:in-reply-to:message-id:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=DeLi+QXt0okG28buVrGSQd+bvV3qA1PMwKWbOSMOHHU=; b=VzllPFP74alCgi0zExQxxrJXVN95y2tfdUEgAt6sVVPF3hf+Jy15VjkLIirPTVDEV6 V9k2LNoFRYmkjvoDE+q7pGnKSYbbGbL82xM6z9ss1rNdRgROWxGJ83bdveiwu57nbGig Tkwx2SiYEg1VDaB20QpdQOsi/zCYSe7hcoeS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796010504; x=1796615304; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:references:in-reply-to:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=DeLi+QXt0okG28buVrGSQd+bvV3qA1PMwKWbOSMOHHU=; b=S/z7NorbbTsVgk56ibWH7COcc6hIFyJ2kTQje+FU2SfMZ9zJK09d9g+hoGSUwmRx2h JWG07J8TbPk5L16O+PIl/U4qdLwyXGuGx512VS/368D+b8cYvc21nMsTDJknWKROSVoJ miYJl9woteimXtq4Cg6R0GR4Y3DA7sj9o9qMvCWiyiBD2jXxSc45XnS2GHvrivO/Tw4W nOskAcIUGKrwfpflEl4LbxKQYvdUEkxocxQPhFwtqRsweG3ZpUc+EdtT7jmu7DetHSlG ctDT8/KIUwxt4W9+/3SQdz3MpISKyQ9wnHh2zPGq6XKtPiUDCte8G0YutMpnuq7n1lns E+fQ== X-Forwarded-Encrypted: i=1; AL+hErFO4t7NhJjFxOTzy+lmVB9e49KI2Dg3H46ECAWx8KZyeEbKqWVwA0PAdwIllhiCXasp4LdGVq4Z0x+8Bro=@vger.kernel.org X-Gm-Message-State: APuU4Z8mDFuxIUHmCA7evJgHpGY49IxZX8vAlXctcj0yaa7ltBWZdVBJ M4C3p18qsRkBNtHd5IAM5J4W8ONaclxihgPuU+t7ymaC9y8WMFB0NXba+gnI4ugJOAc= X-Gm-Gg: AZFdTZd5Wrm8o2xsNuQN3uq8IO9ii2/cM2p5qUsdPTrt1KzjGkLRbQQ0X5+ouCEsgg4 1reUrRQ/d0+4GCMLWqyX8OKV7WFdScgVUyN6MYPw9TJOU6u5plIfUKiUNBq0ia6eDkMuinS3tS6 BE94RfePNyHPNaXcapuS836tThB59NGEHCj3KDc3PDFLo+u8WPhSaYwpRGyrjeDU1q54yj7rm7e MVVNsG7Ncg9t7BntNUmWIg1ukDe7U2Frj5Ov7TMorDHGnn5y2qF99OXP0T4juAyCoxwvXWwA/Hs LY64b6BUBjVlLIio4zO6iTIRmESbptCbWXDe+QuCgE/C4V2FNsXgi6chodZ5riY0k5EoyviumFr gcw9HMk7OHuA3637zk7AsHzKyJs0Na4MnEWgkLrWza4ivEty8zuZ0aukT8JlJ48MYlcwcIP6pNv krgAICTqeP1OQ2TvMoU1cFMB3YXNr2XeBwJ9xWW6NDNX487wHiY5cehqB6SzvwSnC59F3bsqwNM y3ZZuvI4M09cALFVIhB7d92w3ToI6MOn3q00XAG3TMYKBgWThVv3oZ+MRMmlXCJJwGDTYx8uNmA GRDHgNisXvbxQbGHcgMDo4PkZmdx03vCPNcQim2MNsp4+Kf+j20eMzlnGcgbxeH1qKr+LDqB6tf CkqIZKbw1VD7sg23im4Q1R8+XXF9TJY51exsaXBAFWA7FePnYxlithZAUMg6HmEOD/xTQx2uNRE uwNp85y5gvSd8WpFjkk/om/H2hq5GJcluMVrGD3ttL4TAiArBnn/bn/TJrA90Fg/zDvOmRaylv0 y/K1aL3A/v9Dx7luf1ug3rXjofvQxlnbb+iQAFaYs7G X-Received: by 2002:a05:690e:1512:b0:67d:e867:89c5 with SMTP id 956f58d0204a3-67df447ea91mr10534581d50.92.1796010504166; Sun, 29 Nov 2026 19:48:24 -0800 (PST) Received: from [172.20.0.3] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67df33105fesm14625602d50.7.2026.11.29.19.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 19:48:23 -0800 (PST) Date: Sun, 29 Nov 2026 19:48:20 -0800 Message-ID: In-Reply-To: References: From: Chris Down Subject: [PATCH v3 2/3] sched/debug: Drop the "..." suffix from truncated group paths To: Greg Kroah-Hartman , Tejun Heo Cc: Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Serge Hallyn , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Yonghong Song , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , driver-core@lists.linux.dev, cgroups@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, sashiko-bot@kernel.org X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) When another reader holds sched_debug_lock, SEQ_printf_task_group_path() builds the group path in a 128 byte buffer on the stack, and writes "..." over the end of it in case the path filled it. Since the previous commit, cgroup_path() keeps the end of a path which doesn't fit and puts "..." at its start, so a long path now prints with "..." at both ends, which suggests the end was cut off when it wasn't. Let's drop the suffix and leave marking the truncation to cgroup_path(). Signed-off-by: Chris Down --- kernel/sched/debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index e6a3b516c703..328db4809780 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -941,9 +941,7 @@ static void task_group_path(struct task_group *tg, char *path, int plen) /* * Only 1 SEQ_printf_task_group_path() caller can use the full length * group_path[] for cgroup path. Other simultaneous callers will have - * to use a shorter stack buffer. A "..." suffix is appended at the end - * of the stack buffer so that it will show up in case the output length - * matches the given buffer size to indicate possible path name truncation. + * to use a shorter stack buffer. */ #define SEQ_printf_task_group_path(m, tg, fmt...) \ { \ @@ -953,9 +951,7 @@ static void task_group_path(struct task_group *tg, char *path, int plen) spin_unlock(&sched_debug_lock); \ } else { \ char buf[128]; \ - char *bufend = buf + sizeof(buf) - 3; \ - task_group_path(tg, buf, bufend - buf); \ - strcpy(bufend - 1, "..."); \ + task_group_path(tg, buf, sizeof(buf)); \ SEQ_printf(m, fmt, buf); \ } \ } -- 2.56.1