Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1494299pxb; Thu, 7 Oct 2021 08:51:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPquppE5c9BO24X0mTM0Buy740ucrO9TazwdDZq95fCwak3l41Qo3TKCGUn4K079Y4Hejx X-Received: by 2002:a17:902:9a91:b0:138:efd5:7302 with SMTP id w17-20020a1709029a9100b00138efd57302mr4463415plp.35.1633621881162; Thu, 07 Oct 2021 08:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633621881; cv=none; d=google.com; s=arc-20160816; b=hYtwV/PEALM1FePr+NzAU+GRoubg9timiPrtK3hdV0kcmRwHlUtjCG0rgFp2DkSXyU HWHFaWrJad+EmLxQkiwm6au1YcbbCuQH+Ujy+7u2iPtvVOCe1KNVYet7bsYrt8N3721j F135FqvmqF8fDaD/7Tit1CupZq+WBE2aF5K8ihOgrBKOOc4kwsfwe+vLixbT938Rbd3S W9QE/TXVBbQRrv69gzc2O0BUMI9Mvq5puOLtwL2MX8DomGysJvOWwNkVsby36Pu0j5Cg CZKWd4yByGVWgbUJe7nCpb/s463+3gc2TeGteEjSDeFGdO2u/bpDICMY1s89KUf6tn// nakw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mgxV9vofFa2JKR3OMuIjOLiE52M694+VDJIIWjcXhQw=; b=AL5fwMZOJxkKqg82JYdxru3DpY+WyKvtj7ssCBrTN/CdfptJmoAwhOXiIvdghyrXB9 8lVX3ZH4T1wth50Mz7AI3KWGJEbQKd3xTVIQpGLU5P28GyuivXymJYE/Q+q6Yxh4OkMS JOAOdBZwtAYolKK8PrmvLb79lwDvoHbE3H4ILCWR2TAWBlwTyDvTjSa8+W5gDiWkl/YD X8c0qHKMKXzemnj5ZWarIA62G3QOBhkbFvLKP0/wi1hB/ZcEewDOX2LnLKIz5yHoBK5B O1LsWw1V3Hm/Cwh9LkSOpSSrSj7MUWfKnC7OdZufJrdzrlSGKJaZOG6EMVJGnuKIvxv7 nfeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m9dNvUSi; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si6238852plk.277.2021.10.07.08.51.07; Thu, 07 Oct 2021 08:51:21 -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=@chromium.org header.s=google header.b=m9dNvUSi; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242252AbhJGPDo (ORCPT + 99 others); Thu, 7 Oct 2021 11:03:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233392AbhJGPDn (ORCPT ); Thu, 7 Oct 2021 11:03:43 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C543C061570 for ; Thu, 7 Oct 2021 08:01:50 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id u7so5548370pfg.13 for ; Thu, 07 Oct 2021 08:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mgxV9vofFa2JKR3OMuIjOLiE52M694+VDJIIWjcXhQw=; b=m9dNvUSiolriakGCOk/N0DwqY/YGaaVeEAc6xc9IMKoL5dH9MYaH6gA5VP/XZFd1Bq pmDl43BYu7lzLPzdFuYfbm+BQjC5GSshwjxS0Ui60WrFmL5fmCeSCSfH7VLYA0DiaN/E hGubIh8y6P3UUYZbH8ndY0tBxizgOUeaBDpfY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mgxV9vofFa2JKR3OMuIjOLiE52M694+VDJIIWjcXhQw=; b=3JrVbaAoacn00lFrmwQu65gxyr/t814VbF6bfxI3DjUSHTOdWXqi17ZvqrTyf29AHY ny31dhx7M9Ln8iVym6fkUaETxQrMjwH0SPBza6W9cSBTMb/OqVAAtoqBT3KmAzBlW4Ec b9ZFIU8ZzX6/WGrY/NIyaQ0qBzBtolVC0kF8OgVdfgBxAfYj0gDpcVQhC/fw1q+O4fTl A0+thBjBvzQoggd6SZKXM0LBzMwTmBTtfPxdGzsnJxMC2iZ5ufhVImBjT4YujeW3xho5 lHqPcvu/zwLzkThvSq9VzqGlSBQvpwl00CgZQy+RzWviYmEHz/YiZq3djdPZQv1LAohZ ssAg== X-Gm-Message-State: AOAM530Q5697smXEVc/grJ9jUxj+XfbFsGHEVtd4x4ujnonENEj5xCPO 22sWXucwCZaOKJgfR+IP1tniig== X-Received: by 2002:a63:ff0a:: with SMTP id k10mr82399pgi.363.1633618909475; Thu, 07 Oct 2021 08:01:49 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id m1sm25225382pfc.183.2021.10.07.08.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 08:01:49 -0700 (PDT) Date: Thu, 7 Oct 2021 08:01:48 -0700 From: Kees Cook To: Yafang Shao Cc: pmladek@suse.com, 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, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] kernel/kthread: show a warning if kthread's comm is truncated Message-ID: <202110070801.C425A092@keescook> References: <20211007120752.5195-1-laoar.shao@gmail.com> <20211007120752.5195-5-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211007120752.5195-5-laoar.shao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 07, 2021 at 12:07:52PM +0000, Yafang Shao wrote: > Show a warning if task comm is truncated. Below is the result > of my test case: > > truncated kthread comm:I-am-a-kthread-with-lon, pid:14 by 6 characters > > Suggtested-by: Petr Mladek > Signed-off-by: Yafang Shao I like that we get a warning now. :) Reviewed-by: Kees Cook -- Kees Cook