Commit Graph

1767 Commits

Author SHA1 Message Date
maxv
f823c34f61 Define __rodata_start. Will be used soon. 2016-05-08 08:30:41 +00:00
maxv
900fb87538 Use killkpt for the PML4 entries as well. 2016-05-08 08:22:58 +00:00
skrll
856daf275d More options 2016-05-08 07:41:37 +00:00
maxv
15378864f6 clarify 2016-05-07 13:08:30 +00:00
maxv
0ceb789c1f Large pages are supported by default for the text+rodata segments. Apply
the proper alignment for the data segment, so that more pages can benefit
from it. Reduces TLB contention.

kern.ldscript.2MB and largepages.inc are useless.
2016-05-07 12:45:55 +00:00
maxv
9a4c721fbe clarify 2016-05-07 11:49:21 +00:00
nonaka
8b5163f01f Added nvme(4) for Non-Volatile Memory Host Controller Interface devices.
Ported from OpenBSD.
2016-05-01 10:21:01 +00:00
christos
017adfc3ae Moved hack to ufs_lookup.c 2016-04-29 02:17:25 +00:00
mrg
2fd0ab6bd1 XXX: build ufs_lookup.c with -fno-tree-vrp when using GCC 5, for now. 2016-04-28 19:52:43 +00:00
skrll
4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
riastradh
e0a6926ea4 Enable nouveau by default again in x86 GENERIC. 2016-04-13 15:26:27 +00:00
bouyer
2f53f613b4 x86_lfence() calls mcount(), so inline lfence instructions in mcount
helper functions
2016-04-11 14:15:30 +00:00
bouyer
ca03f01a92 __cpu_simple_unlock() is called from _mcount(), so don't call mcount() from
__cpu_simple_unlock().
Kernel profiling should work again
2016-04-11 14:14:27 +00:00
christos
d9da07b963 We don't need TRAP_SIGDEBUG 2016-04-10 15:39:27 +00:00
christos
a9a4b283d5 - Turn on ASLR by default
- Add PAX_MPROTECT_DEBUG flag
2016-04-10 15:28:24 +00:00
shm
606dc45ebf Add support for clac and stac instructions. 2016-03-25 10:14:43 +00:00
gdt
af798e7b27 Disable uscanner in all kernel configs
As discussed on current-users@, SANE uses ugen via libusb and not
uscanner, so users are not well served by having uscanner.  Consensus
is that addressing how to adjust permissions for scanners should not
block restoring basic functionionality.

(Compile-tested only, but there are multiple reports of this being the
right approach.)
2016-03-19 23:21:02 +00:00
christos
a75799a386 Add PAX_SEGVGUARD disabled. 2016-03-16 16:13:16 +00:00
riastradh
566ef8a23e Revert to disabling nouveau by default in x86 GENERIC.
Haven't had time to debug the issues that seem to affect pretty much
everyone.  Maybe soon!
2016-03-05 17:08:48 +00:00
tls
1b1730d0f9 Add cpu_rng, a framework for simple on-CPU random number generators. 2016-02-27 00:09:44 +00:00
riastradh
0c08237178 Use KASSERTs supported by CTASSERTs, not __builtin_unreachable.
pcc has no __builtin_unreachable, and this is clearer anyway.
2016-02-15 20:35:59 +00:00
riastradh
091e6ea2fb Add nouveau to x86 GENERIC kernels. 2016-02-13 19:53:23 +00:00
christos
a0e0372037 Add more relocation constants 2016-02-02 20:13:59 +00:00
christos
736ee7ee51 compile full symbol table for CTF so FBT can get function arguments. 2016-01-30 04:12:38 +00:00
christos
d84c286204 expose the kernel types for standalone code. 2016-01-23 22:31:19 +00:00
christos
4d497c90e6 Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
2016-01-23 21:22:13 +00:00
riz
9ed3ff4a08 Enable KDTRACE_HOOKS on i386 and amd64 GENERIC. 2016-01-22 21:56:56 +00:00
ryo
c2acaf5fa5 __mcount_lock is moved to MI from MD.
because it is needed for all MULTIPROCESSOR arch, but it is exists only in i386 and amd64.

