Commit Graph

6 Commits

Author SHA1 Message Date
Jim Huang Chen db887713de kldload: Improve error handling
Address a failure in linker_load_module (sys/kern/kern_linker.c) to
verify that an already-loaded module matches the version requirement,
which caused the method to return the error (EEXIST).  This was then
propagated back up to kldload, which incorrectly printed that the module
had already been loaded.

Add a lookup to modlist_lookup2 to distinguish between the two cases:
- A module is already loaded that is of the correct version, so the
  error EEXIST should be returned
- An already-loaded module is of the incorrect version, so the error
  ENOEXEC is returned (changed from ENOENT)

Reviewed by:	imp, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57002
2026-06-14 19:45:50 -04:00
Andre Silva a9a562a08e hwpmc_ibs: Add external error handling
Add EXTERR_CAT_HWPMC_IBS to the external error categories and replace generic
EINVAL returns in ibs_allocate_pmc() with EXTERROR() calls that provide
detailed error messages.

This will be augmented with additional cases in the near future.

Reviewed by:	mhorne
Sponsored by:	AMD
Signed-off-by:	Andre Silva <andasilv@amd.com>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2134
2026-04-28 15:49:21 -03:00
Mark Johnston bc7862bc91 vmm: Start using exterror
For now, just describe the error where an unprivileged user attempts to
run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode.

Reviewed by:	bnovkov
MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54743
2026-02-19 17:16:15 +00:00
Konstantin Belousov 6c82bf1407 Regen for the fork and exit/wait exterror category addition 2026-01-25 17:54:27 +02:00
Mark Johnston c527f58bb1 exterr: Regenerate exterr_cat_filenames.h 2026-01-16 15:56:51 +00:00
Konstantin Belousov 5685c07b5a Add automatically generated file libc/gen/exterr_cat_filenames.h
MFC after:	1 week
2025-12-29 03:16:25 +02:00