svn commit: r332642 - in head: contrib/bsnmp/snmpd lib/libc/locale lib/libc/stdio lib/libc/stdlib lib/libc/string lib/libc/sys lib/libufs share/man/man7 share/man/man9
Author: trasz Date: Tue Apr 17 09:05:46 2018 New Revision: 332642 URL: https://svnweb.freebsd.org/changeset/base/332642 Log: Don't put multiple names on a single .Nm line. This fixes apropos(1) output, from this: strnlen, strlen, strlen,(3) - find length of string │··· ... to this: strlen, strnlen(3) - find length of string PR: 223525 MFC after:2 weeks Modified: head/contrib/bsnmp/snmpd/snmpmod.3 head/lib/libc/locale/isdigit.3 head/lib/libc/locale/isxdigit.3 head/lib/libc/stdio/printf.3 head/lib/libc/stdlib/qsort.3 head/lib/libc/string/strcpy.3 head/lib/libc/string/strlen.3 head/lib/libc/sys/fsync.2 head/lib/libufs/ufs_disk_close.3 head/share/man/man7/c99.7 head/share/man/man9/OF_device_from_xref.9 head/share/man/man9/printf.9 Modified: head/contrib/bsnmp/snmpd/snmpmod.3 == --- head/contrib/bsnmp/snmpd/snmpmod.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/contrib/bsnmp/snmpd/snmpmod.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -102,35 +102,35 @@ .Nm index_compare , .Nm index_compare_off , .Nm index_append , -.Nm index_append_off, -.Nm snmpd_usmstats, -.Nm bsnmpd_get_usm_stats, -.Nm bsnmpd_reset_usm_stats, -.Nm usm_first_user, -.Nm usm_next_user, -.Nm usm_find_user, -.Nm usm_new_user, -.Nm usm_delete_user, -.Nm usm_flush_users, -.Nm usm_user -.Nm snmpd_target_stat -.Nm bsnmpd_get_target_stats -.Nm target_first_address -.Nm target_next_address -.Nm target_new_address -.Nm target_activate_address -.Nm target_delete_address -.Nm target_first_param -.Nm target_next_param -.Nm target_new_param -.Nm target_delete_param -.Nm target_first_notify -.Nm target_next_notify -.Nm target_new_notify -.Nm target_delete_notify -.Nm target_flush_all -.Nm target_address -.Nm target_param +.Nm index_append_off , +.Nm snmpd_usmstats , +.Nm bsnmpd_get_usm_stats , +.Nm bsnmpd_reset_usm_stats , +.Nm usm_first_user , +.Nm usm_next_user , +.Nm usm_find_user , +.Nm usm_new_user , +.Nm usm_delete_user , +.Nm usm_flush_users , +.Nm usm_user , +.Nm snmpd_target_stat , +.Nm bsnmpd_get_target_stats , +.Nm target_first_address , +.Nm target_next_address , +.Nm target_new_address , +.Nm target_activate_address , +.Nm target_delete_address , +.Nm target_first_param , +.Nm target_next_param , +.Nm target_new_param , +.Nm target_delete_param , +.Nm target_first_notify , +.Nm target_next_notify , +.Nm target_new_notify , +.Nm target_delete_notify , +.Nm target_flush_all , +.Nm target_address , +.Nm target_param , .Nm target_notify .Nd "SNMP daemon loadable module interface" .Sh LIBRARY Modified: head/lib/libc/locale/isdigit.3 == --- head/lib/libc/locale/isdigit.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/locale/isdigit.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,8 @@ .Dt ISDIGIT 3 .Os .Sh NAME -.Nm isdigit, isnumber +.Nm isdigit , +.Nm isnumber .Nd decimal-digit character test .Sh LIBRARY .Lb libc Modified: head/lib/libc/locale/isxdigit.3 == --- head/lib/libc/locale/isxdigit.3 Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/locale/isxdigit.3 Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,8 @@ .Dt ISXDIGIT 3 .Os .Sh NAME -.Nm isxdigit, ishexnumber +.Nm isxdigit , +.Nm ishexnumber .Nd hexadecimal-digit character test .Sh LIBRARY .Lb libc Modified: head/lib/libc/stdio/printf.3 == --- head/lib/libc/stdio/printf.3Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/stdio/printf.3Tue Apr 17 09:05:46 2018 (r332642) @@ -36,8 +36,18 @@ .Dt PRINTF 3 .Os .Sh NAME -.Nm printf , fprintf , sprintf , snprintf , asprintf , dprintf , -.Nm vprintf , vfprintf, vsprintf , vsnprintf , vasprintf, vdprintf +.Nm printf , +.Nm fprintf , +.Nm sprintf , +.Nm snprintf , +.Nm asprintf , +.Nm dprintf , +.Nm vprintf , +.Nm vfprintf , +.Nm vsprintf , +.Nm vsnprintf , +.Nm vasprintf , +.Nm vdprintf .Nd formatted output conversion .Sh LIBRARY .Lb libc Modified: head/lib/libc/stdlib/qsort.3 == --- head/lib/libc/stdlib/qsort.3Tue Apr 17 02:33:54 2018 (r332641) +++ head/lib/libc/stdlib/qsort.3Tue Apr 17 09:05:46 2018 (r332642) @@ -36,7 +36,13 @@ .Dt QSORT 3 .Os .Sh NAME -.Nm qsort , qsort_b , qsort_r , heapsort , heapsort_b , mergesort, mergesort_b +.Nm qsort , +.Nm qsort_b , +.Nm qsort_r , +.Nm heapsort , +.Nm heapsort_b , +.Nm mergesort , +.Nm mergesort_b .Nd sort functions .Sh LIBRARY .Lb libc Modified: hea
Re: svn commit: r332559 - head/usr.sbin/mountd
On Tue, Apr 17, 2018 at 12:02:04AM +, Rick Macklem wrote: > I wrote: > >Julian Elischer wrote: > >>On 16/4/18 6:56 pm, Konstantin Belousov wrote: > >[stuff snipped] > +ngroups =3D XU_NGROUPS + 1; > >>> Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? > >>valid question.. because that is how many are allocated? > >>it was a "minimally invasive patch".. whoever used XU_NGROUPS before > >>should have fixed it. > >>Having said that, thanks for drawing out attention to it.. will > >>probably fix. > >16 is the limit specified in the RFCs for Sun RPC, so that is the "on the > >wire" limit. > >I haven't looked at the code. It might make sense to handle more here and > >then > >set the limit at 16 after getting rid of duplicates, but I have no idea if = > >it matters? > > > >rick > Correcting my own post. Now that I've looked at the code, this doesn't go on > the wire. It does go in the exports structure, which means that this structure > would have to be revised (along with the syscall and VOP calls and the kernel > code that uses it). These credentials are for the "maproot/mapall" export > option and revising the export structure seems like quite a bit of work for > this > case. (Until revised XU_NGROUPS is the correct value to set it to, since there > is a "struct xucred" in the exports structure.) > > Since Julian Elischer has been emailing me about adding a "fsid" export option > which allows /etc/exports to set the FSID of the exported fs (which would also > need to go in the exports structure), it might be about time to rev. the > exports > structure? Probably yes, we would need a new variant of the nmount(2) syscall. Existing syscall should use the old layout for compatibility (we care about nmount and COMPAT32 as well). ___ 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: r332645 - head/sbin/ifconfig
Author: gallatin Date: Tue Apr 17 12:54:58 2018 New Revision: 332645 URL: https://svnweb.freebsd.org/changeset/base/332645 Log: Make lagg creation more fault tolerant - Warn, don't exit, when SIOCSLAGGPORT returns an error. When we exit with an error during lagg creation, a single failed NIC (which no longer attaches) can prevent lagg creation and other configuration, such as adding an IPv4 address, and thus leave a machine unreachable. - Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, in case scripts are looking for it. Hopefully this can be extended if other parts of ifconfig can allow a "soft" failure. - Improve the warning message to mention what lagg and what member are problematic. Reviewed by: jtl, glebius Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D15046 Modified: head/sbin/ifconfig/ifclone.c head/sbin/ifconfig/ifconfig.c head/sbin/ifconfig/ifconfig.h head/sbin/ifconfig/ifgroup.c head/sbin/ifconfig/iflagg.c Modified: head/sbin/ifconfig/ifclone.c == --- head/sbin/ifconfig/ifclone.cTue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifclone.cTue Apr 17 12:54:58 2018 (r332645) @@ -181,7 +181,7 @@ static void clone_Copt_cb(const char *optarg __unused) { list_cloners(); - exit(0); + exit(exit_code); } static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:54:58 2018 (r332645) @@ -99,6 +99,7 @@ int printifname = 0; intsupmedia = 0; intprintkeys = 0; /* Print keying material for interfaces. */ +intexit_code = 0; /* Formatter Strings */ char *f_inet, *f_inet6, *f_ether, *f_addr; @@ -485,7 +486,7 @@ main(int argc, char *argv[]) errx(1, "%s: cloning name too long", ifname); ifconfig(argc, argv, 1, NULL); - exit(0); + exit(exit_code); } #ifdef JAIL /* @@ -499,7 +500,7 @@ main(int argc, char *argv[]) errx(1, "%s: interface name too long", ifname); ifconfig(argc, argv, 0, NULL); - exit(0); + exit(exit_code); } #endif errx(1, "interface %s does not exist", ifname); @@ -597,7 +598,7 @@ main(int argc, char *argv[]) freeifaddrs(ifap); freeformat(); - exit(0); + exit(exit_code); } static struct afswtch *afs = NULL; Modified: head/sbin/ifconfig/ifconfig.h == --- head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:54:58 2018 (r332645) @@ -136,6 +136,7 @@ extern int printkeys; extern int newaddr; extern int verbose; extern int printifname; +extern int exit_code; void setifcap(const char *, int value, int s, const struct afswtch *); Modified: head/sbin/ifconfig/ifgroup.c == --- head/sbin/ifconfig/ifgroup.cTue Apr 17 12:52:30 2018 (r332644) +++ head/sbin/ifconfig/ifgroup.cTue Apr 17 12:54:58 2018 (r332645) @@ -140,7 +140,7 @@ printgroup(const char *groupname) if (ioctl(s, SIOCGIFGMEMB, (caddr_t)&ifgr) == -1) { if (errno == EINVAL || errno == ENOTTY || errno == ENOENT) - exit(0); + exit(exit_code); else err(1, "SIOCGIFGMEMB"); } @@ -159,7 +159,7 @@ printgroup(const char *groupname) } free(ifgr.ifgr_groups); - exit(0); + exit(exit_code); } static struct cmd group_cmds[] = { Modified: head/sbin/ifconfig/iflagg.c == --- head/sbin/ifconfig/iflagg.c Tue Apr 17 12:52:30 2018(r332644) +++ head/sbin/ifconfig/iflagg.c Tue Apr 17 12:54:58 2018(r332645) @@ -41,9 +41,17 @@ setlaggport(const char *val, int d, int s, const struc strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); strlcpy(rp.rp_portname, val, sizeof(rp.rp_portname)); - /* Don't choke if the port is already in this lagg. */ - if (ioctl(s, SIOCSLA
Re: svn commit: r332645 - head/sbin/ifconfig
On 17/04/2018 10:54 pm, Andrew Gallatin wrote: > Author: gallatin > Date: Tue Apr 17 12:54:58 2018 > New Revision: 332645 > URL: https://svnweb.freebsd.org/changeset/base/332645 > > Log: > Make lagg creation more fault tolerant > > - Warn, don't exit, when SIOCSLAGGPORT returns an error. > > When we exit with an error during lagg creation, a single > failed NIC (which no longer attaches) can prevent lagg > creation and other configuration, such as adding an IPv4 > address, and thus leave a machine unreachable. > > - Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, > in case scripts are looking for it. Hopefully this can be > extended if other parts of ifconfig can allow a "soft" failure. > > - Improve the warning message to mention what lagg and what > member are problematic. > > Reviewed by: jtl, glebius > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D15046 MFC please? > Modified: > head/sbin/ifconfig/ifclone.c > head/sbin/ifconfig/ifconfig.c > head/sbin/ifconfig/ifconfig.h > head/sbin/ifconfig/ifgroup.c > head/sbin/ifconfig/iflagg.c > > Modified: head/sbin/ifconfig/ifclone.c > == > --- head/sbin/ifconfig/ifclone.c Tue Apr 17 12:52:30 2018 > (r332644) > +++ head/sbin/ifconfig/ifclone.c Tue Apr 17 12:54:58 2018 > (r332645) > @@ -181,7 +181,7 @@ static void > clone_Copt_cb(const char *optarg __unused) > { > list_cloners(); > - exit(0); > + exit(exit_code); > } > static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = > clone_Copt_cb }; > > > Modified: head/sbin/ifconfig/ifconfig.c > == > --- head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:52:30 2018 > (r332644) > +++ head/sbin/ifconfig/ifconfig.c Tue Apr 17 12:54:58 2018 > (r332645) > @@ -99,6 +99,7 @@ int printifname = 0; > > int supmedia = 0; > int printkeys = 0; /* Print keying material for interfaces. */ > +int exit_code = 0; > > /* Formatter Strings */ > char *f_inet, *f_inet6, *f_ether, *f_addr; > @@ -485,7 +486,7 @@ main(int argc, char *argv[]) > errx(1, "%s: cloning name too long", > ifname); > ifconfig(argc, argv, 1, NULL); > - exit(0); > + exit(exit_code); > } > #ifdef JAIL > /* > @@ -499,7 +500,7 @@ main(int argc, char *argv[]) > errx(1, "%s: interface name too long", > ifname); > ifconfig(argc, argv, 0, NULL); > - exit(0); > + exit(exit_code); > } > #endif > errx(1, "interface %s does not exist", ifname); > @@ -597,7 +598,7 @@ main(int argc, char *argv[]) > freeifaddrs(ifap); > > freeformat(); > - exit(0); > + exit(exit_code); > } > > static struct afswtch *afs = NULL; > > Modified: head/sbin/ifconfig/ifconfig.h > == > --- head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:52:30 2018 > (r332644) > +++ head/sbin/ifconfig/ifconfig.h Tue Apr 17 12:54:58 2018 > (r332645) > @@ -136,6 +136,7 @@ externint printkeys; > extern int newaddr; > extern int verbose; > extern int printifname; > +extern int exit_code; > > void setifcap(const char *, int value, int s, const struct afswtch *); > > > Modified: head/sbin/ifconfig/ifgroup.c > == > --- head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:52:30 2018 > (r332644) > +++ head/sbin/ifconfig/ifgroup.c Tue Apr 17 12:54:58 2018 > (r332645) > @@ -140,7 +140,7 @@ printgroup(const char *groupname) > if (ioctl(s, SIOCGIFGMEMB, (caddr_t)&ifgr) == -1) { > if (errno == EINVAL || errno == ENOTTY || > errno == ENOENT) > - exit(0); > + exit(exit_code); > else > err(1, "SIOCGIFGMEMB"); > } > @@ -159,7 +159,7 @@ printgroup(const char *groupname) > } > free(ifgr.ifgr_groups); > > - exit(0); > + exit(exit_code); > } > > static struct cmd group_cmds[] = { > > Modified: head/sbin/ifconfig/iflagg.c > == > --- head/sbin/ifconfig/iflagg.c Tue Apr 17 12:52:30 2018 > (r332644) > +++ head/sbin/ifconfig/iflagg.c Tue Apr 17 12:54:58 2018 > (r332645) > @@ -41,9 +4
svn commit: r332646 - head/sys/dev/ocs_fc
Author: ram Date: Tue Apr 17 15:29:32 2018 New Revision: 332646 URL: https://svnweb.freebsd.org/changeset/base/332646 Log: Moved opts-stack.h include before all other includes. PR: 227446 Approved by: ken MFC after: 3 days Modified: head/sys/dev/ocs_fc/ocs_os.c head/sys/dev/ocs_fc/ocs_os.h Modified: head/sys/dev/ocs_fc/ocs_os.c == --- head/sys/dev/ocs_fc/ocs_os.cTue Apr 17 12:54:58 2018 (r332645) +++ head/sys/dev/ocs_fc/ocs_os.cTue Apr 17 15:29:32 2018 (r332646) @@ -37,10 +37,6 @@ */ #include "ocs.h" -#include "opt_stack.h" -#include -#include -#include /* for debug of memory allocations */ static MALLOC_DEFINE(M_OCS, "OCS", "OneCore Storage data"); Modified: head/sys/dev/ocs_fc/ocs_os.h == --- head/sys/dev/ocs_fc/ocs_os.hTue Apr 17 12:54:58 2018 (r332645) +++ head/sys/dev/ocs_fc/ocs_os.hTue Apr 17 15:29:32 2018 (r332646) @@ -39,11 +39,11 @@ #ifndef _OCS_OS_H #define _OCS_OS_H -typedef struct ocs_softc ocs_t; - /*** * OS specific includes */ +#include "opt_stack.h" + #include #include #include @@ -78,6 +78,8 @@ typedef struct ocs_softc ocs_t; #include #include +#include /* for debug of memory allocations */ + /* OCS_OS_MAX_ISR_TIME_MSEC - maximum time driver code should spend in an interrupt * or kernel thread context without yielding */ @@ -151,6 +153,8 @@ typedef struct ocs_softc ocs_t; /*** * Platform specific operations */ + +typedef struct ocs_softc ocs_t; /** * @ingroup os ___ 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"
Re: svn commit: r332471 - head/sys/dev/ocs_fc
Thanks Oliver, For pointing the issue. Checked in the change. -Ram On Sat, Apr 14, 2018 at 3:32 AM, Oliver Pinter < oliver.pin...@hardenedbsd.org> wrote: > > > On Friday, April 13, 2018, Ram Kishore Vegesna wrote: > >> Author: ram >> Date: Fri Apr 13 13:31:20 2018 >> New Revision: 332471 >> URL: https://svnweb.freebsd.org/changeset/base/332471 >> >> Log: >> Check if STACK is defined before using the stack(9). >> >> PR: 227446 >> Reported by: emaste >> Approved by: ken >> >> Modified: >> head/sys/dev/ocs_fc/ocs_os.c >> >> Modified: head/sys/dev/ocs_fc/ocs_os.c >> >> == >> --- head/sys/dev/ocs_fc/ocs_os.cFri Apr 13 13:23:31 2018 >> (r332470) >> +++ head/sys/dev/ocs_fc/ocs_os.cFri Apr 13 13:31:20 2018 >> (r332471) >> @@ -37,6 +37,7 @@ >> */ >> >> #include "ocs.h" >> +#include "opt_stack.h" > > > These types of includes - where you includes opts - should go before any > other includes. > > > >> #include >> #include >> #include /* for debug of memory >> allocations */ >> @@ -855,11 +856,13 @@ void ocs_intr_enable(ocs_os_handle_t os) >> >> void ocs_print_stack(void) >> { >> +#if defined(STACK) >> struct stack st; >> >> stack_zero(&st); >> stack_save(&st); >> stack_print(&st); >> +#endif >> } >> >> void ocs_abort(void) >> ___ >> 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-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: r332648 - head/sys/ddb
Author: imp Date: Tue Apr 17 15:44:05 2018 New Revision: 332648 URL: https://svnweb.freebsd.org/changeset/base/332648 Log: Restore db_radix on parse error, otherwise we'll silently change it to 10 on a botched trace command. Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c == --- head/sys/ddb/db_command.c Tue Apr 17 15:34:08 2018(r332647) +++ head/sys/ddb/db_command.c Tue Apr 17 15:44:05 2018(r332648) @@ -812,6 +812,7 @@ db_stack_trace(db_expr_t tid, bool hastid, db_expr_t c if (!db_expression(&count)) { db_printf("Count missing\n"); db_flush_lex(); + db_radix = radix; return; } } else { ___ 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"
Re: svn commit: r332645 - head/sbin/ifconfig
On 04/17/18 09:47, Kubilay Kocak wrote: Log: Make lagg creation more fault tolerant <...> MFC please? <..> Hmm.. I intentionally did not mark it for MFC, for 2 reasons. I don't run -stable, and I hate to MFC something when I haven't run it. And I'm also worried because it changes (undocumented) ifconfig failure behavior, which I think is more objectionable in -stable than in head. If somebody else would like to MFC it, I certainly would not object. Drew ___ 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: r332649 - head/lib/clang/include/lld/Common
Author: emaste Date: Tue Apr 17 16:21:23 2018 New Revision: 332649 URL: https://svnweb.freebsd.org/changeset/base/332649 Log: lld: add a __FreeBSD_version-style identifier to version This will faciliate a WITH_SYSTEM_LINKER option. Reviewed by: dim MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D15110 Modified: head/lib/clang/include/lld/Common/Version.inc Modified: head/lib/clang/include/lld/Common/Version.inc == --- head/lib/clang/include/lld/Common/Version.inc Tue Apr 17 15:44:05 2018(r332648) +++ head/lib/clang/include/lld/Common/Version.inc Tue Apr 17 16:21:23 2018(r332649) @@ -4,5 +4,7 @@ #define LLD_VERSION_STRING "6.0.0" #define LLD_VERSION_MAJOR 6 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "326565" + #define LLD_REPOSITORY_STRING "FreeBSD" +// - +#define LLD_REVISION_STRING "326565-120001" ___ 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: r332650 - head/sys/kern
Author: brooks Date: Tue Apr 17 16:36:53 2018 New Revision: 332650 URL: https://svnweb.freebsd.org/changeset/base/332650 Log: Stop using fuswintr() and suswintr() in the profiler. Always take the AST path rather than calling MD functions which are often implemented as always failing. The is the case on amd64, arm, i386, and powerpc. This optimization (inherited from 4.4 Lite) is a pessimization on those architectures and is the sole use of these functions. They will be removed in a seperate commit. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D15101 Modified: head/sys/kern/subr_prof.c Modified: head/sys/kern/subr_prof.c == --- head/sys/kern/subr_prof.c Tue Apr 17 16:21:23 2018(r332649) +++ head/sys/kern/subr_prof.c Tue Apr 17 16:36:53 2018(r332650) @@ -447,10 +447,9 @@ sys_profil(struct thread *td, struct profil_args *uap) /* * Collect user-level profiling statistics; called on a profiling tick, * when a process is running in user-mode. This routine may be called - * from an interrupt context. We try to update the user profiling buffers - * cheaply with fuswintr() and suswintr(). If that fails, we revert to - * an AST that will vector us to trap() with a context in which copyin - * and copyout will work. Trap will then call addupc_task(). + * from an interrupt context. We perform the update with an AST + * that will vector us to trap() with a context in which copyin and + * copyout will work. Trap will then call addupc_task(). * * Note that we may (rarely) not get around to the AST soon enough, and * lose profile ticks when the next tick overwrites this one, but in this @@ -461,35 +460,28 @@ void addupc_intr(struct thread *td, uintfptr_t pc, u_int ticks) { struct uprof *prof; - caddr_t addr; - u_int i; - int v; if (ticks == 0) return; prof = &td->td_proc->p_stats->p_prof; PROC_PROFLOCK(td->td_proc); - if (pc < prof->pr_off || - (i = PC_TO_INDEX(pc, prof)) >= prof->pr_size) { + if (pc < prof->pr_off || PC_TO_INDEX(pc, prof) >= prof->pr_size) { PROC_PROFUNLOCK(td->td_proc); return; /* out of range; ignore */ } - addr = prof->pr_base + i; PROC_PROFUNLOCK(td->td_proc); - if ((v = fuswintr(addr)) == -1 || suswintr(addr, v + ticks) == -1) { - td->td_profil_addr = pc; - td->td_profil_ticks = ticks; - td->td_pflags |= TDP_OWEUPC; - thread_lock(td); - td->td_flags |= TDF_ASTPENDING; - thread_unlock(td); - } + td->td_profil_addr = pc; + td->td_profil_ticks = ticks; + td->td_pflags |= TDP_OWEUPC; + thread_lock(td); + td->td_flags |= TDF_ASTPENDING; + thread_unlock(td); } /* - * Much like before, but we can afford to take faults here. If the - * update fails, we simply turn off profiling. + * Actually update the profiling statistics. If the update fails, we + * simply turn off profiling. */ void addupc_task(struct thread *td, uintfptr_t pc, u_int ticks) ___ 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: r332651 - head/sys/dev/bce
Author: imp Date: Tue Apr 17 16:46:01 2018 New Revision: 332651 URL: https://svnweb.freebsd.org/changeset/base/332651 Log: Add PNP info to the bce driver. Submitted by: Lakhan Shiva Kamireddy Pull Request: https://github.com/freebsd/freebsd/pull/136 Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c == --- head/sys/dev/bce/if_bce.c Tue Apr 17 16:36:53 2018(r332650) +++ head/sys/dev/bce/if_bce.c Tue Apr 17 16:46:01 2018(r332651) @@ -529,7 +529,8 @@ MODULE_DEPEND(bce, miibus, 1, 1, 1); DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, NULL, NULL); DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, NULL, NULL); - +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, bce, +bce_devs, sizeof(bce_devs[0]), nitems(bce_devs) - 1); // /* Tunable device values*/ ___ 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: r332652 - in head/sys: conf dev/puc modules/puc
Author: imp Date: Tue Apr 17 16:46:08 2018 New Revision: 332652 URL: https://svnweb.freebsd.org/changeset/base/332652 Log: Add PNP info to the PCI attahement of the puc driver. Adjust sys/conf/files and sys/modules/puc/Makefile to omit pucdata.c now tht it's included by puc_pci.c. Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) Pull Request: https://github.com/freebsd/freebsd/pull/136 Modified: head/sys/conf/files head/sys/dev/puc/puc_pci.c head/sys/modules/puc/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Tue Apr 17 16:46:01 2018(r332651) +++ head/sys/conf/files Tue Apr 17 16:46:08 2018(r332652) @@ -2771,7 +2771,6 @@ dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci -dev/puc/pucdata.c optional puc pci dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral Modified: head/sys/dev/puc/puc_pci.c == --- head/sys/dev/puc/puc_pci.c Tue Apr 17 16:46:01 2018(r332651) +++ head/sys/dev/puc/puc_pci.c Tue Apr 17 16:46:08 2018(r332652) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include static int puc_msi_disable; SYSCTL_INT(_hw_puc, OID_AUTO, msi_disable, CTLFLAG_RDTUN, @@ -198,3 +199,5 @@ static driver_t puc_pci_driver = { }; DRIVER_MODULE(puc, pci, puc_pci_driver, puc_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, puc, +puc_pci_devices, sizeof(puc_pci_devices[0]), nitems(puc_pci_devices) - 1); Modified: head/sys/modules/puc/Makefile == --- head/sys/modules/puc/Makefile Tue Apr 17 16:46:01 2018 (r332651) +++ head/sys/modules/puc/Makefile Tue Apr 17 16:46:08 2018 (r332652) @@ -4,7 +4,7 @@ .PATH: ${SRCTOP}/sys/dev/puc KMOD= puc -SRCS= puc.c puc_cfg.c puc_pci.c puc_pccard.c pucdata.c +SRCS= puc.c puc_cfg.c puc_pci.c puc_pccard.c SRCS+= bus_if.h device_if.h serdev_if.c serdev_if.h \ card_if.h pci_if.h ___ 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: r332653 - head/sys/dev/ixgbe
Author: gallatin Date: Tue Apr 17 16:51:27 2018 New Revision: 332653 URL: https://svnweb.freebsd.org/changeset/base/332653 Log: Restore SIOCGI2C functionality to ixgbe When ixgbe was converted to iflib, it lost the SIOCGI2C support that allows ifconfig to print SFP state, optical light levels, etc. Restore this by plugging in to the ifdi_i2c_req iflib method. Note that the sanity checking on dev_addr that used to be done in ixgbe is now done in iflib. Reviewed by: erj, Matthew Macy Sponsored by: Netflix Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c == --- head/sys/dev/ixgbe/if_ix.c Tue Apr 17 16:46:08 2018(r332652) +++ head/sys/dev/ixgbe/if_ix.c Tue Apr 17 16:51:27 2018(r332653) @@ -137,7 +137,7 @@ static void ixgbe_if_timer(if_ctx_t ctx, uint16_t); static void ixgbe_if_update_admin_status(if_ctx_t ctx); static void ixgbe_if_vlan_register(if_ctx_t ctx, u16 vtag); static void ixgbe_if_vlan_unregister(if_ctx_t ctx, u16 vtag); - +static int ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); int ixgbe_intr(void *arg); / @@ -270,6 +270,7 @@ static device_method_t ixgbe_if_methods[] = { DEVMETHOD(ifdi_vlan_register, ixgbe_if_vlan_register), DEVMETHOD(ifdi_vlan_unregister, ixgbe_if_vlan_unregister), DEVMETHOD(ifdi_get_counter, ixgbe_if_get_counter), + DEVMETHOD(ifdi_i2c_req, ixgbe_if_i2c_req), #ifdef PCI_IOV DEVMETHOD(ifdi_iov_init, ixgbe_if_iov_init), DEVMETHOD(ifdi_iov_uninit, ixgbe_if_iov_uninit), @@ -1232,6 +1233,25 @@ ixgbe_if_get_counter(if_ctx_t ctx, ift_counter cnt) } /* ixgbe_if_get_counter */ / + * ixgbe_if_i2c_req + / +static int +ixgbe_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req) +{ + struct adapter *adapter = iflib_get_softc(ctx); + struct ixgbe_hw *hw = &adapter->hw; + int i; + + + if (hw->phy.ops.read_i2c_byte == NULL) + return (ENXIO); + for (i = 0; i < req->len; i++) + hw->phy.ops.read_i2c_byte(hw, req->offset + i, + req->dev_addr, &req->data[i]); + return (0); +} /* ixgbe_if_i2c_req */ + +/ * ixgbe_add_media_types / static void @@ -4547,4 +4567,3 @@ ixgbe_check_fan_failure(struct adapter *adapter, u32 r if (reg & mask) device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! REPLACE IMMEDIATELY!!\n"); } /* ixgbe_check_fan_failure */ - ___ 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: r332654 - in head: share/man/man9 sys/arm/arm sys/mips/mips
Author: brooks Date: Tue Apr 17 17:20:04 2018 New Revision: 332654 URL: https://svnweb.freebsd.org/changeset/base/332654 Log: Remove unused implementations of copyoutstr(). Also remove the commented out documentation. The documentation arrived with the import of the copy.9 manpage. I suspect the implementations came from NetBSD while bootstrapping the Arm and MIPS ports. Reviewed by: andrew, jmallett Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D15108 Modified: head/share/man/man9/copy.9 head/sys/arm/arm/copystr.S head/sys/mips/mips/support.S Modified: head/share/man/man9/copy.9 == --- head/share/man/man9/copy.9 Tue Apr 17 16:51:27 2018(r332653) +++ head/share/man/man9/copy.9 Tue Apr 17 17:20:04 2018(r332654) @@ -61,8 +61,6 @@ .Fn copystr "const void *kfaddr" "void *kdaddr" "size_t len" "size_t *done" .Ft int .Fn copyinstr "const void *uaddr" "void *kaddr" "size_t len" "size_t *done" -.\" .Ft int -.\" .Fn copyoutstr "const void *kaddr" "void *uaddr" "size_t len" "size_t *done" .Sh DESCRIPTION The .Nm @@ -135,15 +133,6 @@ NUL, is returned in .Fa done is .No non- Ns Dv NULL ) . -.\" .It Fn copyoutstr -.\" Copies a NUL-terminated string, at most -.\" bytes long, from kernel-space address -.\" .Fa kaddr -.\" to user-space address -.\" .Fa uaddr . -.\" The number of bytes actually copied, including the terminating -.\" NUL, is returned in -.\" .Fa *done . .Sh RETURN VALUES The .Nm @@ -164,9 +153,6 @@ The .Fn copystr and .Fn copyinstr -.\" .Fn copyinstr , -.\" and -.\" .Fn copyoutstr functions return .Er ENAMETOOLONG if the string is longer than Modified: head/sys/arm/arm/copystr.S == --- head/sys/arm/arm/copystr.S Tue Apr 17 16:51:27 2018(r332653) +++ head/sys/arm/arm/copystr.S Tue Apr 17 17:20:04 2018(r332654) @@ -149,59 +149,6 @@ ENTRY(copyinstr) RET END(copyinstr) -/* - * r0 - kernel space address - * r1 - user space address - * r2 - maxlens - * r3 - lencopied - * - * Copy string from kernel space to user space - */ -ENTRY(copyoutstr) - SAVE_REGS - - teq r2, #0x - mov r6, #0x - moveq r0, #ENAMETOOLONG - beq 2f - - ldr r12, =VM_MAXUSER_ADDRESS - - GET_PCB(r4) - ldr r4, [r4] - -#ifdef DIAGNOSTIC - teq r4, #0x - beq .Lcopystrpcbfault -#endif - - adr r5, .Lcopystrfault - str r5, [r4, #PCB_ONFAULT] - -1: - cmp r0, r12 - bcs .Lcopystrfault - ldrbr5, [r0], #0x0001 - add r6, r6, #0x0001 - teq r5, #0x - strbt r5, [r1], #0x0001 - teqne r6, r2 - bne 1b - - mov r0, #0x - str r0, [r4, #PCB_ONFAULT] - - teq r5, #0x - moveq r0, #0x - movne r0, #ENAMETOOLONG - -2: teq r3, #0x - strne r6, [r3] - - RESTORE_REGS - RET -END(copyoutstr) - /* A fault occurred during the copy */ .Lcopystrfault: mov r1, #0x Modified: head/sys/mips/mips/support.S == --- head/sys/mips/mips/support.STue Apr 17 16:51:27 2018 (r332653) +++ head/sys/mips/mips/support.STue Apr 17 17:20:04 2018 (r332654) @@ -162,34 +162,6 @@ NESTED(copyinstr, CALLFRAME_SIZ, ra) END(copyinstr) /* - * Copy a null terminated string from the kernel address space into - * the user address space. - * - * copyoutstr(fromaddr, toaddr, maxlength, &lencopied) - * caddr_t fromaddr; - * caddr_t toaddr; - * u_int maxlength; - * u_int *lencopied; - */ -NESTED(copyoutstr, CALLFRAME_SIZ, ra) - PTR_SUBUsp, sp, CALLFRAME_SIZ - .mask 0x8000, (CALLFRAME_RA - CALLFRAME_SIZ) - PTR_LA v0, copyerr - blt a1, zero, _C_LABEL(copyerr) # make sure address is in user space - REG_S ra, CALLFRAME_RA(sp) - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(copystr) - PTR_S v0, U_PCB_ONFAULT(v1) - REG_L ra, CALLFRAME_RA(sp) - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S zero, U_PCB_ONFAULT(v1) - j ra - PTR_ADDUsp, sp, CALLFRAME_SIZ -END(copyoutstr) - -/* * Copy specified amount of data from user space into the kernel * copyin(from, to, len) * caddr_t *from; (user source address) ___ 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: r332655 - head/lib/libmd
Author: cem Date: Tue Apr 17 17:23:47 2018 New Revision: 332655 URL: https://svnweb.freebsd.org/changeset/base/332655 Log: libmd: Remove trailing whitespace from mdXhl.c No functional change. Reported by: me, in a CR from three years ago today Sponsored by: Dell EMC Isilon Modified: head/lib/libmd/mdXhl.c Modified: head/lib/libmd/mdXhl.c == --- head/lib/libmd/mdXhl.c Tue Apr 17 17:20:04 2018(r332654) +++ head/lib/libmd/mdXhl.c Tue Apr 17 17:23:47 2018(r332655) @@ -79,11 +79,11 @@ MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) readrv = read(fd, buffer, sizeof(buffer)); else readrv = read(fd, buffer, remain); - if (readrv <= 0) + if (readrv <= 0) break; MDXUpdate(&ctx, buffer, readrv); remain -= readrv; - } + } error: if (readrv < 0) return 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: r332656 - in head: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/conf sys/i386/i386 sys/mips/mips sys/powerpc/powerpc sys/riscv/riscv sys/sparc64/sparc64 sys/sys
Author: brooks Date: Tue Apr 17 18:04:28 2018 New Revision: 332656 URL: https://svnweb.freebsd.org/changeset/base/332656 Log: Remove the unused fuwintr() and suiwintr() functions. Half of implementations always failed (returned (-1)) and they were previously used in only one place. Reviewed by: kib, andrew Obtained from:CheriBSD Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D15102 Deleted: head/sys/powerpc/powerpc/fuswintr.c head/sys/powerpc/powerpc/suswintr.c Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/fetch.9 head/share/man/man9/store.9 head/sys/amd64/amd64/support.S head/sys/arm/arm/fusu.S head/sys/arm64/arm64/support.S head/sys/arm64/arm64/trap.c head/sys/conf/files.powerpc head/sys/i386/i386/support.s head/sys/mips/mips/support.S head/sys/mips/mips/trap.c head/sys/riscv/riscv/support.S head/sys/riscv/riscv/trap.c head/sys/sparc64/sparc64/support.S head/sys/sys/resourcevar.h Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Apr 17 17:23:47 2018(r332655) +++ head/ObsoleteFiles.inc Tue Apr 17 18:04:28 2018(r332656) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180417: remove fuswintr and suswintr +OLD_FILES+=usr/share/man/man9/fuswintr.9.gz +OLD_FILES+=usr/share/man/man9/suswintr.9.gz # 20180413: remove Arcnet support OLD_FILES+=usr/include/net/if_arc.h OLD_FILES+=usr/share/man/man4/cm.4.gz Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileTue Apr 17 17:23:47 2018 (r332655) +++ head/share/man/man9/MakefileTue Apr 17 18:04:28 2018 (r332656) @@ -960,7 +960,6 @@ MLINKS+=fdt_pinctrl.9 fdt_pinctrl_configure.9 \ fdt_pinctrl.9 fdt_pinctrl_configure_tree.9 \ fdt_pinctrl.9 fdt_pinctrl_register.9 MLINKS+=fetch.9 fubyte.9 \ - fetch.9 fuswintr.9 \ fetch.9 fuword.9 \ fetch.9 fuword16.9 \ fetch.9 fuword32.9 \ @@ -1934,7 +1933,6 @@ MLINKS+=stack.9 stack_copy.9 \ stack.9 stack_sbuf_print_ddb.9 \ stack.9 stack_zero.9 MLINKS+=store.9 subyte.9 \ - store.9 suswintr.9 \ store.9 suword.9 \ store.9 suword16.9 \ store.9 suword32.9 \ Modified: head/share/man/man9/fetch.9 == --- head/share/man/man9/fetch.9 Tue Apr 17 17:23:47 2018(r332655) +++ head/share/man/man9/fetch.9 Tue Apr 17 18:04:28 2018(r332656) @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt FETCH 9 .Os .Sh NAME .Nm fetch , .Nm fubyte , -.Nm fuswintr , .Nm fuword , .Nm fuword16 , .Nm fuword32 , @@ -69,8 +68,6 @@ .Ft int64_t .Fn fueword64 "volatile const void *base" "int64_t *val" .In sys/resourcevar.h -.Ft int -.Fn fuswintr "void *base" .Sh DESCRIPTION The .Nm @@ -100,10 +97,6 @@ Fetches 32 bits of data from the user-space address .It Fn fuword64 Fetches 64 bits of data from the user-space address .Pa base . -.It Fn fuswintr -Fetches a short word of data from the user-space address -.Pa base . -This function is safe to call during an interrupt context. .It Fn fueword Fetches a word of data (long) from the user-space address .Pa base @@ -134,9 +127,8 @@ The .Fn fuword , .Fn fuword16 , .Fn fuword32 , -.Fn fuword64 , and -.Fn fuswintr +.Fn fuword64 functions return the data fetched or -1 on failure. The .Fn fueword , Modified: head/share/man/man9/store.9 == --- head/share/man/man9/store.9 Tue Apr 17 17:23:47 2018(r332655) +++ head/share/man/man9/store.9 Tue Apr 17 18:04:28 2018(r332656) @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt STORE 9 .Os .Sh NAME .Nm store , .Nm subyte , -.Nm suswintr , .Nm suword .Nd store data to user-space .Sh SYNOPSIS @@ -58,8 +57,6 @@ .Ft int .Fn suword64 "volatile void *base" "int64_t word" .In sys/resourcevar.h -.Ft int -.Fn suswintr "void *base" "int word" .Sh DESCRIPTION The .Nm @@ -70,7 +67,7 @@ The data written must be naturally aligned. The .Nm routines provide the following functionality: -.Bl -tag -width "suswintr()" +.Bl -tag -width "suword64()" .It Fn subyte Stores a byte of data to the user-space address .Pa base . @@ -86,10 +83,6 @@ Stores 32 bits of data to the user-space address .It Fn suword64 Stores 64 bits of data to the user-space address .Pa base . -.It Fn suswintr -Stores a short word of data to the user-space address -.Pa base . -This func
svn commit: r332657 - in head: etc/mtree sys/kern sys/sys tests/sys tests/sys/capsicum
Author: jhb Date: Tue Apr 17 18:07:40 2018 New Revision: 332657 URL: https://svnweb.freebsd.org/changeset/base/332657 Log: Properly do a deep copy of the ioctls capability array for fget_cap(). fget_cap() tries to do a cheaper snapshot of a file descriptor without holding the file descriptor lock. This snapshot does not do a deep copy of the ioctls capability array, but instead uses a different return value to inform the caller to retry the copy with the lock held. However, filecaps_copy() was returning 1 to indicate that a retry was required, and fget_cap() was checking for 0 (actually '!filecaps_copy()'). As a result, fget_cap() did not do a deep copy of the ioctls array and just reused the original pointer. This cause multiple file descriptor entries to think they owned the same pointer and eventually resulted in duplicate frees. The only code path that I'm aware of that triggers this is to create a listen socket that has a restricted list of ioctls and then call accept() which calls fget_cap() with a valid filecaps structure from getsock_cap(). To fix, change the return value of filecaps_copy() to return true if it succeeds in copying the caps and false if it fails because the lock is required. I find this more intuitive than fixing the caller in this case. While here, change the return type from 'int' to 'bool'. Finally, make filecaps_copy() more robust in the failure case by not copying any of the source filecaps structure over. This avoids the possibility of leaking a pointer into a structure if a similar future caller doesn't properly handle the return value from filecaps_copy() at the expense of one more branch. I also added a test case that panics before this change and now passes. Reviewed by: kib Discussed with: mjg (not a fan of the extra branch) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D15047 Added: head/tests/sys/capsicum/ head/tests/sys/capsicum/Makefile (contents, props changed) head/tests/sys/capsicum/ioctls_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h head/tests/sys/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Tue Apr 17 18:04:28 2018 (r332656) +++ head/etc/mtree/BSD.tests.dist Tue Apr 17 18:07:40 2018 (r332657) @@ -430,6 +430,8 @@ .. aio .. +capsicum +.. cddl zfs bin Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cTue Apr 17 18:04:28 2018 (r332656) +++ head/sys/kern/kern_descrip.cTue Apr 17 18:07:40 2018 (r332657) @@ -1492,16 +1492,16 @@ filecaps_init(struct filecaps *fcaps) * Note that if the table was not locked, the caller has to check the relevant * sequence counter to determine whether the operation was successful. */ -int +bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked) { size_t size; + if (src->fc_ioctls != NULL && !locked) + return (false); *dst = *src; if (src->fc_ioctls == NULL) - return (0); - if (!locked) - return (1); + return (true); KASSERT(src->fc_nioctls > 0, ("fc_ioctls != NULL, but fc_nioctls=%hd", src->fc_nioctls)); @@ -1509,7 +1509,7 @@ filecaps_copy(const struct filecaps *src, struct filec size = sizeof(src->fc_ioctls[0]) * src->fc_nioctls; dst->fc_ioctls = malloc(size, M_FILECAPS, M_WAITOK); bcopy(src->fc_ioctls, dst->fc_ioctls, size); - return (0); + return (true); } static u_long * Modified: head/sys/sys/filedesc.h == --- head/sys/sys/filedesc.h Tue Apr 17 18:04:28 2018(r332656) +++ head/sys/sys/filedesc.h Tue Apr 17 18:07:40 2018(r332657) @@ -155,7 +155,7 @@ enum { struct thread; void filecaps_init(struct filecaps *fcaps); -intfilecaps_copy(const struct filecaps *src, struct filecaps *dst, +bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked); void filecaps_move(struct filecaps *src, struct filecaps *dst); void filecaps_free(struct filecaps *fcaps); Modified: head/tests/sys/Makefile == --- head/tests/sys/Makefile Tue Apr 17 18:04:28 2018(r332656) +++ head/tests/sys/Makefile Tue Apr 17 18:07:40 2018(r332657) @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+=acl TESTS_SUBDIRS+=
Re: svn commit: r332652 - in head/sys: conf dev/puc modules/puc
On Tuesday, April 17, 2018 04:46:09 PM Warner Losh wrote: > Author: imp > Date: Tue Apr 17 16:46:08 2018 > New Revision: 332652 > URL: https://svnweb.freebsd.org/changeset/base/332652 > > Log: > Add PNP info to the PCI attahement of the puc driver. > > Adjust sys/conf/files and sys/modules/puc/Makefile to omit > pucdata.c now tht it's included by puc_pci.c. > > Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) > Pull Request: https://github.com/freebsd/freebsd/pull/136 If you are going to #include it you can remove the terminator entry and use nitems() in puc_pci_match instead. That will also remove the need for the - 1 hack in the MODULE_PNP_INFO line. -- John Baldwin ___ 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"
Re: svn commit: r332652 - in head/sys: conf dev/puc modules/puc
On Tue, Apr 17, 2018 at 11:20 AM, John Baldwin wrote: > On Tuesday, April 17, 2018 04:46:09 PM Warner Losh wrote: > > Author: imp > > Date: Tue Apr 17 16:46:08 2018 > > New Revision: 332652 > > URL: https://svnweb.freebsd.org/changeset/base/332652 > > > > Log: > > Add PNP info to the PCI attahement of the puc driver. > > > > Adjust sys/conf/files and sys/modules/puc/Makefile to omit > > pucdata.c now tht it's included by puc_pci.c. > > > > Submitted by: Lakhan Shiva Kamireddy (with build fixes by me) > > Pull Request: https://github.com/freebsd/freebsd/pull/136 > > If you are going to #include it you can remove the terminator entry > and use nitems() in puc_pci_match instead. That will also remove the > need for the - 1 hack in the MODULE_PNP_INFO line. > Good suggestion... Warner ___ 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: r332658 - head/sys/vm
Author: markj Date: Tue Apr 17 18:49:17 2018 New Revision: 332658 URL: https://svnweb.freebsd.org/changeset/base/332658 Log: Ensure that m and skip_m belong to the same object. Pages allocated from a given reservation may belong to different objects. It is therefore possible for vm_page_ps_test() to be called with the base page's object unlocked. Check for this case before asserting that the object lock is held. Reported by: jhb Reviewed by: kib MFC after:1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Tue Apr 17 18:07:40 2018(r332657) +++ head/sys/vm/vm_page.c Tue Apr 17 18:49:17 2018(r332658) @@ -4140,6 +4140,8 @@ vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip int i, npages; object = m->object; + if (skip_m != NULL && skip_m->object != object) + return (false); VM_OBJECT_ASSERT_LOCKED(object); npages = atop(pagesizes[m->psind]); ___ 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: r332659 - head/usr.sbin/usbconfig
Author: trasz Date: Tue Apr 17 19:39:47 2018 New Revision: 332659 URL: https://svnweb.freebsd.org/changeset/base/332659 Log: Make it possible to pass the ugenX.Y to usbconfig(8) without using "-d", eg "usbconfig ugen1.2 dump_all_desc". Reviewed by: hselasky@ MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/usbconfig/usbconfig.8 head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/usbconfig.8 == --- head/usr.sbin/usbconfig/usbconfig.8 Tue Apr 17 18:49:17 2018 (r332658) +++ head/usr.sbin/usbconfig/usbconfig.8 Tue Apr 17 19:39:47 2018 (r332659) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 30, 2017 +.Dd April 17, 2018 .Dt USBCONFIG 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Op Fl a Ar addr .Op cmds... .Nm -.Op Fl d Ar [ugen]. +.Op Oo Fl d Oc Ar [ugen]. .Op cmds... .Sh DESCRIPTION The Modified: head/usr.sbin/usbconfig/usbconfig.c == --- head/usr.sbin/usbconfig/usbconfig.c Tue Apr 17 18:49:17 2018 (r332658) +++ head/usr.sbin/usbconfig/usbconfig.c Tue Apr 17 19:39:47 2018 (r332659) @@ -820,6 +820,29 @@ main(int argc, char **argv) opt->got_any++; break; default: + if (n == 1) { + ptr = argv[n]; + + if ((ptr[0] == 'u') && + (ptr[1] == 'g') && + (ptr[2] == 'e') && + (ptr[3] == 'n')) + ptr += 4; + + if ((sscanf(ptr, "%d.%d", + &unit, &addr) != 2) || + (unit < 0) || (unit > 65535) || + (addr < 0) || (addr > 65535)) { + usage(); + break; + } + + opt->bus = unit; + opt->addr = addr; + opt->got_bus = 1; + opt->got_addr = 1; + break; + } usage(); break; } ___ 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: r332660 - head/sys/sparc64/sparc64
Author: brooks Date: Tue Apr 17 22:30:00 2018 New Revision: 332660 URL: https://svnweb.freebsd.org/changeset/base/332660 Log: Remove references to fs_nofault_intr_begin/end. These should have removed in r332656. Reported by: mjg, lidl Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c == --- head/sys/sparc64/sparc64/trap.c Tue Apr 17 19:39:47 2018 (r332659) +++ head/sys/sparc64/sparc64/trap.c Tue Apr 17 22:30:00 2018 (r332660) @@ -100,8 +100,6 @@ extern char copy_nofault_end[]; extern char fs_fault[]; extern char fs_nofault_begin[]; extern char fs_nofault_end[]; -extern char fs_nofault_intr_begin[]; -extern char fs_nofault_intr_end[]; extern char fas_fault[]; extern char fas_nofault_begin[]; @@ -478,14 +476,6 @@ trap_pfault(struct thread *td, struct trapframe *tf) } if (ctx != TLB_CTX_KERNEL) { - if ((tf->tf_tstate & TSTATE_PRIV) != 0 && - (tf->tf_tpc >= (u_long)fs_nofault_intr_begin && - tf->tf_tpc <= (u_long)fs_nofault_intr_end)) { - tf->tf_tpc = (u_long)fs_fault; - tf->tf_tnpc = tf->tf_tpc + 4; - return (0); - } - /* This is a fault on non-kernel virtual memory. */ map = &p->p_vmspace->vm_map; } else { ___ 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: r332661 - head/release/amd64
Author: benno Date: Tue Apr 17 22:33:41 2018 New Revision: 332661 URL: https://svnweb.freebsd.org/changeset/base/332661 Log: Generate hybrid ISO images for amd64. This keeps the existing El Torito entries for BIOS and UEFI boot code and adds a GPT in the ISO image's System Area containing boot code for BIOS that will load /boot/loader from the ISO filesystem and execute it. We then use etdump to find the EFI System Partition image in the El Torito catalog and add an entry to the GPT that allows EFI to find it. Reviewed by: gjb, imp Sponsored by: iXsystems, Inc. Differential Revision:https://reviews.freebsd.org/D15051 Modified: head/release/amd64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh == --- head/release/amd64/mkisoimages.sh Tue Apr 17 22:30:00 2018 (r332660) +++ head/release/amd64/mkisoimages.sh Tue Apr 17 22:33:41 2018 (r332661) @@ -38,7 +38,7 @@ if [ "$1" = "-b" ]; then umount efi rmdir efi mdconfig -d -u $device - bootable="-o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi $bootable" + bootable="$bootable -o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi" shift else @@ -58,3 +58,29 @@ echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/f makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" rm -f "$1/etc/fstab" rm -f efiboot.img + +if [ "$bootable" != "" ]; then + # Look for the EFI System Partition image we dropped in the ISO image. + for entry in `etdump --format shell $NAME`; do + eval $entry + if [ "$et_platform" = "efi" ]; then + espstart=`expr $et_lba \* 2048` + espsize=`expr $et_sectors \* 512` + espparam="-p efi::$espsize:$espstart" + break + fi + done + + # Create a GPT image containing the partitions we need for hybrid boot. + imgsize=`stat -f %z $NAME` + mkimg -s gpt \ + --capacity $imgsize \ + -b $4/boot/pmbr \ + $espparam \ + -p freebsd-boot:=$4/boot/isoboot \ + -o hybrid.img + + # Drop the PMBR, GPT, and boot code into the System Area of the ISO. + dd if=hybrid.img of=$NAME bs=32k count=1 conv=notrunc + rm -f hybrid.img +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: r332662 - head/usr.sbin/iostat
Author: allanjude Date: Wed Apr 18 02:25:03 2018 New Revision: 332662 URL: https://svnweb.freebsd.org/changeset/base/332662 Log: Make `iostat -xC` print CPU information on its own line Requested by: mahrens Reviewed by: kenm (maintainer), mahrens MFC after:1 week Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision:https://reviews.freebsd.org/D15076 Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c == --- head/usr.sbin/iostat/iostat.c Tue Apr 17 22:33:41 2018 (r332661) +++ head/usr.sbin/iostat/iostat.c Wed Apr 18 02:25:03 2018 (r332662) @@ -802,11 +802,15 @@ devstats(int perf_select, long double etime, int havel char *devicename; if (xflag > 0) { + if (Cflag > 0) { + printf(" cpu\n"); + printf(" us ni sy in id\n"); + cpustats(); + printf("\n"); + } printf("extended device statistics "); if (Tflag > 0) printf(" tty "); - if (Cflag > 0) - printf(" cpu "); printf("\n"); if (Iflag == 0) { printf("device r/s w/s kr/s kw/s " @@ -817,8 +821,6 @@ devstats(int perf_select, long double etime, int havel } if (Tflag > 0) printf("tin tout "); - if (Cflag > 0) - printf("us ni sy in id "); printf("\n"); } @@ -922,8 +924,6 @@ devstats(int perf_select, long double etime, int havel printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); - if (Cflag > 0) - cpustats(); } printf("\n"); } ___ 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"
Re: svn commit: r332559 - head/usr.sbin/mountd
On 17/4/18 8:32 pm, Konstantin Belousov wrote: On Tue, Apr 17, 2018 at 12:02:04AM +, Rick Macklem wrote: I wrote: Julian Elischer wrote: On 16/4/18 6:56 pm, Konstantin Belousov wrote: [stuff snipped] +ngroups =3D XU_NGROUPS + 1; Why XU_NGROUPS and not the value of sysctl("kern.ngroups") ? valid question.. because that is how many are allocated? it was a "minimally invasive patch".. whoever used XU_NGROUPS before should have fixed it. Having said that, thanks for drawing out attention to it.. will probably fix. 16 is the limit specified in the RFCs for Sun RPC, so that is the "on the wire" limit. I haven't looked at the code. It might make sense to handle more here and then set the limit at 16 after getting rid of duplicates, but I have no idea if = it matters? rick Correcting my own post. Now that I've looked at the code, this doesn't go on the wire. It does go in the exports structure, which means that this structure would have to be revised (along with the syscall and VOP calls and the kernel code that uses it). These credentials are for the "maproot/mapall" export option and revising the export structure seems like quite a bit of work for this case. (Until revised XU_NGROUPS is the correct value to set it to, since there is a "struct xucred" in the exports structure.) Since Julian Elischer has been emailing me about adding a "fsid" export option which allows /etc/exports to set the FSID of the exported fs (which would also need to go in the exports structure), it might be about time to rev. the exports structure? Probably yes, we would need a new variant of the nmount(2) syscall. Existing syscall should use the old layout for compatibility (we care about nmount and COMPAT32 as well). our issue is that we make a server that combines CIFS/SMB access (via samba), credential setting from a company wide AD server (windows) via winbindd (samba) via nsswitch.. and NFS. The problem is that when one looks up a user name from the AD server One can get back a credential with a large number of groups, because some companies use windows groups extensively. SO a sinel user may be in a group for every project they are involved with and a method of giving them access to files related to a project. In this scenario a group manager may be given access to a lot of groups. A user looking at a file via NFS needs to be able to see what he needs and still be blocked as per company policy. I am investigating the new user-manager daemon may help but I don't fully understand it yet. I gather it maps an incoming request to a set of groups as defined on the server rather than on the client, but I'm not sure yet how that relates to mountd. ___ 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: r332663 - head/release/tools
Author: cperciva Date: Wed Apr 18 05:58:27 2018 New Revision: 332663 URL: https://svnweb.freebsd.org/changeset/base/332663 Log: Move debug.{trace,debugger}_on_panic and kern.panic_reboot_wait_time in EC2 instances from sysctl.conf to loader.conf; these can all be set as loader tunables, and setting them in loader.conf gives us the right behaviour in the event of a kernel panic taking place prior to when sysctl.conf is processed. MFC after:1 week Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf == --- head/release/tools/ec2.conf Wed Apr 18 02:25:03 2018(r332662) +++ head/release/tools/ec2.conf Wed Apr 18 05:58:27 2018(r332663) @@ -60,9 +60,9 @@ vm_extra_pre_umount() { # The EC2 console is output-only, so while printing a backtrace can # be useful, there's no point dropping into a debugger or waiting # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf + echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf + echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf + echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf # The console is not interactive, so we might as well boot quickly. echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf ___ 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"