freebsd-dev/sys
Conrad Meyer 852c303b61 copystr(9): Move to deprecate (attempt #2)
This reapplies logical r360944 and r360946 (reverting r360955), with fixed
copystr() stand-in replacement macro.  Eventually the goal is to convert
consumers and kill the macro, but for a first step it helps if the macro is
correct.

Prior commit message:

Unlike the other copy*() functions, it does not serve to copy from one
address space to another or protect against potential faults.  It's just
an older incarnation of the now-more-common strlcpy().

Add a coccinelle script to tools/ which can be used to mechanically
convert existing instances where replacement with strlcpy is trivial.
In the two cases which matched, fuse_vfsops.c and union_vfsops.c, the
code was further refactored manually to simplify.

Replace the declaration of copystr() in systm.h with a small macro
wrapper around strlcpy (with correction from brooks@ -- thanks).

Remove N redundant MI implementations of copystr.  For MIPS, this
entailed inlining the assembler copystr into the only consumer,
copyinstr, and making the latter a leaf function.

Reviewed by:		jhb (earlier version)
Discussed with:		brooks (thanks!)
Differential Revision:	https://reviews.freebsd.org/D24672
2020-05-25 16:40:48 +00:00
..
amd64 copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
arm copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
arm64 copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
bsm bsm: add AUE_CLOSERANGE 2020-04-24 01:27:25 +00:00
cam cam: ANSIfy 0-argument function definitions 2020-05-16 14:33:08 +00:00
cddl Don't block on the range lock in zfs_getpages(). 2020-05-20 18:29:23 +00:00
compat linuxkpi: Fix mod_timer and del_timer_sync 2020-05-25 12:46:05 +00:00
conf copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
contrib Unbreak ARM64 kernel build after r361426 2020-05-23 23:10:03 +00:00
crypto Remove a workaround for GCM requests with an empty payload. 2020-05-22 20:52:36 +00:00
ddb kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
dev Introduce a driver for NXP LS1046A SoC AHCI. 2020-05-25 16:00:08 +00:00
dts allwinner: aw_thermal: Cope with DTS changes 2020-04-14 19:05:17 +00:00
fs copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Reimplement aliases in geom 2020-05-13 19:17:28 +00:00
gnu dts: Import DTS from Linux 5.6 2020-04-14 18:57:00 +00:00
i386 copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
isa
kern copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
kgssapi Remove support for Kernel GSS algorithms deprecated in r348875. 2020-04-10 23:08:41 +00:00
libkern libkern: Add arc4random_uniform 2020-05-23 17:51:06 +00:00
mips copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
modules Introduce support for Epson RX-8803 RTC. 2020-05-25 15:40:02 +00:00
net Move <add|del|change>_route() functions to route_ctl.c in preparation of 2020-05-23 19:06:57 +00:00
net80211 net80211: post RTM_IFINFO notification after toggling IFF_DRV_RUNNING 2020-05-22 11:25:45 +00:00
netgraph Fix Typo in ng_hci_le_connection_complete_ep struct. 2020-05-19 13:58:52 +00:00
netinet bbr: Use arc4random_uniform from libkern. 2020-05-23 19:52:20 +00:00
netinet6 Move <add|del|change>_route() functions to route_ctl.c in preparation of 2020-05-23 19:06:57 +00:00
netipsec Don't pass bogus keys down for NULL algorithms. 2020-05-02 01:00:29 +00:00
netpfil pf: Add a new zone for per-table entry counters. 2020-05-16 00:28:12 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Use epoch(9) for rtentries to simplify control plane operations. 2020-05-23 10:21:02 +00:00
nfsclient
nfsserver
nlm Make nfslockd depend on xdr. 2020-04-23 09:37:22 +00:00
ofed Convert OFED rtable interactions to the new routing KPI. 2020-04-15 13:06:55 +00:00
opencrypto Correct the minimum key length for Camellia to 16 bytes (128 bits). 2020-05-22 17:21:22 +00:00
powerpc copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
riscv copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
rpc Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
security Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
sys copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools
ufs Update name of description of vfs.ffs.setsize in comment. 2020-05-22 17:23:43 +00:00
vm Allocate UMA per-CPU counters earlier. 2020-05-14 16:06:54 +00:00
x86 amd64: Add a knob to flush RSB on context switches if machine has SMEP. 2020-05-20 22:00:31 +00:00
xdr Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile