History log of /netbsd/sys/dev/kloader.c (Results 1 – 25 of 32)
Revision Date Author Comments
# 30bb6193 11-Oct-2021 rin <rin@NetBSD.org>

Switch to kmem(9).


# 535f292a 11-Oct-2021 rin <rin@NetBSD.org>

Sort headers.


# 40753c37 11-Oct-2021 rin <rin@NetBSD.org>

Zero clear sh_offset to indicate a section is unused.

Avoid kernel text being doubly allocated due to non-zero sh_offset for
unused sections.

None of MD codes and kern_ksyms.c use sh_type == SHT_NU

Zero clear sh_offset to indicate a section is unused.

Avoid kernel text being doubly allocated due to non-zero sh_offset for
unused sections.

None of MD codes and kern_ksyms.c use sh_type == SHT_NULL (yet?) to
determine whether a section is unused.

show more ...


# c3e886ad 29-Jun-2021 dholland <dholland@NetBSD.org>

Add containment for the cloning devices hack in vn_open.

Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violatio

Add containment for the cloning devices hack in vn_open.

Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)

show more ...


# ea5c7e85 05-Sep-2020 riastradh <riastradh@NetBSD.org>

Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
to query whether curlw

Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
here.

ok chs@

show more ...


# b2a9406a 11-Jun-2015 matt <matt@NetBSD.org>

Move declaration of avail_start, avail_end to <machine/kloader.h>


# 08686a64 25-Jan-2014 skrll <skrll@NetBSD.org>

More alignment spellos


# 5fcd084d 19-Nov-2010 dholland <dholland@NetBSD.org>

add missing pathbuf_destroy on error path, noticed by enami

XXX: this code is wrong; it should not be calling namei and then
XXX: vn_open on the same nameidata.


# 8f6ed30d 19-Nov-2010 dholland <dholland@NetBSD.org>

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string an

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.

show more ...


# 11f414fd 12-Nov-2010 uebayasi <uebayasi@NetBSD.org>

kloader(4) accesses vm_page, pull in uvm/uvm.h.


# 1423e65b 24-Jun-2010 hannken <hannken@NetBSD.org>

Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.


# 5b83bdc8 07-Feb-2010 uebayasi <uebayasi@NetBSD.org>

KNF.

XXX This should use bus_dma(9).


# 1d8b3e46 14-Dec-2009 matt <matt@NetBSD.org>

Use PRIxVADDR


# df7f595e 18-Mar-2009 cegger <cegger@NetBSD.org>

Ansify function definitions w/o arguments. Generated with sed.


# 06c343ac 04-Jun-2008 ad <ad@NetBSD.org>

vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# a9ca7a37 21-Mar-2008 ad <ad@NetBSD.org>

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.


# 9b2b412c 15-Dec-2007 perry <perry@NetBSD.org>

__FUNCTION__ -> __func__


# 3dfb5682 10-Dec-2007 he <he@NetBSD.org>

Remove a now-unused local variable.


# db06a930 08-Dec-2007 pooka <pooka@NetBSD.org>

Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
stru

Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

show more ...


# 712239e3 21-Feb-2007 thorpej <thorpej@NetBSD.org>

Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.


# 3029ac48 21-Jul-2006 ad <ad@NetBSD.org>

- Use the LWP cached credentials where sane.
- Minor cosmetic changes.


# 2867b68b 14-May-2006 elad <elad@NetBSD.org>

integrate kauth.


# cebdea24 20-Jan-2006 uwe <uwe@NetBSD.org>

Use uintN_t.


# ba474401 02-Jan-2006 uwe <uwe@NetBSD.org>

In kloader_open print errno if namei or vn_open fail.
Use consistent style for error messages.
While here, return NULL instead on 0 on error.


12