Age | Commit message (Collapse) | Author |
|
- FORK_THREAD handling is a totally separate function, thread_fork(),
that is only used by sys___tfork() and which loses the flags, func,
arg, and newprocp parameters and gains tcb parameter to guarantee
the new thread's TCB is set before the creating thread returns
- fork1() loses its stack and tidptr parameters
Common bits factor out:
- struct proc allocation and initialization moves to thread_new()
- maxthread handling moves to fork_check_maxthread()
- setting the new thread running moves to fork_thread_start()
The MD cpu_fork() function swaps its unused stacksize parameter for
a tcb parameter.
luna88k testing by aoyama@, alpha testing by dlg@
ok mpi@
|
|
ok tb@, jca@
|
|
leaving out the size, so that
ELFNAME2(exec,makecmds)
becomes
exec_elf_makecmds
instead of
exec_elf{32,64}_makecmds
and then delete the ELFNAME2() and ELFNAMEEND() macros.
Move the prototypes for functions local to exec_elf.c to there from
exec_elf.h.
Simplify the SMALL_KERNEL conditionals around the ELF coredump code.
Change exec_conf.c to use the size-generic names and macros
Remove exec_elf{32,64}.c and just build exec_elf.c; delete the
_KERN_DO_ELF and _KERN_DO_ELF64 #defines.
ok jca@, encouragement from deraadt@ and tom@
|
|
the environment, 'make cleandir' does not descend into kernel build
directories. Thus, kernel object files survive 'make build' on slower
architectures.
WARNING:
If you set this variable, you run the risk of breaking 'make release':
Be sure to run 'make cleandir' from /sys/arch/$(machine)/compile before
doing 'make release'. This issue will be addressed shortly.
requested by kettenis;
ok deraadt
|
|
struct proc to struct process.
ok deraadt@ kettenis@
|
|
depth when attaching.
OK visa@, deraadt@
|
|
OK mpi@
|
|
This will allow us to extract type informations from DWARF2 sections. It
also makes developer life easier as debug information are now included in
every object.
Resulting kernels will be stripped using strip(1) instead of ld(1).
Kernel build time increases by approximately 10%. However it is still
possible to disable this by defining DEBUG="".
ok kettenis@, bluhm@, natano@, jasper@, reyk@, deraadt@
|
|
- Remove the 'lint' target. lint has been removed with OpenBSD 5.2.
- Remove the 'tags' target. It does nothing of value.
- Replace 'clean::' with 'clean:', as requested by espie and millert,
and remove files from the 'clean' target, that are never generated.
- Don't create a file called 'depend' in 'make depend', but just do
nothing instead.
ok mpi tb
|
|
ok deraadt@
|
|
1) Replace '.elif !exists(${OBJDIR}/Makefile)' with just '.else'. espie
pointed out, that if the file existed, make wouldn't be reading this
file, so the check is superflous. Less clutter.
2) Unconditionally define the 'clean' and 'cleandir' targets, also when
obj doesn't exist. This changes the behaviour of 'make clean' to be
successful (doing nothing) without obj@ or obj/.
ok tb millert deraadt
|
|
reference to eddep in the kernel Makefile I could find is in 4.3BSD,
released some 30 years ago.
ok tb millert
|
|
|
|
fixes percpu allocations, like visa@ just did on mips64.
|
|
|
|
ok kettenis@
|
|
ok natano
|
|
if srctree is not rooted at /usr/src]. As a result, stock GENERIC & RAMDISK
kernels are commited to the tree, to ensure the src tree can be "readonly"
during builds, with all writes occuring inside the obj space. config -b
options are handled by ../Makefile.inc. The canonical new way to configure
one of these kernels is:
% cd /sys/arch/amd64/compile/GENERIC.MP
% doas make obj
% make config
% make
% doas cp obj/bsd /bsd
The build infrastructure will use this new mechanism in a de-escalation
way using BUILDUSER.
Much help from natano and tb.
|
|
Same thought from kettenis@, ok krw@ phessler@ millert@
|
|
Build testing assistance from deraadt@
|
|
child_return() like on other archs, so cpu_fork() doesn't need to
touch them.
ok kettenis@ deraadt@
|
|
|
|
Add sysctl kern.allowkmem (default 0) which controls the ability to open
/dev/mem or /dev/kmem at securelevel > 0. Over 15 years we converted 99%
of utilities in the tree to operate on sysctl-nodes (either by themselves
or via code hiding in the guts of -lkvm).
pstat -d and -v & procmap are affected and continued use of them will
require kern.allowkmem=1 in /etc/sysctl.conf. acpidump (and it's
buddy sendbug) are affected, but we'll work out a solution soon.
There will be some impact in ports.
ok kettenis guenther
|
|
ok patrick@ (for armv7), deraadt@
|
|
ok guenther@ millert@
|
|
|
|
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
ok deraadt@ guenther@
|
|
on a guess how much memory a typical machine has. If the value is
too high, users may run out of kernel memory. Then we will have
to adjust this again.
OK claudio@ deraadt@
|
|
ok deraadt@ yasuoka@ reyk@
|
|
|
|
|
|
|
|
ok millert@ kettenis@
|
|
|
|
gets us a bit closer to an MI splraise api.
|
|
|
|
this is a step toward making ipls unconditionaly on pools.
ok deraadt@ kettenis@
|
|
suggested by mpi
|
|
ok millert
|
|
sigtramp page, so that it will generate a nice kernel fault if touched.
While here, move most of the sigtramps to the .rodata segment, because
they are not executed in the kernel.
Also some preparation for sliding the actual sigtramp forward (will need
some gdb changes)
ok mlarkin kettenis
|
|
ok guenther kettenis
|
|
Inline asm from NetBSD
testing deraadt@
|
|
commit.
|
|
inside the sigcontext. sigreturn(2) checks syscall entry was from the
exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie,
and clears it to prevent sigcontext reuse.
not yet tested on landisk, sparc, *88k, socppc.
ok kettenis
|
|
actually use this in em(4) and xhci(4), but I'm not committing those yet
because we almost certainly need to save and restore the MSI-X registers
during suspend/resume. However, this allows mpi@ to play with multiple-vector
support in networking hardware.
Requested by mpi@
ok mlarkin@, mikeb@
|
|
busses are little endian, so the non-raw ops are raw anyway. fixes
the kernel build after xge grew the use of the raw ops.
|
|
ddb(4) can now see static functions. That doesn't mean we should start
declaring functions as ``static'', however it helps for the few existing
exceptions.
ok deraadt@, kettenis@
|
|
|