User Details
- User Since
- Apr 1 2021, 3:21 AM (163 w, 1 d)
Today
Yesterday
This is split from D40467 with fixing the order of .fini_array section.
I tried to Update Diff but failed. Split the definition for other platforms to D45214 .
Should ready to go.
Wed, May 15
@aokblast
I'm not familiar with debuggers, so this might be a silly question.
While Linux does support tap traffic without good CRC (FCS) via tcpdump / bpf. I think that is most useful for developing drivers / hardwares or diagnosing noisy wireless environment, but I think that (enable capturing bad CRC via bpf) should be turned on per interface and still those packets with bad CRC should not enter net stack. So I'm convinced this is the right approach.
Tue, May 14
@kp has just made similar fix 59a6666ec91d for if_ovpn.
Split the FIX for sorting input sections to D45194 .
Fri, May 10
Xref a PR: 271344 which was reported after the fix.
Thu, May 9
Tue, May 7
The change is simple and looks good, IMO manual test is required at least.
Mon, May 6
Sat, Apr 27
Thu, Apr 25
Thu, Apr 18
Apr 16 2024
Apr 15 2024
Apr 12 2024
Apr 10 2024
Looks good to me.
Apr 9 2024
What about stub functions for !NUMA ?
For example, converting
static inline int vm_page_domain(vm_page_t m) { #ifdef NUMA int domn, segind;
Apr 8 2024
Bite out the translation for errors from kernel linker. If that is needed, do it in separate CR.
I think I see what you meant. I'll try that.
As for
with a signature allowing to pass back a text describing the error.
I think that is perfect, but given linker_load_module() can be called recursively, the signature should be designed carefully. IMO a failure from kernel linkers should be rare thus one of the above simpler fixes should be adequate. It is not perfect but user can still get the real reason from dmesg or /var/log/message.
I would just give up on that in that revision, this would be a separate change anyway, way more useful to users than just returning EUNSDEP, but it requires some (hopefully short) design discussion. This way, we also stop delaying the current change, which is useful to users on its own, and that I personally would like to see in, e.g., 14.1-RELEASE.
As propagation error from other subsystem is a common issue. Actually languages such as C++ / Java do that well. Those languages have type exception and exceptions can be wrapped up ( nested exceptions ). I think C can mimic but that is not elegance IMO.
+1 for 14.1-RELEASE .
Apr 7 2024
Looks good to me.
Apr 5 2024
I spotted this while working on D44581 which intends to introduce new kernel-only error code EUNSDEP and on D44552 which uses it.
As in D44552 kern_kldload() will return the new error. It should not be leaked to the userspace. I was evaluating the impact and @olce pointed out the macro request_module is consuming kern_kldload().
Apr 4 2024
@olce
As a side effect, the error from kern_kldload() is lost, so I think you are right , we should emit logs from kernel about the error, to help diagnosing.
Apr 3 2024
Sorry for that.
After carefully checking, I can conclude it is safe to move the translation to sys_kldload(), as consumers of kern_kldload() either have done the translation themself, or totally ignore the return value, e.g. request_module in sys/compat/linuxkpi/common/include/linux/kmod.h, [1] and [2]. For the latter the current change will not make it worse.
I agree with the second part (some ignore the return value, so don't really care), but not with the first. Unless I'm mistaken, there are almost direct return paths to userland in these two cases:
- vfs_byname_kld()
Rechecked this, CURRENT and stable/14 vfs_byname_kld() has translated error to ENODEV. As for stable/13 it will be leaked.
- ngc_send()
ngcontrol_protosw.pr_send == ngc_send so EUNSDEP will be leaked. Really sorry I did not read the code carefully.
so EUNSDEP is going to be leaked.
Could you revert that modification? In other words, kern_kldload() still should translate the error itself, for now.
Another option could be refactor linker_file_unload() into two functions. One for normal unload and another is for abnormal ones such as unloading partially linked file.
Almost all abnormal unload requires the flag LINKER_UNLOAD_FORCE and at that moment the reference count of file should be right one. The logic will be much clear.
Apr 2 2024
The only in-tree consumers of kld_unload_try and kld_unload even handlers are sdt and dtrace. Hopefully these even handlers are not abused by out-tree consumers.
Apr 1 2024
Address @imp 's comments.
Move translating errno EUNSDEP from kern_kldload() to sys_kldload()