| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
questing kernel config files not in CVS.
Approved by: re(kensmith)
|
|
|
|
|
|
|
|
|
|
|
| |
It can be used to panic the kernel by giving too big value.
Fix it by moving allocation and size verification into kern_getfsstat().
This even simplifies kern_getfsstat() consumers, but destroys symmetry -
memory is allocated inside kern_getfsstat(), but has to be freed by the
caller.
Found by: FreeBSD Kernel Stress Test Suite: http://www.holm.cc/stress/
Reported by: Peter Holm <peter@holm.cc>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vm_page's machine-dependent fields. Use this function in
vm_pageq_add_new_page() so that the vm_page's machine-dependent and
machine-independent fields are initialized at the same time.
Remove code from pmap_init() for initializing the vm_page's
machine-dependent fields.
Remove stale comments from pmap_init().
Eliminate the Boolean variable pmap_initialized from the alpha, amd64,
i386, and ia64 pmap implementations. Its use is no longer required
because of the above changes and earlier changes that result in physical
memory that is being mapped at initialization time being mapped without
pv entries.
Tested by: cognet, kensmith, marcel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implement sampling modes and logging support in hwpmc(4).
- Separate MI and MD parts of hwpmc(4) and allow sharing of
PMC implementations across different architectures.
Add support for P4 (EMT64) style PMCs to the amd64 code.
- New pmcstat(8) options: -E (exit time counts) -W (counts
every context switch), -R (print log file).
- pmc(3) API changes, improve our ability to keep ABI compatibility
in the future. Add more 'alias' names for commonly used events.
- bug fixes & documentation.
|
|
|
|
|
|
| |
kern_getfsstat() function.
Obtained from: jhb
|
|
|
|
|
|
| |
PR: kern/81951
Submitted by: Andriy Gapon <avg@icyb.net.ua>
MFC after: 1 week
|
|
|
|
|
|
|
| |
getpriority(2) syscall.
PR: kern/81951
Submitted by: Andriy Gapon <avg@icyb.net.ua>
|
|
|
|
|
| |
driver it is better to not include the driver in GENERIC as it panics
the system on probing a TGA.
|
|
|
|
|
|
|
| |
the audit event field to the syscalls.master file format.
Submitted by: wsalamon
Obtained from: TrustedBSD Project
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
audit event identifier associated with each system call, which will
be stored by makesyscalls.sh in the sy_auevent field of struct sysent.
For now, default the audit identifier on all system calls to AUE_NULL,
but in the near future, other BSM event identifiers will be used. The
mapping of system calls to event identifiers is many:one due to
multiple system calls that map to the same end functionality across
compatibility wrappers, ABI wrappers, etc.
Submitted by: wsalamon
Obtained from: TrustedBSD Project
|
|
|
|
|
| |
makes sure that sysinit tasks that run after configure_first(),
but before configure() have a nexus to hang devices off.
|
|
|
|
| |
o Remove unused and compiled-out code while here.
|
|
|
|
| |
the system call type field.
|
|
|
|
|
|
| |
and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
such, the segments pointer in the DMA tag will always be NULL. In
bus_dmamap_load(), temporarily point the segments pointer in the
DMA tag to a local variable so that we don't dereference a NULL
pointer. Reset the segments pointer to NULL after calling the
callback function with it.
PR: alpha/30486
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
- Don't leak fsid.
- Don't forget about prison_check_mount().
- Don't use additional variable when there is no need to.
|
|
|
|
|
|
| |
- Use isa/isareg.h rather than <arch>/isa/isa.h.
Tested on: i386, pc98
|
|
|
|
|
|
|
|
|
| |
i8253reg.h, and add some defines to control a speaker.
- Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them.
- Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively.
- Use isa/isareg.h rather than <arch>/isa/isa.h.
Tested on: i386, pc98
|
|
|
|
|
|
|
| |
in other codes. Add cpu_set_user_tls, use it to tweak user register
and setup user TLS. I ever wanted to merge it into cpu_set_kse_upcall,
but since cpu_set_kse_upcall is also used by M:N threads which may
not need this feature, so I wrote a separated cpu_set_user_tls.
|
|
|
|
| |
get hwpmc(4) to compile on this platform.
|
|
|
|
|
|
|
|
|
|
| |
into _bus.h to help with name space polution from including all of bus.h.
In a few days, I'll commit changes to the MI code to take advantage of thse
sepration (after I've made sure that these changes don't break anything in
the main tree, I've tested in my trees, but you never know...).
Suggested by: bde (in 2002 or 2003 I think)
Reviewed in principle by: jhb
|
|
|
|
| |
operations in some places and simple non-per CPU math in others.
|
|
|
|
| |
Reported by: tinderbox
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions. They no longer have any affect on
interrupts. This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.
Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit(). This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock. For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections. Note that I've also taken this
opportunity to push a few things into MD code rather than MI. For example,
critical_fork_exit() no longer exists. Instead, MD code ensures that new
threads have the correct state when they are created. Also, we no longer
try to fixup the idlethreads for APs in MI code. Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.
This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).
Reviewed by: grehan, cognet, arch@, others
Tested on: i386, alpha, sparc64, powerpc, arm, possibly more
|
|
|
|
|
|
|
|
|
|
|
|
| |
the type of object represented by the handle argument.
- Allow vm_mmap() to map device memory via cdev objects in addition to
vnodes and anonymous memory. Note that mmaping a cdev directly does not
currently perform any MAC checks like mapping a vnode does.
- Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the
cdev the ioctl is acting on rather than trying to find a suitable vnode
to map from.
Reviewed by: alc, arch@
|
| |
|
|
|
|
| |
kern_{read,write}v().
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD based on aue(4) it was picked by OpenBSD, then from OpenBSD ported
to NetBSD and finally NetBSD version merged with original one goes into
FreeBSD.
Obtained from: http://www.gank.org/freebsd/cdce/
NetBSD
OpenBSD
|
|
|
|
|
|
|
|
|
| |
This is mentioned in the Handbook but it is not as obvious to new
users why bpf is needed compared to the other largely self-explanatory
items in GENERIC.
PR: conf/40855
MFC after: 1 week
|
|
|
|
|
|
|
| |
architectures. This makes it possible to insert hooks before and
after the device attachment step.
Tested thanks to: marcel
|
|
|
|
| |
as well as saying that the alpha is wired up in a certain way.
|
|
|
|
|
|
|
|
|
|
| |
sys/bus_dma.h instead of being copied in every single arch. This slightly
reorders a flag that was specific to AXP and thus changes the ABI there.
The interface still relies on bus_space definitions found in <machine/bus.h>
so it cannot be included on its own yet, but that will be fixed at a later
date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to
allow for future MD augmentation of the API. sparc64 makes heavy use of
this right now due to its different bus_dma implemenation.
|
|
|
|
|
|
|
|
|
|
|
| |
OR the physical address with alpha_XXX_dmamap_or to get the DMA address,
like the name of the variable suggests. However, while we were doing
this correctly in the alpha_XXX_dmamap() macro, the busdma code added
the variable to the physical address instead of or'ing it. Fortunately
and if my math is not entirely wrong, you would need more than 128GB of
RAM and a device able to do DMA in 64bits to experience the bug.
Spotted by: cognet
|
| |
|
| |
|
|
|
|
|
|
|
| |
signal first and only then returning ENOSYS to match what real linux does.
PR: kern/74302
Submitted by: Travis Poppe <tlp@LiquidX.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
place.
This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.
By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild. Extension to other compilers is supposed
to be possible, of course.
Submitted by: netchild
Reviewed by: various developers on arch@, some time ago
|
|
|
|
|
|
| |
architectures. Pointed out by O'Brien, ScottL via email.
Reviewed by: obrien (various)
|
|
|
|
| |
protection to alpha/include/exec.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the semantics in that the returned filename to use is now a kernel
pointer rather than a user space pointer. This required changing the
arguments to the CHECKALT*() macros some and changing the various system
calls that used pathnames to use the kern_foo() functions that can accept
kernel space filename pointers instead of calling the system call
directly.
- Use kern_open(), kern_stat(), kern_lstat(), kern_fstat(), kern_access(),
kern_truncate(), kern_pathconf(), kern_execve(), kern_select(),
kern_setitimer(), kern_getitimer(), kern_statfs(), and kern_fstatfs().
Silence on: alpha@
|
|
|
|
|
|
|
| |
exec_copyin_args(), kern_execve(), and exec_free_args() rather than
execve() to eliminate stackgap use from Alpha's linux_execve().
Silence on: alpha@
|
|
|
|
|
|
| |
in emulation layers), since it appears to be too broad.
Requested by: rwatson
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
former is callable from user space and the latter from the kernel one. Make
kernel version take additional argument which tells if the respective call
should check for additional restrictions for sending signals to suid/sugid
applications or not.
Make all emulation layers using non-checked version, since signal numbers in
emulation layers can have different meaning that in native mode and such
protection can cause misbehaviour.
As a result remove LIBTHR from the signals allowed to be delivered to a
suid/sugid application.
Requested (sorta) by: rwatson
MFC after: 2 weeks
|
|
|
|
|
| |
Tested by: wilko
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
uses the i8237 without trying to emulate the PC architecture move
the register definitions for the i8237 chip into the central include
file for the chip, except for the PC98 case which is magic.
Add new isa_dmatc() function which tells us as cheaply as possible
if the terminal count has been reached for a given channel.
|
|
|
|
|
|
| |
malloc.h before proc.h on sparc64. Noticed by das@
Compiled on: alpha, amd64, i386, pc98, sparc64
|
| |
|