In fact, I do not see much need in introducing 'p': you reference curproc only once in each branch, so caching the pointer does not save anything.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Nov 27 2019
Looks like these guards should be __cplusplus instead?
Use "efi" as label and boot/efi instead of boot/msdos
Resolve conflicts after r355121.
Handle comments from @kib
Report spurious EINTR from sigtimedwait() only if there is no other errors to return.
I guess using UMA made more sense when KVA was still allocated directly from the vm_map instead of vmem?
Keep the rootvnode check in case the root file system gets unmounted.
Update comment.
Seems ok.
Note, the issue about the staging size is not really if we can or can not allocate specific size, but if we have enough target space to copy it. I have starting to port other change (https://reviews.freebsd.org/D22309), the idea there is that we should determine if the target location has enough space. The bios version is simple as there we own the memory and we can not load directly to target address, in UEFI case we need to allocate, load and after switching off the BS, only then we can copy.
In D22571#493584, @hselasky wrote:Index: sys/kern/kern_linker.c =================================================================== --- sys/kern/kern_linker.c (revision 355108) +++ sys/kern/kern_linker.c (working copy) @@ -2067,6 +2067,7 @@ struct linker_file *parent, const struct mod_depend *verinfo, struct linker_file **lfpp) { + struct proc *cp = curproc; linker_file_t lfdep; const char *filename; char *pathname; @@ -2079,13 +2080,13 @@ */ KASSERT(verinfo == NULL, ("linker_load_module: verinfo" " is not NULL")); - if (rootvnode == NULL) + if (rootvnode == NULL || cp->p_fd == NULL || cp->p_fd->fd_rdir == NULL) return (ENXIO); pathname = linker_search_kld(kldname); } else { if (modlist_lookup2(modname, verinfo) != NULL) return (EEXIST); - if (rootvnode == NULL) + if (rootvnode == NULL || cp->p_fd == NULL || cp->p_fd->fd_rdir == NULL) return (ENXIO); if (kldname != NULL) pathname = strdup(kldname, M_LINKER);Why not like this? Or remove the rootvnode == NULL and only test fd_rdir ?
Not seeing any holes here
In D22546#493348, @kib wrote:In D22546#493318, @markj wrote:In D22546#493292, @kib wrote:Also, I believe it is consistent with behavior of other sleeping syscalls like select(2), where the situation causes spurious EINTR.
I agree it is more consistent than before, but from my reading:
- it does not result in EINTR for a mere ptrace attach, and
For PT_ATTACH it is not needed, I believe. There a SIGSTOP is generated and we would do all the magic inside ptracestop().
Index: sys/kern/kern_linker.c =================================================================== --- sys/kern/kern_linker.c (revision 355108) +++ sys/kern/kern_linker.c (working copy) @@ -2067,6 +2067,7 @@ struct linker_file *parent, const struct mod_depend *verinfo, struct linker_file **lfpp) { + struct proc *cp = curproc; linker_file_t lfdep; const char *filename; char *pathname; @@ -2079,13 +2080,13 @@ */ KASSERT(verinfo == NULL, ("linker_load_module: verinfo" " is not NULL")); - if (rootvnode == NULL) + if (rootvnode == NULL || cp->p_fd == NULL || cp->p_fd->fd_rdir == NULL) return (ENXIO); pathname = linker_search_kld(kldname); } else { if (modlist_lookup2(modname, verinfo) != NULL) return (EEXIST); - if (rootvnode == NULL) + if (rootvnode == NULL || cp->p_fd == NULL || cp->p_fd->fd_rdir == NULL) return (ENXIO); if (kldname != NULL) pathname = strdup(kldname, M_LINKER);
- drop _lock.h and _mtx.h
I wonder if this check should be factored out? It is not only the LinuxKPI which access these code paths too early, but USB drivers loading firmware .ko's can also do the same??
Except for the headers pollution, I am fine with the change.
Sounds like a cool feature to have. Thanks for working on it.
The man page looks good!
Would you prefer commit it yourself or let fabient commit it ?
If you commit it yourself, please mention Stormshield as sponsor.
Hi Mmel,
- Rebase
- Rebase after rP235570
- Use sizeof(tcbptr).
- Use ustringp for the location of the argv and environment strings
- Stop allocating a space for a stack gap in the Linux ABIs.
- move the lock to cdev_privdata