ok christos@, on tech-kern@
2016-01-10 09:04:32 +00:00
christos
92de9d75ce scsibus at scsi should work; if it does not... 2016-01-10 04:09:28 +00:00
christos
8f042a8186 PR/50636: Ryo ONODERA: Add scsibus to vioscsi 2016-01-10 03:19:36 +00:00
msaitoh
0c27f9bb62 Add ismt(4). 2016-01-05 11:33:18 +00:00
maxv
e3befc155e Implement amd64 support for SMEP - Supervisor Mode Execution Protection.
Now, on CPUs that support this feature, if the kernel tries to execute
an instruction located in userland, the CPU will trigger a page fault.

Tested on amd64 (Intel Core i5).
2015-12-13 15:53:05 +00:00
maxv
5e224a552d KNF, and use C-style comments. Also, remove fusword/susword. 2015-12-09 16:55:18 +00:00
dholland
cf8a8cd732 If the kernel jumps to NULL, print where it came from instead of trying
to dereference and faulting again.
2015-11-28 15:06:55 +00:00
martin
76713fa86f We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.
2015-11-26 13:15:34 +00:00
maxv
386a6446d1 Cosmetic changes. 2015-11-25 16:00:09 +00:00
maxv
165df8bad6 Remove cpu_vendorname (unused). It is retrieved later in identcpu.c. 2015-11-22 14:06:08 +00:00
maxv
a406542551 KNF a bit, so I don't get scared each time I open a file 2015-11-22 13:41:24 +00:00
maxv
67b107f811 Clarify:
- add some comments
 - rename some jumps
 - KNF
No functional change.
2015-11-22 10:18:59 +00:00
maxv
a84a9bb93c Remove the amd64 implementation of fuword and suword. They are not used in
the MI+amd64 code - Christos replaced them yesterday by copy*.

They are both buggy:
 - suword does not properly check the userspace limit: 64 bits are copied,
   but the max address checked is VM_MAXUSER_ADDRESS-4, which means that 4
   bytes may overflow. Reported by Ed Schouten.
 - fuword is supposed to be symmetrical with suword. But it uses 32bit
   registers, so it stores 32bit values! Spotted by Chuck (chs@).
2015-11-21 12:34:48 +00:00
maxv
5b63704f89 A few changes:
- remove cpu_id and cpu_brand_id (unused)
 - copy a comment from i386 about fillkpt
 - define PDE_SIZE (i386)
2015-11-20 11:58:00 +00:00
maxv
1433b9b2e5 KNF, and fix some comments 2015-11-14 14:01:23 +00:00
tnn
4db8cd7033 Add "pseudo-device iscsi" to ALL and as a commented out hint in XEN3_* 2015-11-10 13:01:41 +00:00
christos
3ba3e5a56e add vioscsi 2015-10-30 21:16:15 +00:00
mrg
9884c86a80 make sure MSGBUFSIZE can't expand strangely by using parens. 2015-10-27 22:28:56 +00:00
khorben
142dd55d17 Remove references to SPLASHSCREEN_PROGRESS
To my knowledge this feature is no longer supported at the moment. The
manual page for wsdisplay(4) should probably also be updated to reflect
this situation.
2015-10-25 22:48:23 +00:00
maxv
87ee1fdec1 Disable PAX_SEGVGUARD.
We actually have a big problem: the fileassocs are never deleted.
Therefore, if a user generates a lot of buggy binaries and launches them
all, the kernel will allocate memory again again and again for all these
entries and will never free them (unless the files are deleted from the
disk). Which means that a user can too easily put the kernel under memory
pressure.
2015-09-26 16:33:16 +00:00
christos
b88569ce68 For processors that have memory breakpoints, add macros for them to help
libproc
2015-09-25 16:05:17 +00:00
nonaka
ac3789be33 PR/50261: Added newer Toshiba hotkeys support. 2015-09-21 12:32:06 +00:00
christos
dbf397647f fix 32 bit build. 2015-09-17 14:39:35 +00:00