Age | Commit message (Collapse) | Author |
|
|
|
ok deraadt@, jasper@
|
|
clang optimizes better for size with -Oz so use that as a default to avoid
overflowing the ramdisk floppies. gcc now accepts -Oz as an alias for -Os.
ok kettenis@
|
|
amd64/arm64/armv7/i386/sparc64.
ok visa@
|
|
whenever make is issued. Only do this when there are actual source changes
below /sys. This restores the behavior prior to the KARL implementation.
Problem noticed and patiently explained by mpi
implementation with a lot of help from espie
ok mpi, espie, deraadt
|
|
ok visa@ kettenis@
|
|
Reduce size of switch stack frame to match normal 64byte alignment
Eliminate useless 'osp' variable when setting up initial frame in cpu_fork()
ok visa@ kettenis@
|
|
a partial solution to cross compiling the kernel with KARL.
OK deraadt@ a while ago
|
|
"go for it" deraadt@
|
|
without src and comp work. That is what we've designed for, but since
we always have src and comp on our systems it is so easy to slide...
problem first noted by rpe.
|
|
correct prologue if compiled with -DPROF.
ok deraadt@
|
|
architectures we must also link against a gapdummy.o to repair the ABI
of the resulting .o file. Woe is me.
Also repair install: target to update the linkkit & hash when a kernel
is installed.
ok rpe tb mlarkin and tested by others also
|
|
(BTW, the binutils disasm cannot handle that instruction with those
parameters, because the decoder logic is wrong..)
|
|
since it has source dependencies, and relinking doesn't have any. Also
the bsd: target is created by config(8)...
worked on with rpe.
|
|
fiction participating only in the linkphase.
tricks from rpe and espie
|
|
Otherwise owner of /bsd could be the build user with permissions
inherited from the compile directory.
OK deraadt@ tb@
|
|
run so that this locore0.o is always at the start of the executable.
But randomize the link order of all other .o files in the kernel, so
that their exec/rodata/data/bss segments land all over the place.
The bootstrap code will need smashing because it is mapped by BLTB,
but this is a bit involved so not done yet.
As a result, the internal layout of every newly build bsd kernel is
different from past kernels. Internal relative offsets are not known
to an outside attacker. The only known offsets are in the startup code
(which will be gone when it is smashed).
Ramdisk kernels cannot be compiled like this, because they are gzip'd.
When the internal pointer references change, the compression dictionary
bloats and results in poorer compression.
|
|
This seems to satisfy the BTLB granularity. Good enough for now.
ok kettenis
|
|
directories. Copy it in the same way on other architectures, for the same
effect. Something upcoming will want that file there anyways.
|
|
Prying eyes cannot look at the kernels in the compile directory.
ok tb rpe, kernel developers seem unimpacted
|
|
ok deraadt@, kettenis@, jasper@
|
|
ok visa@, kettenis@
|
|
this properly identifies the registers used as input and output
operands to the code running in the trap handler, and passes them
to the asm statement as such. this means we dont have to do an extra
copy in the asm, or an extra clobber to keep the compiler away from
the registers. it also lets gcc set up and use the input register
nicely before it reaches the asm.
ok kettenis@
|
|
"your chicken scratches look fine to me" deraadt@
|
|
this is so drivers can advertise that they can handle 64 dma addresses
to the platform. it may choose to handle dmamaps differently based
on this flag.
tweaks and ok tom@
ok kettenis@
|
|
Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.
ok deraadt@, kettenis@, visa@
|
|
|
|
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB
macro can be unifdef'ed as always defined.
ok kettenis@ visa@ jsing@
|
|
if the kernel's name ends in .PROF.
problem reported by jmc via mpi
ok mpi
|
|
unsigned variables as argument in most places anyway. Decrease the
chance of signedness/range mismatch issues.
ok stefan
|
|
|
|
- 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
|
|
|
|
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
|
|
defer their creation to later, so that they are owned by BUILDUSER.
This eliminates the last root-owned files in obj/ from 'make build'.
In addition, place a MACHINE == hppa test in hppa/stand/Makefile.inc
to avoid creating bogus symlinks on all other archs.
joint work with & ok natano, "let's try it" 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
|
|
|
|
Make process_auxv_offset() take and release a reference of the vmspace like
process_domem() does.
ok kettenis@
|
|
powerpc: rename second argument of pmap_proc_iflush() to match other archs
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@
|
|
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
|