head	1.9;
access;
symbols
	netbsd-11-0-RC6:1.9
	netbsd-11-0-RC5:1.9
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.2
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.7.26.1
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.32
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.3.6.1
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	thorpej-ifq:1.7.0.30
	thorpej-ifq-base:1.7
	thorpej-altq-separation:1.7.0.28
	thorpej-altq-separation-base:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.26
	netbsd-10-base:1.7
	bouyer-sunxi-drm:1.7.0.24
	bouyer-sunxi-drm-base:1.7
	netbsd-9-3-RELEASE:1.6
	thorpej-i2c-spi-conf2:1.7.0.22
	thorpej-i2c-spi-conf2-base:1.7
	thorpej-futex2:1.7.0.20
	thorpej-futex2-base:1.7
	thorpej-cfargs2:1.7.0.18
	thorpej-cfargs2-base:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.16
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.7.0.14
	cjep_staticlib_x-base:1.7
	thorpej-i2c-spi-conf:1.7.0.12
	thorpej-i2c-spi-conf-base:1.7
	thorpej-cfargs:1.7.0.10
	thorpej-cfargs-base:1.7
	thorpej-futex:1.7.0.8
	thorpej-futex-base:1.7
	netbsd-9-1-RELEASE:1.6
	bouyer-xenpvh-base2:1.7
	phil-wifi-20200421:1.7
	bouyer-xenpvh-base1:1.7
	phil-wifi-20200411:1.7
	bouyer-xenpvh:1.7.0.6
	bouyer-xenpvh-base:1.7
	is-mlppp:1.7.0.4
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.3.6.1
	ad-namecache-base3:1.7
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	ad-namecache-base2:1.7
	ad-namecache-base1:1.7
	ad-namecache:1.7.0.2
	ad-namecache-base:1.7
	netbsd-9-0-RC1:1.6
	phil-wifi-20191119:1.7
	netbsd-9:1.6.0.4
	netbsd-9-base:1.6
	phil-wifi-20190609:1.6
	netbsd-8-1-RELEASE:1.3.6.1
	netbsd-8-1-RC1:1.3.6.1
	isaki-audio2:1.6.0.2
	isaki-audio2-base:1.6
	pgoyette-compat-merge-20190127:1.4
	pgoyette-compat-20190127:1.4
	pgoyette-compat-20190118:1.4
	pgoyette-compat-1226:1.4
	pgoyette-compat-1126:1.4
	pgoyette-compat-1020:1.4
	pgoyette-compat-0930:1.4
	pgoyette-compat-0906:1.4
	netbsd-7-2-RELEASE:1.2
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.3.6.1
	phil-wifi:1.4.0.4
	phil-wifi-base:1.4
	pgoyette-compat-0625:1.4
	netbsd-8-0-RC2:1.3.6.1
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	netbsd-8-0-RC1:1.3.6.1
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	netbsd-7-1-2-RELEASE:1.2
	pgoyette-compat:1.4.0.2
	pgoyette-compat-base:1.4
	netbsd-7-1-1-RELEASE:1.2
	tls-maxphys-base-20171202:1.4
	matt-nb8-mediatek:1.3.0.10
	matt-nb8-mediatek-base:1.3
	nick-nhusb-base-20170825:1.3
	perseant-stdc-iso10646:1.3.0.8
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.6
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.4
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	jdolecek-ncq:1.3.0.2
	jdolecek-ncq-base:1.3
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.2.0.46
	netbsd-7-1-RELEASE:1.2
	netbsd-7-1-RC2:1.2
	nick-nhusb-base-20170204:1.2
	netbsd-7-nhusb-base-20170116:1.2
	bouyer-socketcan:1.2.0.44
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.2
	nick-nhusb-base-20161204:1.2
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.2
	nick-nhusb-base-20161004:1.2
	localcount-20160914:1.2
	netbsd-7-nhusb:1.2.0.42
	netbsd-7-nhusb-base:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.40
	pgoyette-localcount-base:1.2
	nick-nhusb-base-20160907:1.2
	nick-nhusb-base-20160529:1.2
	netbsd-7-0-1-RELEASE:1.2
	nick-nhusb-base-20160422:1.2
	nick-nhusb-base-20160319:1.2
	nick-nhusb-base-20151226:1.2
	netbsd-7-0:1.2.0.38
	netbsd-7-0-RELEASE:1.2
	nick-nhusb-base-20150921:1.2
	netbsd-7-0-RC3:1.2
	netbsd-7-0-RC2:1.2
	netbsd-7-0-RC1:1.2
	nick-nhusb-base-20150606:1.2
	nick-nhusb-base-20150406:1.2
	nick-nhusb:1.2.0.36
	nick-nhusb-base:1.2
	netbsd-5-2-3-RELEASE:1.1
	netbsd-5-1-5-RELEASE:1.1
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.2.0.34
	netbsd-7-base:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.2.0.32
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-5-2-2-RELEASE:1.1
	netbsd-5-1-4-RELEASE:1.1
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	netbsd-5-2-1-RELEASE:1.1
	netbsd-5-1-3-RELEASE:1.1
	rmind-smpnet-nbase:1.2
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.2
	riastradh-drm2-base1:1.2
	riastradh-drm2:1.2.0.30
	riastradh-drm2-base:1.2
	rmind-smpnet:1.2.0.22
	rmind-smpnet-base:1.2
	netbsd-6-1:1.2.0.28
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	khorben-n900:1.2.0.26
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.2.0.24
	agc-symver-base:1.2
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.1.0.32
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.1
	netbsd-5-2-RC1:1.1
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.20
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.18
	tls-maxphys-base:1.2
	matt-nb6-plus:1.2.0.16
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	jmcneill-usbmp-base10:1.2
	yamt-pagecache-base5:1.2
	jmcneill-usbmp-base9:1.2
	yamt-pagecache-base4:1.2
	jmcneill-usbmp-base8:1.2
	jmcneill-usbmp-base7:1.2
	jmcneill-usbmp-base6:1.2
	jmcneill-usbmp-base5:1.2
	jmcneill-usbmp-base4:1.2
	jmcneill-usbmp-base3:1.2
	jmcneill-usbmp-pre-base2:1.2
	jmcneill-usbmp-base2:1.2
	netbsd-6:1.2.0.14
	netbsd-6-base:1.2
	netbsd-5-1-2-RELEASE:1.1
	netbsd-5-1-1-RELEASE:1.1
	jmcneill-usbmp:1.2.0.12
	jmcneill-usbmp-base:1.2
	jmcneill-audiomp3:1.2.0.10
	jmcneill-audiomp3-base:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.8
	yamt-pagecache-base:1.2
	rmind-uvmplock-nbase:1.2
	cherry-xenmp:1.2.0.6
	cherry-xenmp-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.4
	bouyer-quota2-base:1.2
	jruoho-x86intr:1.2.0.2
	jruoho-x86intr-base:1.2
	matt-mips64-premerge-20101231:1.2
	matt-nb5-mips64-premerge-20101231:1.1
	matt-nb5-pq3:1.1.0.30
	matt-nb5-pq3-base:1.1
	netbsd-5-1:1.1.0.28
	netbsd-5-1-RELEASE:1.1
	uebayasi-xip-base4:1.2
	uebayasi-xip-base3:1.2
	yamt-nfs-mp-base11:1.2
	netbsd-5-1-RC4:1.1
	matt-nb5-mips64-k15:1.1
	uebayasi-xip-base2:1.2
	yamt-nfs-mp-base10:1.2
	netbsd-5-1-RC3:1.1
	netbsd-5-1-RC2:1.1
	uebayasi-xip-base1:1.1
	netbsd-5-1-RC1:1.1
	rmind-uvmplock:1.1.0.26
	rmind-uvmplock-base:1.2
	yamt-nfs-mp-base9:1.1
	uebayasi-xip:1.1.0.24
	uebayasi-xip-base:1.1
	netbsd-5-0-2-RELEASE:1.1
	matt-nb5-mips64-premerge-20091211:1.1
	matt-premerge-20091211:1.1
	yamt-nfs-mp-base8:1.1
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1
	matt-nb4-mips64-k7-u2a-k9b:1.1
	matt-nb5-mips64-u1-k1-k5:1.1
	yamt-nfs-mp-base7:1.1
	matt-nb5-mips64:1.1.0.22
	netbsd-5-0-1-RELEASE:1.1
	jymxensuspend-base:1.1
	yamt-nfs-mp-base6:1.1
	yamt-nfs-mp-base5:1.1
	yamt-nfs-mp-base4:1.1
	jym-xensuspend-nbase:1.1
	yamt-nfs-mp:1.1.0.20
	yamt-nfs-mp-base3:1.1
	nick-hppapmap-base4:1.1
	nick-hppapmap-base3:1.1
	netbsd-5-0:1.1.0.18
	netbsd-5-0-RELEASE:1.1
	netbsd-5-0-RC4:1.1
	netbsd-5-0-RC3:1.1
	nick-hppapmap-base2:1.1
	netbsd-5-0-RC2:1.1
	jym-xensuspend:1.1.0.16
	jym-xensuspend-base:1.1
	netbsd-5-0-RC1:1.1
	haad-dm-base2:1.1
	haad-nbase2:1.1
	ad-audiomp2:1.1.0.14
	ad-audiomp2-base:1.1
	netbsd-5:1.1.0.12
	netbsd-5-base:1.1
	nick-hppapmap:1.1.0.10
	nick-hppapmap-base:1.1
	matt-mips64-base2:1.1
	haad-dm-base1:1.1
	wrstuden-revivesa-base-4:1.1
	wrstuden-revivesa-base-3:1.1
	wrstuden-revivesa:1.1.0.8
	wrstuden-revivesa-base-2:1.1
	haad-dm:1.1.0.6
	haad-dm-base:1.1
	simonb-wapbl-base:1.1
	simonb-wapbl:1.1.0.4
	simonb-wapbl-nbase:1.1
	mjf-devfs2-base:1.1
	mjf-devfs2:1.1.0.2;
