svn commit: r366822 - in head: share/man/man5 usr.bin/login
Author: imp Date: Mon Oct 19 01:16:39 2020 New Revision: 366822 URL: https://svnweb.freebsd.org/changeset/base/366822 Log: Add more explicit instructions about updating motd Not that you can regenerate the motd by editing motd.template and running 'service motd restart' rather than rebooting. Small wordsmithing by me, and updated the example from FreeBSD 2.1.6.1 release to 12.1 release. Submitted by: Dan Mack Modified: head/share/man/man5/motd.5 head/usr.bin/login/motd.template Modified: head/share/man/man5/motd.5 == --- head/share/man/man5/motd.5 Sun Oct 18 23:58:40 2020(r366821) +++ head/share/man/man5/motd.5 Mon Oct 19 01:16:39 2020(r366822) @@ -3,7 +3,7 @@ .\" This file is in the public domain. .\" $FreeBSD$ .\" -.Dd July 20, 2019 +.Dd October 18, 2020 .Dt MOTD 5 .Os .Sh NAME @@ -22,6 +22,14 @@ prepended to and the contents are written to .Pa /var/run/motd . .Pp +.Pa /var/run/motd +can be updated without a system reboot by manually restarting the +motd service after updating +.Pa /etc/motd.template: +.Bd -literal -offset -ident -compact +service motd restart +.Ed +.Pp Individual users may suppress the display of this file by creating a file named .Dq Pa .hushlogin @@ -39,7 +47,7 @@ Suppresses output of .El .Sh EXAMPLES .Bd -literal -FreeBSD 2.1.6.1-RELEASE (GENERIC) #0: Sun Dec 29 03:08:31 PST 1996 +FreeBSD 12.1-RELEASE (GENERIC) #0: Sun Dec 29 03:08:31 PST 2019 /home is full. Please cleanup your directories. .Ed Modified: head/usr.bin/login/motd.template == --- head/usr.bin/login/motd.templateSun Oct 18 23:58:40 2020 (r366821) +++ head/usr.bin/login/motd.templateMon Oct 19 01:16:39 2020 (r366822) @@ -17,4 +17,4 @@ Please include that output and any error messages when Introduction to manual pages: man man FreeBSD directory layout: man hier -Edit /etc/motd.template to change this login announcement. +To change this login announcement, see motd(5). ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366821 - in head: lib/libbe tools/build/mk
Author: kevans Date: Sun Oct 18 23:58:40 2020 New Revision: 366821 URL: https://svnweb.freebsd.org/changeset/base/366821 Log: libbe(3): install MLINKS for all of the functions provided MFC after:1 week Modified: head/lib/libbe/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/lib/libbe/Makefile == --- head/lib/libbe/Makefile Sun Oct 18 23:42:00 2020(r366820) +++ head/lib/libbe/Makefile Sun Oct 18 23:58:40 2020(r366821) @@ -11,6 +11,41 @@ SHLIB_MINOR= 0 SRCS= be.c be_access.c be_error.c be_info.c INCS= be.h MAN= libbe.3 +MLINKS+= libbe.3 be_activate.3 +MLINKS+= libbe.3 be_active_name.3 +MLINKS+= libbe.3 be_active_path.3 +MLINKS+= libbe.3 be_create_depth.3 +MLINKS+= libbe.3 be_create_from_existing_snap.3 +MLINKS+= libbe.3 be_create_from_existing.3 +MLINKS+= libbe.3 be_create.3 +MLINKS+= libbe.3 be_deactivate.3 +MLINKS+= libbe.3 be_destroy.3 +MLINKS+= libbe.3 be_exists.3 +MLINKS+= libbe.3 be_export.3 +MLINKS+= libbe.3 be_get_bootenv_props.3 +MLINKS+= libbe.3 be_get_dataset_props.3 +MLINKS+= libbe.3 be_get_dataset_snapshots.3 +MLINKS+= libbe.3 be_import.3 +MLINKS+= libbe.3 be_is_auto_snapshot_name.3 +MLINKS+= libbe.3 be_mount.3 +MLINKS+= libbe.3 be_mounted_at.3 +MLINKS+= libbe.3 be_nextboot_name.3 +MLINKS+= libbe.3 be_nextboot_path.3 +MLINKS+= libbe.3 be_nicenum.3 +MLINKS+= libbe.3 be_prop_list_alloc.3 +MLINKS+= libbe.3 be_prop_list_free.3 +MLINKS+= libbe.3 be_rename.3 +MLINKS+= libbe.3 be_root_concat.3 +MLINKS+= libbe.3 be_root_path.3 +MLINKS+= libbe.3 be_snapshot.3 +MLINKS+= libbe.3 be_unmount.3 +MLINKS+= libbe.3 be_validate_name.3 +MLINKS+= libbe.3 be_validate_snap.3 +MLINKS+= libbe.3 libbe_close.3 +MLINKS+= libbe.3 libbe_errno.3 +MLINKS+= libbe.3 libbe_error_description.3 +MLINKS+= libbe.3 libbe_init.3 +MLINKS+= libbe.3 libbe_print_on_error.3 LIBADD+= zfs LIBADD+= nvpair Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Oct 18 23:42:00 2020(r366820) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Oct 18 23:58:40 2020(r366821) @@ -1172,6 +1172,41 @@ OLD_LIBS+=usr/lib32/libzpool.so.2 OLD_FILES+=usr/sbin/zfsd OLD_FILES+=usr/sbin/zhack OLD_FILES+=usr/sbin/zdb +OLD_FILES+=usr/share/man/man3/be_activate.3.gz +OLD_FILES+=usr/share/man/man3/be_active_name.3.gz +OLD_FILES+=usr/share/man/man3/be_active_path.3.gz +OLD_FILES+=usr/share/man/man3/be_create_depth.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing_snap.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing.3.gz +OLD_FILES+=usr/share/man/man3/be_create.3.gz +OLD_FILES+=usr/share/man/man3/be_deactivate.3.gz +OLD_FILES+=usr/share/man/man3/be_destroy.3.gz +OLD_FILES+=usr/share/man/man3/be_exists.3.gz +OLD_FILES+=usr/share/man/man3/be_export.3.gz +OLD_FILES+=usr/share/man/man3/be_get_bootenv_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_snapshots.3.gz +OLD_FILES+=usr/share/man/man3/be_import.3.gz +OLD_FILES+=usr/share/man/man3/be_is_auto_snapshot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_mount.3.gz +OLD_FILES+=usr/share/man/man3/be_mounted_at.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_path.3.gz +OLD_FILES+=usr/share/man/man3/be_nicenum.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_alloc.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_free.3.gz +OLD_FILES+=usr/share/man/man3/be_rename.3.gz +OLD_FILES+=usr/share/man/man3/be_root_concat.3.gz +OLD_FILES+=usr/share/man/man3/be_root_path.3.gz +OLD_FILES+=usr/share/man/man3/be_snapshot.3.gz +OLD_FILES+=usr/share/man/man3/be_unmount.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_name.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_snap.3.gz +OLD_FILES+=usr/share/man/man3/libbe_close.3.gz +OLD_FILES+=usr/share/man/man3/libbe_errno.3.gz +OLD_FILES+=usr/share/man/man3/libbe_error_description.3.gz +OLD_FILES+=usr/share/man/man3/libbe_init.3.gz +OLD_FILES+=usr/share/man/man3/libbe_print_on_error.3.gz OLD_FILES+=usr/share/man/man3/libbe.3.gz OLD_FILES+=usr/share/man/man5/zpool-features.5.gz OLD_FILES+=usr/share/man/man8/bectl.8.gz ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366820 - head/lib/libbe
Author: kevans Date: Sun Oct 18 23:42:00 2020 New Revision: 366820 URL: https://svnweb.freebsd.org/changeset/base/366820 Log: libbe(3): document be_snapshot() While toying around with lua bindings for libbe(3), I discovered that I apparently never documented this, despite having documented be_is_auto_snapshot_name that references it. MFC after:1 week Modified: head/lib/libbe/libbe.3 Modified: head/lib/libbe/libbe.3 == --- head/lib/libbe/libbe.3 Sun Oct 18 23:32:47 2020(r366819) +++ head/lib/libbe/libbe.3 Sun Oct 18 23:42:00 2020(r366820) @@ -58,6 +58,9 @@ .Ft const char * Ns .Fn be_root_path "libbe_handle_t *hdl" .Pp +.Ft int Ns +.Fn be_snapshot "libbe_handle_t *hdl" "const char *be_name" "const char *snap_name" "bool recursive" "char *result" +.Pp .Ft bool Ns .Fn be_is_auto_snapshot_name "libbe_handle_t *hdl" "const char *snap" .Pp @@ -218,6 +221,30 @@ active on reboot. The .Fn be_root_path function returns the boot environment root path. +.Pp +The +.Fn be_snapshot +function creates a snapshot of +.Fa be_name +named +.Fa snap_name . +A +.Dv NULL +.Fa snap_name +may be used, indicating that +.Fn be_snaphot +should derive the snapshot name from the current date and time. +If +.Fa recursive +is set, then +.Fn be_snapshot +will recursively snapshot the dataset. +If +.Fa result +is not +.Dv NULL , +then it will be populated with the final +.Dq Fa be_name Ns @ Ns Fa snap_name . .Pp The .Fn be_is_auto_snapshot_name ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366819 - head/lib/libbe
Author: kevans Date: Sun Oct 18 23:32:47 2020 New Revision: 366819 URL: https://svnweb.freebsd.org/changeset/base/366819 Log: libbe(3): const'ify a couple arguments libbe will never need to mutate these as we either process them into a local buffer or we just don't touch them and write to a separate out argument. MFC after:1 week Modified: head/lib/libbe/be.h head/lib/libbe/be_access.c head/lib/libbe/be_info.c head/lib/libbe/libbe.3 Modified: head/lib/libbe/be.h == --- head/lib/libbe/be.h Sun Oct 18 22:37:58 2020(r366818) +++ head/lib/libbe/be.h Sun Oct 18 23:32:47 2020(r366819) @@ -112,8 +112,8 @@ typedef enum { BE_MNT_DEEP = 1 << 1, } be_mount_opt_t; -int be_mount(libbe_handle_t *, char *, char *, int, char *); -int be_unmount(libbe_handle_t *, char *, int); +int be_mount(libbe_handle_t *, const char *, const char *, int, char *); +int be_unmount(libbe_handle_t *, const char *, int); int be_mounted_at(libbe_handle_t *, const char *path, nvlist_t *); /* Error related functions: be_error.c */ @@ -125,7 +125,7 @@ void libbe_print_on_error(libbe_handle_t *, bool); int be_root_concat(libbe_handle_t *, const char *, char *); int be_validate_name(libbe_handle_t * __unused, const char *); int be_validate_snap(libbe_handle_t *, const char *); -int be_exists(libbe_handle_t *, char *); +int be_exists(libbe_handle_t *, const char *); int be_export(libbe_handle_t *, const char *, int fd); int be_import(libbe_handle_t *, const char *, int fd); Modified: head/lib/libbe/be_access.c == --- head/lib/libbe/be_access.c Sun Oct 18 22:37:58 2020(r366818) +++ head/lib/libbe/be_access.c Sun Oct 18 23:32:47 2020(r366819) @@ -232,8 +232,8 @@ be_mounted_at(libbe_handle_t *lbh, const char *path, n * usage */ int -be_mount(libbe_handle_t *lbh, char *bootenv, char *mountpoint, int flags, -char *result_loc) +be_mount(libbe_handle_t *lbh, const char *bootenv, const char *mountpoint, +int flags, char *result_loc) { char be[BE_MAXPATHLEN]; char mnt_temp[BE_MAXPATHLEN]; @@ -288,7 +288,7 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou * usage */ int -be_unmount(libbe_handle_t *lbh, char *bootenv, int flags) +be_unmount(libbe_handle_t *lbh, const char *bootenv, int flags) { int err; char be[BE_MAXPATHLEN]; Modified: head/lib/libbe/be_info.c == --- head/lib/libbe/be_info.cSun Oct 18 22:37:58 2020(r366818) +++ head/lib/libbe/be_info.cSun Oct 18 23:32:47 2020(r366819) @@ -305,7 +305,7 @@ be_prop_list_free(nvlist_t *be_list) * Usage */ int -be_exists(libbe_handle_t *lbh, char *be) +be_exists(libbe_handle_t *lbh, const char *be) { char buf[BE_MAXPATHLEN]; Modified: head/lib/libbe/libbe.3 == --- head/lib/libbe/libbe.3 Sun Oct 18 22:37:58 2020(r366818) +++ head/lib/libbe/libbe.3 Sun Oct 18 23:32:47 2020(r366819) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 22, 2020 +.Dd August 18, 2020 .Dt LIBBE 3 .Os .Sh NAME @@ -94,13 +94,13 @@ .\"BE_MNT_DEEP = 1 << 1, .\" } be_mount_opt_t .Ft int -.Fn be_mount "libbe_handle_t *hdl" "char *be_name" "char *mntpoint" "int flags" "char *result" +.Fn be_mount "libbe_handle_t *hdl" "const char *be_name" "const char *mntpoint" "int flags" "char *result" .Pp .Ft int .Fn be_mounted_at "libbe_handle_t *hdl" "const char *path" "nvlist_t *details" .Pp .Ft int -.Fn be_unmount "libbe_handle_t *hdl" "char *be_name" "int flags" +.Fn be_unmount "libbe_handle_t *hdl" "const char *be_name" "int flags" .Pp .Ft int .Fn libbe_errno "libbe_handle_t *hdl" @@ -121,7 +121,7 @@ .Fn be_validate_snap "libbe_handle_t *hdl" "const char *snap" .Pp .Ft int -.Fn be_exists "libbe_handle_t *hdl" "char *be_name" +.Fn be_exists "libbe_handle_t *hdl" "const char *be_name" .Pp .Ft int .Fn be_export "libbe_handle_t *hdl" "const char *be_name" "int fd" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366818 - head/sys/conf
Author: adrian Date: Sun Oct 18 22:37:58 2020 New Revision: 366818 URL: https://svnweb.freebsd.org/changeset/base/366818 Log: [zfs] Remove a non-existent directory in the build infra This directory doesn't exist and causes gcc-6.4 to complain about a non-existent include directory Approved by: kevans, imp Differential Revision:https://reviews.freebsd.org/D26846 Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Sun Oct 18 21:34:04 2020(r366817) +++ head/sys/conf/kmod.mk Sun Oct 18 22:37:58 2020(r366818) @@ -540,7 +540,6 @@ OPENZFS_CFLAGS= \ -nostdinc \ -DSMP \ -I${ZINCDIR} \ - -I${ZINCDIR}/spl \ -I${ZINCDIR}/os/freebsd \ -I${ZINCDIR}/os/freebsd/spl \ -I${ZINCDIR}/os/freebsd/zfs \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366817 - head/sys/net80211
Author: bz Date: Sun Oct 18 21:34:04 2020 New Revision: 366817 URL: https://svnweb.freebsd.org/changeset/base/366817 Log: net80211: factor out the priv(9) checks into OS specifc code. Factor out the priv(9) checks into OS specifc code so other OSes can equally implement them. This sorts out those XXX in the net80211 code. We provide 3 arguments (cmd, vap, ifp) where available to the functions, in order to allow other OSes to use that data but also in case we'd add auditing to these check to have the information available. For now the arguments are marked __unused. PR: 249403 Reported by: martin(NetBSD) Reviewed by: adrian, martin(NetBSD) MFC after:10 days Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision:https://reviews.freebsd.org/D26541 Modified: head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_freebsd.c == --- head/sys/net80211/ieee80211_freebsd.c Sun Oct 18 20:54:15 2020 (r366816) +++ head/sys/net80211/ieee80211_freebsd.c Sun Oct 18 21:34:04 2020 (r366817) @@ -75,6 +75,42 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, static const char wlanname[] = "wlan"; static struct if_clone *wlan_cloner; +/* + * priv(9) NET80211 checks. + * Return 0 if operation is allowed, E* (usually EPERM) otherwise. + */ +int +ieee80211_priv_check_vap_getkey(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_GETKEY)); +} + +int +ieee80211_priv_check_vap_manage(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_MANAGE)); +} + +int +ieee80211_priv_check_vap_setmac(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_SETMAC)); +} + +int +ieee80211_priv_check_create_vap(u_long cmd __unused, +struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_CREATE_VAP)); +} + static int wlan_clone_create(struct if_clone *ifc, int unit, caddr_t params) { @@ -83,7 +119,7 @@ wlan_clone_create(struct if_clone *ifc, int unit, cadd struct ieee80211com *ic; int error; - error = priv_check(curthread, PRIV_NET80211_CREATE_VAP); + error = ieee80211_priv_check_create_vap(0, NULL, NULL); if (error) return error; Modified: head/sys/net80211/ieee80211_freebsd.h == --- head/sys/net80211/ieee80211_freebsd.h Sun Oct 18 20:54:15 2020 (r366816) +++ head/sys/net80211/ieee80211_freebsd.h Sun Oct 18 21:34:04 2020 (r366817) @@ -43,6 +43,19 @@ #include /* + * priv(9) NET80211 checks. + */ +struct ieee80211vap; +int ieee80211_priv_check_vap_getkey(u_long, struct ieee80211vap *, +struct ifnet *); +int ieee80211_priv_check_vap_manage(u_long, struct ieee80211vap *, +struct ifnet *); +int ieee80211_priv_check_vap_setmac(u_long, struct ieee80211vap *, +struct ifnet *); +int ieee80211_priv_check_create_vap(u_long, struct ieee80211vap *, +struct ifnet *); + +/* * Common state locking definitions. */ typedef struct { Modified: head/sys/net80211/ieee80211_ioctl.c == --- head/sys/net80211/ieee80211_ioctl.c Sun Oct 18 20:54:15 2020 (r366816) +++ head/sys/net80211/ieee80211_ioctl.c Sun Oct 18 21:34:04 2020 (r366817) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -72,7 +71,8 @@ static int ieee80211_scanreq(struct ieee80211vap *, struct ieee80211_scan_req *); static int -ieee80211_ioctl_getkey(struct ieee80211vap *vap, struct ieee80211req *ireq) +ieee80211_ioctl_getkey(u_long cmd, struct ieee80211vap *vap, +struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; @@ -106,8 +106,7 @@ ieee80211_ioctl_getkey(struct ieee80211vap *vap, struc ik.ik_flags = wk->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV); if (wk->wk_keyix == vap->iv_def_txkey) ik.ik_flags |= IEEE80211_KEY_DEFAULT; - /* XXX TODO: move priv check to ieee80211_freebsd.c */ - if (priv_check(curthread, PRIV_NET80211_VAP_GETKEY) == 0) { + if (ieee80211_priv_check_vap_getkey(cmd, vap, NULL) == 0) { /* NB: only root can read key data */ ik.ik_keyrsc = wk->wk_keyrsc[IEEE80211_NONQOS_TID]; ik.ik_keytsc = wk->wk_keytsc; @@ -822,8
Re: svn commit: r366781 - in head: include lib/libc/stdlib
Hi, Thanks very much for the feedback. I have created a new change for review at https://reviews.freebsd.org/D26845 , could you please take a look and let me know if it's satisfactory? On 10/16/20 11:53 PM, Konstantin Belousov wrote: [...]>> +int ptsname_r(int, char *, size_t); > This declaration appears in the __XSI_VISIBLE block, but I do not see the > function description in the IEEE Std 1003.1™-2017 text (base issue 7). > > Review mentioned that the function is scheduled for issue 8, but shouldn't > it put under BSD_VISIBLE until specification is finalized ? Good point, fixed in the proposed change. [...] >> Modified: head/lib/libc/stdlib/Symbol.map >> == >> --- head/lib/libc/stdlib/Symbol.map Sat Oct 17 01:06:04 2020 >> (r366780) >> +++ head/lib/libc/stdlib/Symbol.map Sat Oct 17 04:14:38 2020 >> (r366781) >> @@ -125,6 +125,7 @@ FBSD_1.6 { >> qsort_s; >> rand; >> srand; >> +ptsname_r; > This is unsorted now. Fixed in the proposed change. [...] >> +{ >> +static char pt_slave[sizeof _PATH_DEV + SPECNAMELEN]; > We usually write sizeof(_PATH_DEV). This was from previous code so I leave it as-is, but fixed in the proposed change. >> + >> +if (ptsname_r(fildes, pt_slave, sizeof(pt_slave)) == 0) > Since ptsname_r is non-standard and exported, userspace is allowed to > interpose the symbol, which would break ptsname(). Thanks for pointing it out -- I should have paid more attention here. Fixed in the proposed change. >> +return (pt_slave); >> +else > 'else' is redundand. Removed else and used a straight return instead. Cheers, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366815 - in head: . usr.bin/mkimg/tests
Author: arichardson Date: Sun Oct 18 18:35:23 2020 New Revision: 366815 URL: https://svnweb.freebsd.org/changeset/base/366815 Log: Significantly speed up mkimg_test It turns out that the majority of the test time for the mkimg tests isn't mkimg itself but rather the use of jot and hexdump which can be quite slow on emulated platforms such as QEMU. On QEMU-RISC-V this reduces the time for `kyua test mkimg_test` from 655 seconds to 200. And for CheriBSD on QEMU-CHERI this saves 4-5 hours (25% of the time for the entire testsuite!) since jot ends up triggering slow functions inside the QEMU emulation a lot. Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D26796 Modified: head/Makefile.inc1 head/usr.bin/mkimg/tests/Makefile head/usr.bin/mkimg/tests/mkimg_test.sh Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Sun Oct 18 17:31:10 2020(r366814) +++ head/Makefile.inc1 Sun Oct 18 18:35:23 2020(r366815) @@ -2342,6 +2342,8 @@ _other_bootstrap_tools+=tools/build/cross-build/fake_c .endif # mkfifo is used by sys/conf/newvers.sh _basic_bootstrap_tools+=usr.bin/mkfifo +# jot is needed for the mkimg tests +_basic_bootstrap_tools+=usr.bin/jot .if ${MK_BOOT} != "no" # md5 is used by boot/beri (and possibly others) Modified: head/usr.bin/mkimg/tests/Makefile == --- head/usr.bin/mkimg/tests/Makefile Sun Oct 18 17:31:10 2020 (r366814) +++ head/usr.bin/mkimg/tests/Makefile Sun Oct 18 18:35:23 2020 (r366815) @@ -15,9 +15,25 @@ $f: $f.hex sed -e '/^#.*/D' < ${.ALLSRC} > ${.TARGET} .endfor +# Note: Pre-generating this test file saves a lot of time when building on +# emulated platforms such as QEMU. It can take about 2-5 seconds to generate +# the test file using jot (depending on the emulated architecture) and this +# is done for each of the 168 test configurations. +# The effect is even more pronounced on CHERI-RISCV QEMU (emulating CHERI inside +# QEMU adds additional run-time overhead): Running the apm_1x1_512_raw without +# the pre-generated file takes about 108 seconds of which 102 seconds (over 95%) +# were spent running jot -b. It's even worse on CHERI-MIPS QEMU: 187 seconds +# for jot -b P 2097152 > /dev/null. By using a pre-generated 4MB file, the +# slowest test variant (vtoc8_63x255_4096_vhdx) now only takes 29 seconds (of +# which 26s are spent in hexdump -C) instead of previously 2min30s. +${PACKAGE}FILES+= partition_data_4M.bin +partition_data_4M.bin: Makefile + jot -b P 2097152 > ${.TARGET} || rm -f ${.TARGET} + CLEANFILES+= ${${PACKAGE}FILES}} -rebase: .PHONY - (cd ${.CURDIR}; /usr/libexec/atf-sh ${_REBASE_SCRIPT}.sh rebase) +rebase: partition_data_4M.bin ${_REBASE_SCRIPT} .PHONY + cd ${.CURDIR}; PATH=${.OBJDIR}/..:$${PATH}:/usr/bin:/bin \ + /usr/libexec/atf-sh ${.OBJDIR}/${_REBASE_SCRIPT} -s ${.OBJDIR} rebase .include Modified: head/usr.bin/mkimg/tests/mkimg_test.sh == --- head/usr.bin/mkimg/tests/mkimg_test.sh Sun Oct 18 17:31:10 2020 (r366814) +++ head/usr.bin/mkimg/tests/mkimg_test.sh Sun Oct 18 18:35:23 2020 (r366815) @@ -56,7 +56,7 @@ makeimage() if test -z "$partarg"; then local swap ufs swap="-p freebsd-swap::128K" - ufs="-p freebsd-ufs:=`mkcontents P 4194304`" + ufs="-p freebsd-ufs:=$(atf_get_srcdir)/partition_data_4M.bin" partarg="$ufs $swap" fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366814 - head/contrib/llvm-project/libcxx/include
Author: adrian Date: Sun Oct 18 17:31:10 2020 New Revision: 366814 URL: https://svnweb.freebsd.org/changeset/base/366814 Log: [libcxx] Fix atomic type for mips32 on gcc to work w/out needing libatomic When compiling this for mips32 on gcc-6.x, we'd hit issues where we don't have 64 bit atomics on mips32. gcc implements this using libatomic, which we don't currently include in our freebsd-gcc compiler packages. So for now add this work around so mips32 works. It's also fine for mips64. We can fix this later once we get libatomic included. Approved by: dim Differential Revision:https://reviews.freebsd.org/D26774 Modified: head/contrib/llvm-project/libcxx/include/atomic Modified: head/contrib/llvm-project/libcxx/include/atomic == --- head/contrib/llvm-project/libcxx/include/atomic Sun Oct 18 17:15:47 2020(r366813) +++ head/contrib/llvm-project/libcxx/include/atomic Sun Oct 18 17:31:10 2020(r366814) @@ -1480,11 +1480,11 @@ struct __cxx_atomic_impl : public _Base { : _Base(value) {} }; -#ifdef __linux__ +#if defined(__linux__) || (defined(__FreeBSD__) && defined(__mips__)) using __cxx_contention_t = int32_t; #else using __cxx_contention_t = int64_t; -#endif //__linux__ +#endif #if _LIBCPP_STD_VER >= 11 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366813 - in head/sys: conf net net/route netinet netinet6
Author: melifaro Date: Sun Oct 18 17:15:47 2020 New Revision: 366813 URL: https://svnweb.freebsd.org/changeset/base/366813 Log: Implement flowid calculation for outbound connections to balance connections over multiple paths. Multipath routing relies on mbuf flowid data for both transit and outbound traffic. Current code fills mbuf flowid from inp_flowid for connection-oriented sockets. However, inp_flowid is currently not calculated for outbound connections. This change creates simple hashing functions and starts calculating hashes for TCP,UDP/UDP-Lite and raw IP if multipath routes are present in the system. Reviewed by: glebius (previous version),ae Differential Revision:https://reviews.freebsd.org/D26523 Modified: head/sys/conf/files head/sys/net/radix.c head/sys/net/route.h head/sys/net/route/mpath_ctl.c head/sys/net/route/route_var.h head/sys/netinet/in_fib.c head/sys/netinet/in_fib.h head/sys/netinet/in_pcb.c head/sys/netinet/in_rss.c head/sys/netinet/in_rss.h head/sys/netinet/raw_ip.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_fib.h head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_rss.c head/sys/netinet6/in6_rss.h head/sys/netinet6/ip6_output.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/conf/files == --- head/sys/conf/files Sun Oct 18 16:30:49 2020(r366812) +++ head/sys/conf/files Sun Oct 18 17:15:47 2020(r366813) @@ -4180,7 +4180,7 @@ net/rss_config.c optional inet rss | inet6 rss net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp -net/toeplitz.c optional inet rss | inet6 rss +net/toeplitz.c optional inet rss | inet6 rss | route_mpath net/vnet.c optional vimage net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl Modified: head/sys/net/radix.c == --- head/sys/net/radix.cSun Oct 18 16:30:49 2020(r366812) +++ head/sys/net/radix.cSun Oct 18 17:15:47 2020(r366813) @@ -624,21 +624,6 @@ rn_addroute(void *v_arg, void *n_arg, struct radix_hea saved_tt = tt = rn_insert(v, head, , treenodes); if (keyduplicated) { for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) { -#ifdef RADIX_MPATH - /* permit multipath, if enabled for the family */ - if (rn_mpath_capable(head) && netmask == tt->rn_mask) { - /* -* go down to the end of multipaths, so that -* new entry goes into the end of rn_dupedkey -* chain. -*/ - do { - t = tt; - tt = tt->rn_dupedkey; - } while (tt && t->rn_mask == tt->rn_mask); - break; - } -#endif if (tt->rn_mask == netmask) return (0); if (netmask == 0 || @@ -744,10 +729,8 @@ on2: if (m->rm_flags & RNF_NORMAL) { mmask = m->rm_leaf->rn_mask; if (tt->rn_flags & RNF_NORMAL) { -#if !defined(RADIX_MPATH) log(LOG_ERR, "Non-unique normal route, mask not entered\n"); -#endif return (tt); } } else Modified: head/sys/net/route.h == --- head/sys/net/route.hSun Oct 18 16:30:49 2020(r366812) +++ head/sys/net/route.hSun Oct 18 17:15:47 2020(r366813) @@ -125,7 +125,41 @@ VNET_DECLARE(uint32_t, _rt_numfibs); /* number of exis #definert_numfibs V_rt_numfibs VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all fibs */ #defineV_rt_add_addr_allfibs VNET(rt_add_addr_allfibs) + +/* Calculate flowid for locally-originated packets */ +#defineV_fib_hash_outbound VNET(fib_hash_outbound) +VNET_DECLARE(u_int, fib_hash_outbound); + +/* Outbound flowid generation rules */ +#ifdef RSS + +#define fib4_calc_packet_hash xps_proto_software_hash_v4 +#define fib6_calc_packet_hash xps_proto_software_hash_v6 +#defineCALC_FLOWID_OUTBOUND_SENDTO true + +#ifdef ROUTE_MPATH +#defineCALC_FLOWID_OUTBOUNDV_fib_hash_outbound +#else +#define
svn commit: r366812 - head/sys/dev/iscsi
Author: trasz Date: Sun Oct 18 16:30:49 2020 New Revision: 366812 URL: https://svnweb.freebsd.org/changeset/base/366812 Log: If the SIM freezes the queue at exactly the wrong moment, after another thread has started to send in a CCB and already checked the queue wasn't frozen, we would end up with iscsi_action() being called despite the queue is now frozen. Add a check to make sure this doesn't happen . Perhaps this should be fixed at the CAM level instead, but given how the send queue and SIM are governed by two separate mutexes, it is somewhat hard to do. Reviewed by: imp, mav MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26750 Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c == --- head/sys/dev/iscsi/iscsi.c Sun Oct 18 16:24:08 2020(r366811) +++ head/sys/dev/iscsi/iscsi.c Sun Oct 18 16:30:49 2020(r366812) @@ -367,8 +367,8 @@ iscsi_session_cleanup(struct iscsi_session *is, bool d xpt_async(AC_LOST_DEVICE, is->is_path, NULL); if (is->is_simq_frozen) { - xpt_release_simq(is->is_sim, 1); is->is_simq_frozen = false; + xpt_release_simq(is->is_sim, 1); } xpt_free_path(is->is_path); @@ -1479,8 +1479,8 @@ iscsi_ioctl_daemon_handoff(struct iscsi_softc *sc, KASSERT(is->is_simq_frozen, ("reconnect without frozen simq")); ISCSI_SESSION_LOCK(is); ISCSI_SESSION_DEBUG(is, "releasing"); - xpt_release_simq(is->is_sim, 1); is->is_simq_frozen = false; + xpt_release_simq(is->is_sim, 1); ISCSI_SESSION_UNLOCK(is); } else { @@ -2351,6 +2351,17 @@ iscsi_action(struct cam_sim *sim, union ccb *ccb) if (is->is_terminating || (is->is_connected == false && fail_on_disconnection)) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; + xpt_done(ccb); + return; + } + + /* +* Make sure CAM doesn't sneak in a CCB just after freezing the queue. +*/ + if (is->is_simq_frozen == true) { + ccb->ccb_h.status &= ~(CAM_SIM_QUEUED | CAM_STATUS_MASK); + ccb->ccb_h.status |= CAM_REQUEUE_REQ; + /* Don't freeze the devq - the SIM queue is already frozen. */ xpt_done(ccb); return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366811 - in head: share/man/man9 sys/geom sys/geom/bde sys/geom/cache sys/geom/concat sys/geom/journal sys/geom/label sys/geom/linux_lvm sys/geom/mirror sys/geom/mountver sys/geom/mult...
Author: trasz Date: Sun Oct 18 16:24:08 2020 New Revision: 366811 URL: https://svnweb.freebsd.org/changeset/base/366811 Log: Make g_attach() return ENXIO for orphaned providers; update various classes to add missing error checking. Reviewed by: imp MFC after:2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26658 Modified: head/share/man/man9/g_attach.9 head/sys/geom/bde/g_bde.c head/sys/geom/cache/g_cache.c head/sys/geom/concat/g_concat.c head/sys/geom/geom_dev.c head/sys/geom/geom_subr.c head/sys/geom/geom_vfs.c head/sys/geom/journal/g_journal.c head/sys/geom/label/g_label.c head/sys/geom/linux_lvm/g_linux_lvm.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror_ctl.c head/sys/geom/mountver/g_mountver.c head/sys/geom/multipath/g_multipath.c head/sys/geom/raid/g_raid.c head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/virstor/g_virstor.c Modified: head/share/man/man9/g_attach.9 == --- head/share/man/man9/g_attach.9 Sun Oct 18 16:16:22 2020 (r366810) +++ head/share/man/man9/g_attach.9 Sun Oct 18 16:24:08 2020 (r366811) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2004 +.Dd October 10, 2020 .Dt G_ATTACH 9 .Os .Sh NAME @@ -122,6 +122,8 @@ Possible errors: .Bl -tag -width Er .It Bq Er ELOOP The operation creates a topology loop. +.It Bq Er ENXIO +Provider got orphaned. .El .Sh SEE ALSO .Xr geom 4 , Modified: head/sys/geom/bde/g_bde.c == --- head/sys/geom/bde/g_bde.c Sun Oct 18 16:16:22 2020(r366810) +++ head/sys/geom/bde/g_bde.c Sun Oct 18 16:24:08 2020(r366811) @@ -131,7 +131,13 @@ g_bde_create_geom(struct gctl_req *req, struct g_class gp = g_new_geomf(mp, "%s.bde", pp->name); cp = g_new_consumer(gp); - g_attach(cp, pp); + error = g_attach(cp, pp); + if (error != 0) { + g_destroy_consumer(cp); + g_destroy_geom(gp); + gctl_error(req, "could not attach consumer"); + return; + } error = g_access(cp, 1, 1, 1); if (error) { g_detach(cp); Modified: head/sys/geom/cache/g_cache.c == --- head/sys/geom/cache/g_cache.c Sun Oct 18 16:16:22 2020 (r366810) +++ head/sys/geom/cache/g_cache.c Sun Oct 18 16:24:08 2020 (r366811) @@ -673,9 +673,11 @@ g_cache_taste(struct g_class *mp, struct g_provider *p gp->orphan = g_cache_orphan; gp->access = g_cache_access; cp = g_new_consumer(gp); - g_attach(cp, pp); - error = g_cache_read_metadata(cp, ); - g_detach(cp); + error = g_attach(cp, pp); + if (error == 0) { + error = g_cache_read_metadata(cp, ); + g_detach(cp); + } g_destroy_consumer(cp); g_destroy_geom(gp); if (error != 0) Modified: head/sys/geom/concat/g_concat.c == --- head/sys/geom/concat/g_concat.c Sun Oct 18 16:16:22 2020 (r366810) +++ head/sys/geom/concat/g_concat.c Sun Oct 18 16:24:08 2020 (r366811) @@ -718,9 +718,11 @@ g_concat_taste(struct g_class *mp, struct g_provider * gp->access = g_concat_access; gp->orphan = g_concat_orphan; cp = g_new_consumer(gp); - g_attach(cp, pp); - error = g_concat_read_metadata(cp, ); - g_detach(cp); + error = g_attach(cp, pp); + if (error == 0) { + error = g_concat_read_metadata(cp, ); + g_detach(cp); + } g_destroy_consumer(cp); g_destroy_geom(gp); if (error != 0) Modified: head/sys/geom/geom_dev.c == --- head/sys/geom/geom_dev.cSun Oct 18 16:16:22 2020(r366810) +++ head/sys/geom/geom_dev.cSun Oct 18 16:24:08 2020(r366811) @@ -346,7 +346,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, cp->private = sc; cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; error = g_attach(cp, pp); - KASSERT(error == 0, + KASSERT(error == 0 || error == ENXIO, ("g_dev_taste(%s) failed to g_attach, err=%d", pp->name, error)); make_dev_args_init(); Modified: head/sys/geom/geom_subr.c == --- head/sys/geom/geom_subr.c Sun Oct 18 16:16:22 2020(r366810) +++ head/sys/geom/geom_subr.c Sun Oct 18 16:24:08 2020(r366811) @@ -896,6 +896,8 @@ g_attach(struct g_consumer *cp, struct g_provider
svn commit: r366810 - head/sys/amd64/linux
Author: trasz Date: Sun Oct 18 16:16:22 2020 New Revision: 366810 URL: https://svnweb.freebsd.org/changeset/base/366810 Log: Stop calling set_syscall_retval() from linux_set_syscall_retval(). The former clobbers some registers that shouldn't be touched. Reviewed by: kib (earlier version) MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26406 Modified: head/sys/amd64/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Sun Oct 18 15:58:16 2020 (r366809) +++ head/sys/amd64/linux/linux_sysvec.c Sun Oct 18 16:16:22 2020 (r366810) @@ -206,24 +206,45 @@ linux_fetch_syscall_args(struct thread *td) static void linux_set_syscall_retval(struct thread *td, int error) { - struct trapframe *frame = td->td_frame; + struct trapframe *frame; - /* -* On Linux only %rcx and %r11 values are not preserved across -* the syscall. So, do not clobber %rdx and %r10. -*/ - td->td_retval[1] = frame->tf_rdx; - if (error != EJUSTRETURN) - frame->tf_r10 = frame->tf_rcx; + frame = td->td_frame; - cpu_set_syscall_retval(td, error); + switch (error) { + case 0: + frame->tf_rax = td->td_retval[0]; + frame->tf_r10 = frame->tf_rcx; + break; - if (__predict_false(error != 0)) { - if (error != ERESTART && error != EJUSTRETURN) - frame->tf_rax = linux_to_bsd_errno(error); + case ERESTART: + /* +* Reconstruct pc, we know that 'syscall' is 2 bytes, +* lcall $X,y is 7 bytes, int 0x80 is 2 bytes. +* We saved this in tf_err. +* +*/ + frame->tf_rip -= frame->tf_err; + frame->tf_r10 = frame->tf_rcx; + break; + + case EJUSTRETURN: + break; + + default: + frame->tf_rax = linux_to_bsd_errno(error); + frame->tf_r10 = frame->tf_rcx; + break; } -/* Restore all registers. */ + /* +* Differently from FreeBSD native ABI, on Linux only %rcx +* and %r11 values are not preserved across the syscall. +* Require full context restore to get all registers except +* those two restored at return to usermode. +* +* XXX: Would be great to be able to avoid PCB_FULL_IRET +* for the error == 0 case. +*/ set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366809 - head/sys/compat/linux
Author: trasz Date: Sun Oct 18 15:58:16 2020 New Revision: 366809 URL: https://svnweb.freebsd.org/changeset/base/366809 Log: Add compat.linux.dummy_rlimits, and disable by default. Turns out the dummy rlimits fix prlimit(1), but break su(8) (login-1:4.5-1ubuntu2) - although not sudo(8), for some reason. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26814 Modified: head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_mib.h head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_mib.c == --- head/sys/compat/linux/linux_mib.c Sun Oct 18 15:56:47 2020 (r366808) +++ head/sys/compat/linux/linux_mib.c Sun Oct 18 15:58:16 2020 (r366809) @@ -77,6 +77,11 @@ SYSCTL_INT(_compat_linux, OID_AUTO, default_stacksize, _default_stacksize, 0, "Default soft stack size resource limit, or -1 for unlimited"); +int linux_dummy_rlimits = 0; +SYSCTL_INT(_compat_linux, OID_AUTO, dummy_rlimits, CTLFLAG_RWTUN, +_dummy_rlimits, 0, +"Return dummy values for unsupported Linux-specific rlimits"); + int linux_ignore_ip_recverr = 1; SYSCTL_INT(_compat_linux, OID_AUTO, ignore_ip_recverr, CTLFLAG_RWTUN, _ignore_ip_recverr, 0, "Ignore enabling IP_RECVERR"); Modified: head/sys/compat/linux/linux_mib.h == --- head/sys/compat/linux/linux_mib.h Sun Oct 18 15:56:47 2020 (r366808) +++ head/sys/compat/linux/linux_mib.h Sun Oct 18 15:58:16 2020 (r366809) @@ -65,6 +65,7 @@ int linux_kernver(struct thread *td); extern int linux_debug; extern int linux_default_openfiles; extern int linux_default_stacksize; +extern int linux_dummy_rlimits; extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; extern bool linux_map_sched_prio; Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c Sun Oct 18 15:56:47 2020 (r366808) +++ head/sys/compat/linux/linux_misc.c Sun Oct 18 15:58:16 2020 (r366809) @@ -1377,6 +1377,9 @@ static bool linux_get_dummy_limit(l_uint resource, struct rlimit *rlim) { + if (linux_dummy_rlimits == 0) + return (false); + switch (resource) { case LINUX_RLIMIT_LOCKS: case LINUX_RLIMIT_SIGPENDING: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366808 - head/sys/amd64/linux
Author: trasz Date: Sun Oct 18 15:56:47 2020 New Revision: 366808 URL: https://svnweb.freebsd.org/changeset/base/366808 Log: Slightly tweak linux ptrace(2) debug message; no functional changes. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D26815 Modified: head/sys/amd64/linux/linux_ptrace.c Modified: head/sys/amd64/linux/linux_ptrace.c == --- head/sys/amd64/linux/linux_ptrace.c Sun Oct 18 12:03:36 2020 (r366807) +++ head/sys/amd64/linux/linux_ptrace.c Sun Oct 18 15:56:47 2020 (r366808) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #defineLINUX_PTRACE_GETSIGINFO 0x4202 #defineLINUX_PTRACE_GETREGSET 0x4204 #defineLINUX_PTRACE_SEIZE 0x4206 +#defineLINUX_PTRACE_GET_SYSCALL_INFO 0x420e #defineLINUX_PTRACE_EVENT_EXIT 6 @@ -557,6 +558,14 @@ linux_ptrace_seize(struct thread *td, pid_t pid, l_ulo return (EINVAL); } +static int +linux_ptrace_get_syscall_info(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) +{ + + linux_msg(td, "PTRACE_GET_SYSCALL_INFO not implemented; returning EINVAL"); + return (EINVAL); +} + int linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) { @@ -641,6 +650,9 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar break; case LINUX_PTRACE_SEIZE: error = linux_ptrace_seize(td, pid, uap->addr, uap->data); + break; + case LINUX_PTRACE_GET_SYSCALL_INFO: + error = linux_ptrace_get_syscall_info(td, pid, uap->addr, uap->data); break; default: linux_msg(td, "ptrace(%ld, ...) not implemented; " ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366807 - head/sys/netinet
Author: melifaro Date: Sun Oct 18 12:03:36 2020 New Revision: 366807 URL: https://svnweb.freebsd.org/changeset/base/366807 Log: Simplify NET_EPOCH_EXIT in inp_join_group(). Suggested by: kib Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Sun Oct 18 08:58:14 2020(r366806) +++ head/sys/netinet/in_mcast.c Sun Oct 18 12:03:36 2020(r366807) @@ -2009,6 +2009,7 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt else ifp = inp_lookup_mcast_ifp(inp, >sin, mreqn.imr_address); + NET_EPOCH_EXIT(et); break; } case IP_ADD_SOURCE_MEMBERSHIP: { @@ -2032,6 +2033,7 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt NET_EPOCH_ENTER(et); ifp = inp_lookup_mcast_ifp(inp, >sin, mreqs.imr_interface); + NET_EPOCH_EXIT(et); CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", __func__, ntohl(mreqs.imr_interface.s_addr), ifp); break; @@ -2074,6 +2076,7 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt return (EADDRNOTAVAIL); NET_EPOCH_ENTER(et); ifp = ifnet_byindex_ref(gsr.gsr_interface); + NET_EPOCH_EXIT(et); break; default: @@ -2082,7 +2085,6 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt return (EOPNOTSUPP); break; } - NET_EPOCH_EXIT(et); if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) { if (ifp != NULL) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366806 - in head/sys/dev/usb: . quirk
Author: hselasky Date: Sun Oct 18 08:58:14 2020 New Revision: 366806 URL: https://svnweb.freebsd.org/changeset/base/366806 Log: Add new USB quirk. PR: 250422 Submitted by: vidwer+fbsdb...@gmail.com MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Sun Oct 18 03:01:26 2020 (r366805) +++ head/sys/dev/usb/quirk/usb_quirk.c Sun Oct 18 08:58:14 2020 (r366806) @@ -224,6 +224,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1), USB_QUIRK(CYPRESS, XX6830XX, 0x, 0x, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(EMTEC, DANEELEC4GB, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(DESKNOTE, UCR_61S2B, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(DMI, CFSM_RW, 0x, 0x, UQ_MSC_FORCE_PROTO_SCSI, Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun Oct 18 03:01:26 2020(r366805) +++ head/sys/dev/usb/usbdevsSun Oct 18 08:58:14 2020(r366806) @@ -1880,6 +1880,7 @@ product ELV USBI2C0xe00f USB-I2C interface product EMS DUAL_SHOOTER 0x0003 PSX gun controller converter /* Emtec products */ +product EMTEC DANEELEC4GB 0x1e20 USB DISK Pro PMAP product EMTEC RUF2PS 0x2240 Flash Drive /* Encore products */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"