summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2016-11-06Do not create machine@ symlinks in obj as root during includes:, butTheo Buehler
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
2016-11-05Two tweaks for compile/Makefile.inc:Martin Natano
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
2016-10-29sync with -r1.95 of amd64/vmm.c:Reyk Floeter
Further improve vmm's security model by restricting pledged vmm processes to only do VMM_IOC_ ioctls on their associated VM (these ioctls are _RUN, _RESETCPU, _INTR, _READREGS, or _WRITEREGS at present). The vmm monitor (parent) process or any non-pledged processes can still do ioctls on any VM. For example, a VM can only terminate itself but vmctl or the monitor can terminate any VM. This prevents reachover into other VMs: while escaping from a VM to the host side (eg. through a bug in virtio etc.) pledge already kept the attacker in a pledged and privsep'ed process, but now it also prevents vmm ioctls on "other VMs". OK mlarkin@
2016-10-27We don't generate an eddep script for kernel builds nowadays. The lastMartin Natano
reference to eddep in the kernel Makefile I could find is in 4.3BSD, released some 30 years ago. ok tb millert
2016-10-26Fix a few misc bugs in i386 vmm:Mike Larkin
1. Include ioctls needed for pledge support (to be used with the upcoming i386 vmd diff) 2. Don't assume we can enter an IA32e mode guest on entry when the host doesn't have unrestricted guest capability 3. Don't enable PAE in the guest CR4 when launching on hosts without unrestricted guest capability (vmd does not set up PAE bootstrap page tables) 4. Don't use a bitfield for the MSR bitmap index (same fix as just committed for amd64) 5. Store and restore EFER properly on exit to ensure that the host NXE is recovered on exit
2016-10-24make cleandir should skip the version file; ok otto millertTheo de Raadt
2016-10-21Fix MP builds including vmmTheo de Raadt
ok mlarkin
2016-10-21pledge changes needed to support pledging vmd(8) on i386, forthcoming.Mike Larkin
ok deraadt@
2016-10-21vmm(4) for i386. Userland changes forthcoming. Note that for the time being,Mike Larkin
i386 hosts are limited to running only i386 guests, even if the underlying hardware supports amd64. This is a restriction I hope to lift moving forward, but for now please don't report problems running amd64 guests on i386 hosts. This was a straightforward port of the in-tree amd64 code plus the old rotted tree I had from last year for i386 support. Changes included converting 64-bit VMREAD/VMWRITE ops to 2x32-bit ops, and fixing treatment of the TSS, which differs on i386. ok deraadt@
2016-10-18put .openbsd.randomdata into rodata, since i386 can handle itTheo de Raadt
2016-10-15cleandir: target for kernel compile directoriesTheo de Raadt
ok natano
2016-10-14backout small errorTheo de Raadt
2016-10-14Kernel builds now happen in compile/CONFIG/obj@ -> /usr/obj/... [or ./obj/,Theo de Raadt
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.
2016-10-14cache some more cpuid info. the cached data is presently unused, but willMike Larkin
soon be.
2016-10-13cache another feature bit for something I'm working onMike Larkin
2016-10-09Apply consistency to forever loops with continue and NOTREACHEDTom Cosgrove
Same thought from kettenis@, ok krw@ phessler@ millert@
2016-10-08Various printf claim to report the PID, so actually report that and not the TIDPhilip Guenther
Build testing assistance from deraadt@
2016-09-26Check cpuid_level before using CPUID().Philip Guenther
Problem noted by Sami (sami.tikkanen (at) haxaa.net) ok deraadt@
2016-09-25Make a move towards ending 4 decades of kernel snooping.Theo de Raadt
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
2016-09-24Add -Wno-pointer-sign to all our gcc4 architectures.Mark Kettenis
ok patrick@ (for armv7), deraadt@
2016-09-22Fix indentation. No binary change.Jonathan Gray
2016-09-18Bump boot loader versions due to bcrypt pbkdf support.Joel Sing
2016-09-18Add bcrypt pbkdf support to the softraid crypto boot loader code.Joel Sing
Based on a diff from djm@
2016-09-18Fix a bug in the bounce buffer handling of BIOS disk I/O.Joel Sing
Currently, if a buffer crosses a 64KB boundary, a bounce buffer is allocated, however it is assumed that this new buffer does not cross the 64KB boundary. In the case of i386 fdboot, it just so happens that (due to the size of fdboot and heap allocations) UFS gets allocated a 4KB buffer that crosses a 64KB boundary, then biosd_io() allocates a bounce buffer, which also crosses a 64KB boundary. At this point the BIOS gets grumpy and refuses to read from the disk. Further clean up to come from tom@.
2016-09-18option INSECURE is obsoleteTheo de Raadt
2016-09-18as is done on amd64, allow using CTF to lookup the function parameters.Jasper Lievisse Adriaanse
ok mpi@
2016-09-17remove unused pmap_dump functionsMike Larkin
ok kettenis, deraadt
2016-09-16move the vm_page struct from being stored in RB macro trees to RBT functionsDavid Gwynne
vm_page structs go into three trees, uvm_objtree, uvm_pmr_addr, and uvm_pmr_size. all these have been moved to RBT code. this should give us a decent chunk of code space back.
2016-09-16move the uvm_map_addr RB tree from RB macros to the RBT functionsDavid Gwynne
this tree is interesting because it uses all the red black tree features, specifically the augment callback thats called on tree topology changes, and it poisons and checks entries as theyre removed from and inserted back into the tree respectively. ok stefan@
2016-09-15all pools have their ipl set via pool_setipl, so fold it into pool_init.David Gwynne
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);
2016-09-13crank bootloader version after .SUNW_ctf changeJasper Lievisse Adriaanse
as discussed with jsing@ it's easier this way to ensure people have bootblocks capable of loading the section
2016-09-12Enable uwacom(4) where uts(4) is already present.Martin Pieuchot
2016-09-11Switch i386 boot code to libsa MI softraid.Joel Sing
2016-09-11Update header guards.Joel Sing
2016-09-11Rename softraid boot files, which are currently in an MD location. ThisJoel Sing
will allow us to bring in a MI softraid.{c,h} in lib/libsa.
2016-09-10Clean up some softraid crypto code - rename struct sr_crypto_kdf_pbkdf2 toJoel Sing
sr_crypto_pbkdf (since it is useable for more than just pkcs5_pbkdf2) and embed a struct sr_crypto_genkdf within it, rather than redeclaring the same fields. Rename SR_CRYPTOKDFT_PBKDF2 to SR_CRYPTOKDFT_PCKS5_PBKDF2 and add SR_CRYPTOKDFT_BCRYPT_PBKDF for upcoming changes.
2016-09-10Rename libsa pbkdf2.c to pkcs5_pbkdf2.c so that we match libutil.Joel Sing
2016-09-10take it one step further and bring the message inline with arm/sparc64Jasper Lievisse Adriaanse
pointed out by guenther@
2016-09-09don't hardcode the filename in an error message; use the function name insteadJasper Lievisse Adriaanse
ok jsg@ (who spotted the powerpc straggler too) millert@
2016-09-04Remove support for tape block devices. Nobody mount(8)s tapes any longer.Christian Weisgerber
ok deraadt@ guenther@
2016-09-04bha depends on the deleted aha.h, so it will follow it into the atticTed Unangst
2016-09-04TCB_GET_MEMBER() is no longer used after the TIB changesPhilip Guenther
2016-09-03the src tree is growing too large. delete the aha and ahb drivers inTed Unangst
order to make room for llvm. er, the llvm makefiles. er, some of them.
2016-09-03remove cnw driver. it was never enabled anywhere except on amd64 (and onlyTed Unangst
there by accident) where it hasn't seen much use...
2016-09-03Write the system time back to the RTC every 30 minutes.Christian Weisgerber
This fixes the problem that long-running machines which were not shut down properly would reboot with a badly offset system time. hints and ok kettenis@
2016-09-03Increase the number of mbufs on most architectures. This is basedAlexander Bluhm
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@
2016-09-03fix typo "mode" -> "model" when referring to "Model specific registers"Mike Larkin
2016-09-03Make .openbsd.randomdata section RO. Highlight is that the stack protectorTheo de Raadt
cookie becomes readonly, spraying over it in KVA becomes more difficult. amd64 version from guenther, i386 version by myself ok guenther kettenis
2016-09-03add SDBG to cpuid bits and identcpuMike Larkin
2016-09-02Add switch(4) cdev entryKazuya Goda
ok deraadt@ yasuoka@ reyk@