summaryrefslogtreecommitdiff
path: root/sys/arch/sh
AgeCommit message (Collapse)Author
2016-05-27Remove the non ELF macrosTheo de Raadt
ok millert
2016-05-23Place a cpu-dependent trap/illegal instruction over the remainder of theTheo de Raadt
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
2016-05-21hand-massage sendsig() and sys_sigreturn() to be much more similar.Theo de Raadt
ok guenther kettenis
2016-05-18Save and restore 'gbr' register when enter/leaving the kernel, and usePhilip Guenther
it for the TCB pointer. Eliminate __cerror. "looks good" kettenis@, testing and ok deraadt@
2016-05-11delete SROP mitigation debug code; it worksTheo de Raadt
2016-05-10SROP mitigation. sendsig() stores a (per-process ^ &sigcontext) cookieTheo de Raadt
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
2016-04-27G/C DDB_REGS.Martin Pieuchot
2016-03-05Sync no-argument function declaration and definition by adding (void).Tobias Ulmer
Covers all of landisk/sh, per naddy's suggestion. ok on previous diff deraadt@ naddy@
2016-02-27Rename kdb_trap() into db_ktrap().Martin Pieuchot
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@
2016-02-26Make alpha and sh 2038-safe. Now that we have 64-bit time_t, we don'tmmcc
need to ignore the hardware clock when it reports a year > 2037. Irony noted. both ok millert, alpha ok deraadt
2016-01-15intr_barrier for sh/landisk; tobiasu noticed the need as wellTheo de Raadt
2015-10-21Do not call uvm_swap_finicrypt_all() a second time in dumpsys().Martin Pieuchot
ok tedu@, deraadt@, miod@
2015-09-30Use #ifndef _MACHINE_DISKLABEL_H_ everywhere. Replace _ARM_DISKLABEL_H_Kenneth R Westerback
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.
2015-09-30Use consistant whitespace/comments for #define'ing LABELSECTOR,Kenneth R Westerback
LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning through all these files. No functional change.
2015-09-26lint is dead and C99 may be old enough to drive a car: delete LONGLONGPhilip Guenther
comments ok millert@
2015-09-10Fix error value in ktrace syscall records. ok deraadt@ dlg@ guenther@Miod Vallat
2015-09-08Give the pool page allocator backends more sensible names. We now have:Mark Kettenis
* 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@
2015-09-01free() sizeTheo de Raadt
2015-08-29_NLIST_DO_ELF is no longer needed: it's the only optionPhilip Guenther
ok deraadt@
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-05-15still needs kcore.hTheo de Raadt
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
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@
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-02-15Change pmap_remove_holes() to take a vmspace instead of a map as its argument.Miod Vallat
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.
2015-02-11no md code wants lockmgr locks, so no md code needs to include sys/lock.hDavid Gwynne
with and ok miod@
2015-02-10Convert to uiomove().Miod Vallat
ok guenther@
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- 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@
2015-02-09No need to check for va < USRSTACK before invoking uvm_grow() on behalf ofMiod Vallat
a userland map.
2015-01-20Move ps_strings "after" the random stackgap. This makes its location aMark Kettenis
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@
2014-12-03More duplicate #include cleanout.Kenneth R Westerback
ok deraadt@ tedu@
2014-11-18Nuke some obvious #include duplications.Kenneth R Westerback
ok espie@ deraadt@ millert@ tedu@
2014-11-17split the int and long implementations to avoid compiler warnings.David Gwynne
tested by and ok jsg@
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
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
2014-10-13Let this compile without option DDB.Miod Vallat
2014-09-24jmatthew@ found another case of me getting the number of args wrongDavid Gwynne
to an atomic_swap_ptr.
2014-09-24implement atomic_{cas,swap}_{uint,long,ptr) and atomic_{add,sub}_{int,long}David Gwynne
fixes from and ok miod@
2014-07-13use nitems() instead of handrolling something identicalJasper Lievisse Adriaanse
ok mpi@ sthen@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12Tackle the endian.h mess. Make it so that:Philip Guenther
* you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
2014-07-11CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionMasao Uebayashi
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
2014-07-10remove most of the boolean_t infection outside uvm/ddb/pmap; ok jsgTheo de Raadt
2014-05-11Move the increment of uvmexp.softs back to the caller of mi_ast():Philip Guenther
it needs to be done atomicly on some MP archs and we don't have atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline. noted by miod@
2014-05-10bring things syscall_mi.h needs into scope earlierTheo de Raadt
2014-05-10Factor out the common ast bits into mi_ast()Philip Guenther
ok deraadt@
2014-05-08Format string fixes and removal of -Wno-format for landisk kernelsMiod Vallat
2014-04-18Have each thread keeps its own (counted!) reference to the process's ucredsPhilip Guenther
to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
2014-04-14Fewer <uvm/uvm.h>Martin Pieuchot
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-26Move p_emul and p_sigcode from proc to process.Philip Guenther
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@