linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Matteo Croce <mcroce@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Ahern <dsahern@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH net] mpls: fix af_mpls dependencies
Date: Tue, 11 Jun 2019 19:39:51 -0700	[thread overview]
Message-ID: <49b58181-90da-4ee4-cbb0-80e226d040fc@infradead.org> (raw)
In-Reply-To: <CAGnkfhyS15NPEO2ygkjazECULtUDkJgPk8wCYFhA9zL2+w27pg@mail.gmail.com>

On 6/11/19 5:08 PM, Matteo Croce wrote:
> On Wed, Jun 12, 2019 at 1:07 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> On 6/9/19 7:57 PM, David Miller wrote:
>>> From: Matteo Croce <mcroce@redhat.com>
>>> Date: Sat,  8 Jun 2019 14:50:19 +0200
>>>
>>>> MPLS routing code relies on sysctl to work, so let it select PROC_SYSCTL.
>>>>
>>>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>>>> Suggested-by: David Ahern <dsahern@gmail.com>
>>>> Signed-off-by: Matteo Croce <mcroce@redhat.com>
>>>
>>> Applied, thanks.
>>>
>>
>> This patch causes build errors when
>> # CONFIG_PROC_FS is not set
>> because PROC_SYSCTL depends on PROC_FS.  The build errors are not
>> in fs/proc/ but in other places in the kernel that never expect to see
>> PROC_FS not set but PROC_SYSCTL=y.
>>
> 
> Hi,
> 
> Maybe I'm missing something, if PROC_SYSCTL depends on PROC_FS, how is
> possible to have PROC_FS not set but PROC_SYSCTL=y?

When MPLS=y and MPLS_ROUTING=[y|m], MPLS_ROUTING selects PROC_SYSCTL.
That enables PROC_SYSCTL, whether PROC_FS is set/enabled or not.

There is a warning about this in Documentation/kbuild/kconfig-language.rst:

  Note:
	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.


> I tried it by manually editing .config. but make oldconfig warns:
> 
> WARNING: unmet direct dependencies detected for PROC_SYSCTL
>   Depends on [n]: PROC_FS [=n]
>   Selected by [m]:
>   - MPLS_ROUTING [=m] && NET [=y] && MPLS [=y] && (NET_IP_TUNNEL [=n]
> || NET_IP_TUNNEL [=n]=n)

Yes, I get this also.

> *
> * Restart config...
> *
> *
> * Configure standard kernel features (expert users)
> *
> Configure standard kernel features (expert users) (EXPERT) [Y/?] y
>   Multiple users, groups and capabilities support (MULTIUSER) [Y/n/?] y
>   sgetmask/ssetmask syscalls support (SGETMASK_SYSCALL) [N/y/?] n
>   Sysfs syscall support (SYSFS_SYSCALL) [N/y/?] n
>   Sysctl syscall support (SYSCTL_SYSCALL) [N/y/?] (NEW)

So I still say that MPLS_ROUTING should depend on PROC_SYSCTL,
not select it.

-- 
~Randy

  reply	other threads:[~2019-06-12  2:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08 12:50 [PATCH net] mpls: fix af_mpls dependencies Matteo Croce
2019-06-10  2:57 ` David Miller
2019-06-11 23:06   ` Randy Dunlap
2019-06-12  0:08     ` Matteo Croce
2019-06-12  2:39       ` Randy Dunlap [this message]
2019-06-14 14:01         ` Arnd Bergmann
2019-06-14 14:07           ` David Ahern
2019-06-14 14:26             ` Arnd Bergmann
2019-06-14 14:54               ` Eric W. Biederman
2019-06-14 15:10               ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49b58181-90da-4ee4-cbb0-80e226d040fc@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).