summaryrefslogtreecommitdiffstats
path: root/sys/arch/sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix kernel build on armv7 and sh.visa2017-05-182-4/+4
| | | | Pointed out by deraadt@
* Rename Debugger() into db_enter().mpi2017-04-302-4/+4
| | | | | | | Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
* Hook up mutex(9) to witness(4).visa2017-04-202-8/+9
|
* Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itguenther2017-04-131-3/+1
| | | | | | | 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@
* Split up fork1():guenther2017-02-121-15/+14
| | | | | | | | | | | | | | | | | - 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@
* In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptguenther2017-02-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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@
* p_comm is the process's command and isn't per thread, so move it fromguenther2017-01-212-11/+6
| | | | | | struct proc to struct process. ok deraadt@ kettenis@
* Change pmap_proc_iflush() to take a process instead of a procguenther2016-10-191-2/+2
| | | | | | powerpc: rename second argument of pmap_proc_iflush() to match other archs ok kettenis@
* struct process has a pointer to the vmspace now, so simplify the ASID searchguenther2016-10-191-10/+4
| | | | ok deraadt@ jca@
* Various printf claim to report the PID, so actually report that and not the TIDguenther2016-10-081-2/+2
| | | | Build testing assistance from deraadt@
* Make a move towards ending 4 decades of kernel snooping.deraadt2016-09-251-2/+6
| | | | | | | | | | | | | | | 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
* all pools have their ipl set via pool_setipl, so fold it into pool_init.dlg2016-09-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | 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);
* Increase the number of mbufs on most architectures. This is basedbluhm2016-09-031-2/+2
| | | | | | | 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@
* remove #define for /dev/mem minors. let the raw magic of the hardcodedtedu2016-08-161-14/+10
| | | | numbers serve as a warning not to touch them.
* normalize some commentstedu2016-08-151-6/+1
|
* consistently set ipls on pmap pools.dlg2016-06-071-3/+5
| | | | | | this is a step toward making ipls unconditionaly on pools. ok deraadt@ kettenis@
* Remove the non ELF macrosderaadt2016-05-272-32/+3
| | | | ok millert
* Place a cpu-dependent trap/illegal instruction over the remainder of thederaadt2016-05-231-1/+13
| | | | | | | | | 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
* hand-massage sendsig() and sys_sigreturn() to be much more similar.deraadt2016-05-211-17/+11
| | | | ok guenther kettenis
* Save and restore 'gbr' register when enter/leaving the kernel, and useguenther2016-05-186-7/+32
| | | | | | it for the TCB pointer. Eliminate __cerror. "looks good" kettenis@, testing and ok deraadt@
* delete SROP mitigation debug code; it worksderaadt2016-05-111-2/+1
|
* SROP mitigation. sendsig() stores a (per-process ^ &sigcontext) cookiederaadt2016-05-103-13/+32
| | | | | | | | 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
* G/C DDB_REGS.mpi2016-04-271-2/+1
|
* Sync no-argument function declaration and definition by adding (void).tobiasu2016-03-0510-35/+35
| | | | | | Covers all of landisk/sh, per naddy's suggestion. ok on previous diff deraadt@ naddy@
* Rename kdb_trap() into db_ktrap().mpi2016-02-273-7/+7
| | | | | | | | The goal is to include it in the list of functions that must not be instrumented. All ddb(8) functions should be in this list and have their names start with 'db_'. ok visa@, deraadt@
* Make alpha and sh 2038-safe. Now that we have 64-bit time_t, we don'tmmcc2016-02-261-2/+2
| | | | | | | need to ignore the hardware clock when it reports a year > 2037. Irony noted. both ok millert, alpha ok deraadt
* intr_barrier for sh/landisk; tobiasu noticed the need as wellderaadt2016-01-152-2/+9
|
* Do not call uvm_swap_finicrypt_all() a second time in dumpsys().mpi2015-10-211-6/+1
| | | | ok tedu@, deraadt@, miod@
* Use #ifndef _MACHINE_DISKLABEL_H_ everywhere. Replace _ARM_DISKLABEL_H_krw2015-09-301-4/+4
| | | | | | and _SH_DISKLABEL_H_ with _MACHINE_DISKLABEL_H_. Add the guard to loongson and octeon. The #defines are not used anywhere else in the tree so no functional change.
* Use consistant whitespace/comments for #define'ing LABELSECTOR,krw2015-09-301-4/+4
| | | | | LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning through all these files. No functional change.
* lint is dead and C99 may be old enough to drive a car: delete LONGLONGguenther2015-09-261-3/+1
| | | | | | comments ok millert@
* Fix error value in ktrace syscall records. ok deraadt@ dlg@ guenther@miod2015-09-101-4/+4
|
* Give the pool page allocator backends more sensible names. We now have:kettenis2015-09-081-2/+2
| | | | | | | | * pool_allocator_single: single page allocator, always interrupt safe * pool_allocator_multi: multi-page allocator, interrupt safe * pool_allocator_multi_ni: multi-page allocator, not interrupt-safe ok deraadt@, dlg@
* free() sizederaadt2015-09-011-2/+2
|
* _NLIST_DO_ELF is no longer needed: it's the only optionguenther2015-08-291-2/+1
| | | | ok deraadt@
* remove obsolete INET kernel optiontedu2015-07-171-3/+3
|
* still needs kcore.hderaadt2015-05-151-1/+2
|
* emul_native is only used for kernel threads which can't dump core, soguenther2015-05-053-66/+3
| | | | | | | | | | | delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
* Remove SIZE_MAX from limits.h. It was added years ago before wemillert2015-04-301-4/+1
| | | | had a proper stdint.h. No ports fallout. OK guenther@ miod@
* Change pmap_remove_holes() to take a vmspace instead of a map as its argument.miod2015-02-151-2/+2
| | | | | Use this on vax to correctly pick the end of the stack area now that the stackgap adjustment code will no longer guarantee it is a fixed location.
* no md code wants lockmgr locks, so no md code needs to include sys/lock.hdlg2015-02-111-2/+1
| | | | with and ok miod@
* Convert to uiomove().miod2015-02-101-10/+10
| | | | ok guenther@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-5/+5
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* No need to check for va < USRSTACK before invoking uvm_grow() on behalf ofmiod2015-02-091-3/+2
| | | | a userland map.
* Move ps_strings "after" the random stackgap. This makes its location akettenis2015-01-201-2/+2
| | | | | | | | per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a per-process one as well. This gets rid of a pointer to the bottom of the stack at a fixed location. Also clears the road for unmapping the stackgap. ok deraadt@
* More duplicate #include cleanout.krw2014-12-031-2/+1
| | | | ok deraadt@ tedu@
* Nuke some obvious #include duplications.krw2014-11-181-2/+1
| | | | ok espie@ deraadt@ millert@ tedu@
* split the int and long implementations to avoid compiler warnings.dlg2014-11-171-13/+70
| | | | tested by and ok jsg@
* Replace a plethora of historical protection options with justderaadt2014-11-163-28/+28
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Let this compile without option DDB.miod2014-10-131-1/+5
|