Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1673336ybk; Sat, 16 May 2020 19:47:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFU9VNy9br/ELC0Kkf2bGAxIiO0iCw+neJOZilsfz83rBF5TaDiSwnT3UcUyAF28QzPGCp X-Received: by 2002:a50:8d57:: with SMTP id t23mr8751608edt.168.1589683641273; Sat, 16 May 2020 19:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589683641; cv=none; d=google.com; s=arc-20160816; b=VPA3UCPgi/6kcU4BsZu+C9kJV5GpQRcwQBBEFxg3VL4RMf1+h+rPoiRFLgqlGJK7ZS QW6A46eHYqWkuIbmmN/SJp3NHqGBRzk5F8bKzkgOGEM3AQrjsgJb2uUeGeXsN3oH8tJ3 gkhUDJlINcx4TCFnOvXwPk1cPmnCfkefCtYhLm8cSmWP36MVg1zRiMQybTMcct96k6st 2EbZWSz1p8pUqd9yge8ZNOGRB25xEc+TknglXRBdlB/aiBFoN0vikU46yQFzP2o5RnqX L7smybakFddgZWvzshORrd7aD0Rxaa8vdVscoXiKsP4IdbkhrBlUxy4d09YlEK0GhlDu rB2w== 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=uq35MuQh3BQE+DEOjJ7MGVBKpzrL1FTb+VJBwvU0AHk=; b=oW+VULUhtExgqczHwXmXrs4+5twCzrSq740y4iPEBLerFIwUTPALdF949CjouzQLe/ v3lX69gSqQmV1m16ODdKt/kE6Kr4jZ50pr0de5VJYQdJ3xI0CaBAzEmzH04yjirVUcua oWjfOzC927yDU6ScBRFkRN4nw8FDZC2657KrYlztPGh1pLfTECxqieTrCGoRiFZqODAk IdSvcycWLgx4in0dv9K72YP7/WgKTTXCFUicbgdsD/VZYg/NWHHccc6YlKr+G5iDDkTu Iyy1LdbYMytM/yFE4DHyR8NWBGUIkUDQByB9S1kT0lVnzBAP/FUQnY3VYpqQeagp+kyH 4I9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Vq/A/08d"; 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 bt19si4103910edb.96.2020.05.16.19.46.58; Sat, 16 May 2020 19:47: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="Vq/A/08d"; 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 S1727012AbgEQCoc (ORCPT + 99 others); Sat, 16 May 2020 22:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgEQCob (ORCPT ); Sat, 16 May 2020 22:44:31 -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 401E2C061A0C for ; Sat, 16 May 2020 19:44:30 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id n11so2979842pgl.9 for ; Sat, 16 May 2020 19:44:30 -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=uq35MuQh3BQE+DEOjJ7MGVBKpzrL1FTb+VJBwvU0AHk=; b=Vq/A/08d+NZoCgyOliCZLorADWTSYNvj6xapzwZHoaC6teYOP2FUgFGAwp5kRgXP2U WebvMdP05Dt0Wf7N0hXDc6ZKwwhmU09sLVqoQVqPMpBWnfO2K/RTcxN3/czYC+W7b4cf ar7NC7/fE6rN9MVdNtAyE95jwARW0VlxM+x1M= 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=uq35MuQh3BQE+DEOjJ7MGVBKpzrL1FTb+VJBwvU0AHk=; b=e8DJTXEXuL68Nr1dauDb61P9IGEvcOYDVpAhSsfWWxEEVSEEFMoByd/RdN5dRWboDB s5tCcxH5FeryZvBXtzhwPlQ3uaXBf36NFiFrrFSM3M0rwiMNQziasf5s8pAT0206IwRH W5imytyrClOVtMBWtU1lDL11Zl5E9PQThiXgU4fnbZINTbwkURXwp26jVUZDk2RVkatA eVWYynoPcUaBnhA7Zq7VaGg0TuTDrMgkyUaHlYSyuiRJ5LjGKDF8PinYhErIW6kqT2OJ 2bYPbA94c7+P0PePwosTBQWPsRmZta77P5KVBvWgL/VkjiySMKNwxA2f1qSrLihyJIsW TGng== X-Gm-Message-State: AOAM533XpOMtBaSHBg96qDqMSg2W6cXfh+uY/I4olS4E9qllKOC//jVk yB9Ddz7Cw5z2h6kq2wRHkTWDsk3oP1g= X-Received: by 2002:aa7:8ad6:: with SMTP id b22mr6394643pfd.251.1589683469828; Sat, 16 May 2020 19:44:29 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x13sm5153898pfn.200.2020.05.16.19.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 May 2020 19:44:29 -0700 (PDT) Date: Sat, 16 May 2020 19:44:28 -0700 From: Kees Cook To: Xiaoming Ni Cc: mcgrof@kernel.org, yzaikin@google.com, adobriyan@gmail.com, peterz@infradead.org, mingo@kernel.org, patrick.bellasi@arm.com, gregkh@linuxfoundation.org, tglx@linutronix.de, Jisheng.Zhang@synaptics.com, bigeasy@linutronix.de, pmladek@suse.com, ebiederm@xmission.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, wangle6@huawei.com Subject: Re: [PATCH v2 1/4] sysctl: Add register_sysctl_init() interface Message-ID: <202005161944.CD304B5@keescook> References: <1589619315-65827-1-git-send-email-nixiaoming@huawei.com> <1589619315-65827-2-git-send-email-nixiaoming@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1589619315-65827-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 Sat, May 16, 2020 at 04:55:12PM +0800, Xiaoming Ni wrote: > In order to eliminate the duplicate code for registering the sysctl > interface during the initialization of each feature, add the > register_sysctl_init() interface > > Signed-off-by: Xiaoming Ni Reviewed-by: Kees Cook -- Kees Cook