The NetBSD Project

CVS log for src/sys/kern/kern_sig.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: netbsd-8


Revision 1.336.4.3 / (download) - annotate - [select for diffs], Thu Nov 29 14:59:56 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.336.4.2: +10 -3 lines
Diff to previous 1.336.4.2 (colored) to branchpoint 1.336 (colored) next main 1.337 (colored)

Pull up following revision(s) (requested by maxv in ticket #1113):

	sys/kern/kern_sig.c: revision 1.350

Fix kernel info leak, 4 bytes of padding at the end of struct sigaction.

        + Possible info leak: [len=32, leaked=4]
        | #0 0xffffffff80baf327 in kleak_copyout
        | #1 0xffffffff80bd9ca8 in sys___sigaction_sigtramp
        | #2 0xffffffff80259c42 in syscall

Revision 1.336.4.2 / (download) - annotate - [select for diffs], Thu Apr 12 13:42:48 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.336.4.1: +3 -4 lines
Diff to previous 1.336.4.1 (colored) to branchpoint 1.336 (colored)

Pull up following revision(s) (requested by kamil in ticket #713):

	sys/modules/procfs/Makefile: revision 1.4
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.98
	bin/ps/ps.1: revision 1.108
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.32
	sys/miscfs/procfs/procfs_vnops.c: revision 1.198
	sys/kern/sys_ptrace_common.c: revision 1.23
	sys/kern/sys_ptrace_common.c: revision 1.24
	sbin/mount_procfs/mount_procfs.8: revision 1.36
	sys/kern/sys_ptrace_common.c: revision 1.25
	sys/kern/sys_ptrace.c: revision 1.5
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.30
	sys/sys/proc.h: revision 1.342
	sys/kern/sys_ptrace_common.c: revision 1.26
	sys/miscfs/procfs/procfs_ctl.c: file removal
	sys/kern/sys_ptrace_common.c: revision 1.27
	sys/miscfs/procfs/procfs_subr.c: revision 1.109
	sys/kern/sys_ptrace_common.c: revision 1.28
	sys/secmodel/extensions/secmodel_extensions.c: revision 1.8
	sys/kern/sys_ptrace_common.c: revision 1.29
	sys/sys/ptrace.h: revision 1.62
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.45
	share/man/man9/kauth.9: revision 1.109
	sys/miscfs/procfs/files.procfs: revision 1.12
	sys/compat/netbsd32/netbsd32.h: revision 1.115
	sys/miscfs/procfs/procfs.h: revision 1.72
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.5
	sys/kern/kern_sig.c: revision 1.337
	sys/sys/kauth.h: revision 1.75
	sys/sys/sysctl.h: revision 1.224
	sys/kern/sys_ptrace_common.c: revision 1.30
	sys/kern/sys_ptrace_common.c: revision 1.31
	sys/kern/sys_ptrace_common.c: revision 1.32
	sys/kern/sys_ptrace_common.c: revision 1.33
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.20
	sys/kern/sys_ptrace_common.c: revision 1.34
	sys/kern/sys_ptrace_common.c: revision 1.36
	sys/kern/kern_proc.c: revision 1.207
	sys/kern/kern_exit.c: revision 1.269
	doc/TODO.ptrace: revision 1.29

Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed

PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

untangle the mess:
- factor out common code
- break each ptrace subcall to its own sub-function
  .. more to come ...
- reduce ifdef ugliness by moving it up top.
- factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it
- factor out PT_DUMPCORE
- factor out sendsig code
  .. more to come ...

handle siginfo requests for ptrace32

ptrace: Partially undo PT_{READ,WRITE}_{I,D} and unbreak these commands

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

Merge the code back; the problem was that since we are reading/writing
to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace.
provide separate read and write functions to accomodate register functions
that need a size argument.

don't ignore error from copyout_piod

Use the proper process (the tracee) to get information about lwps and
registers and the tracer for vmspace.

Add new sysctl(3) entry: security.models.extensions.user_set_dbregs

Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.

Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.

Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.

Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>

Revision 1.336.4.1 / (download) - annotate - [select for diffs], Thu Dec 21 19:41:15 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.336: +29 -25 lines
Diff to previous 1.336 (colored)

Pull up following revision(s) (requested by christos in ticket #443):
	sys/kern/kern_sig.c: revision 1.339
- Reset ignored or masked traps to avoid infinite loops
- If sigpost fails don't add an SDT_PROBE
ok (and author) chuq

Revision 1.336 / (download) - annotate - [select for diffs], Fri Apr 21 15:10:35 2017 UTC (7 years ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.335: +4 -8 lines
Diff to previous 1.335 (colored)

- Propagate the signal mask from the ucontext_t to the newly created thread
  as specified by _lwp_create(2)
- Reset the signal stack for threads created with _lwp_create(2)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>