locks; strict;
comment	@# @;


1.9
date	2024.09.14.01.36.11;	author pgoyette;	state Exp;
branches;
next	1.8;
commitid	eXBZZgZ1spgBiIpF;

1.8
date	2024.09.09.15.52.31;	author pgoyette;	state Exp;
branches;
next	1.7;
commitid	vcqZ86KhQ8koc9pF;

1.7
date	2019.09.26.17.34.56;	author christos;	state Exp;
branches
	1.7.26.1
	1.7.32.1;
next	1.6;
commitid	cvQNqrMFcn8RWxEB;

1.6
date	2019.03.31.02.24.47;	author christos;	state Exp;
branches;
next	1.5;
commitid	7kabBwonp2QkFshB;

1.5
date	2019.02.17.04.05.56;	author rin;	state Exp;
branches;
next	1.4;
commitid	viEUadQYccaOx4cB;

1.4
date	2017.08.28.00.46.07;	author kamil;	state Exp;
branches
	1.4.4.1;
next	1.3;
commitid	MFC5MK9lwTGREU4A;

1.3
date	2017.03.30.20.16.42;	author christos;	state Exp;
branches
	1.3.6.1;
next	1.2;
commitid	kI0dxa5MEr4U5CLz;

1.2
date	2010.07.08.20.32.12;	author rmind;	state Exp;
branches
	1.2.18.1
	1.2.36.1
	1.2.40.1
	1.2.44.1;
