From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75103C31E4B for ; Fri, 14 Jun 2019 15:10:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47FAA20866 for ; Fri, 14 Jun 2019 15:10:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FnqdDZiJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbfFNPKw (ORCPT ); Fri, 14 Jun 2019 11:10:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56798 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbfFNPKw (ORCPT ); Fri, 14 Jun 2019 11:10:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mE9NtdIMLtRYrJYsPVWIdYlP8QGELtHjDgLDViKfFl8=; b=FnqdDZiJoa/hEZr3Y2wAtAUvW RwDKcxBcqFY2c4fPRp6dSp+IE8gwtLiBGpdqJHcJmQvP+4Ydz77mape5I6u1BOJPd61R25r3sE1Uq Wsu8q691aQtts8MORMHhDzbud0v3H9nwLCsJZQ9FeadiPcbNDKVkGJkTUgMY27NGkZwebeaGufkjc FYFyjqmMpwzysLyHIAAogDRhsHYoQ+Gifq4FFht8alnljAOYi/gKzwpdRNMAaaZ+9Ea6vwAjo3KZC +A+uix0ZXF6suPpy6TiGQsXZeuTTHRG0i2hNhQR9tuor/hc3xiQYTTfy4JEylUiV4lzI7oUjXqisS 5KamCY3rg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbnqt-00089R-Jx; Fri, 14 Jun 2019 15:10:51 +0000 Subject: Re: [PATCH net] mpls: fix af_mpls dependencies To: Arnd Bergmann , David Ahern Cc: Matteo Croce , David Miller , netdev , Linux Next Mailing List , Andrew Morton , LKML , Linux FS-devel Mailing List References: <20190608125019.417-1-mcroce@redhat.com> <20190609.195742.739339469351067643.davem@davemloft.net> <49b58181-90da-4ee4-cbb0-80e226d040fc@infradead.org> <47f1889a-e919-e3fd-f90c-39c26cb1ccbb@gmail.com> From: Randy Dunlap Message-ID: Date: Fri, 14 Jun 2019 08:10:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 6/14/19 7:26 AM, Arnd Bergmann wrote: > On Fri, Jun 14, 2019 at 4:07 PM David Ahern wrote: >> On 6/14/19 8:01 AM, Arnd Bergmann wrote: >>> On Wed, Jun 12, 2019 at 9:41 AM Randy Dunlap wrote: >>>> On 6/11/19 5:08 PM, Matteo Croce wrote: >>> >>> It clearly shouldn't select PROC_SYSCTL, but I think it should not >>> have a 'depends on' statement either. I think the correct fix for the >>> original problem would have been something like >>> >>> --- a/net/mpls/af_mpls.c >>> +++ b/net/mpls/af_mpls.c >>> @@ -2659,6 +2659,9 @@ static int mpls_net_init(struct net *net) >>> net->mpls.ip_ttl_propagate = 1; >>> net->mpls.default_ttl = 255; >>> >>> + if (!IS_ENABLED(CONFIG_PROC_SYSCTL)) >>> + return 0; >>> + >>> table = kmemdup(mpls_table, sizeof(mpls_table), GFP_KERNEL); >>> if (table == NULL) >>> return -ENOMEM; >>> >> >> Without sysctl, the entire mpls_router code is disabled. So if sysctl is >> not enabled there is no point in building this file. > > Ok, I see. > > There are a couple of other drivers that use 'depends on SYSCTL', > which may be the right thing to do here. In theory, one can still > build a kernel with CONFIG_SYSCTRL_SYSCALL=y and no > procfs. Yes, that makes sense. -- ~Randy