[Bug 275741] sys/modules: Fix processing of WITHOUT_MODULES

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275741

Bug ID: 275741
   Summary: sys/modules: Fix processing of WITHOUT_MODULES
   Product: Base System
   Version: CURRENT
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: kern
  Assignee: b...@freebsd.org
  Reporter: free...@kumba.dev

The handling of WITHOUT_MODULES in the FreeBSD kernel build system is currently
suboptimal.  At present, it is only possible to exclude kmods at the top-level
of /usr/src/sys/modules from being built with this variable.  If a kmod is in a
subdirectory, then it is built regardless if it is listed in WITHOUT_MODULES. 
I have tried several forms of specifying subdirectory kmods in this variable to
avoid building them, but none of them work.

The crux of the issue is because the only processing of this variable is done
in /usr/src/sys/modules/Makefile, and it is a simple loop that iterates over
WITHOUT_MODULES and removes any entries from the SUBDIR variable *only* in that
top-level Makefile.  For kmods in subdirectories that have their own Makefiles
that define SUBDIR, no processing of WITHOUT_MODULES takes place, so they will
always be built.

A previous attempt to tackle this issue was found in PR#76225, and the last
comment says this was all fixed back in Jan 2005, however, this fix may have
been undone at some point, as the current Makefile logic is not capable of
excluding kmods in lower-level subdirectories from being built.

The issue was again highlighted by PR#210143, but the reporter did not provide
a recommended fix or any patches, and the reporter eventually self-closed the
PR due to feedback timeout (by developers?).

I have made an effort to fix this in the attached patch by taking several
steps:

1. Move the WITHOUT_MODULES for loop to a new mk file in /usr/src/sys/conf and
call it "kmod.without.mk".  The loop is expanded to process kmod names as
either a top-level name under /usr/src/sys/modules, or as a path relative to
that directory.

2. Include this new mk file in every Makefile that defines a SUBDIR variable in
/usr/src/sys/modules.

3. Update the make.conf(5) manpage to specify the way kmods can be excluded
from building via this variable.

I've made the patch against -CURRENT (git HEAD), but I've only tested against
one of my 14.0-RELEASE systems, as I don't actively run -CURRENT on any machine
at present.  My systems use a custom kernel config that inherits from GENERIC,
and install to /boot/kernel.custom.  After fixing the processing of
WITHOUT_MODULES, I've been able to knock the size of /boot/kernel.custom down
to ~47MB, and I can probably get it smaller once I deep dive whether that
particular system needs any of the i2c or other ancillary bus drivers.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275741] sys/modules: Fix processing of WITHOUT_MODULES

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275741

--- Comment #1 from Joshua Kinard  ---
Created attachment 247024
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247024&action=edit
Fix processing of WITHOUT_MODULES

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275743] Spurious "TCP spoofing vulnerability in pf" warning from 405.pkg-base-audit after updating to 12.4-RELEASE-p9

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275743

Bug ID: 275743
   Summary: Spurious "TCP spoofing vulnerability in pf" warning
from 405.pkg-base-audit after updating to
12.4-RELEASE-p9
   Product: Base System
   Version: 12.4-RELEASE
  Hardware: i386
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: misc
  Assignee: b...@freebsd.org
  Reporter: mar...@lispworks.com

Created attachment 247028
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247028&action=edit
Output from "freebsd-update fetch install" updating to 12.4-RELEASE-p9

Even after using "freebsd-update fetch install" to update to 12.4-RELEASE-p9
(see attached output), the script
/usr/local/etc/periodic/security/405.pkg-base-audit still reports:

Checking for security vulnerabilities in base (userland & kernel):
Fetching vuln.xml.xz: .. done
FreeBSD-kernel-12.4_6 is vulnerable:
  FreeBSD -- TCP spoofing vulnerability in pf(4)
  CVE: CVE-2023-6534
  WWW:
https://vuxml.FreeBSD.org/freebsd/9cbbc506-93c1-11ee-8e38-002590c1f29c.html