next	1.1;

1.1
date	2008.06.28.16.11.36;	author rumble;	state Exp;
branches
	1.1.2.1
	1.1.4.1
	1.1.8.1
	1.1.20.1
	1.1.24.1
	1.1.26.1;
next	;

1.7.26.1
date	2024.09.13.14.09.51;	author martin;	state Exp;
branches;
next	;
commitid	B7OzQaMdcrXovEpF;

1.7.32.1
date	2025.08.02.05.57.46;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.4.4.1
date	2019.06.10.22.09.36;	author christos;	state Exp;
branches;
next	1.4.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.4.4.2
date	2020.04.13.08.05.13;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.3.6.1
date	2018.04.12.13.42.48;	author martin;	state Exp;
branches;
next	;
commitid	V8a6bWK6bpwsL9yA;

1.2.18.1
date	2017.12.03.11.38.59;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.2.36.1
date	2017.08.28.17.53.10;	author skrll;	state Exp;
branches;
next	;
commitid	UQQpnjvcNkUZn05A;

1.2.40.1
date	2017.04.26.02.53.28;	author pgoyette;	state Exp;
branches;
next	;
commitid	ojV02aOSdzvBqZOz;

1.2.44.1
date	2017.04.21.16.54.04;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.2.1
date	2008.06.28.16.11.36;	author mjf;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2008.06.29.09.33.17;	author mjf;	state Exp;
branches;
next	;

