Bug 242136 - 12.1 kernel build fails with "nodevice bpf"
Summary: 12.1 kernel build fails with "nodevice bpf"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Bjoern A. Zeeb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-21 11:05 UTC by dave
Modified: 2020-01-07 17:04 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dave 2019-11-21 11:05:58 UTC
Working with releng/12.1 revision 354894 on amd64.  Problem also occurs with stable/12 revision 354853 on amd64.

I can build the GENERIC kernel just fine. As soon as I try to remove
BPF the kernel fails to link. The following simple kernel config is
enough to demonstrate the problem:

include GENERIC
ident NOBPF
nodevice bpf
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2019-11-21 11:54:22 UTC
It seems r297816 should handle the case when DEV_BPF is not defined.
Comment 2 Bjoern A. Zeeb freebsd_committer freebsd_triage 2019-11-21 13:27:53 UTC
If it is only that commit I'll fix it.
If there's more I'll bounce it back to the pool.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-11-24 23:21:59 UTC
A commit references this bug:

Author: bz
Date: Sun Nov 24 23:21:47 UTC 2019
New revision: 355070
URL: https://svnweb.freebsd.org/changeset/base/355070

Log:
  Allow kernel to compile without BPF.

  r297816 added some bpf magic for VIMAGE unconditionally which no longer
  allows kernels to compile without bpf (but with other networking).
  Add the missing ifdef checks and allow a kernel to compile without bpf
  again.

  PR:		242136
  Reported by:	dave mischler.com
  MFC after:	2 weeks

Changes:
  head/sys/net/if.c
Comment 4 Bjoern A. Zeeb freebsd_committer freebsd_triage 2019-11-24 23:23:02 UTC
(In reply to Andrey V. Elsukov from comment #1)

Thanks for the diag finding the commit in question ae@!
Comment 5 dave 2019-12-17 18:21:48 UTC
I can confirm that this change fixes the problem in head, and that the differences used as a patch to stable/12/sys/net/if.c as of r355849 fixes the problem in stable/12.

When might the MFC be completed?
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-01-07 16:59:05 UTC
A commit references this bug:

Author: bz
Date: Tue Jan  7 16:58:39 UTC 2020
New revision: 356455
URL: https://svnweb.freebsd.org/changeset/base/356455

Log:
  MFC r355070:

    Allow kernel to compile without BPF.

    r297816 added some bpf magic for VIMAGE unconditionally which no longer
    allows kernels to compile without bpf (but with other networking).
    Add the missing ifdef checks and allow a kernel to compile without bpf
    again.

    PR:		242136
    Reported by:	dave mischler.com

Changes:
_U  stable/12/
  stable/12/sys/net/if.c
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-01-07 17:03:06 UTC
A commit references this bug:

Author: bz
Date: Tue Jan  7 17:02:50 UTC 2020
New revision: 356456
URL: https://svnweb.freebsd.org/changeset/base/356456

Log:
  MFC r355070:

    Allow kernel to compile without BPF.

    r297816 added some bpf magic for VIMAGE unconditionally which no longer
    allows kernels to compile without bpf (but with other networking).
    Add the missing ifdef checks and allow a kernel to compile without bpf
    again.

    PR:		242136
    Reported by:	dave mischler.com
    MFC after:	2 weeks

Changes:
_U  stable/11/
  stable/11/sys/net/if.c
Comment 8 Bjoern A. Zeeb freebsd_committer freebsd_triage 2020-01-07 17:04:30 UTC
Thanks a lot for reporting!

The problem should be fixed in HEAD and stable/12 and stable/11 and with that fixed in any upcoming releases as well.