I don't see this on amd64 systems.  The difference between them seems to be
that the kernel was not updated on this i386 system, so it is still on p6 even
though /boot/kernel/pf.ko was updated.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275744] Sendmail will not make all restart

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275744

Bug ID: 275744
   Summary: Sendmail will not make all restart
   Product: Base System
   Version: 14.0-RELEASE
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: misc
  Assignee: b...@freebsd.org
  Reporter: nos...@ofloo.net

Not sure to which component this belonged so choose misc

After upgrading I noticed I couldn't cd /etc/mail && make all && restart

"
# make all restart
/usr/sbin/sendmail -bi -OAliasFile=/etc/mail/aliases
sendmail: no recipients
*** Error code 66

Stop.
make: stopped in /etc/mail
"

Have this on a system that compiled upgrade from 13.x have this on system that
did freebsd-update upgrade, and have this on a new install. 

Checked google and this issue has been in there since 14.0 RC3

https://groups.google.com/g/ml-freebsd-questions/c/3tk3Pjo-ELw

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275737] leap-seconds.list location via IETF is no longer valid

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275737

Brad Davis  changed:

   What|Removed |Added

 CC||b...@freebsd.org

--- Comment #4 from Brad Davis  ---
Looks like this was fixed in
https://cgit.freebsd.org/src/commit/libexec/rc/rc.conf?id=b1c95af45488bef649e9a84890e2414ff80b3a00

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275737] leap-seconds.list location via IETF is no longer valid

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275737

Kurt Jaeger  changed:

   What|Removed |Added

   Assignee|b...@freebsd.org|phi...@freebsd.org
 Resolution|--- |FIXED
 Status|New |Closed

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275743] Spurious "TCP spoofing vulnerability in pf" warning from 405.pkg-base-audit after updating to 12.4-RELEASE-p9

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275743

Mark Linimon  changed:

   What|Removed |Added

   Assignee|b...@freebsd.org|r...@freebsd.org
   Keywords||regression

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 275741] sys/modules: Fix processing of WITHOUT_MODULES

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275741

Joshua Kinard  changed:

   What|Removed |Added

 Attachment #247024|0   |1
is obsolete||

--- Comment #2 from Joshua Kinard  ---
Created attachment 247035
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247035&action=edit
Fix processing of WITHOUT_MODULES v2

This version of the patch fixes an accidental bug in the kmod.without.mk for
loop where I was trying to be too clever and compare `basename CURDIR` against
`dirname kmod` to try and limit accidental matches from being removed from
SUBDIR.  A.k.a., being overly-cautious and while that check works for a single
subdirectory level (foo/bar), it fails if the kmod name in WITHOUT_MODULES has
several subdirectory levels (foo/bar/baz).  After adding better debugging and
looking through the build log, the conditional simply isn't needed, so it is
removed in this version.

Also updated the date in the make.conf.5 man page.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 240035] freebsd32: sysv IPC broken on non-i386

2023-12-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240035

--- Comment #2 from commit-h...@freebsd.org ---
A commit in branch stable/14 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=cc77811bf02c4a32c5303fc9de1e4596bbbc94e1

commit cc77811bf02c4a32c5303fc9de1e4596bbbc94e1
Author: Brooks Davis 
AuthorDate: 2023-12-01 20:48:29 +
Commit: Brooks Davis 
CommitDate: 2023-12-13 23:10:53 +

sysvipc: Fix 32-bit compat on !i386

The various time fields are time_t's which are only 32-bit on i386.

Fixing the old versions is probably of little use, but it's more correct
and in theory there could be powerpc binaries from 6.x.

PR: 240035
Fixes:  fbb273bc05bef Properly support for FreeBSD 4 32bit System V
shared memory.
Reviewed by:kib
Differential Revision:  https://reviews.freebsd.org/D42870

(cherry picked from commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7)

 sys/compat/freebsd32/freebsd32_ipc.h | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.