summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
AgeCommit message (Collapse)Author
2019-08-03In the bootblocks, after discovering and opening /bsd.upgrade, fchmod -xTheo de Raadt
so the file cannot be re-executed upon the next boot. This provides a stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade. Now various forms of upgrade failure will reboot into /bsd, which is probably more recoverable. Performing fchmod -x depends on (1) use of MI boot.c (not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality in the IO layer. Most architectures have this support now. Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will remain in the tree while refinements happen for some of the laggard architectures. based upon a discussion florian tested in snapshots for more than a week without any complaints
2019-07-09I wrote the pc-page-writeable and sp-not-MAP_STACK code to be shared, andTheo de Raadt
then ran into the messaging being poor. Then I fixed the messages. But there are two sub-cases of sp-not-MAP_STACK -- one at syscall time, and another at regular userland trap (on some architectures), and I bungled that messaging. Correct that now, while I look for yet another better way... discovered by millert, who ran an pre-MAP_STACK binary.
2019-06-21Further improve the filesystem stability of kernel installation by KARL.Theo de Raadt
Use install -F to instead of cp, for fsync(2). Coupled with the new sync(8) in the reorder_kernel script, the window for a incomplete /bsd file on-disk due to a crash has now shrunk substantially. Discussion with kettenis, millert and tedu
2019-06-11Remove unused scheduler related definitions.Martin Pieuchot
ok visa@
2019-06-01Refactor the MAP_STACK feature, and introduce another similar variation:Theo de Raadt
Lookup the address that a syscall instruction is executed from, and kill the process if that page is writeable. This brings an aspect of W^X behaviour to W|X mappings (in JITs not yet adapted to W^X). The goal is to remove simple attack methods and force use of ret2libc or other more complicated means. ok kettenis stefan visa
2019-05-08Enable ucrcom(4) on all architectures that have uslcom(4).Mark Kettenis
ok deraadt@
2019-04-23Remove file name and line number output from witness(4)Visa Hankala
Reduce code clutter by removing the file name and line number output from witness(4). Typically it is easy enough to locate offending locks using the stack traces that are shown in lock order conflict reports. Tricky cases can be tracked using sysctl kern.witness.locktrace=1 . This patch additionally removes the witness(4) wrapper for mutexes. Now each mutex implementation has to invoke the WITNESS_*() macros in order to utilize the checker. Discussed with and OK dlg@, OK mpi@
2019-04-20libsa's memcpy() is actually memmove(). make a proper memmove(), and giveTheo de Raadt
memcpy() correct behaviour. This also brings the bcopy() macro into line.
2019-04-14Instead of using COPTS=-Oz (and similar) in make environment to forceTheo de Raadt
tightly-built ramdisk kernels, set the option in per-arch Makefile.inc based upon SMALL_KERNEL
2019-04-10crank versionsTheo de Raadt
2019-04-10change marks[] array to uint64_t, so the code can track full 64-bitTheo de Raadt
details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
2019-04-08crank version; looks good deraadtFlorian Obser
2019-04-01fast track ddb> reboot command to skip anything which might panic again.Ted Unangst
ok deraadt
2019-01-02markup boot prompt commands using Ic, not Nm; ok jmc@anton
2018-12-28Fix dino at uturn attachment. From miod@Mark Kettenis
2018-12-05Include srp.h where struct cpu_info uses srp to avoid erroring out whenJonathan Gray
including cpu.h machine/intr.h etc without first including param.h when MULTIPROCESSOR is defined. ok visa@
2018-11-15one more typo noticed while pasting miod a reply;Jason McIntyre
2018-11-15fix typos in comments; from miodJason McIntyre
2018-11-08Remove cardbus and pcmcia debug options that we don't enable on otherMark Kettenis
platforms. From miod@
2018-09-20grow alpha and hppa media to accomodate some recent growthTheo de Raadt
2018-09-14Unify and bump some of the NMBCLUSTERS defines. Some archs had it set toClaudio Jeker
4MB which is far too low especially when the platform is able to run MP. New limits are, amd64 = 256M; arm64, mips64, sparc64 = 64M; alpha, arm, hppa, i386, powerpc = 32M; m88k, sh = 8M Still rather conservative numbers but much better than before. At least some hangs of arm64 build boxes was caused by this. OK kettenis@, visa@
2018-08-22Enable uscom(4) where uslcom(4) is already present.Martin Pieuchot
Based on a submisison from Jan Klemkow.
2018-07-20Missed a 'ksi' -> '*ksip' change in previous commitPhilip Guenther
2018-07-10Move from sendsig() to its callers the initsiginfo() calls andPhilip Guenther
instead of passing sendsig() the code+type+val, pass a siginfo_t* to copy from. Eliminate the indirection through struct emul for sendsig(); we no longer have a SunOS4-compat version of sendsig() ok deraadt@
2018-06-08Constipate all the struct lock_type's so they go into .rodataPhilip Guenther
ok visa@
2018-05-22Delete antique sigdebug definitionsPhilip Guenther
ok kettenis@
2018-05-14Relax the way irqs are assigned. This diff does:Mark Kettenis
- dynamic allocation of interrupts for dino(4) and gsc(4) - only mention irq locators for devices which use interrupts. - for gsc(4), this actually postpones interrupt allocation until gsc(4) attaches, so asp(4)/lasi(4)/wax(4) won't route the interrupt yet, but the gsc(4) child will take care of this. - remove the irq locator for the drivers which do not need a fixed assignment. siop and moongoose could benefit from this but don't work at the moment so this is left as an exercize to future kernel hackers. A side effect from this is that we do not need multiple sti(4) attachment lines, so PCI sti(4) devices will now attach as sti0 rather than sti2. With this diff, multiple dino(4) devices attached to the same parent will use different interrupt sources, and more than two dino(4) devices can attach. Tested on 715/75 (old-gen using asp), 715/100/XC (new-gen using lasi), B132L+, B180L, C240, B2000, C3650. From miod@
2018-05-14Expose memory barriers to userland.Mark Kettenis
ok visa@, mpi@
2018-05-04Initialize st_count in db_save_stack_trace().Visa Hankala
OK guenther@
2018-04-28replace add_*_randomness with enqueue_randomness()Jasper Lievisse Adriaanse
this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
2018-04-12Implement MAP_STACK option for mmap(). Synchronous faults (pagefault andTheo de Raadt
syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer ok kettenis
2018-03-20Do not panic from ddb(4) when a lock requirement isn't fulfilled.Martin Pieuchot
Extend the logic already present for panic() to any DDB-related operation such that if ddb(4) is entered because of a fault or other trap it is still possible to call 'boot reboot'. While here stop printing splassert() messages as well, to not fill the buffer. ok visa@, deraadt@
2018-03-05#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an archTheo de Raadt
needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan
2018-02-19Remove almost unused `flags' argument of suser().Martin Pieuchot
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
2018-02-14prune files.* entries that refer to files not in treeJonathan Gray
ok krw@ mpi@
2018-02-09Check for the existence of /bsd before trying to back it up to /obsd.Theo Buehler
Fixes 'make install' when /bsd is not present for some reason. ok rob florian, "fine with me" deraadt
2018-01-27Sync the nam2blk entries with the bdevsw table, which is theChristian Weisgerber
definitive list of block devices supported on an architecture. ok kettenis@ deraadt@
2018-01-13Define and use IPL_MPFLOOR in our common mutex implementation.Martin Pieuchot
ok kettenis@, visa@
2018-01-04Unify <machine/mutex.h> a bit further.Martin Pieuchot
Remove `mtx_lock' from i386, add volatile before `mtx_owner' where it was missing. Inputs from kettenis@, ok visa@
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-14fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, soPhilip Guenther
the memory devices (/dev/null, /dev/zero, etc) need to permit them. problem noted, tweak, and testing by jeremy@ ok deraadt@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-12-04Change __mp_lock_held() to work with an arbitrary CPU info structure andMartin Pieuchot
extend ddb(4) "ps /o" output to print which CPU is currently holding the KERNEL_LOCK(). Tested by dhill@, ok visa@
2017-11-04Since rev 1.502 of rc(8) it creates a /bsd.booted hard link. At theFlorian Obser
end of rc we call reorder_kernel which creates a /obsd hard link to the same kernel. In the past obsd was only created when doing a manual make install in the kernel sources. There is no need for two backup hard links during boot, rearange the kernel Makefiles to restore previous behaviour and thus stopping reorder_kernel from scribbling over /obsd. Makes muscle memory of some kernel developers work again: /obsd can serve as a known good kernel; and there was much rejoycing... Discussed at length with benno, rpe, phessler and tb at p2k17. Seems like a good idea to deraadt. OK benno, phessler, rpe, tb
2017-11-03use %lx to print the frame address if resolving of the symbol name failsJasper Lievisse Adriaanse
as discussed with and ok mpi@
2017-09-28When option DDB_STRUCTINFO was removed from the kernel, too much fromPatrick Wildt
the kernel makefiles was removed which lead to C files not being re- compiled when a dependency changed. This can lead to panics in odd places and generally a broken system. ok deraadt@
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarMartin Pieuchot
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-09-05Move mutex, condvar, and thread-specific data routes, pthread_once, andPhilip Guenther
pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@