Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp314997ybk; Fri, 15 May 2020 01:13:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf+Bq2mQPkzHU4YqJxRmgmjDVrxvK8aQv4xDwSz4gwWeRoaQS8f4PM7Lpl1dScxoeDL54i X-Received: by 2002:a17:906:84cf:: with SMTP id f15mr1682715ejy.185.1589530411874; Fri, 15 May 2020 01:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589530411; cv=none; d=google.com; s=arc-20160816; b=MBbnHdG2ceFmgZDVoEhL7NPX8lkq3HGnLCSiqF8+EfzFoLBHuOnjAA2oAqCXSbg//2 aZUGSEpLv8uuv1c2Mv0UmnmdxGY+T8vsbpOIKZPFgcYV998samPFyTKKmu4EKQysBe7h ErKe7Z9mAk+n+Su4qN7h7s7synIMK8peCW6NF7LZ0ChM90xXFu5i/8GKThDPQFl/KfQs cPUMDLevqwz/W7FxAeSaCOWrARhn35sWa8P5GTdCBz4+I2/TdpYr3s0mD3UGl3qaTzGR Mz6V3G0yzXxkK9whN4sSTjidI6nfCsYTzDz/gpK6MG2WwyZ8nrz0OL2SStgdfcaWhZ8y 3lBw== 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=xOrE5zGn6uPvmnJr7dBeSUQ5HqdT7v+oxYQZGlXnk+k=; b=do4aV39LaCWTgjO67f06SJ1v4500JxBhrK0Mny3qrYcsuMeNd2AZcuJu93fuwexsGQ Xmt/8Y2IIzEx5iA1k3a5xFoAIdleY+huADcZQqCrhc3UH6aVNWRKq9/+2gDkNC/Pl+N9 jHnZEGFZyvtHwyNUyBRE1CiIRPBoyyCc5WS6DSOGnB+SH9zOtRgrW23uz46AchLhMyFQ U8kCg5fuGMVRt7p8Jdahae1EOK9kFiQpVfTtKu/nf8kpR5lHVqju6JCClj+kRnBsQGNo gjE1h1EB+EH8y2MMVfDFMB91AQojJ5t95FLeh1JtT5SpG8wSyLL+D/nUoMjPOpdmdtX5 49fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aQuQ7L7K; 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 ov4si742503ejb.237.2020.05.15.01.13.07; Fri, 15 May 2020 01:13:31 -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=aQuQ7L7K; 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 S1727111AbgEOILC (ORCPT + 99 others); Fri, 15 May 2020 04:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726714AbgEOILB (ORCPT ); Fri, 15 May 2020 04:11:01 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1634C05BD09 for ; Fri, 15 May 2020 01:11:01 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id j21so628423pgb.7 for ; Fri, 15 May 2020 01:11:01 -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=xOrE5zGn6uPvmnJr7dBeSUQ5HqdT7v+oxYQZGlXnk+k=; b=aQuQ7L7Kspm6klbOPbMp85wrVBOSaFLGPXT2ylm2Afy/8IpK0mPfvSEdSe0lS8gV9F lSbC2KcZQLcUd+RalxmvtSoHOKNH5H3GUoyNArCaRmplNtS71CZGR+49REu1kZmATNj0 ek0PqLhGJ97mwudkzZ3IV8oV6tboH+V8sy1Rw= 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=xOrE5zGn6uPvmnJr7dBeSUQ5HqdT7v+oxYQZGlXnk+k=; b=Asfo7qI3JliRAE0+aMeKn9/qD1to0vEOsvsh+klvGw/8YpW0bgZ9WcN0B/Sx5nl0AF UVfimauaoKOFY2oG3+rSBpF7/14OtQJNESNRuyJAIxI9OSz9B61eQH8BSWI1+WwYaMPQ MHrb13c8nIvmbaUAq510Yo4pA7vT/HqQvp1NQqGfKIlgbsr9b0fjsT6cREEFB0+S4nKi mqG9s7VQ3Qg1hYVyhKwSTRYWcv90/2SwxH7zb2mdQEbAKq9d3bQcr65kfCBjdMJmDH38 /8TeqhrCgEEDRkZWCritn3byqkDXOjWzOmhItHfTDG9XyRNe2pXOxCOiEw+wokM/a46j fIBw== X-Gm-Message-State: AOAM531Mvt/TJqqxYg5+G8ccCxqnekAnpfjwXLxjzPLvBUTPJ1KcvW2Q giPWYZnNNo+BrqqmSuBa0kk50g== X-Received: by 2002:a63:211b:: with SMTP id h27mr2033439pgh.207.1589530261328; Fri, 15 May 2020 01:11:01 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i9sm1262581pfk.199.2020.05.15.01.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 01:11:00 -0700 (PDT) Date: Fri, 15 May 2020 01:10:59 -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 4/4] sysctl: Add register_sysctl_init() interface Message-ID: <202005150110.988A691@keescook> References: <1589517224-123928-1-git-send-email-nixiaoming@huawei.com> <1589517224-123928-5-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-5-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:44PM +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 I think this should come before the code relocations. -- Kees Cook