Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp310968ybk; Fri, 15 May 2020 01:06:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5r5AlTpyepGH0zz97dxPTN5bhqDwd+1W7/uvz7Th2rsMUrhGHfEznf8ccntaao95B24fC X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr1731048ejb.6.1589529977803; Fri, 15 May 2020 01:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589529977; cv=none; d=google.com; s=arc-20160816; b=ZZYhCoB5+0kPhNmT6yeW4IE4MmUy+PF1MBm2bG6zRte40PAZvchPVIsQcdDULncJN2 jF42ijUmB6wnnJIRn0bneyJu6591KhvV0cQcHVjAbLsa/oHJ9ufPSMMnmijagNtv/Gs1 jpSZhIGgiAVf7RXa40JtoVSn5XRuRCzPapDSXJ8vjtIt8jct/aqXeTtWiR4Bm+jJN6bg AWWfNtLfl/KUF/za7bq7SMDaRDRptGi/ytydXEdZ+0zBMVG7g6MkPNfidRVc4aIygQpi YeDRfzdwlloOy6gxVbz2SX/nCaOZ7nlIeoQsBq8CSSadAh9ZjNlWu28GhRPkV0+DDvRi sWHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LC42tQWSVKcPTd0vfct9nXEP5yPluiMsV+/dal56l40=; b=m/agmf4BysM6l5OWJMblmFgAKlu7BNLrG7y2p3zTR1Co6vkxhGWufQe6MWcnE+naSt 5RUv28/Q+cLDVfe5Hd4ORBbyBdhlIAxTytBusEOvnpK2bWJ7LtEd8QHOC+/yXsI8SvV5 vlksK85kBVi5mllFLNCn7wNyJan7qbKWrlufcw15CFPkTqdPcEv0QgahE0DJObAbNOen 5tvildwl9Wjxq/DYYc22ec/atoyuMs5mZR3swBE6Y6NheRWEJXLNSl8OsOAiLR0wDgCp cGsNBpzojZXm56Z2MTAilFkvT2n18JniHX9Er4upZ1rivTjT6ZUtUZPO/JT2dgtt05Fu xhxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nye9VDAB; 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 rl17si793668ejb.241.2020.05.15.01.05.54; Fri, 15 May 2020 01:06:17 -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=nye9VDAB; 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 S1727113AbgEOIE0 (ORCPT + 99 others); Fri, 15 May 2020 04:04:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726694AbgEOIEZ (ORCPT ); Fri, 15 May 2020 04:04:25 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA23C061A0C for ; Fri, 15 May 2020 01:04:24 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id j21so621379pgb.7 for ; Fri, 15 May 2020 01:04:24 -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=LC42tQWSVKcPTd0vfct9nXEP5yPluiMsV+/dal56l40=; b=nye9VDABcDWL9gKYaE40k1ONvXp/eBIpP0OHIwwaZ+eKb4bOiLnjaYBbq56KRBcgdG /x/Vu5n5nDX/ojuh95Ko0Zhr0LPhSoHkx44TbRdq3mejTC1sIWroMupPgsKqafO/mvle e/ZfFneXBldriWjrwMroEVj5pMpOhNo6FH0a0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LC42tQWSVKcPTd0vfct9nXEP5yPluiMsV+/dal56l40=; b=C8SSTnYm9cKzALpOkDv5XQDrz45Pb9euKAgE9DMhmTfF70lI74rhuQWR9ZWhmeym9y YeGfsov47LUaQR7uYwi92JxqWx+7lY3gb2f6OCCWBFtyu+Qnmmut43PO/7kzgMkf+4H4 r8/pmLpft8bNzq6Pvk3oDoyz2cG8uyCaEHZMpEwyzSl8yAcnQduiRO1+Rm23zVEl4Vfw UcGcB7EQU+KYQDbijr0LYt9WLwy80lw3HSYcn7r0cyAJVq4wWCO/7+6LWz0czf+/W61Q /s9XpQo6Z2gq5e0HpQeQLYTeAJMz4XWBUoRBYqnxiykFG5Y/95dcy6KrFuFVugtu95IW Toow== X-Gm-Message-State: AOAM530DdtWyy40+BtDqSfEhrG5co+MbTPerb1woV1rpX78HQ+1ZsB3E oMLZwwGMGIaPaSVfgETQuYLyNQ== X-Received: by 2002:a63:1f62:: with SMTP id q34mr1949396pgm.197.1589529863766; Fri, 15 May 2020 01:04:23 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h64sm1302263pfe.42.2020.05.15.01.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 01:04:22 -0700 (PDT) Date: Fri, 15 May 2020 01:04:21 -0700 From: Kees Cook To: Xiaoming Ni Cc: mcgrof@kernel.org, yzaikin@google.com, adobriyan@gmail.com, mingo@kernel.org, peterz@infradead.org, akpm@linux-foundation.org, yamada.masahiro@socionext.com, bauerman@linux.ibm.com, gregkh@linuxfoundation.org, skhan@linuxfoundation.org, dvyukov@google.com, svens@stackframe.org, joel@joelfernandes.org, tglx@linutronix.de, Jisheng.Zhang@synaptics.com, pmladek@suse.com, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, wangle6@huawei.com Subject: Re: [PATCH 1/4] hung_task: Move hung_task sysctl interface to hung_task_sysctl.c Message-ID: <202005150103.6DD6F07@keescook> References: <1589517224-123928-1-git-send-email-nixiaoming@huawei.com> <1589517224-123928-2-git-send-email-nixiaoming@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1589517224-123928-2-git-send-email-nixiaoming@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 12:33:41PM +0800, Xiaoming Ni wrote: > Move hung_task sysctl interface to hung_task_sysctl.c. > Use register_sysctl() to register the sysctl interface to avoid > merge conflicts when different features modify sysctl.c at the same time. > > Signed-off-by: Xiaoming Ni > --- > include/linux/sched/sysctl.h | 8 +---- > kernel/Makefile | 4 ++- > kernel/hung_task.c | 6 ++-- > kernel/hung_task.h | 21 ++++++++++++ > kernel/hung_task_sysctl.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ Why a separate file? That ends up needing changes to Makefile, the creation of a new header file, etc. Why not just put it all into hung_task.c directly? -Kees -- Kees Cook