1.1.4.1
date	2008.06.28.16.11.36;	author simonb;	state dead;
branches;
next	1.1.4.2;

1.1.4.2
date	2008.07.03.18.38.20;	author simonb;	state Exp;
branches;
next	;

1.1.8.1
date	2008.06.28.16.11.36;	author wrstuden;	state dead;
branches;
next	1.1.8.2;

1.1.8.2
date	2008.09.18.04.36.59;	author wrstuden;	state Exp;
branches;
next	;

1.1.20.1
date	2008.06.28.16.11.36;	author yamt;	state dead;
branches;
next	1.1.20.2;

1.1.20.2
date	2009.05.04.08.14.12;	author yamt;	state Exp;
branches;
next	1.1.20.3;

1.1.20.3
date	2010.08.11.22.54.51;	author yamt;	state Exp;
branches;
next	;

1.1.24.1
date	2010.08.17.06.47.41;	author uebayasi;	state Exp;
branches;
next	;

1.1.26.1
date	2011.03.05.20.55.47;	author rmind;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Update module build options to match with GENERIC kernel options
@
text
@#	$NetBSD: Makefile,v 1.8 2024/09/09 15:52:31 pgoyette Exp $

.include "../Makefile.inc"

.PATH:	${S}/miscfs/procfs ${S} ${S}/arch/${MACHINE}/${MACHINE} \
	${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
.PATH:  ${S}/arch/x86/x86
.endif

# enable the SYSV and MQUEUE linux nodes
COPTS+=	-D SYSVSHM -D SYSVSEM -D SYSVMSG -D MQUEUE

KMOD=	procfs
SRCS=	procfs_note.c procfs_status.c procfs_subr.c \
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_limit.c \
	procfs_linux.c \
	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
	procfs_mem.c procfs_fd.c procfs_auxv.c

.include <bsd.kmodule.mk>
@


1.8
log
@Include the SYSV_* entries for modular procfs
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2019/09/26 17:34:56 christos Exp $
d12 2
a13 2
# enable the SYSV linux nodes
COPTS+=	-D SYSVSHM -D SYSVSEM -D SYSVMSG
@


1.7
log
@Kill WARNS = 3
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2019/03/31 02:24:47 christos Exp $
d12 3
@


1.7.32.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2024/09/14 01:36:11 pgoyette Exp $
a11 3
# enable the SYSV and MQUEUE linux nodes
COPTS+=	-D SYSVSHM -D SYSVSEM -D SYSVMSG -D MQUEUE

@


1.7.26.1
log
@Pull up following revision(s) (requested by pgoyette in ticket #857):

	sys/modules/procfs/Makefile: revision 1.8
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.118
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.119

procfs grew a new dependency

Include the SYSV_* entries for modular procfs

Now we have another dependency for the SYSV_* stuff.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2019/09/26 17:34:56 christos Exp $
a11 3
# enable the SYSV linux nodes
COPTS+=	-D SYSVSHM -D SYSVSEM -D SYSVMSG

@


1.6
log
@Add the limit node
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2019/02/17 04:05:56 rin Exp $
a18 2
WARNS=	3

@


1.5
log
@Bump default value of WARNS for modules from 3 to 5, and
explicitly set WARNS for modules that fail with WARNS=5.

Also, turn on -Wno-missing-noreturn for clang for some files.

At the moment, among ~ 360 modules,
- 2 (lua and zfs) need WARNS=0
- 1 (solaris) needs WARNS=1
- 136 need WARNS=3 (mostly due to sign-compare)
- 4 need WARNS=4
- others can be compiled with WARNS=5

Discussed on tech-kern.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2017/08/28 00:46:07 kamil Exp $
d14 2
a15 1
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c \
@


1.4
log
@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>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2017/03/30 20:16:42 christos Exp $
d18 2
@


1.4.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2019/03/31 02:24:47 christos Exp $
d14 1
a14 2
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_limit.c \
	procfs_linux.c \
a17 2
WARNS=	3

@


1.4.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
#	$NetBSD$
d19 2
@


1.3
log
@Add auxv
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2010/07/08 20:32:12 rmind Exp $
d13 1
a13 1
SRCS=	procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
@


1.3.6.1
log
@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>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2017/03/30 20:16:42 christos Exp $
d13 1
a13 1
SRCS=	procfs_note.c procfs_status.c procfs_subr.c \
@


1.2
log
@Sync procfs module with kernel change for x86 MD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2008/06/28 16:11:36 rumble Exp $
d16 1
a16 1
	procfs_mem.c procfs_fd.c
@


1.2.18.1
log
@update from HEAD
@
text
@d1 1
a1 1
#	$NetBSD$
d13 1
a13 1
SRCS=	procfs_note.c procfs_status.c procfs_subr.c \
d16 1
a16 1
	procfs_mem.c procfs_fd.c procfs_auxv.c
@


1.2.36.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2017/03/30 20:16:42 christos Exp $
d16 1
a16 1
	procfs_mem.c procfs_fd.c procfs_auxv.c
@


1.2.40.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2017/03/30 20:16:42 christos Exp $
d16 1
a16 1
	procfs_mem.c procfs_fd.c procfs_auxv.c
@


1.2.44.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2017/03/30 20:16:42 christos Exp $
d16 1
a16 1
	procfs_mem.c procfs_fd.c procfs_auxv.c
@


1.1
log
@Add of bunch of file system modules.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2003/01/03 13:22:23 christos Exp $
d8 4
@


1.1.26.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD$
a7 4
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
.PATH:  ${S}/arch/x86/x86
.endif

@


1.1.24.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD$
a7 4
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
.PATH:  ${S}/arch/x86/x86
.endif

@


1.1.20.1
log
@file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:14:12 +0000
@
text
@d1 14
@


1.1.20.2
log
@sync with head.
@
text
@a0 14
#	$NetBSD$

.include "../Makefile.inc"

.PATH:	${S}/miscfs/procfs ${S} ${S}/arch/${MACHINE}/${MACHINE} \
	${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}

KMOD=	procfs
SRCS=	procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c \
	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
	procfs_mem.c procfs_fd.c

.include <bsd.kmodule.mk>
@


1.1.20.3
log
@sync with head.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1.20.2 2009/05/04 08:14:12 yamt Exp $
a7 4
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
.PATH:  ${S}/arch/x86/x86
.endif

@


1.1.8.1
log
@file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:36:59 +0000
@
text
@d1 14
@


1.1.8.2
log
@Sync with wrstuden-revivesa-base-2.
@
text
@a0 14
#	$NetBSD: Makefile,v 1.1 2008/06/28 16:11:36 rumble Exp $

.include "../Makefile.inc"

.PATH:	${S}/miscfs/procfs ${S} ${S}/arch/${MACHINE}/${MACHINE} \
	${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}

KMOD=	procfs
SRCS=	procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c \
	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
	procfs_mem.c procfs_fd.c

.include <bsd.kmodule.mk>
@


1.1.4.1
log
@file Makefile was added on branch simonb-wapbl on 2008-07-03 18:38:20 +0000
@
text
@d1 14
@


1.1.4.2
log
@Sync with head.
@
text
@a0 14
#	$NetBSD: Makefile,v 1.1 2008/06/28 16:11:36 rumble Exp $

.include "../Makefile.inc"

.PATH:	${S}/miscfs/procfs ${S} ${S}/arch/${MACHINE}/${MACHINE} \
	${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}

KMOD=	procfs
SRCS=	procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c \
	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
	procfs_mem.c procfs_fd.c

.include <bsd.kmodule.mk>
@


1.1.2.1
log
@file Makefile was added on branch mjf-devfs2 on 2008-06-29 09:33:17 +0000
@
text
@d1 14
@


1.1.2.2
log
@Sync with HEAD.
@
text
@a0 14
#	$NetBSD$

.include "../Makefile.inc"

.PATH:	${S}/miscfs/procfs ${S} ${S}/arch/${MACHINE}/${MACHINE} \
	${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}

KMOD=	procfs
SRCS=	procfs_ctl.c procfs_note.c procfs_status.c procfs_subr.c \
	procfs_vfsops.c procfs_vnops.c procfs_cmdline.c procfs_linux.c \
	procfs_machdep.c procfs_map.c procfs_regs.c procfs_fpregs.c \
	procfs_mem.c procfs_fd.c

.include <bsd.kmodule.mk>
@


