svn commit: r332349 - svnadmin/conf
Author: bapt Date: Tue Apr 10 04:56:31 2018 New Revision: 332349 URL: https://svnweb.freebsd.org/changeset/base/332349 Log: rgrimes@ mentors has been changed to be bde@ and phk@ reflect it in the svn administration files With hat: core Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Tue Apr 10 03:15:07 2018(r332348) +++ svnadmin/conf/mentors Tue Apr 10 04:56:31 2018(r332349) @@ -26,7 +26,7 @@ kadesai ken Co-mentor: scottl, ambrisko mahrensmckusick mjoras rstone peterj jhb Co-mentor: grog -rgrimesgrehan +rgrimesphk Co-mentor: bde sefmav slavashkib Co-mentor: hselasky slmken Co-mentor: scottl, ambrisko ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
[ Charset UTF-8 unsupported, converting... ] > On Mon, Apr 9, 2018 at 11:59 AM, Warner Loshwrote: > > > > > > On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: > >> > >> Right- so, back out this MFC (and the subsequent FreeBSD_version bump) > >> and fix the ports to do the right thing for 12.x while that's still > >> not a technically supported branch? > > > > > > Don't back out the version bump. Other things may be riding along on it 'for > > free'. Better to bump it again when you unMFC (if it's been more than a few > > days since we've had one), and then yet-again when a fixed MFC happens. > > Unless there's something you can ride along on for free :) > > > > Otherwise, that's a great plan. > > Ok, I think the result of this thread and discussion with 0mp is the > following set of actions: > > 1.) One (1) commit to stable/11 to revert the MFC and bump > FreeBSD_Version again for the removal > 2.) One (1) commit to doc to document the new FreeBSD_Version > 3.) Fixing ports to use the "new" behavior on 12, both the > yet-to-be-patched ports and the ports that had already been patched > under the assumption that it would still land first in 11.1-stable > 4.) Documenting the original commit? > > The hard part of point #3 has already been done by 0mp, who has > submitted patches for all of the ports using this behavior. His > patches will just need a bump of the version they're testing to the > 12.x FreeBSD_Version and a fix-up on the patches that already landed. > > For point #4, this seems like the type of breakage we should be > documenting in release notes or something for the eventual upgrading > of systems to 12.0. All usage of _limits stuff in custom rc scripts > need to be audited, and all rc.conf(5)'s need to be scrubbed for > ${name}_limits usage that doesn't make sense with the new context. I'm > not sure what the most appropriate action here is, or what we should > do this far ahead of time for such a thing. We do need a way to stack little notes that need to make it into the release notes, even if there is no single commit they are related to, or in this case we find out later that a change had wider impacts and needs to have a note added. Maybe gjb@ has a place we can just commit to that gets collected for the release? > If this sounds like a good path forward, I'll execute #1 and #2 in the > morning (CST, so ~11 hours from this e-mail being sent). I am on board with this much of this plan. What about cy@ changes to the ddb and other startup scripts? -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332348 - stable/10/usr.sbin/rpcbind
Author: delphij Date: Tue Apr 10 03:15:07 2018 New Revision: 332348 URL: https://svnweb.freebsd.org/changeset/base/332348 Log: MFC r331180: Plug a possible memory leak. Modified: stable/10/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/rpcbind.c == --- stable/10/usr.sbin/rpcbind/rpcbind.cTue Apr 10 03:12:22 2018 (r332347) +++ stable/10/usr.sbin/rpcbind/rpcbind.cTue Apr 10 03:15:07 2018 (r332348) @@ -548,6 +548,8 @@ init_transport(struct netconfig *nconf) pml->pml_map.pm_port = PMAPPORT; if (strcmp(nconf->nc_proto, NC_TCP) == 0) { if (tcptrans[0]) { + free(pml); + pml = NULL; syslog(LOG_ERR, "cannot have more than one TCP transport"); goto error; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332347 - stable/11/usr.sbin/rpcbind
Author: delphij Date: Tue Apr 10 03:12:22 2018 New Revision: 332347 URL: https://svnweb.freebsd.org/changeset/base/332347 Log: MFC r331180: Plug a possible memory leak. Modified: stable/11/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/rpcbind.c == --- stable/11/usr.sbin/rpcbind/rpcbind.cTue Apr 10 02:49:53 2018 (r332346) +++ stable/11/usr.sbin/rpcbind/rpcbind.cTue Apr 10 03:12:22 2018 (r332347) @@ -550,6 +550,8 @@ init_transport(struct netconfig *nconf) pml->pml_map.pm_port = PMAPPORT; if (strcmp(nconf->nc_proto, NC_TCP) == 0) { if (tcptrans[0]) { + free(pml); + pml = NULL; syslog(LOG_ERR, "cannot have more than one TCP transport"); goto error; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332346 - head/release/amd64
Author: benno Date: Tue Apr 10 02:49:53 2018 New Revision: 332346 URL: https://svnweb.freebsd.org/changeset/base/332346 Log: Fix the position of $bootable so that -o platformid=efi applies correctly. Sponsored by: iXsystems, Inc. Pointy hat to:benno (again) Modified: head/release/amd64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh == --- head/release/amd64/mkisoimages.sh Tue Apr 10 02:43:07 2018 (r332345) +++ head/release/amd64/mkisoimages.sh Tue Apr 10 02:49:53 2018 (r332346) @@ -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 $bootable -o platformid=efi" + bootable="-o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi $bootable" shift else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332345 - head/release/amd64
Author: benno Date: Tue Apr 10 02:43:07 2018 New Revision: 332345 URL: https://svnweb.freebsd.org/changeset/base/332345 Log: Fix makefs invocation after r331843. Reported by: gjb Reviewed by: gjb Sponsored by: iXsystems, Inc. Pointy hat to:benno Modified: head/release/amd64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh == --- head/release/amd64/mkisoimages.sh Mon Apr 9 23:36:52 2018 (r332344) +++ head/release/amd64/mkisoimages.sh Tue Apr 10 02:43:07 2018 (r332345) @@ -38,7 +38,7 @@ if [ "$1" = "-b" ]; then umount efi rmdir efi mdconfig -d -u $device - bootable="-o bootimage=efi;efiboot.img -o no-emul-boot $bootable" + bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable -o platformid=efi" shift else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 11:59 AM, Warner Loshwrote: > > > On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: >> >> Right- so, back out this MFC (and the subsequent FreeBSD_version bump) >> and fix the ports to do the right thing for 12.x while that's still >> not a technically supported branch? > > > Don't back out the version bump. Other things may be riding along on it 'for > free'. Better to bump it again when you unMFC (if it's been more than a few > days since we've had one), and then yet-again when a fixed MFC happens. > Unless there's something you can ride along on for free :) > > Otherwise, that's a great plan. Ok, I think the result of this thread and discussion with 0mp is the following set of actions: 1.) One (1) commit to stable/11 to revert the MFC and bump FreeBSD_Version again for the removal 2.) One (1) commit to doc to document the new FreeBSD_Version 3.) Fixing ports to use the "new" behavior on 12, both the yet-to-be-patched ports and the ports that had already been patched under the assumption that it would still land first in 11.1-stable 4.) Documenting the original commit? The hard part of point #3 has already been done by 0mp, who has submitted patches for all of the ports using this behavior. His patches will just need a bump of the version they're testing to the 12.x FreeBSD_Version and a fix-up on the patches that already landed. For point #4, this seems like the type of breakage we should be documenting in release notes or something for the eventual upgrading of systems to 12.0. All usage of _limits stuff in custom rc scripts need to be audited, and all rc.conf(5)'s need to be scrubbed for ${name}_limits usage that doesn't make sense with the new context. I'm not sure what the most appropriate action here is, or what we should do this far ahead of time for such a thing. If this sounds like a good path forward, I'll execute #1 and #2 in the morning (CST, so ~11 hours from this e-mail being sent). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
On Mon, Apr 09, 2018 at 04:38:38PM -0700, Benno Rice wrote: > > > > On Apr 9, 2018, at 6:37 AM, Glen Barberwrote: > > [snip] > > > It appears this part has broken creating disc1.iso (and other ISO > > images) for amd64. I see the following error: > > [snip] > > Yep, that’s on me. I forgot to update mkisoimages.sh. Could you try the > attached patch? > % Index: release/amd64/mkisoimages.sh % === % --- release/amd64/mkisoimages.sh (revision 332343) % +++ release/amd64/mkisoimages.sh (working copy) % @@ -38,7 +38,7 @@ % umount efi % rmdir efi % mdconfig -d -u $device % - bootable="-o bootimage=efi;efiboot.img -o no-emul-boot $bootable" % + bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable -o platformid=efi" % % shift % else This appears to have fixed it. Glen signature.asc Description: PGP signature
Re: svn commit: r332090 - head/stand/i386
On 9 April 2018 at 15:28, John Baldwinwrote: > > I do think we are likely to have far fewer conditional LDFLAGS rather > than CFLAGS though. I think if we are only going to have 1 or 2 > instances in the tree then LDFLAGS.LINKER_TYPE might perhaps be > overkill, but if we think there will be several then I think it is > more readable. Indeed, I don't anticipate we'd end up with more than 1 or 2 instances, but even with only the single case today I think it is clearer (D14998). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
> On Apr 9, 2018, at 6:37 AM, Glen Barberwrote: [snip] > It appears this part has broken creating disc1.iso (and other ISO > images) for amd64. I see the following error: [snip] Yep, that’s on me. I forgot to update mkisoimages.sh. Could you try the attached patch? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332344 - in head/sys: arm/mv dev/cesa
Author: mw Date: Mon Apr 9 23:36:52 2018 New Revision: 332344 URL: https://svnweb.freebsd.org/changeset/base/332344 Log: Enable cesa driver to work with Linux DT binding Linux device tree binding, whose usage is obligatory, comprises faulty representation of Marvell cryptographic engine (CESA) - two engines are artificially gathered into single DT node, in order to avoid certain SW limitation. This patch improves the cesa driver to support above binding, depending on compatible string, which helps to ensure backward compatibility. Submitted by: Patryk Duda Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14760 Modified: head/sys/arm/mv/mv_common.c head/sys/arm/mv/mvwin.h head/sys/dev/cesa/cesa.c head/sys/dev/cesa/cesa.h Modified: head/sys/arm/mv/mv_common.c == --- head/sys/arm/mv/mv_common.c Mon Apr 9 22:59:10 2018(r332343) +++ head/sys/arm/mv/mv_common.c Mon Apr 9 23:36:52 2018(r332344) @@ -108,6 +108,7 @@ static int decode_win_xor_valid(void); static void decode_win_cpu_setup(void); static int decode_win_sdram_fixup(void); static void decode_win_cesa_setup(u_long); +static void decode_win_a38x_cesa_setup(u_long); static void decode_win_usb_setup(u_long); static void decode_win_usb3_setup(u_long); static void decode_win_eth_setup(u_long); @@ -120,6 +121,7 @@ static void decode_win_idma_setup(u_long); static void decode_win_xor_setup(u_long); static void decode_win_cesa_dump(u_long); +static void decode_win_a38x_cesa_dump(u_long); static void decode_win_usb_dump(u_long); static void decode_win_usb3_dump(u_long); static void decode_win_eth_dump(u_long base); @@ -226,6 +228,8 @@ static struct soc_node_spec soc_nodes[] = { { "mrvl,idma", _win_idma_setup, _win_idma_dump, _win_idma_valid}, { "mrvl,cesa", _win_cesa_setup, _win_cesa_dump, _win_cesa_valid}, { "mrvl,pcie", _win_pcie_setup, _win_pcie_dump, _win_pcie_valid}, + { "marvell,armada-38x-crypto", _win_a38x_cesa_setup, + _win_a38x_cesa_dump, _win_cesa_valid}, { NULL, NULL, NULL, NULL }, }; @@ -1558,6 +1562,20 @@ decode_win_cesa_setup(u_long base) } } } +} + +static void +decode_win_a38x_cesa_setup(u_long base) +{ + decode_win_cesa_setup(base); + decode_win_cesa_setup(base + MV_WIN_CESA_OFFSET); +} + +static void +decode_win_a38x_cesa_dump(u_long base) +{ + decode_win_cesa_dump(base); + decode_win_cesa_dump(base + MV_WIN_CESA_OFFSET); } /** Modified: head/sys/arm/mv/mvwin.h == --- head/sys/arm/mv/mvwin.h Mon Apr 9 22:59:10 2018(r332343) +++ head/sys/arm/mv/mvwin.h Mon Apr 9 23:36:52 2018(r332344) @@ -202,6 +202,8 @@ #defineMV_WIN_NETA_OFFSET 0x2000 #defineMV_WIN_NETA_BASE(n) MV_WIN_ETH_BASE(n) + MV_WIN_NETA_OFFSET +#define MV_WIN_CESA_OFFSET 0x2000 + #define MV_WIN_ETH_BASE(n) (0x8 * (n) + 0x200) #define MV_WIN_ETH_SIZE(n) (0x8 * (n) + 0x204) #define MV_WIN_ETH_REMAP(n)(0x4 * (n) + 0x280) Modified: head/sys/dev/cesa/cesa.c == --- head/sys/dev/cesa/cesa.cMon Apr 9 22:59:10 2018(r332343) +++ head/sys/dev/cesa/cesa.cMon Apr 9 23:36:52 2018(r332344) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,6 +77,7 @@ __FBSDID("$FreeBSD$"); static int cesa_probe(device_t); static int cesa_attach(device_t); +static int cesa_attach_late(device_t); static int cesa_detach(device_t); static voidcesa_intr(void *); static int cesa_newsession(device_t, u_int32_t *, struct cryptoini *); @@ -1003,14 +1005,130 @@ cesa_setup_sram(struct cesa_softc *sc) return (0); } +/* + * Function: device_from_node + * This function returns appropriate device_t to phandle_t + * Parameters: + * root - device where you want to start search + * if you provide NULL here, function will take + * "root0" device as root. + * node - we are checking every device_t to be + * appropriate with this. + */ +static device_t +device_from_node(device_t root, phandle_t node) +{ + device_t *children, retval; + int nkid, i; + + /* Nothing matches no node */ + if (node == -1) + return (NULL); + + if (root == NULL) + /* Get root of device tree */ + if ((root = device_lookup_by_name("root0")) == NULL) + return (NULL); + + if (device_get_children(root, , ) != 0) + return (NULL); + + retval
Re: svn commit: r331880 - stable/11/etc
On Monday, April 9, 2018, Warner Loshwrote: > On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: > > > Right- so, back out this MFC (and the subsequent FreeBSD_version bump) > > and fix the ports to do the right thing for 12.x while that's still > > not a technically supported branch? > > > Don't back out the version bump. Other things may be riding along on it > 'for free'. Better to bump it again when you unMFC (if it's been more than > a few days since we've had one), and then yet-again when a fixed MFC > happens. Unless there's something you can ride along on for free :) > > Otherwise, that's a great plan. What's about "direction Z"? Like moving find to /bin and do a compatibility symlink for them from /usr/bin? > > Warner > ___ > svn-src-stable...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to " > svn-src-stable-11-unsubscr...@freebsd.org" > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332343 - head/sys/dev/pci
Author: brooks Date: Mon Apr 9 22:59:10 2018 New Revision: 332343 URL: https://svnweb.freebsd.org/changeset/base/332343 Log: Refactor PCIOCGETCONF for improved readability. The code now has a single, consistant flow for all three ioctl variants. ifdefs and for pre-FreeBSD-7 compatability are moved to functions and macros. So the flow is alwasy the same, we impose the cost of allocating, copying to, updating from, and freeing a copy of struct pci_conf_io on all paths. This change will allow PCIOCGETCONF32 support currently in sys/compat/freebsd32/freebsd32_ioctl.c to be moved here. Reviewed by: kib, jhb Obtained from:CheriBSD Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14978 Modified: head/sys/dev/pci/pci_user.c Modified: head/sys/dev/pci/pci_user.c == --- head/sys/dev/pci/pci_user.c Mon Apr 9 22:23:45 2018(r332342) +++ head/sys/dev/pci/pci_user.c Mon Apr 9 22:59:10 2018(r332343) @@ -65,8 +65,6 @@ __FBSDID("$FreeBSD$"); static d_open_tpci_open; static d_close_t pci_close; -static int pci_conf_match(struct pci_match_conf *matches, int num_matches, - struct pci_conf *match_buf); static d_ioctl_t pci_ioctl; struct cdevsw pcicdev = { @@ -106,7 +104,7 @@ pci_close(struct cdev *dev, int flag, int devtype, str * This function returns 1 on failure, 0 on success. */ static int -pci_conf_match(struct pci_match_conf *matches, int num_matches, +pci_conf_match_native(struct pci_match_conf *matches, int num_matches, struct pci_conf *match_buf) { int i; @@ -275,9 +273,6 @@ struct pci_conf_io32 { #definePCIOCREAD_OLD _IOWR('p', 2, struct pci_io_old) #definePCIOCWRITE_OLD _IOWR('p', 3, struct pci_io_old) -static int pci_conf_match_old(struct pci_match_conf_old *matches, - int num_matches, struct pci_conf *match_buf); - static int pci_conf_match_old(struct pci_match_conf_old *matches, int num_matches, struct pci_conf *match_buf) @@ -405,9 +400,46 @@ pci_conf_match_old32(struct pci_match_conf_old32 *matc return (1); } #endif /* COMPAT_FREEBSD32 */ -#endif /* PRE7_COMPAT */ +#endif /* !PRE7_COMPAT */ +union pci_conf_union { + struct pci_conf pc; +#ifdef PRE7_COMPAT + struct pci_conf_old pco; +#ifdef COMPAT_FREEBSD32 + struct pci_conf_old32 pco32; +#endif +#endif +}; + static int +pci_conf_match(u_long cmd, struct pci_match_conf *matches, int num_matches, +struct pci_conf *match_buf) +{ + + switch (cmd) { + case PCIOCGETCONF: + return (pci_conf_match_native( + (struct pci_match_conf *)matches, num_matches, match_buf)); +#ifdef PRE7_COMPAT + case PCIOCGETCONF_OLD: + return (pci_conf_match_old( + (struct pci_match_conf_old *)matches, num_matches, + match_buf)); +#ifdef COMPAT_FREEBSD32 + case PCIOCGETCONF_OLD32: + return (pci_conf_match_old32( + (struct pci_match_conf_old32 *)matches, num_matches, + match_buf)); +#endif +#endif + default: + /* programmer error */ + return (0); + } +} + +static int pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvio) { struct pci_vpd_element vpd_element, *vpd_user; @@ -490,11 +522,184 @@ pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvi return (0); } +static size_t +pci_match_conf_size(u_long cmd) +{ + + switch (cmd) { + case PCIOCGETCONF: + return (sizeof(struct pci_match_conf)); +#ifdef PRE7_COMPAT + case PCIOCGETCONF_OLD: + return (sizeof(struct pci_match_conf_old)); +#ifdef COMPAT_FREEBSD32 + case PCIOCGETCONF_OLD32: + return (sizeof(struct pci_match_conf_old32)); +#endif +#endif + default: + /* programmer error */ + return (0); + } +} + +static size_t +pci_conf_size(u_long cmd) +{ + + switch (cmd) { + case PCIOCGETCONF: + return (sizeof(struct pci_conf)); +#ifdef PRE7_COMPAT + case PCIOCGETCONF_OLD: + return (sizeof(struct pci_conf_old)); +#ifdef COMPAT_FREEBSD32 + case PCIOCGETCONF_OLD32: + return (sizeof(struct pci_conf_old32)); +#endif +#endif + default: + /* programmer error */ + return (0); + } +} + +static void +pci_conf_io_init(struct pci_conf_io *cio, caddr_t data, u_long cmd) +{ +#if defined(PRE7_COMPAT) && defined(COMPAT_FREEBSD32) + struct pci_conf_io32 *cio32; +#endif + + switch (cmd) { + case PCIOCGETCONF: +#ifdef PRE7_COMPAT + case PCIOCGETCONF_OLD: +#endif + *cio = *(struct pci_conf_io *)data; + return; + +#if
svn commit: r332342 - head/share/man/man9
Author: gonzo Date: Mon Apr 9 22:23:45 2018 New Revision: 332342 URL: https://svnweb.freebsd.org/changeset/base/332342 Log: [man] Add documentation for OpenFirmware API Add man pages for following OpenFirmware functions: OF_child, OF_parent, OF_peer, OF_device_from_xref, OF_device_register_xref, OF_xref_from_device, OF_getprop, OF_getencprop, OF_getencprop_alloc, OF_getprop_alloc, OF_getproplen, OF_hasprop, OF_nextprop, OF_prop_free, OF_searchencprop, OF_searchprop, OF_setprop Edited by:wblock MFC after:3 days Differential Revision:https://reviews.freebsd.org/D14511 Added: head/share/man/man9/OF_child.9 (contents, props changed) head/share/man/man9/OF_device_from_xref.9 (contents, props changed) head/share/man/man9/OF_finddevice.9 (contents, props changed) head/share/man/man9/OF_getprop.9 (contents, props changed) head/share/man/man9/OF_node_from_xref.9 (contents, props changed) head/share/man/man9/OF_package_to_path.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileMon Apr 9 22:06:16 2018 (r332341) +++ head/share/man/man9/MakefileMon Apr 9 22:23:45 2018 (r332342) @@ -208,6 +208,12 @@ MAN= accept_filter.9 \ namei.9 \ netisr.9 \ nv.9 \ + OF_child.9 \ + OF_device_from_xref.9 \ + OF_finddevice.9 \ + OF_getprop.9 \ + OF_node_from_xref.9 \ + OF_package_to_path.9 \ ofw_bus_is_compatible.9 \ ofw_bus_status_okay.9 \ osd.9 \ @@ -1527,6 +1533,21 @@ MLINKS+=nv.9 libnv.9 \ nv.9 nvlist_take_string_array.9 \ nv.9 nvlist_unpack.9 \ nv.9 nvlist_xfer.9 +MLINKS+=OF_child.9 OF_parent.9 \ + OF_child.9 OF_peer.9 +MLINKS+=OF_device_from_xref.9 OF_device_register_xref.9 \ + OF_device_from_xref.9 OF_xref_from_device.9 +MLINKS+=OF_getprop.9 OF_getencprop.9 \ + OF_getprop.9 OF_getencprop_alloc.9 \ + OF_getprop.9 OF_getprop_alloc.9 \ + OF_getprop.9 OF_getproplen.9 \ + OF_getprop.9 OF_hasprop.9 \ + OF_getprop.9 OF_nextprop.9 \ + OF_getprop.9 OF_prop_free.9 \ + OF_getprop.9 OF_searchencprop.9 \ + OF_getprop.9 OF_searchprop.9 \ + OF_getprop.9 OF_setprop.9 +MLINKS+=OF_node_from_xref.9 OF_xref_from_node.9 MLINKS+=ofw_bus_is_compatible.9 ofw_bus_is_compatible_strict.9 \ ofw_bus_is_compatible.9 ofw_bus_node_is_compatible.9 \ ofw_bus_is_compatible.9 ofw_bus_search_compatible.9 Added: head/share/man/man9/OF_child.9 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/OF_child.9 Mon Apr 9 22:23:45 2018 (r332342) @@ -0,0 +1,76 @@ +.\" +.\" Copyright (c) 2018 Oleksandr Tymoshenko+.\" +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 9, 2018 +.Dt OF_CHILD 9 +.Os +.Sh NAME +.Nm OF_child , +.Nm OF_parent , +.Nm OF_peer +.Nd navigate device tree +.Sh SYNOPSIS +.In dev/ofw/ofw_bus.h +.In dev/ofw/ofw_bus_subr.h +.Ft phandle_t +.Fn OF_child "phandle_t node" +.Ft phandle_t +.Fn OF_parent "phandle_t node" +.Ft phandle_t +.Fn OF_peer "phandle_t node" +.Sh DESCRIPTION +.Pp +.Fn OF_child +returns the phandle value of the first child of the +.Fa node . +Zero is returned if there are no child nodes. +.Pp +.Fn OF_parent +returns the phandle for the parent of the +.Fa node . +Zero is returned if +.Fa node +is the root node. +.Pp +.Fn OF_peer +returns the
svn commit: r332341 - in head/sys: arm/amlogic/aml8726 arm/annapurna/alpine arm/at91 arm/broadcom/bcm2835 arm/freescale/imx arm/nvidia/drm2 arm/ti dev/cpufreq dev/dpaa dev/extres/clk dev/extres/phy...
Author: gonzo Date: Mon Apr 9 22:06:16 2018 New Revision: 332341 URL: https://svnweb.freebsd.org/changeset/base/332341 Log: Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_alloc Change OF_getencprop_alloc semantics to be combination of malloc and OF_getencprop and return size of the property, not number of elements allocated. For the use cases where number of elements is preferred introduce OF_getencprop_alloc_multi helper function that copies semantics of OF_getencprop_alloc prior to this change. This is to make OF_getencprop_alloc and OF_getencprop_alloc_multi function signatures consistent with OF_getencprop_alloc and OF_getencprop_alloc_multi. Functionality-wise this patch is mostly rename of OF_getencprop_alloc to OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfo where 1 was used as a block size. Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c head/sys/arm/annapurna/alpine/alpine_pci_msix.c head/sys/arm/at91/at91_pinctrl.c head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm/nvidia/drm2/tegra_drm_subr.c head/sys/arm/ti/ti_adc.c head/sys/arm/ti/ti_pinmux.c head/sys/dev/cpufreq/cpufreq_dt.c head/sys/dev/dpaa/qman_fdt.c head/sys/dev/extres/clk/clk.c head/sys/dev/extres/phy/phy.c head/sys/dev/extres/regulator/regulator.c head/sys/dev/extres/syscon/syscon.c head/sys/dev/fdt/fdt_clock.c head/sys/dev/fdt/fdt_pinctrl.c head/sys/dev/gpio/gpioregulator.c head/sys/dev/gpio/ofw_gpiobus.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h head/sys/dev/vnic/thunder_bgx_fdt.c head/sys/mips/ingenic/jz4780_pinctrl.c head/sys/mips/mediatek/fdt_reset.c head/sys/powerpc/mpc85xx/lbc.c Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c == --- head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c Mon Apr 9 21:46:58 2018(r332340) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c Mon Apr 9 22:06:16 2018(r332341) @@ -195,7 +195,7 @@ aml8726_usb_phy_attach(device_t dev) err = 0; - len = OF_getencprop_alloc(node, "usb-pwr-en", + len = OF_getencprop_alloc_multi(node, "usb-pwr-en", 3 * sizeof(pcell_t), (void **)); npwr_en = (len > 0) ? len : 0; Modified: head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c == --- head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Mon Apr 9 21:46:58 2018(r332340) +++ head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c Mon Apr 9 22:06:16 2018(r332341) @@ -167,7 +167,7 @@ aml8726_usb_phy_attach(device_t dev) err = 0; - len = OF_getencprop_alloc(node, "usb-pwr-en", + len = OF_getencprop_alloc_multi(node, "usb-pwr-en", 3 * sizeof(pcell_t), (void **)); npwr_en = (len > 0) ? len : 0; @@ -188,7 +188,7 @@ aml8726_usb_phy_attach(device_t dev) OF_prop_free(prop); - len = OF_getencprop_alloc(node, "usb-hub-rst", + len = OF_getencprop_alloc_multi(node, "usb-hub-rst", 3 * sizeof(pcell_t), (void **)); if (len > 0) { sc->hub_rst.dev = OF_device_from_xref(prop[0]); Modified: head/sys/arm/annapurna/alpine/alpine_pci_msix.c == --- head/sys/arm/annapurna/alpine/alpine_pci_msix.c Mon Apr 9 21:46:58 2018(r332340) +++ head/sys/arm/annapurna/alpine/alpine_pci_msix.c Mon Apr 9 22:06:16 2018(r332341) @@ -188,7 +188,7 @@ al_msix_attach(device_t dev) sc->gic_dev = gic_dev; /* Manually read range of interrupts from DTB */ - nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), + nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr), (void **)); if (nintr == 0) { device_printf(dev, "Cannot read interrupts prop from DTB\n"); Modified: head/sys/arm/at91/at91_pinctrl.c == --- head/sys/arm/at91/at91_pinctrl.cMon Apr 9 21:46:58 2018 (r332340) +++ head/sys/arm/at91/at91_pinctrl.cMon Apr 9 22:06:16 2018 (r332341) @@ -101,7 +101,8 @@ at91_pinctrl_setup_dinfo(device_t dev, phandle_t node) } resource_list_init(>rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)); + nreg = OF_getencprop_alloc_multi(node, "reg", sizeof(*reg), + (void **)); if (nreg == -1) nreg = 0; if (nreg % (sc->acells + sc->scells) != 0) { @@ -127,7 +128,7 @@ at91_pinctrl_setup_dinfo(device_t dev, phandle_t node) } OF_prop_free(reg); - nintr =
svn commit: r332340 - svnadmin/conf
Author: jtl Date: Mon Apr 9 21:46:58 2018 New Revision: 332340 URL: https://svnweb.freebsd.org/changeset/base/332340 Log: Add Tom Jones (thj@) as a source committer. Tom has been doing work to add support for the GPD Pocket, as well as doing some transport-related work. He plans to continue working on GPD Pocket support. He also plans to work on UDP options support. I will be his mentor. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessMon Apr 9 21:38:45 2018(r332339) +++ svnadmin/conf/accessMon Apr 9 21:46:58 2018(r332340) @@ -208,6 +208,7 @@ stevek syrinx takawata theraven +thj thomas thompsa tijl Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Mon Apr 9 21:38:45 2018(r332339) +++ svnadmin/conf/mentors Mon Apr 9 21:46:58 2018(r332340) @@ -30,4 +30,5 @@ rgrimes grehan sefmav slavashkib Co-mentor: hselasky slmken Co-mentor: scottl, ambrisko +thjjtl wosch cem ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332337 - stable/11/libexec/dma/dmagent
Author: emaste Date: Mon Apr 9 21:16:28 2018 New Revision: 332337 URL: https://svnweb.freebsd.org/changeset/base/332337 Log: dmagent: add -D_WITH_GETLINE to fix stable/11 build The need for _WITH_GETLINE and _WITH_DPRINTF was removed in HEAD in r303524 but is still needed in stable/11 to enable prototypes for these functions. Modified: stable/11/libexec/dma/dmagent/Makefile Modified: stable/11/libexec/dma/dmagent/Makefile == --- stable/11/libexec/dma/dmagent/Makefile Mon Apr 9 20:00:07 2018 (r332336) +++ stable/11/libexec/dma/dmagent/Makefile Mon Apr 9 21:16:28 2018 (r332337) @@ -20,6 +20,7 @@ SRCS= aliases_parse.y \ MAN8= dma.8 CONFS= dma.conf CONFSDIR= ${CONFDIR}/dma +CFLAGS+= -D_WITH_GETLINE YFLAGS+= -i CLEANFILES=aliases_parse.i FILES= mailer.conf ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332336 - stable/11/contrib/dma
Author: emaste Date: Mon Apr 9 20:00:07 2018 New Revision: 332336 URL: https://svnweb.freebsd.org/changeset/base/332336 Log: MFC r326641 by bapt: Split body of mails not respecting RFC2822 For mails which has a body not respecting RFC2822 (which often happen with crontabs) try to split by words finding the last space before 1000's character If no spaces are found then consider the mail to be malformed anyway PR: 208261 Modified: stable/11/contrib/dma/mail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/dma/mail.c == --- stable/11/contrib/dma/mail.cMon Apr 9 19:11:24 2018 (r332335) +++ stable/11/contrib/dma/mail.cMon Apr 9 20:00:07 2018 (r332336) @@ -41,6 +41,8 @@ #include "dma.h" +#define MAX_LINE_RFC8221000 + void bounce(struct qitem *it, const char *reason) { @@ -341,19 +343,47 @@ newaddr: goto again; } +static int +writeline(struct queue *queue, const char *line, ssize_t linelen) +{ + ssize_t len; + + while (linelen > 0) { + len = linelen; + if (linelen > MAX_LINE_RFC822) { + len = MAX_LINE_RFC822 - 10; + } + + if (fwrite(line, len, 1, queue->mailf) != 1) + return (-1); + + if (linelen <= MAX_LINE_RFC822) + break; + + if (fwrite("\n", 1, 1, queue->mailf) != 1) + return (-1); + + line += MAX_LINE_RFC822 - 10; + linelen = strlen(line); + } + return (0); +} + int readmail(struct queue *queue, int nodot, int recp_from_header) { struct parse_state parse_state; - char line[1000];/* by RFC2822 */ - size_t linelen; + char *line = NULL; + ssize_t linelen; + size_t linecap = 0; + char newline[MAX_LINE_RFC822]; size_t error; int had_headers = 0; int had_from = 0; int had_messagid = 0; int had_date = 0; - int had_last_line = 0; int nocopy = 0; + int ret = -1; parse_state.state = NONE; @@ -372,24 +402,17 @@ readmail(struct queue *queue, int nodot, int recp_from return (-1); while (!feof(stdin)) { - if (fgets(line, sizeof(line) - 1, stdin) == NULL) + newline[0] = '\0'; + if ((linelen = getline(, , stdin)) <= 0) break; - if (had_last_line) - errlogx(EX_DATAERR, "bad mail input format:" - " from %s (uid %d) (envelope-from %s)", - username, useruid, queue->sender); - linelen = strlen(line); - if (linelen == 0 || line[linelen - 1] != '\n') { - /* -* This line did not end with a newline character. -* If we fix it, it better be the last line of -* the file. -*/ - line[linelen] = '\n'; - line[linelen + 1] = 0; - had_last_line = 1; - } + if (!had_headers) { + if (linelen > MAX_LINE_RFC822) { + /* XXX also split headers */ + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); + } /* * Unless this is a continuation, switch of * the Bcc: nocopy flag. @@ -430,31 +453,39 @@ readmail(struct queue *queue, int nodot, int recp_from while (!had_date || !had_messagid || !had_from) { if (!had_date) { had_date = 1; - snprintf(line, sizeof(line), "Date: %s\n", rfc822date()); + snprintf(newline, sizeof(newline), "Date: %s\n", rfc822date()); } else if (!had_messagid) { /* XXX msgid, assign earlier and log? */ had_messagid = 1; - snprintf(line, sizeof(line), "Message-Id: <%"PRIxMAX".%s.%"PRIxMAX"@%s>\n", + snprintf(newline, sizeof(newline), "Message-Id: <%"PRIxMAX".%s.%"PRIxMAX"@%s>\n", (uintmax_t)time(NULL), queue->id, (uintmax_t)random(),
Re: svn commit: r332090 - head/stand/i386
On Monday, April 09, 2018 11:02:01 AM Warner Losh wrote: > On Mon, Apr 9, 2018 at 10:44 AM, Ed Mastewrote: > > > On 6 April 2018 at 13:54, John Baldwin wrote: > > > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > > >> Author: emaste > > >> Date: Fri Apr 6 02:57:58 2018 > > >> New Revision: 332090 > > >> URL: https://svnweb.freebsd.org/changeset/base/332090 > > >> > > >> Log: > > >> stand: pass --no-rosegment for i386 bits when linking with lld > > >> > > > > > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? > > > > I don't anticipate LINKER_TYPE tests proliferating, but a good point > > nonetheless. Change proposed in review D14998. > > > > We only really support two compilers. This lets us have fewer .if > statements which historically people have messed often enough that we've > move to constructs that avoid them. I do think we are likely to have far fewer conditional LDFLAGS rather than CFLAGS though. I think if we are only going to have 1 or 2 instances in the tree then LDFLAGS.LINKER_TYPE might perhaps be overkill, but if we think there will be several then I think it is more readable. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332335 - head/sys/amd64/linux32
Author: emaste Date: Mon Apr 9 19:11:24 2018 New Revision: 332335 URL: https://svnweb.freebsd.org/changeset/base/332335 Log: linuxulator: add else case braces to reduce diffs between archs Sponsored by: Turing Robotic Industries Inc. Modified: head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Mon Apr 9 17:30:30 2018 (r332334) +++ head/sys/amd64/linux32/linux32_sysvec.c Mon Apr 9 19:11:24 2018 (r332335) @@ -805,13 +805,14 @@ linux_copyout_strings(struct image_params *imgp) imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(u_int32_t)); - } else + } else { /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ vectp = (u_int32_t *)(destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); + } /* vectp also becomes our initial stack base. */ stack_base = vectp; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332334 - in head: share/man/man4 sys/conf sys/geom
Author: kevans Date: Mon Apr 9 17:30:30 2018 New Revision: 332334 URL: https://svnweb.freebsd.org/changeset/base/332334 Log: Retire the geom_aes class It's had a good life, but it's not really configurable and not really used. Obtained from:opBSD (with some changes) Differential Revision:https://reviews.freebsd.org/D14991 Deleted: head/sys/geom/geom_aes.c Modified: head/share/man/man4/geom.4 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options Modified: head/share/man/man4/geom.4 == --- head/share/man/man4/geom.4 Mon Apr 9 17:24:01 2018(r332333) +++ head/share/man/man4/geom.4 Mon Apr 9 17:30:30 2018(r332334) @@ -34,14 +34,13 @@ .\" .\" $FreeBSD$ .\" -.Dd August 9, 2017 +.Dd April 9, 2018 .Dt GEOM 4 .Os .Sh NAME .Nm GEOM .Nd "modular disk I/O request transformation framework" .Sh SYNOPSIS -.Cd options GEOM_AES .Cd options GEOM_BDE .Cd options GEOM_CACHE .Cd options GEOM_CONCAT Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Apr 9 17:24:01 2018(r332333) +++ head/sys/conf/NOTES Mon Apr 9 17:30:30 2018(r332334) @@ -145,7 +145,6 @@ options INCLUDE_CONFIG_FILE # Include this file i optionsBOOTVERBOSE=1 optionsBOOTHOWTO=RB_MULTIPLE -optionsGEOM_AES# Don't use, use GEOM_BDE optionsGEOM_BDE# Disk encryption. optionsGEOM_BSD# BSD disklabels (obsolete, gone in 12) optionsGEOM_CACHE # Disk cache. Modified: head/sys/conf/files == --- head/sys/conf/files Mon Apr 9 17:24:01 2018(r332333) +++ head/sys/conf/files Mon Apr 9 17:30:30 2018(r332334) @@ -3658,7 +3658,6 @@ geom/eli/g_eli_key_cache.coptional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate -geom/geom_aes.coptional geom_aes geom/geom_bsd.coptional geom_bsd geom/geom_bsd_enc.coptional geom_bsd | geom_part_bsd geom/geom_ccd.coptional ccd | geom_ccd Modified: head/sys/conf/options == --- head/sys/conf/options Mon Apr 9 17:24:01 2018(r332333) +++ head/sys/conf/options Mon Apr 9 17:30:30 2018(r332334) @@ -104,7 +104,6 @@ FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h IMAGACT_BINMISCopt_dontuse.h IPI_PREEMPTION opt_sched.h -GEOM_AES opt_geom.h GEOM_BDE opt_geom.h GEOM_BSD opt_geom.h GEOM_CACHE opt_geom.h ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332333 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux
Author: emaste Date: Mon Apr 9 17:24:01 2018 New Revision: 332333 URL: https://svnweb.freebsd.org/changeset/base/332333 Log: linuxulator: deduplicate linux_exec_imgact_try Previously linuxulator had three identical copies of linux_exec_imgact_try. Deduplicate before adding another arch to linuxulator. Sponsored by: Turing Robotic Industries Inc Differential Revision:https://reviews.freebsd.org/D14856 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_emul.h head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Mon Apr 9 16:32:49 2018 (r332332) +++ head/sys/amd64/linux/linux_sysvec.c Mon Apr 9 17:24:01 2018 (r332333) @@ -86,12 +86,6 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux64, 1); -#if BYTE_ORDER == LITTLE_ENDIAN -#define SHELLMAGIC 0x2123 /* #! */ -#else -#define SHELLMAGIC 0x2321 -#endif - #if defined(DEBUG) SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, @@ -125,7 +119,6 @@ static void linux_vdso_install(void *param); static voidlinux_vdso_deinstall(void *param); static voidlinux_set_syscall_retval(struct thread *td, int error); static int linux_fetch_syscall_args(struct thread *td); -static int linux_exec_imgact_try(struct image_params *iparams); static voidlinux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack); static int linux_vsyscall(struct thread *td); @@ -661,42 +654,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse set_pcb_flags(td->td_pcb, PCB_FULL_IRET); PROC_LOCK(p); mtx_lock(>ps_mtx); -} - -/* - * If a Linux binary is exec'ing something, try this image activator - * first. We override standard shell script execution in order to - * be able to modify the interpreter path. We only do this if a Linux - * binary is doing the exec, so we do not create an EXEC module for it. - */ -static int -linux_exec_imgact_try(struct image_params *imgp) -{ - const char *head = (const char *)imgp->image_header; - char *rpath; - int error = -1; - - /* -* The interpreter for shell scripts run from a Linux binary needs -* to be located in /compat/linux if possible in order to recursively -* maintain Linux path emulation. -*/ - if (((const short *)head)[0] == SHELLMAGIC) { - /* -* Run our normal shell image activator. If it succeeds then -* attempt to use the alternate path for the interpreter. If -* an alternate path is found, use our stringspace to store it. -*/ - if ((error = exec_shell_imgact(imgp)) == 0) { - linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), - imgp->interpreter_name, UIO_SYSSPACE, , 0, - AT_FDCWD); - if (rpath != NULL) - imgp->args->fname_buf = - imgp->interpreter_name = rpath; - } - } - return (error); } #defineLINUX_VSYSCALL_START(-10UL << 20) Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Mon Apr 9 16:32:49 2018 (r332332) +++ head/sys/amd64/linux32/linux32_sysvec.c Mon Apr 9 17:24:01 2018 (r332333) @@ -95,12 +95,6 @@ MODULE_VERSION(linux, 1); suword32(pos++, val); \ } while (0) -#if BYTE_ORDER == LITTLE_ENDIAN -#define SHELLMAGIC 0x2123 /* #! */ -#else -#define SHELLMAGIC 0x2321 -#endif - /* * Allow the sendsig functions to use the ldebug() facility even though they * are not syscalls themselves. Map them to syscall 0. This is slightly less @@ -124,7 +118,6 @@ static int linux_fixup_elf(register_t **stack_base, struct image_params *iparams); static register_t *linux_copyout_strings(struct image_params *imgp); static void linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); -static int linux_exec_imgact_try(struct image_params *iparams); static voidlinux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack); static voidlinux32_fixlimit(struct rlimit *rl, int which); @@ -715,42 +708,6 @@ linux32_fetch_syscall_args(struct thread *td) td->td_retval[1] = frame->tf_rdx; return (0); -} - -/* - * If a Linux binary is exec'ing something, try this image activator - * first. We override standard shell script execution in order to - * be able to modify the
Re: svn commit: r332091 - stable/11/sys/vm
On Fri, Apr 06, 2018 at 09:25:08AM +, Konstantin Belousov wrote: > Author: kib > Date: Fri Apr 6 09:25:08 2018 > New Revision: 332091 > URL: https://svnweb.freebsd.org/changeset/base/332091 > > Log: > MFC r331760: > Make vm_map_max/min/pmap KBI stable. > > Modified: > stable/11/sys/vm/vm_map.c > stable/11/sys/vm/vm_map.h > Directory Properties: > stable/11/ (props changed) -STABLE still crashed after load vboxnet build on 11.1-RELEASE nvidia (build on 11.1-RELEASE) also don't work ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On Mon, Apr 9, 2018 at 10:44 AM, Ed Mastewrote: > On 6 April 2018 at 13:54, John Baldwin wrote: > > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > >> Author: emaste > >> Date: Fri Apr 6 02:57:58 2018 > >> New Revision: 332090 > >> URL: https://svnweb.freebsd.org/changeset/base/332090 > >> > >> Log: > >> stand: pass --no-rosegment for i386 bits when linking with lld > >> > > > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? > > I don't anticipate LINKER_TYPE tests proliferating, but a good point > nonetheless. Change proposed in review D14998. > We only really support two compilers. This lets us have fewer .if statements which historically people have messed often enough that we've move to constructs that avoid them. Warner ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evanswrote: > Right- so, back out this MFC (and the subsequent FreeBSD_version bump) > and fix the ports to do the right thing for 12.x while that's still > not a technically supported branch? Don't back out the version bump. Other things may be riding along on it 'for free'. Better to bump it again when you unMFC (if it's been more than a few days since we've had one), and then yet-again when a fixed MFC happens. Unless there's something you can ride along on for free :) Otherwise, that's a great plan. Warner ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On 6 April 2018 at 13:54, John Baldwinwrote: > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: >> Author: emaste >> Date: Fri Apr 6 02:57:58 2018 >> New Revision: 332090 >> URL: https://svnweb.freebsd.org/changeset/base/332090 >> >> Log: >> stand: pass --no-rosegment for i386 bits when linking with lld >> > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? I don't anticipate LINKER_TYPE tests proliferating, but a good point nonetheless. Change proposed in review D14998. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332332 - stable/10/sys/net
Author: brooks Date: Mon Apr 9 16:32:49 2018 New Revision: 332332 URL: https://svnweb.freebsd.org/changeset/base/332332 Log: MFC r332151: ifconf(): correct handling of sockaddrs smaller than struct sockaddr. Portable programs that use SIOCGIFCONF (e.g. traceroute) assume that each pseudo ifreq is of length MAX(sizeof(struct ifreq), sizeof(ifr_name) + ifr_addr.sa_len). For short sockaddrs we copied too much from the source sockaddr resulting in a heap leak. I believe only one such sockaddr exists (struct sockaddr_sco which is 8 bytes) and it is unclear if such sockaddrs end up on interfaces in practice. If it did, the result would be an 8 byte heap leak on current architectures. admbugs: 869 Reviewed by: kib Obtained from:CheriBSD Security: kernel heap leak Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14981 Modified: stable/10/sys/net/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if.c == --- stable/10/sys/net/if.c Mon Apr 9 16:18:02 2018(r332331) +++ stable/10/sys/net/if.c Mon Apr 9 16:32:49 2018(r332332) @@ -3055,7 +3055,13 @@ again: } else #endif if (sa->sa_len <= sizeof(*sa)) { - ifr.ifr_addr = *sa; + if (sa->sa_len < sizeof(*sa)) { + memset(_ifru.ifru_addr, 0, + sizeof(ifr.ifr_ifru.ifru_addr)); + memcpy(_ifru.ifru_addr, sa, + sa->sa_len); + } else + ifr.ifr_ifru.ifru_addr = *sa; sbuf_bcat(sb, , sizeof(ifr)); max_len += sizeof(ifr); } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Mon, Apr 09, 2018 at 04:19:11PM +, Brooks Davis wrote: > On Mon, Apr 09, 2018 at 03:32:50PM +, Brooks Davis wrote: > > On Mon, Apr 09, 2018 at 01:58:49PM +, Glen Barber wrote: > > > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > > > Author: brooks > > > > Date: Sun Apr 8 16:54:07 2018 > > > > New Revision: 332288 > > > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > > > > > Log: > > > > MFC r331797: > > > > > > > > Use an accessor function to access ifr_data. > > > > > > > > This fixes 32-bit compat (no ioctl command defintions are required > > > > as struct ifreq is the same size). > > > > > > > > Reviewed by: kib > > > > Obtained from:CheriBSD > > > > Sponsored by: DARPA, AFRL > > > > Differential Revision:https://reviews.freebsd.org/D14900 > > > > > > > > Modified: > > > [...] > > > > stable/11/sys/dev/wl/if_wl.c > > > > > > > Directory Properties: > > > > stable/11/ (props changed) > > > > > > > [...] > > > > Modified: stable/11/sys/dev/wl/if_wl.c > > > > == > > > > --- stable/11/sys/dev/wl/if_wl.cSun Apr 8 16:46:24 2018 > > > > (r332287) > > > > +++ stable/11/sys/dev/wl/if_wl.cSun Apr 8 16:54:07 2018 > > > > (r332288) > > > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > > > data) > > > > } > > > > WL_UNLOCK(sc); > > > > > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), > > > > sizeof(psa_buf)); > > > > break; > > > > > > > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > > > data) > > > > if ((error = priv_check(td, PRIV_DRIVER))) > > > > break; > > > > > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > > > if (error) > > > > break; > > > > > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > > > data) > > > > /* get the current NWID out of the sc since we stored it there > > > > */ > > > > case SIOCGWLCNWID: > > > > WL_LOCK(sc); > > > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | > > > > sc->nwid[1]); > > > > WL_UNLOCK(sc); > > > > break; > > > > > > > > > > This part of the change appears to have broken i386 with the following: > > > > Sorry about this, will fix shortly. > > Fixed in r332331. > Thank you. Glen signature.asc Description: PGP signature
Re: svn commit: r331880 - stable/11/etc
[ Charset UTF-8 unsupported, converting... ] > On Mon, Apr 9, 2018 at 10:52 AM, Rodney W. Grimes >wrote: > >> On Mon, Apr 9, 2018 at 10:30 AM, Rodney W. Grimes > >> wrote: > >> >> On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimes > >> >> wrote: > >> >> >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes > >> >> >> wrote: > >> >> >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: > >> >> >> >> >> Author: kevans > >> >> >> >> >> Date: Mon Apr 2 15:28:48 2018 > >> >> >> >> >> New Revision: 331880 > >> >> >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> >> >> >> >> > >> >> >> >> >> Log: > >> >> >> >> >>MFC r328331: Support configuring arbitrary limits(1) for > >> >> >> >> >> any rc.conf daemon > >> >> >> >> >> > >> >> >> >> >>Usage is ${name}_limits, and the argument is any flags > >> >> >> >> >> accepted by > >> >> >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open > >> >> >> >> >> files). > >> >> >> >> >> > >> >> >> >> >> Modified: > >> >> >> >> >>stable/11/etc/rc.subr > >> >> >> >> >> Directory Properties: > >> >> >> >> >>stable/11/ (props changed) > >> >> >> >> >> > >> >> >> >> >> Modified: stable/11/etc/rc.subr > >> >> >> >> >> == > >> >> >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018 > >> >> >> >> >> (r331879) > >> >> >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018 > >> >> >> >> >> (r331880) > >> >> >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() > >> >> >> >> >> # > >> >> >> >> >> #${name}_login_class n Login class to use, else > >> >> >> >> >> "daemon". > >> >> >> >> >> # > >> >> >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. > >> >> >> >> >> +# > >> >> >> >> > > >> >> >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used > >> >> >> >> > before > >> >> >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken > >> >> >> >> > by > >> >> >> >> > this change if a call is made to limits. > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >> >> >> >> Sorry for jumping on this so late. This is also an issue in > >> >> >> >> CURRENT, > >> >> >> >> and has been since at least 2016. > >> >> >> > > >> >> >> > I was aware that it was an issue and why I made a comment about it > >> >> >> > being MFC'ed. Though I had forgot a bug report existed. > >> >> >> > >> >> >> I'm kind of surprised we haven't had more complaints about this- the > >> >> >> original commit for this stuff landed before stable/11 was even > >> >> >> branched, so it's been broken for all of 11.x's lifetime. > >> >> > > >> >> > History has taught me it takes a long time for this type of > >> >> > breakage to usually surface in a noticable way. Also I think > >> >> > until you merged this last ${name}_limits thing it actually > >> >> > didn't cause an issue, except for the few like me running > >> >> > diskless systems and or seperate /usr. > >> >> > >> >> I don't see how this merge could possibly have been the cause of any > >> >> claimed issues- like I said before, it didn't add any limits > >> >> invocations, it added an arg to the limits invocation that already > >> >> existed. You can see this pretty clearly from the diff, we didn't even > >> >> change any conditions for limits to be invoked. > >> > > >> > limits_mysql="NO" is defined by the startup script for mysql, > >> > that now causes /etc/rc to try and use that variable in a > >> > different way. > >> > > >> > You added a variable, one that was already in use by some other > >> > /etc/rc* related component. Collision of differening uses is > >> > causing errors. > >> > > >> > >> Ah, apologies, I misread your previous e-mail and had interpreted it > >> as you claiming again that this broke things for those of you "running > >> diskless systems and or seperate /usr." -- this other breakage, these > >> are things we can fix and aren't really large hurdles to climb over. > > > > Mostly true, other than the hurdle of that 0mp mentions in his > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 > > We need to remember that we cannot simply switch to > > the new mechanism as it is only available in 12-CURRENT > > and soon in 11-STABLE (and 11.2). > > > > I am not sure how to handle that with the users, it is a operational > > interface change in how limits are done for these ports and probably > > is going to break a lot of peoples systems if they try to update > > from 11.1 to 11.2 because there /etc/rc.conf file is full of old > > stuff that this new stuff is incompatible with. > > > > IMHO, it would be best to post pone this change to 12, as people > > are more willing to suffer painful upgrades when going between > > major versions. > > > > Right- so, back out this MFC (and the
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Mon, Apr 09, 2018 at 03:32:50PM +, Brooks Davis wrote: > On Mon, Apr 09, 2018 at 01:58:49PM +, Glen Barber wrote: > > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > > Author: brooks > > > Date: Sun Apr 8 16:54:07 2018 > > > New Revision: 332288 > > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > > > Log: > > > MFC r331797: > > > > > > Use an accessor function to access ifr_data. > > > > > > This fixes 32-bit compat (no ioctl command defintions are required > > > as struct ifreq is the same size). > > > > > > Reviewed by:kib > > > Obtained from: CheriBSD > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D14900 > > > > > > Modified: > > [...] > > > stable/11/sys/dev/wl/if_wl.c > > > > > Directory Properties: > > > stable/11/ (props changed) > > > > > [...] > > > Modified: stable/11/sys/dev/wl/if_wl.c > > > == > > > --- stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:46:24 2018 > > > (r332287) > > > +++ stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:54:07 2018 > > > (r332288) > > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > > } > > > WL_UNLOCK(sc); > > > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > > > break; > > > > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > > if ((error = priv_check(td, PRIV_DRIVER))) > > > break; > > > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > > if (error) > > > break; > > > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > > /* get the current NWID out of the sc since we stored it there */ > > > case SIOCGWLCNWID: > > > WL_LOCK(sc); > > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > WL_UNLOCK(sc); > > > break; > > > > > > > This part of the change appears to have broken i386 with the following: > > Sorry about this, will fix shortly. Fixed in r332331. -- Brooks signature.asc Description: PGP signature
svn commit: r332331 - stable/11/sys/dev/wl
Author: brooks Date: Mon Apr 9 16:18:02 2018 New Revision: 332331 URL: https://svnweb.freebsd.org/changeset/base/332331 Log: Fix wl(4) after r332288. I missed that this was an assignment (a bad pattern, use another member) on i386. As wl(4) is i386 only and gone in head, just expand the ifr_ifru member rather than adding an accessor. Reported by: gjb Modified: stable/11/sys/dev/wl/if_wl.c Modified: stable/11/sys/dev/wl/if_wl.c == --- stable/11/sys/dev/wl/if_wl.cMon Apr 9 15:29:14 2018 (r332330) +++ stable/11/sys/dev/wl/if_wl.cMon Apr 9 16:18:02 2018 (r332331) @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) /* get the current NWID out of the sc since we stored it there */ case SIOCGWLCNWID: WL_LOCK(sc); - ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); + ifr->ifr_ifru.ifru_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); WL_UNLOCK(sc); break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 10:52 AM, Rodney W. Grimeswrote: >> On Mon, Apr 9, 2018 at 10:30 AM, Rodney W. Grimes >> wrote: >> >> On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimes >> >> wrote: >> >> >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes >> >> >> wrote: >> >> >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: >> >> >> >> >> Author: kevans >> >> >> >> >> Date: Mon Apr 2 15:28:48 2018 >> >> >> >> >> New Revision: 331880 >> >> >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 >> >> >> >> >> >> >> >> >> >> Log: >> >> >> >> >>MFC r328331: Support configuring arbitrary limits(1) for any >> >> >> >> >> rc.conf daemon >> >> >> >> >> >> >> >> >> >>Usage is ${name}_limits, and the argument is any flags >> >> >> >> >> accepted by >> >> >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). >> >> >> >> >> >> >> >> >> >> Modified: >> >> >> >> >>stable/11/etc/rc.subr >> >> >> >> >> Directory Properties: >> >> >> >> >>stable/11/ (props changed) >> >> >> >> >> >> >> >> >> >> Modified: stable/11/etc/rc.subr >> >> >> >> >> == >> >> >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018 >> >> >> >> >> (r331879) >> >> >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018 >> >> >> >> >> (r331880) >> >> >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() >> >> >> >> >> # >> >> >> >> >> #${name}_login_class n Login class to use, else >> >> >> >> >> "daemon". >> >> >> >> >> # >> >> >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. >> >> >> >> >> +# >> >> >> >> > >> >> >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used >> >> >> >> > before >> >> >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by >> >> >> >> > this change if a call is made to limits. >> >> >> >> > >> >> >> >> > >> >> >> >> >> >> >> >> Sorry for jumping on this so late. This is also an issue in >> >> >> >> CURRENT, >> >> >> >> and has been since at least 2016. >> >> >> > >> >> >> > I was aware that it was an issue and why I made a comment about it >> >> >> > being MFC'ed. Though I had forgot a bug report existed. >> >> >> >> >> >> I'm kind of surprised we haven't had more complaints about this- the >> >> >> original commit for this stuff landed before stable/11 was even >> >> >> branched, so it's been broken for all of 11.x's lifetime. >> >> > >> >> > History has taught me it takes a long time for this type of >> >> > breakage to usually surface in a noticable way. Also I think >> >> > until you merged this last ${name}_limits thing it actually >> >> > didn't cause an issue, except for the few like me running >> >> > diskless systems and or seperate /usr. >> >> >> >> I don't see how this merge could possibly have been the cause of any >> >> claimed issues- like I said before, it didn't add any limits >> >> invocations, it added an arg to the limits invocation that already >> >> existed. You can see this pretty clearly from the diff, we didn't even >> >> change any conditions for limits to be invoked. >> > >> > limits_mysql="NO" is defined by the startup script for mysql, >> > that now causes /etc/rc to try and use that variable in a >> > different way. >> > >> > You added a variable, one that was already in use by some other >> > /etc/rc* related component. Collision of differening uses is >> > causing errors. >> > >> >> Ah, apologies, I misread your previous e-mail and had interpreted it >> as you claiming again that this broke things for those of you "running >> diskless systems and or seperate /usr." -- this other breakage, these >> are things we can fix and aren't really large hurdles to climb over. > > Mostly true, other than the hurdle of that 0mp mentions in his > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 > We need to remember that we cannot simply switch to > the new mechanism as it is only available in 12-CURRENT > and soon in 11-STABLE (and 11.2). > > I am not sure how to handle that with the users, it is a operational > interface change in how limits are done for these ports and probably > is going to break a lot of peoples systems if they try to update > from 11.1 to 11.2 because there /etc/rc.conf file is full of old > stuff that this new stuff is incompatible with. > > IMHO, it would be best to post pone this change to 12, as people > are more willing to suffer painful upgrades when going between > major versions. > Right- so, back out this MFC (and the subsequent FreeBSD_version bump) and fix the ports to do the right thing for 12.x while that's still not a technically supported branch? >> >> We just need people like 0mp that are actually inclined to address it >> in ports, and we need to actually communicate changes like this with >> ports
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 9:29 AM, Shawn Webbwrote: > On Mon, Apr 02, 2018 at 03:28:48PM +, Kyle Evans wrote: >> Author: kevans >> Date: Mon Apr 2 15:28:48 2018 >> New Revision: 331880 >> URL: https://svnweb.freebsd.org/changeset/base/331880 >> >> Log: >> MFC r328331: Support configuring arbitrary limits(1) for any rc.conf daemon >> >> Usage is ${name}_limits, and the argument is any flags accepted by >> limits(1), such as `-n 100' (e.g. only allow 100 open files). > > A HardenedBSD user has reported an issue with this commit: > > https://twitter.com/0x666c7578/status/982901931969597440 > The mariadb ports should be good with this after ports r466451, tracking PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
> On Mon, Apr 9, 2018 at 10:30 AM, Rodney W. Grimes >wrote: > >> On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimes > >> wrote: > >> >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes > >> >> wrote: > >> >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: > >> >> >> >> Author: kevans > >> >> >> >> Date: Mon Apr 2 15:28:48 2018 > >> >> >> >> New Revision: 331880 > >> >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> >> >> >> > >> >> >> >> Log: > >> >> >> >>MFC r328331: Support configuring arbitrary limits(1) for any > >> >> >> >> rc.conf daemon > >> >> >> >> > >> >> >> >>Usage is ${name}_limits, and the argument is any flags > >> >> >> >> accepted by > >> >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). > >> >> >> >> > >> >> >> >> Modified: > >> >> >> >>stable/11/etc/rc.subr > >> >> >> >> Directory Properties: > >> >> >> >>stable/11/ (props changed) > >> >> >> >> > >> >> >> >> Modified: stable/11/etc/rc.subr > >> >> >> >> == > >> >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018 > >> >> >> >> (r331879) > >> >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018 > >> >> >> >> (r331880) > >> >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() > >> >> >> >> # > >> >> >> >> #${name}_login_class n Login class to use, else > >> >> >> >> "daemon". > >> >> >> >> # > >> >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. > >> >> >> >> +# > >> >> >> > > >> >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used > >> >> >> > before > >> >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by > >> >> >> > this change if a call is made to limits. > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> Sorry for jumping on this so late. This is also an issue in CURRENT, > >> >> >> and has been since at least 2016. > >> >> > > >> >> > I was aware that it was an issue and why I made a comment about it > >> >> > being MFC'ed. Though I had forgot a bug report existed. > >> >> > >> >> I'm kind of surprised we haven't had more complaints about this- the > >> >> original commit for this stuff landed before stable/11 was even > >> >> branched, so it's been broken for all of 11.x's lifetime. > >> > > >> > History has taught me it takes a long time for this type of > >> > breakage to usually surface in a noticable way. Also I think > >> > until you merged this last ${name}_limits thing it actually > >> > didn't cause an issue, except for the few like me running > >> > diskless systems and or seperate /usr. > >> > >> I don't see how this merge could possibly have been the cause of any > >> claimed issues- like I said before, it didn't add any limits > >> invocations, it added an arg to the limits invocation that already > >> existed. You can see this pretty clearly from the diff, we didn't even > >> change any conditions for limits to be invoked. > > > > limits_mysql="NO" is defined by the startup script for mysql, > > that now causes /etc/rc to try and use that variable in a > > different way. > > > > You added a variable, one that was already in use by some other > > /etc/rc* related component. Collision of differening uses is > > causing errors. > > > > Ah, apologies, I misread your previous e-mail and had interpreted it > as you claiming again that this broke things for those of you "running > diskless systems and or seperate /usr." -- this other breakage, these > are things we can fix and aren't really large hurdles to climb over. Mostly true, other than the hurdle of that 0mp mentions in his https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 We need to remember that we cannot simply switch to the new mechanism as it is only available in 12-CURRENT and soon in 11-STABLE (and 11.2). I am not sure how to handle that with the users, it is a operational interface change in how limits are done for these ports and probably is going to break a lot of peoples systems if they try to update from 11.1 to 11.2 because there /etc/rc.conf file is full of old stuff that this new stuff is incompatible with. IMHO, it would be best to post pone this change to 12, as people are more willing to suffer painful upgrades when going between major versions. > > We just need people like 0mp that are actually inclined to address it > in ports, and we need to actually communicate changes like this with > ports people and assess what's going to break and make a plan to get > it fixed. Problem was/is no one had the foresight to see the ports breakage coming and avoid it in some way. That happens, its engineering, lets find a fix and move on. > IMO this in particular wasn't a major change, and it shouldn't have > been too big of a deal (unlike the commit that it built upon). I don't > think it
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 10:30 AM, Rodney W. Grimeswrote: >> On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimes >> wrote: >> >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes >> >> wrote: >> >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: >> >> >> >> Author: kevans >> >> >> >> Date: Mon Apr 2 15:28:48 2018 >> >> >> >> New Revision: 331880 >> >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 >> >> >> >> >> >> >> >> Log: >> >> >> >>MFC r328331: Support configuring arbitrary limits(1) for any >> >> >> >> rc.conf daemon >> >> >> >> >> >> >> >>Usage is ${name}_limits, and the argument is any flags accepted >> >> >> >> by >> >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). >> >> >> >> >> >> >> >> Modified: >> >> >> >>stable/11/etc/rc.subr >> >> >> >> Directory Properties: >> >> >> >>stable/11/ (props changed) >> >> >> >> >> >> >> >> Modified: stable/11/etc/rc.subr >> >> >> >> == >> >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) >> >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) >> >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() >> >> >> >> # >> >> >> >> #${name}_login_class n Login class to use, else >> >> >> >> "daemon". >> >> >> >> # >> >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. >> >> >> >> +# >> >> >> > >> >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used before >> >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by >> >> >> > this change if a call is made to limits. >> >> >> > >> >> >> > >> >> >> >> >> >> Sorry for jumping on this so late. This is also an issue in CURRENT, >> >> >> and has been since at least 2016. >> >> > >> >> > I was aware that it was an issue and why I made a comment about it >> >> > being MFC'ed. Though I had forgot a bug report existed. >> >> >> >> I'm kind of surprised we haven't had more complaints about this- the >> >> original commit for this stuff landed before stable/11 was even >> >> branched, so it's been broken for all of 11.x's lifetime. >> > >> > History has taught me it takes a long time for this type of >> > breakage to usually surface in a noticable way. Also I think >> > until you merged this last ${name}_limits thing it actually >> > didn't cause an issue, except for the few like me running >> > diskless systems and or seperate /usr. >> >> I don't see how this merge could possibly have been the cause of any >> claimed issues- like I said before, it didn't add any limits >> invocations, it added an arg to the limits invocation that already >> existed. You can see this pretty clearly from the diff, we didn't even >> change any conditions for limits to be invoked. > > limits_mysql="NO" is defined by the startup script for mysql, > that now causes /etc/rc to try and use that variable in a > different way. > > You added a variable, one that was already in use by some other > /etc/rc* related component. Collision of differening uses is > causing errors. > Ah, apologies, I misread your previous e-mail and had interpreted it as you claiming again that this broke things for those of you "running diskless systems and or seperate /usr." -- this other breakage, these are things we can fix and aren't really large hurdles to climb over. We just need people like 0mp that are actually inclined to address it in ports, and we need to actually communicate changes like this with ports people and assess what's going to break and make a plan to get it fixed. IMO this in particular wasn't a major change, and it shouldn't have been too big of a deal (unlike the commit that it built upon). I don't think it should've been broken in head for two months in the various ports that 0mp has identified- even if people don't run these databases on head, we should've assessed the fallout and fixed it somewhere in the two month's time. We're not talking half the ports tree, we're talking < 30 ports. =( ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Mon, Apr 09, 2018 at 01:58:49PM +, Glen Barber wrote: > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > Author: brooks > > Date: Sun Apr 8 16:54:07 2018 > > New Revision: 332288 > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > Log: > > MFC r331797: > > > > Use an accessor function to access ifr_data. > > > > This fixes 32-bit compat (no ioctl command defintions are required > > as struct ifreq is the same size). > > > > Reviewed by: kib > > Obtained from:CheriBSD > > Sponsored by: DARPA, AFRL > > Differential Revision:https://reviews.freebsd.org/D14900 > > > > Modified: > [...] > > stable/11/sys/dev/wl/if_wl.c > > > Directory Properties: > > stable/11/ (props changed) > > > [...] > > Modified: stable/11/sys/dev/wl/if_wl.c > > == > > --- stable/11/sys/dev/wl/if_wl.cSun Apr 8 16:46:24 2018 > > (r332287) > > +++ stable/11/sys/dev/wl/if_wl.cSun Apr 8 16:54:07 2018 > > (r332288) > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > } > > WL_UNLOCK(sc); > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > > break; > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > if ((error = priv_check(td, PRIV_DRIVER))) > > break; > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > if (error) > > break; > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > > /* get the current NWID out of the sc since we stored it there */ > > case SIOCGWLCNWID: > > WL_LOCK(sc); > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > WL_UNLOCK(sc); > > break; > > > > This part of the change appears to have broken i386 with the following: Sorry about this, will fix shortly. -- Brooks signature.asc Description: PGP signature
Re: svn commit: r331880 - stable/11/etc
> On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimes >wrote: > >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes > >> wrote: > >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: > >> >> >> Author: kevans > >> >> >> Date: Mon Apr 2 15:28:48 2018 > >> >> >> New Revision: 331880 > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> >> >> > >> >> >> Log: > >> >> >>MFC r328331: Support configuring arbitrary limits(1) for any > >> >> >> rc.conf daemon > >> >> >> > >> >> >>Usage is ${name}_limits, and the argument is any flags accepted by > >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). > >> >> >> > >> >> >> Modified: > >> >> >>stable/11/etc/rc.subr > >> >> >> Directory Properties: > >> >> >>stable/11/ (props changed) > >> >> >> > >> >> >> Modified: stable/11/etc/rc.subr > >> >> >> == > >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) > >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) > >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() > >> >> >> # > >> >> >> #${name}_login_class n Login class to use, else "daemon". > >> >> >> # > >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. > >> >> >> +# > >> >> > > >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used before > >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by > >> >> > this change if a call is made to limits. > >> >> > > >> >> > > >> >> > >> >> Sorry for jumping on this so late. This is also an issue in CURRENT, > >> >> and has been since at least 2016. > >> > > >> > I was aware that it was an issue and why I made a comment about it > >> > being MFC'ed. Though I had forgot a bug report existed. > >> > >> I'm kind of surprised we haven't had more complaints about this- the > >> original commit for this stuff landed before stable/11 was even > >> branched, so it's been broken for all of 11.x's lifetime. > > > > History has taught me it takes a long time for this type of > > breakage to usually surface in a noticable way. Also I think > > until you merged this last ${name}_limits thing it actually > > didn't cause an issue, except for the few like me running > > diskless systems and or seperate /usr. > > I don't see how this merge could possibly have been the cause of any > claimed issues- like I said before, it didn't add any limits > invocations, it added an arg to the limits invocation that already > existed. You can see this pretty clearly from the diff, we didn't even > change any conditions for limits to be invoked. limits_mysql="NO" is defined by the startup script for mysql, that now causes /etc/rc to try and use that variable in a different way. You added a variable, one that was already in use by some other /etc/rc* related component. Collision of differening uses is causing errors. > > This latest issue is a name space collision between base and ports. > > > > People who see limits issues due to missing /usr files usually > > know how to work around it, and they do, they just cp /usr/bin/limits > > to /bin, and do not submit a bug report or send an email. > > > > That saddens me. =/ Sorry for the reality check. Breakage can often take years before someone notices some side effect that was never for seen. Its just the nature of the beast. I am *still* dealing with the fall out that was the FreeBSD 6.0 conversion from standalone ata code to ata over cam. Our error reporting and handling is still not as robust as that which I have in my 5.4p8 based systems. I think it was near 2 years before someone noticed that a change to telldir() caused Samba performance to go in the tank. And iirc that change was done to make it Posix compliant! I try to keep in mind that every bug being fixed often has an unknown new bug being introduced, and some times 2. If you do not believe this, go look at the coverty graphs, despite the fact that many coverty errors have been fixed, we are actually increasing the number of issues over the long term. In the statistic process model of manufacturing when you see this the first thing that comes to mind is "we have an open loop and out of control manufacturing system". Now that saddens me. =/ -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332330 - stable/10/sys/netpfil/pf
Author: kp Date: Mon Apr 9 15:29:14 2018 New Revision: 332330 URL: https://svnweb.freebsd.org/changeset/base/332330 Log: MFC r331225: pf: Fix memory leak in DIOCRADDTABLES If a user attempts to add two tables with the same name the duplicate table will not be added, but we forgot to free the duplicate table, leaking memory. Ensure we free the duplicate table in the error path. Reported by: Coverity CID: 1382111 Modified: stable/10/sys/netpfil/pf/pf_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf_table.c == --- stable/10/sys/netpfil/pf/pf_table.c Mon Apr 9 15:21:40 2018 (r332329) +++ stable/10/sys/netpfil/pf/pf_table.c Mon Apr 9 15:29:14 2018 (r332330) @@ -1123,8 +1123,10 @@ pfr_add_tables(struct pfr_table *tbl, int size, int *n if (p == NULL) senderr(ENOMEM); SLIST_FOREACH(q, , pfrkt_workq) { - if (!pfr_ktable_compare(p, q)) + if (!pfr_ktable_compare(p, q)) { + pfr_destroy_ktable(p, 0); goto _skip; + } } SLIST_INSERT_HEAD(, p, pfrkt_workq); xadd++; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332329 - stable/11/sys/net
Author: brooks Date: Mon Apr 9 15:21:40 2018 New Revision: 332329 URL: https://svnweb.freebsd.org/changeset/base/332329 Log: MFC r332151: ifconf(): correct handling of sockaddrs smaller than struct sockaddr. Portable programs that use SIOCGIFCONF (e.g. traceroute) assume that each pseudo ifreq is of length MAX(sizeof(struct ifreq), sizeof(ifr_name) + ifr_addr.sa_len). For short sockaddrs we copied too much from the source sockaddr resulting in a heap leak. I believe only one such sockaddr exists (struct sockaddr_sco which is 8 bytes) and it is unclear if such sockaddrs end up on interfaces in practice. If it did, the result would be an 8 byte heap leak on current architectures. admbugs: 869 Reviewed by: kib Obtained from:CheriBSD Security: kernel heap leak Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14981 Modified: stable/11/sys/net/if.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if.c == --- stable/11/sys/net/if.c Mon Apr 9 15:11:17 2018(r332328) +++ stable/11/sys/net/if.c Mon Apr 9 15:21:40 2018(r332329) @@ -3153,7 +3153,13 @@ again: max_len += sizeof(ifr); } else if (sa->sa_len <= sizeof(*sa)) { - ifr.ifr_addr = *sa; + if (sa->sa_len < sizeof(*sa)) { + memset(_ifru.ifru_addr, 0, + sizeof(ifr.ifr_ifru.ifru_addr)); + memcpy(_ifru.ifru_addr, sa, + sa->sa_len); + } else + ifr.ifr_ifru.ifru_addr = *sa; sbuf_bcat(sb, , sizeof(ifr)); max_len += sizeof(ifr); } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
> On Mon, Apr 9, 2018 at 7:58 AM, Glen Barberwrote: > > > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > > Author: brooks > > > Date: Sun Apr 8 16:54:07 2018 > > > New Revision: 332288 > > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > > > Log: > > > MFC r331797: > > > > > > Use an accessor function to access ifr_data. > > > > > > This fixes 32-bit compat (no ioctl command defintions are required > > > as struct ifreq is the same size). > > > > > > Reviewed by:kib > > > Obtained from: CheriBSD > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D14900 > > > > > > Modified: > > [...] > > > stable/11/sys/dev/wl/if_wl.c > > > > > Directory Properties: > > > stable/11/ (props changed) > > > > > [...] > > > Modified: stable/11/sys/dev/wl/if_wl.c > > > > > == > > > --- stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:46:24 2018 > > (r332287) > > > +++ stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:54:07 2018 > > (r332288) > > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > } > > > WL_UNLOCK(sc); > > > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > > > break; > > > > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > if ((error = priv_check(td, PRIV_DRIVER))) > > > break; > > > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > > if (error) > > > break; > > > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > /* get the current NWID out of the sc since we stored it there */ > > > case SIOCGWLCNWID: > > > WL_LOCK(sc); > > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > WL_UNLOCK(sc); > > > break; > > > > > > > This part of the change appears to have broken i386 with the following: > > > > /usr/src/sys/modules/wl/../../dev/wl/if_wl.c:1360:24: error: expression > > is not assignable > > ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | > > sc->nwid[1]); > > ~ ^ > > 1 error generated. > > --- if_wl.o --- > > *** [if_wl.o] Error code 1 > > > > make[4]: stopped in /usr/src/sys/modules/wl > > 1 error > > > > wl has been removed in -current. It's pre-802.11 ISA card with thin market > penetration. I would be shocked if anybody has run this on a FreeBSD system > > 4.x. The last version of our Wireless WAN using these cards was at 5.4, the wl cards have been decomissioned and replaced with newer hardware, either way, we need stable/11 i386 to build please :-) -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Mon, Apr 09, 2018 at 09:11:44AM -0600, Warner Losh wrote: > On Mon, Apr 9, 2018 at 7:58 AM, Glen Barberwrote: > > > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > > Author: brooks > > > Date: Sun Apr 8 16:54:07 2018 > > > New Revision: 332288 > > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > > > Log: > > > MFC r331797: > > > > > > Use an accessor function to access ifr_data. > > > > > > This fixes 32-bit compat (no ioctl command defintions are required > > > as struct ifreq is the same size). > > > > > > Reviewed by:kib > > > Obtained from: CheriBSD > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D14900 > > > > > > Modified: > > [...] > > > stable/11/sys/dev/wl/if_wl.c > > > > > Directory Properties: > > > stable/11/ (props changed) > > > > > [...] > > > Modified: stable/11/sys/dev/wl/if_wl.c > > > > > == > > > --- stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:46:24 2018 > > (r332287) > > > +++ stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:54:07 2018 > > (r332288) > > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > } > > > WL_UNLOCK(sc); > > > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > > > break; > > > > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > if ((error = priv_check(td, PRIV_DRIVER))) > > > break; > > > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > > if (error) > > > break; > > > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > > data) > > > /* get the current NWID out of the sc since we stored it there */ > > > case SIOCGWLCNWID: > > > WL_LOCK(sc); > > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > > WL_UNLOCK(sc); > > > break; > > > > > > > This part of the change appears to have broken i386 with the following: > > > > /usr/src/sys/modules/wl/../../dev/wl/if_wl.c:1360:24: error: expression > > is not assignable > > ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | > > sc->nwid[1]); > > ~ ^ > > 1 error generated. > > --- if_wl.o --- > > *** [if_wl.o] Error code 1 > > > > make[4]: stopped in /usr/src/sys/modules/wl > > 1 error > > > > wl has been removed in -current. It's pre-802.11 ISA card with thin market > penetration. I would be shocked if anybody has run this on a FreeBSD system > > 4.x. > This commit is to stable/11. Glen signature.asc Description: PGP signature
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 10:14 AM, Rodney W. Grimeswrote: > [ Charset UTF-8 unsupported, converting... ] >> On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes >> wrote: >> >> On 04/02/18 17:39, Rodney W. Grimes wrote: >> >> >> Author: kevans >> >> >> Date: Mon Apr 2 15:28:48 2018 >> >> >> New Revision: 331880 >> >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 >> >> >> >> >> >> Log: >> >> >>MFC r328331: Support configuring arbitrary limits(1) for any >> >> >> rc.conf daemon >> >> >> >> >> >>Usage is ${name}_limits, and the argument is any flags accepted by >> >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). >> >> >> >> >> >> Modified: >> >> >>stable/11/etc/rc.subr >> >> >> Directory Properties: >> >> >>stable/11/ (props changed) >> >> >> >> >> >> Modified: stable/11/etc/rc.subr >> >> >> == >> >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) >> >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) >> >> >> @@ -773,6 +773,8 @@ check_startmsgs() >> >> >> # >> >> >> #${name}_login_class n Login class to use, else "daemon". >> >> >> # >> >> >> +# ${name}_limits n limits(1) to apply to ${command}. >> >> >> +# >> >> > >> >> > Caution, limits(1) is in /usr/bin, this code can fail if used before >> >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by >> >> > this change if a call is made to limits. >> >> > >> >> > >> >> >> >> Sorry for jumping on this so late. This is also an issue in CURRENT, >> >> and has been since at least 2016. >> > >> > I was aware that it was an issue and why I made a comment about it >> > being MFC'ed. Though I had forgot a bug report existed. >> >> I'm kind of surprised we haven't had more complaints about this- the >> original commit for this stuff landed before stable/11 was even >> branched, so it's been broken for all of 11.x's lifetime. > > History has taught me it takes a long time for this type of > breakage to usually surface in a noticable way. Also I think > until you merged this last ${name}_limits thing it actually > didn't cause an issue, except for the few like me running > diskless systems and or seperate /usr. I don't see how this merge could possibly have been the cause of any claimed issues- like I said before, it didn't add any limits invocations, it added an arg to the limits invocation that already existed. You can see this pretty clearly from the diff, we didn't even change any conditions for limits to be invoked. > > This latest issue is a name space collision between base and ports. > > People who see limits issues due to missing /usr files usually > know how to work around it, and they do, they just cp /usr/bin/limits > to /bin, and do not submit a bug report or send an email. > That saddens me. =/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
[ Charset UTF-8 unsupported, converting... ] > On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimes >wrote: > >> On 04/02/18 17:39, Rodney W. Grimes wrote: > >> >> Author: kevans > >> >> Date: Mon Apr 2 15:28:48 2018 > >> >> New Revision: 331880 > >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> >> > >> >> Log: > >> >>MFC r328331: Support configuring arbitrary limits(1) for any rc.conf > >> >> daemon > >> >> > >> >>Usage is ${name}_limits, and the argument is any flags accepted by > >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). > >> >> > >> >> Modified: > >> >>stable/11/etc/rc.subr > >> >> Directory Properties: > >> >>stable/11/ (props changed) > >> >> > >> >> Modified: stable/11/etc/rc.subr > >> >> == > >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) > >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) > >> >> @@ -773,6 +773,8 @@ check_startmsgs() > >> >> # > >> >> #${name}_login_class n Login class to use, else "daemon". > >> >> # > >> >> +# ${name}_limits n limits(1) to apply to ${command}. > >> >> +# > >> > > >> > Caution, limits(1) is in /usr/bin, this code can fail if used before > >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by > >> > this change if a call is made to limits. > >> > > >> > > >> > >> Sorry for jumping on this so late. This is also an issue in CURRENT, > >> and has been since at least 2016. > > > > I was aware that it was an issue and why I made a comment about it > > being MFC'ed. Though I had forgot a bug report existed. > > I'm kind of surprised we haven't had more complaints about this- the > original commit for this stuff landed before stable/11 was even > branched, so it's been broken for all of 11.x's lifetime. History has taught me it takes a long time for this type of breakage to usually surface in a noticable way. Also I think until you merged this last ${name}_limits thing it actually didn't cause an issue, except for the few like me running diskless systems and or seperate /usr. This latest issue is a name space collision between base and ports. People who see limits issues due to missing /usr files usually know how to work around it, and they do, they just cp /usr/bin/limits to /bin, and do not submit a bug report or send an email. > >> See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 > > > > This bug is rat holed as it has no FreeBSD-foo@ in the cc list. > > > > > > -- > > Rod Grimes > > rgri...@freebsd.org > > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
-- Start of PGP signed section. > On Mon, Apr 09, 2018 at 09:33:38AM -0500, Kyle Evans wrote: > > On Mon, Apr 9, 2018 at 9:29 AM, Shawn Webb> > wrote: > > > On Mon, Apr 02, 2018 at 03:28:48PM +, Kyle Evans wrote: > > >> Author: kevans > > >> Date: Mon Apr 2 15:28:48 2018 > > >> New Revision: 331880 > > >> URL: https://svnweb.freebsd.org/changeset/base/331880 > > >> > > >> Log: > > >> MFC r328331: Support configuring arbitrary limits(1) for any rc.conf > > >> daemon > > >> > > >> Usage is ${name}_limits, and the argument is any flags accepted by > > >> limits(1), such as `-n 100' (e.g. only allow 100 open files). > > > > > > A HardenedBSD user has reported an issue with this commit: > > > > > > https://twitter.com/0x666c7578/status/982901931969597440 > > > > > > > The mariadb ports should be good with this after ports r466451, > > tracking PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 > > Awesome. Thanks! Maybe not so awesome, as now if we go trying to fix the earlier issues it also now effects a pile of ports... *sigh*. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Mon, Apr 9, 2018 at 7:58 AM, Glen Barberwrote: > On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > > Author: brooks > > Date: Sun Apr 8 16:54:07 2018 > > New Revision: 332288 > > URL: https://svnweb.freebsd.org/changeset/base/332288 > > > > Log: > > MFC r331797: > > > > Use an accessor function to access ifr_data. > > > > This fixes 32-bit compat (no ioctl command defintions are required > > as struct ifreq is the same size). > > > > Reviewed by:kib > > Obtained from: CheriBSD > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D14900 > > > > Modified: > [...] > > stable/11/sys/dev/wl/if_wl.c > > > Directory Properties: > > stable/11/ (props changed) > > > [...] > > Modified: stable/11/sys/dev/wl/if_wl.c > > > == > > --- stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:46:24 2018 > (r332287) > > +++ stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:54:07 2018 > (r332288) > > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > data) > > } > > WL_UNLOCK(sc); > > > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > > break; > > > > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > data) > > if ((error = priv_check(td, PRIV_DRIVER))) > > break; > > > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > > if (error) > > break; > > > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t > data) > > /* get the current NWID out of the sc since we stored it there */ > > case SIOCGWLCNWID: > > WL_LOCK(sc); > > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > > WL_UNLOCK(sc); > > break; > > > > This part of the change appears to have broken i386 with the following: > > /usr/src/sys/modules/wl/../../dev/wl/if_wl.c:1360:24: error: expression > is not assignable > ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | > sc->nwid[1]); > ~ ^ > 1 error generated. > --- if_wl.o --- > *** [if_wl.o] Error code 1 > > make[4]: stopped in /usr/src/sys/modules/wl > 1 error > wl has been removed in -current. It's pre-802.11 ISA card with thin market penetration. I would be shocked if anybody has run this on a FreeBSD system > 4.x. Warner ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332328 - stable/11/sys/netpfil/pf
Author: kp Date: Mon Apr 9 15:11:17 2018 New Revision: 332328 URL: https://svnweb.freebsd.org/changeset/base/332328 Log: MFC r331225: pf: Fix memory leak in DIOCRADDTABLES If a user attempts to add two tables with the same name the duplicate table will not be added, but we forgot to free the duplicate table, leaking memory. Ensure we free the duplicate table in the error path. Reported by: Coverity CID: 1382111 Modified: stable/11/sys/netpfil/pf/pf_table.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf_table.c == --- stable/11/sys/netpfil/pf/pf_table.c Mon Apr 9 14:05:43 2018 (r332327) +++ stable/11/sys/netpfil/pf/pf_table.c Mon Apr 9 15:11:17 2018 (r332328) @@ -1124,8 +1124,10 @@ pfr_add_tables(struct pfr_table *tbl, int size, int *n if (p == NULL) senderr(ENOMEM); SLIST_FOREACH(q, , pfrkt_workq) { - if (!pfr_ktable_compare(p, q)) + if (!pfr_ktable_compare(p, q)) { + pfr_destroy_ktable(p, 0); goto _skip; + } } SLIST_INSERT_HEAD(, p, pfrkt_workq); xadd++; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 9:46 AM, Rodney W. Grimeswrote: >> On 04/02/18 17:39, Rodney W. Grimes wrote: >> >> Author: kevans >> >> Date: Mon Apr 2 15:28:48 2018 >> >> New Revision: 331880 >> >> URL: https://svnweb.freebsd.org/changeset/base/331880 >> >> >> >> Log: >> >>MFC r328331: Support configuring arbitrary limits(1) for any rc.conf >> >> daemon >> >> >> >>Usage is ${name}_limits, and the argument is any flags accepted by >> >>limits(1), such as `-n 100' (e.g. only allow 100 open files). >> >> >> >> Modified: >> >>stable/11/etc/rc.subr >> >> Directory Properties: >> >>stable/11/ (props changed) >> >> >> >> Modified: stable/11/etc/rc.subr >> >> == >> >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) >> >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) >> >> @@ -773,6 +773,8 @@ check_startmsgs() >> >> # >> >> #${name}_login_class n Login class to use, else "daemon". >> >> # >> >> +# ${name}_limits n limits(1) to apply to ${command}. >> >> +# >> > >> > Caution, limits(1) is in /usr/bin, this code can fail if used before >> > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by >> > this change if a call is made to limits. >> > >> > >> >> Sorry for jumping on this so late. This is also an issue in CURRENT, >> and has been since at least 2016. > > I was aware that it was an issue and why I made a comment about it > being MFC'ed. Though I had forgot a bug report existed. I'm kind of surprised we haven't had more complaints about this- the original commit for this stuff landed before stable/11 was even branched, so it's been broken for all of 11.x's lifetime. >> See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 > > This bug is rat holed as it has no FreeBSD-foo@ in the cc list. > > > -- > Rod Grimes rgri...@freebsd.org > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
Adding Devin Teske to cc: > On Mon, Apr 9, 2018 at 9:04 AM, Niclas Zeising >wrote: > > On 04/02/18 17:39, Rodney W. Grimes wrote: > >>> > >>> Author: kevans > >>> Date: Mon Apr 2 15:28:48 2018 > >>> New Revision: 331880 > >>> URL: https://svnweb.freebsd.org/changeset/base/331880 > >>> > >>> Log: > >>>MFC r328331: Support configuring arbitrary limits(1) for any rc.conf > >>> daemon > >>> Usage is ${name}_limits, and the argument is any flags accepted by > >>>limits(1), such as `-n 100' (e.g. only allow 100 open files). > >>> > >>> Modified: > >>>stable/11/etc/rc.subr > >>> Directory Properties: > >>>stable/11/ (props changed) > >>> > >>> Modified: stable/11/etc/rc.subr > >>> > >>> == > >>> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) > >>> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) > >>> @@ -773,6 +773,8 @@ check_startmsgs() > >>> # > >>> # ${name}_login_class n Login class to use, else "daemon". > >>> # > >>> +# ${name}_limits n limits(1) to apply to ${command}. > >>> +# > >> > >> > >> Caution, limits(1) is in /usr/bin, this code can fail if used before > >> /usr is mounted. (Ie, our rc.initdiskless) is probably broken by > >> this change if a call is made to limits. > >> > >> > > > > Sorry for jumping on this so late. This is also an issue in CURRENT, and > > has been since at least 2016. > > > > See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 > > > > I kind of like Cy's approach in Comment #7.. scripts that start pretty > early, at least, are bound to trip over all kinds of issues. I think you mean comment #5, with a specific patch to rc.d/ddb in #7? If so I like that approach. > I don't think it's a good idea to work around this in rc.subr like his > "relief valve" patch since it'll just create hidden inconsistencies in > some of these things. _limits isn't getting applied, but it's not > obvious that _limits isn't getting applied because we just silently > work around it. Before we know it, we'll be adding something else > that's nice in the general case but not applicable for some of these > earlier bits. Agree fully with that, changing behavior based on avaliablility of a critical function would be a POLA issue. > Rod, what are you thoughts on these approaches? I am ok with Cy's #5/#7 fix. I would like to look closer at this limits(1) issue, as I do not understand why /etc/rc* suddenly grew the need to start tossing limits on programs in a generic way. Also if a specific user has a specific need to put a limit on a program could that not be done with: program_foo_limits="-C blah blah" foo_program="limits ${program_foo_limits} foo" in /etc/rc.conf or where ever else it is valid to do this. I would also like to ask Devin Teske to weigh in on these issues, so have added them to the CC: of this reply. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
> On 04/02/18 17:39, Rodney W. Grimes wrote: > >> Author: kevans > >> Date: Mon Apr 2 15:28:48 2018 > >> New Revision: 331880 > >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> > >> Log: > >>MFC r328331: Support configuring arbitrary limits(1) for any rc.conf > >> daemon > >> > >>Usage is ${name}_limits, and the argument is any flags accepted by > >>limits(1), such as `-n 100' (e.g. only allow 100 open files). > >> > >> Modified: > >>stable/11/etc/rc.subr > >> Directory Properties: > >>stable/11/ (props changed) > >> > >> Modified: stable/11/etc/rc.subr > >> == > >> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) > >> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) > >> @@ -773,6 +773,8 @@ check_startmsgs() > >> # > >> #${name}_login_class n Login class to use, else "daemon". > >> # > >> +# ${name}_limits n limits(1) to apply to ${command}. > >> +# > > > > Caution, limits(1) is in /usr/bin, this code can fail if used before > > /usr is mounted. (Ie, our rc.initdiskless) is probably broken by > > this change if a call is made to limits. > > > > > > Sorry for jumping on this so late. This is also an issue in CURRENT, > and has been since at least 2016. I was aware that it was an issue and why I made a comment about it being MFC'ed. Though I had forgot a bug report existed. > See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 This bug is rat holed as it has no FreeBSD-foo@ in the cc list. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 09, 2018 at 09:33:38AM -0500, Kyle Evans wrote: > On Mon, Apr 9, 2018 at 9:29 AM, Shawn Webbwrote: > > On Mon, Apr 02, 2018 at 03:28:48PM +, Kyle Evans wrote: > >> Author: kevans > >> Date: Mon Apr 2 15:28:48 2018 > >> New Revision: 331880 > >> URL: https://svnweb.freebsd.org/changeset/base/331880 > >> > >> Log: > >> MFC r328331: Support configuring arbitrary limits(1) for any rc.conf > >> daemon > >> > >> Usage is ${name}_limits, and the argument is any flags accepted by > >> limits(1), such as `-n 100' (e.g. only allow 100 open files). > > > > A HardenedBSD user has reported an issue with this commit: > > > > https://twitter.com/0x666c7578/status/982901931969597440 > > > > The mariadb ports should be good with this after ports r466451, > tracking PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227205 Awesome. Thanks! -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 02, 2018 at 03:28:48PM +, Kyle Evans wrote: > Author: kevans > Date: Mon Apr 2 15:28:48 2018 > New Revision: 331880 > URL: https://svnweb.freebsd.org/changeset/base/331880 > > Log: > MFC r328331: Support configuring arbitrary limits(1) for any rc.conf daemon > > Usage is ${name}_limits, and the argument is any flags accepted by > limits(1), such as `-n 100' (e.g. only allow 100 open files). A HardenedBSD user has reported an issue with this commit: https://twitter.com/0x666c7578/status/982901931969597440 Thanks, -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 9:04 AM, Niclas Zeisingwrote: > On 04/02/18 17:39, Rodney W. Grimes wrote: >>> >>> Author: kevans >>> Date: Mon Apr 2 15:28:48 2018 >>> New Revision: 331880 >>> URL: https://svnweb.freebsd.org/changeset/base/331880 >>> >>> Log: >>>MFC r328331: Support configuring arbitrary limits(1) for any rc.conf >>> daemon >>> Usage is ${name}_limits, and the argument is any flags accepted by >>>limits(1), such as `-n 100' (e.g. only allow 100 open files). >>> >>> Modified: >>>stable/11/etc/rc.subr >>> Directory Properties: >>>stable/11/ (props changed) >>> >>> Modified: stable/11/etc/rc.subr >>> >>> == >>> --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) >>> +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) >>> @@ -773,6 +773,8 @@ check_startmsgs() >>> # >>> # ${name}_login_class n Login class to use, else "daemon". >>> # >>> +# ${name}_limits n limits(1) to apply to ${command}. >>> +# >> >> >> Caution, limits(1) is in /usr/bin, this code can fail if used before >> /usr is mounted. (Ie, our rc.initdiskless) is probably broken by >> this change if a call is made to limits. >> >> > > Sorry for jumping on this so late. This is also an issue in CURRENT, and > has been since at least 2016. > > See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 > I kind of like Cy's approach in Comment #7.. scripts that start pretty early, at least, are bound to trip over all kinds of issues. I don't think it's a good idea to work around this in rc.subr like his "relief valve" patch since it'll just create hidden inconsistencies in some of these things. _limits isn't getting applied, but it's not obvious that _limits isn't getting applied because we just silently work around it. Before we know it, we'll be adding something else that's nice in the general case but not applicable for some of these earlier bits. Rod, what are you thoughts on these approaches? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332092 - in head/sys: amd64/amd64 sys x86/x86
> On Fri, Apr 06, 2018 at 09:17:09AM -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > Author: royger > > > Date: Fri Apr 6 11:20:06 2018 > > > New Revision: 332092 > > > URL: https://svnweb.freebsd.org/changeset/base/332092 > > > > > > Log: > > > remove GiB/MiB macros from param.h > > > > > > And instead define them in the files where they are used. > > > > It would of been better to "revert" your prior change and > > make a seperate new commit. It is rarely desireable to combine > > a revert of a change with anything. > > A plain revert of r332072 would have left the tree in a broken state, > because r332073 depends on those macros. IMO it's better to have a > buildable tree at all times in order for it to be bisectable. Well a revert of r332073 could of been combined leaving the tree building, and in the state before the attempt to do {MG}iB() macros. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332327 - head/sys/arm/allwinner
On Mon, Apr 9, 2018 at 9:05 AM, Kyle Evanswrote: > Author: kevans > Date: Mon Apr 9 14:05:43 2018 > New Revision: 332327 > URL: https://svnweb.freebsd.org/changeset/base/332327 > > Log: > if_awg: Add support for allwinner,{tx,rx}-delay-ps bindings > > Split out delay parsing into a separate function; we'll support both > {tx,rx}-delay as well as the new versions. > > While here, validate that they're within the expected range and fail to > attach if they are not. Assuming that we can clamp the delay is a bad idea > that might result in a non-working awg anyways, so we'll fail early to make > it easier to catch. > > This version also unsets the tx and rx delay registers unconditionally and > then sets them if we read a non-zero delay. These delay properties should > default to 0 if not specified, as declared in the binding documentation. > Presumably the delays will be set via hardware configuration if they're not > explicitly set in FDT. > Ugh, I dropped these: Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D15008 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332327 - head/sys/arm/allwinner
Author: kevans Date: Mon Apr 9 14:05:43 2018 New Revision: 332327 URL: https://svnweb.freebsd.org/changeset/base/332327 Log: if_awg: Add support for allwinner,{tx,rx}-delay-ps bindings Split out delay parsing into a separate function; we'll support both {tx,rx}-delay as well as the new versions. While here, validate that they're within the expected range and fail to attach if they are not. Assuming that we can clamp the delay is a bad idea that might result in a non-working awg anyways, so we'll fail early to make it easier to catch. This version also unsets the tx and rx delay registers unconditionally and then sets them if we read a non-zero delay. These delay properties should default to 0 if not specified, as declared in the binding documentation. Presumably the delays will be set via hardware configuration if they're not explicitly set in FDT. Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c == --- head/sys/arm/allwinner/if_awg.c Mon Apr 9 13:32:12 2018 (r332326) +++ head/sys/arm/allwinner/if_awg.c Mon Apr 9 14:05:43 2018 (r332327) @@ -221,6 +221,8 @@ static struct resource_spec awg_spec[] = { static void awg_txeof(struct awg_softc *sc); +static int awg_parse_delay(device_t dev, uint32_t *tx_delay, +uint32_t *rx_delay); static uint32_t syscon_read_emac_clk_reg(device_t dev); static void syscon_write_emac_clk_reg(device_t dev, uint32_t val); static phandle_t awg_get_phy_node(device_t dev); @@ -1218,6 +1220,50 @@ awg_has_internal_phy(device_t dev) } static int +awg_parse_delay(device_t dev, uint32_t *tx_delay, uint32_t *rx_delay) +{ + phandle_t node; + uint32_t delay; + + if (tx_delay == NULL || rx_delay == NULL) + return (EINVAL); + *tx_delay = *rx_delay = 0; + node = ofw_bus_get_node(dev); + + if (OF_getencprop(node, "tx-delay", , sizeof(delay)) >= 0) + *tx_delay = delay; + else if (OF_getencprop(node, "allwinner,tx-delay-ps", , + sizeof(delay)) >= 0) { + if ((delay % 100) != 0) { + device_printf(dev, "tx-delay-ps is not a multiple of 100\n"); + return (EDOM); + } + *tx_delay = delay / 100; + } + if (*tx_delay > 7) { + device_printf(dev, "tx-delay out of range\n"); + return (ERANGE); + } + + if (OF_getencprop(node, "rx-delay", , sizeof(delay)) >= 0) + *rx_delay = delay; + else if (OF_getencprop(node, "allwinner,rx-delay-ps", , + sizeof(delay)) >= 0) { + if ((delay % 100) != 0) { + device_printf(dev, "rx-delay-ps is not within documented domain\n"); + return (EDOM); + } + *rx_delay = delay / 100; + } + if (*rx_delay > 31) { + device_printf(dev, "rx-delay out of range\n"); + return (ERANGE); + } + + return (0); +} + +static int awg_setup_phy(device_t dev) { struct awg_softc *sc; @@ -1260,16 +1306,22 @@ awg_setup_phy(device_t dev) else reg |= EMAC_CLK_PIT_MII | EMAC_CLK_SRC_MII; - if (OF_getencprop(node, "tx-delay", _delay, - sizeof(tx_delay)) > 0) { - reg &= ~EMAC_CLK_ETXDC; + /* +* Fail attach if we fail to parse either of the delay +* parameters. If we don't have the proper delay to write to +* syscon, then awg likely won't function properly anyways. +* Lack of delay is not an error! +*/ + error = awg_parse_delay(dev, _delay, _delay); + if (error != 0) + goto fail; + + /* Default to 0 and we'll increase it if we need to. */ + reg &= ~(EMAC_CLK_ETXDC | EMAC_CLK_ERXDC); + if (tx_delay > 0) reg |= (tx_delay << EMAC_CLK_ETXDC_SHIFT); - } - if (OF_getencprop(node, "rx-delay", _delay, - sizeof(rx_delay)) > 0) { - reg &= ~EMAC_CLK_ERXDC; + if (rx_delay > 0) reg |= (rx_delay << EMAC_CLK_ERXDC_SHIFT); - } if (sc->type == EMAC_H3) { if (awg_has_internal_phy(dev)) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On 04/02/18 17:39, Rodney W. Grimes wrote: Author: kevans Date: Mon Apr 2 15:28:48 2018 New Revision: 331880 URL: https://svnweb.freebsd.org/changeset/base/331880 Log: MFC r328331: Support configuring arbitrary limits(1) for any rc.conf daemon Usage is ${name}_limits, and the argument is any flags accepted by limits(1), such as `-n 100' (e.g. only allow 100 open files). Modified: stable/11/etc/rc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr == --- stable/11/etc/rc.subr Mon Apr 2 15:07:41 2018(r331879) +++ stable/11/etc/rc.subr Mon Apr 2 15:28:48 2018(r331880) @@ -773,6 +773,8 @@ check_startmsgs() # # ${name}_login_class n Login class to use, else "daemon". # +# ${name}_limits n limits(1) to apply to ${command}. +# Caution, limits(1) is in /usr/bin, this code can fail if used before /usr is mounted. (Ie, our rc.initdiskless) is probably broken by this change if a call is made to limits. Sorry for jumping on this so late. This is also an issue in CURRENT, and has been since at least 2016. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206291 Regards -- Niclas ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332288 - in stable/11/sys: dev/an dev/ath dev/cxgbe dev/de dev/en dev/fatm dev/hatm dev/if_ndis dev/iwi dev/ixgbe dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce de
On Sun, Apr 08, 2018 at 04:54:07PM +, Brooks Davis wrote: > Author: brooks > Date: Sun Apr 8 16:54:07 2018 > New Revision: 332288 > URL: https://svnweb.freebsd.org/changeset/base/332288 > > Log: > MFC r331797: > > Use an accessor function to access ifr_data. > > This fixes 32-bit compat (no ioctl command defintions are required > as struct ifreq is the same size). > > Reviewed by:kib > Obtained from: CheriBSD > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D14900 > > Modified: [...] > stable/11/sys/dev/wl/if_wl.c > Directory Properties: > stable/11/ (props changed) > [...] > Modified: stable/11/sys/dev/wl/if_wl.c > == > --- stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:46:24 2018 > (r332287) > +++ stable/11/sys/dev/wl/if_wl.c Sun Apr 8 16:54:07 2018 > (r332288) > @@ -1313,7 +1313,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > } > WL_UNLOCK(sc); > > - error = copyout(psa_buf, ifr->ifr_data, sizeof(psa_buf)); > + error = copyout(psa_buf, ifr_data_get_ptr(ifr), sizeof(psa_buf)); > break; > > > @@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > if ((error = priv_check(td, PRIV_DRIVER))) > break; > > - error = copyin(ifr->ifr_data, psa_buf, sizeof(psa_buf)); > + error = copyin(ifr_data_get_ptr(ifr), psa_buf, sizeof(psa_buf)); > if (error) > break; > > @@ -1357,7 +1357,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) > /* get the current NWID out of the sc since we stored it there */ > case SIOCGWLCNWID: > WL_LOCK(sc); > - ifr->ifr_data = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > + ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); > WL_UNLOCK(sc); > break; > This part of the change appears to have broken i386 with the following: /usr/src/sys/modules/wl/../../dev/wl/if_wl.c:1360:24: error: expression is not assignable ifr_data_get_ptr(ifr) = (caddr_t) (sc->nwid[0] << 8 | sc->nwid[1]); ~ ^ 1 error generated. --- if_wl.o --- *** [if_wl.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/wl 1 error Glen signature.asc Description: PGP signature
Re: svn commit: r331843 - in head/usr.sbin/makefs: . cd9660
On Sat, Mar 31, 2018 at 03:04:42PM +, Benno Rice wrote: > Author: benno > Date: Sat Mar 31 15:04:41 2018 > New Revision: 331843 > URL: https://svnweb.freebsd.org/changeset/base/331843 > > Log: > Synchronise with NetBSD's version of EFI handling for El Torito images. > > When I implemented my EFI support I failed to check if the upstream version > of makefs in NetBSD had done the same. Override my version with theirs to > make it easier to stay in sync with them in the future. > > Reviewed by:imp, mav > Obtained from: NetBSD > MFC after: 1 week > Sponsored by: iXsystems, Inc. > Differential Revision: https://reviews.freebsd.org/D14913 > > Modified: > head/usr.sbin/makefs/cd9660.c > head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > head/usr.sbin/makefs/cd9660/cd9660_eltorito.h > head/usr.sbin/makefs/makefs.8 > > Modified: head/usr.sbin/makefs/cd9660.c > == > --- head/usr.sbin/makefs/cd9660.c Sat Mar 31 13:19:27 2018 > (r331842) > +++ head/usr.sbin/makefs/cd9660.c Sat Mar 31 15:04:41 2018 > (r331843) > @@ -309,6 +309,7 @@ cd9660_prep_opts(fsinfo_t *fsopts) > OPT_STR('\0', "no-boot", "No boot support"), > OPT_STR('\0', "hard-disk-boot", "Boot from hard disk"), > OPT_STR('\0', "boot-load-segment", "Boot load segment"), > + OPT_STR('\0', "platformid", "Section Header Platform ID"), > > { .name = NULL } > }; > @@ -444,7 +445,8 @@ cd9660_parse_opts(const char *option, fsinfo_t *fsopts > /* RRIP */ > cd9660_eltorito_add_boot_option(diskStructure, name, 0); > rv = 1; > - } else if (strcmp(name, "boot-load-segment") == 0) { > + } else if (strcmp(name, "boot-load-segment") == 0 || > + strcmp(name, "platformid") == 0) { > if (buf[0] == '\0') { > warnx("Option `%s' doesn't contain a value", > name); > > Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > == > --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sat Mar 31 13:19:27 > 2018(r331842) > +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sat Mar 31 15:04:41 > 2018(r331843) > @@ -1,4 +1,4 @@ > -/* $NetBSD: cd9660_eltorito.c,v 1.17 2011/06/23 02:35:56 enami Exp $ > */ > +/* $NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 nonaka Exp $ > */ > > /*- > * SPDX-License-Identifier: BSD-2-Clause-NetBSD > @@ -47,16 +47,19 @@ __FBSDID("$FreeBSD$"); > #define ELTORITO_DPRINTF(__x) > #endif > > +#include > + > static struct boot_catalog_entry *cd9660_init_boot_catalog_entry(void); > static struct boot_catalog_entry *cd9660_boot_setup_validation_entry(char); > static struct boot_catalog_entry *cd9660_boot_setup_default_entry( > struct cd9660_boot_image *); > static struct boot_catalog_entry *cd9660_boot_setup_section_head(char); > -static struct boot_catalog_entry *cd9660_boot_setup_validation_entry(char); > #if 0 > static u_char cd9660_boot_get_system_type(struct cd9660_boot_image *); > #endif > > +static struct cd9660_boot_image *default_boot_image; > + > int > cd9660_add_boot_disk(iso9660_disk *diskStructure, const char *boot_info) > { > @@ -104,12 +107,9 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, cons > else if (strcmp(sysname, "macppc") == 0 || >strcmp(sysname, "mac68k") == 0) > new_image->system = ET_SYS_MAC; > - else if (strcmp(sysname, "efi") == 0 || > - strcmp(sysname, "uefi") == 0) > - new_image->system = ET_SYS_UEFI; > else { > warnx("boot disk system must be " > - "efi, i386, powerpc, macppc, mac68k"); > + "i386, powerpc, macppc, or mac68k"); > free(temp); > free(new_image); > return 0; It appears this part has broken creating disc1.iso (and other ISO images) for amd64. I see the following error: sh /usr/src/release/amd64/mkisoimages.sh -b 12_0_CURRENT_amd64_CD disc1.iso disc1 200+0 records in 200+0 records out 819200 bytes transferred in 0.004175 secs (19690 bytes/sec) newfs_msdos: cannot get number of sectors per track: Operation not supported newfs_msdos: cannot get number of heads: Operation not supported /dev/md3: 1557 sectors in 1557 FAT12 clusters (512 bytes/cluster) BytesPerSec=512 SecPerClust=1 ResSectors=1 FATs=2 RootDirEnts=512 Sectors=1600 Media=0xf8 FATsecs=5 SecPerTrack=63 Heads=1 HiddenSecs=0 makefs: boot disk system must be i386, powerpc, macppc, or mac68k Usage: makefs [-xZ] [-B endian] [-b free-blocks] [-d debug-mask] [-F mtree-specfile] [-f free-files] [-M
svn commit: r332326 - head/share/man/man4
Author: trasz Date: Mon Apr 9 13:32:12 2018 New Revision: 332326 URL: https://svnweb.freebsd.org/changeset/base/332326 Log: cfumass(4) no longer requires iscsi(4). MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/cfumass.4 Modified: head/share/man/man4/cfumass.4 == --- head/share/man/man4/cfumass.4 Mon Apr 9 13:01:43 2018 (r332325) +++ head/share/man/man4/cfumass.4 Mon Apr 9 13:32:12 2018 (r332326) @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd January 27, 2017 +.Dd April 9, 2018 .Dt CFUMASS 4 .Os .Sh NAME @@ -38,7 +38,6 @@ the kernel configuration file: .Bd -ragged -offset indent .Cd "device usb" .Cd "device usb_template" -.Cd "device iscsi" .Cd "device ctl" .Cd "device cfumass" .Ed ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332325 - stable/10/sys/i386/i386
Author: emaste Date: Mon Apr 9 13:01:43 2018 New Revision: 332325 URL: https://svnweb.freebsd.org/changeset/base/332325 Log: MFC r331053: ANSIfy i386/vm86.c Modified: stable/10/sys/i386/i386/vm86.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/vm86.c == --- stable/10/sys/i386/i386/vm86.c Mon Apr 9 13:00:03 2018 (r332324) +++ stable/10/sys/i386/i386/vm86.c Mon Apr 9 13:01:43 2018 (r332325) @@ -128,8 +128,7 @@ POPL(struct vm86frame *vmf) } int -vm86_emulate(vmf) - struct vm86frame *vmf; +vm86_emulate(struct vm86frame *vmf) { struct vm86_kernel *vm86; caddr_t addr; @@ -586,10 +585,7 @@ vm86_intcall(int intnum, struct vm86frame *vmf) * caller's cs:ip routine. */ int -vm86_datacall(intnum, vmf, vmc) - int intnum; - struct vm86frame *vmf; - struct vm86context *vmc; +vm86_datacall(int intnum, struct vm86frame *vmf, struct vm86context *vmc) { pt_entry_t *pte = (pt_entry_t *)vm86paddr; vm_paddr_t page; @@ -634,11 +630,8 @@ vm86_getaddr(struct vm86context *vmc, u_short sel, u_s } int -vm86_getptr(vmc, kva, sel, off) - struct vm86context *vmc; - vm_offset_t kva; - u_short *sel; - u_short *off; +vm86_getptr(struct vm86context *vmc, vm_offset_t kva, u_short *sel, + u_short *off) { int i; @@ -653,9 +646,7 @@ vm86_getptr(vmc, kva, sel, off) } int -vm86_sysarch(td, args) - struct thread *td; - char *args; +vm86_sysarch(struct thread *td, char *args) { int error = 0; struct i386_vm86_args ua; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332324 - stable/10/usr.bin/vtfontcvt
Author: emaste Date: Mon Apr 9 13:00:03 2018 New Revision: 332324 URL: https://svnweb.freebsd.org/changeset/base/332324 Log: MFC r282920: vtfontcvt: Allow 6 digits in verbose output Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c == --- stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 12:58:53 2018 (r332323) +++ stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 13:00:03 2018 (r332324) @@ -513,24 +513,24 @@ print_font_info(void) { printf( "Statistics:\n" -"- glyph_total: %5u\n" -"- glyph_normal:%5u\n" -"- glyph_normal_right: %5u\n" -"- glyph_bold: %5u\n" -"- glyph_bold_right:%5u\n" -"- glyph_unique:%5u\n" -"- glyph_dupe: %5u\n" -"- mapping_total: %5u\n" -"- mapping_normal: %5u\n" -"- mapping_normal_folded: %5u\n" -"- mapping_normal_right:%5u\n" -"- mapping_normal_right_folded: %5u\n" -"- mapping_bold:%5u\n" -"- mapping_bold_folded: %5u\n" -"- mapping_bold_right: %5u\n" -"- mapping_bold_right_folded: %5u\n" -"- mapping_unique: %5u\n" -"- mapping_dupe:%5u\n", +"- glyph_total: %6u\n" +"- glyph_normal:%6u\n" +"- glyph_normal_right: %6u\n" +"- glyph_bold: %6u\n" +"- glyph_bold_right:%6u\n" +"- glyph_unique:%6u\n" +"- glyph_dupe: %6u\n" +"- mapping_total: %6u\n" +"- mapping_normal: %6u\n" +"- mapping_normal_folded: %6u\n" +"- mapping_normal_right:%6u\n" +"- mapping_normal_right_folded: %6u\n" +"- mapping_bold:%6u\n" +"- mapping_bold_folded: %6u\n" +"- mapping_bold_right: %6u\n" +"- mapping_bold_right_folded: %6u\n" +"- mapping_unique: %6u\n" +"- mapping_dupe:%6u\n", glyph_total, glyph_count[0], glyph_count[1], ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332323 - stable/10/usr.bin/vtfontcvt
Author: emaste Date: Mon Apr 9 12:58:53 2018 New Revision: 332323 URL: https://svnweb.freebsd.org/changeset/base/332323 Log: MFC r296920: vtfontcvt: support .hex fonts with chars beyond Unicode BMP This is already supported by the vt(4) vfnt format mapping from code points to glyphs. Update the .hex font parser to accept up to six hex digits. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c == --- stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 12:57:08 2018 (r332322) +++ stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 12:58:53 2018 (r332323) @@ -328,12 +328,13 @@ parse_hex(FILE *fp, unsigned int map_idx) if (bytes != NULL) errx(1, "malformed input: Width tag after font data"); set_width(atoi(ln + 9)); - } else if (sscanf(ln, "%4x:", )) { + } else if (sscanf(ln, "%6x:", )) { if (bytes == NULL) { bytes = xmalloc(wbytes * height); bytes_r = xmalloc(wbytes * height); } - p = ln + 5; + /* ln is guaranteed to have a colon here. */ + p = strchr(ln, ':') + 1; chars_per_row = strlen(p) / height; dwidth = width; if (chars_per_row / 2 > (width + 7) / 8) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332322 - stable/10/usr.bin/vtfontcvt
Author: emaste Date: Mon Apr 9 12:57:08 2018 New Revision: 332322 URL: https://svnweb.freebsd.org/changeset/base/332322 Log: MFC r331935: vtfontcvt: allow .bdf characters less than full height Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vtfontcvt/vtfontcvt.c == --- stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 12:55:09 2018 (r332321) +++ stable/10/usr.bin/vtfontcvt/vtfontcvt.c Mon Apr 9 12:57:08 2018 (r332322) @@ -265,10 +265,23 @@ parse_bdf(FILE *fp, unsigned int map_idx) if (strncmp(ln, "BITMAP", 6) == 0 && (ln[6] == ' ' || ln[6] == '\0')) { + /* +* Assume that the next _height_ lines are bitmap +* data. ENDCHAR is allowed to terminate the bitmap +* early but is not otherwise checked; any extra data +* is ignored. +*/ for (i = 0; i < height; i++) { if ((ln = fgetln(fp, )) == NULL) errx(1, "Unexpected EOF!\n"); ln[length - 1] = '\0'; + if (strcmp(ln, "ENDCHAR") == 0) { + memset(bytes + i * wbytes, 0, + (height - i) * wbytes); + memset(bytes_r + i * wbytes, 0, + (height - i) * wbytes); + break; + } sscanf(ln, "%x", ); if (parse_bitmap_line(bytes + i * wbytes, bytes_r + i * wbytes, line, dwidth) != 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332321 - stable/10/sys/dev/ath
Author: emaste Date: Mon Apr 9 12:55:09 2018 New Revision: 332321 URL: https://svnweb.freebsd.org/changeset/base/332321 Log: MFC r327529: ath: fix possible memory disclosure in ioctl handler Submitted by: Domagoj StolfaModified: stable/10/sys/dev/ath/if_ath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ath/if_ath.c == --- stable/10/sys/dev/ath/if_ath.c Mon Apr 9 12:53:15 2018 (r332320) +++ stable/10/sys/dev/ath/if_ath.c Mon Apr 9 12:55:09 2018 (r332321) @@ -5910,7 +5910,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag * * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332320 - stable/10/sys/dev/ath
Author: emaste Date: Mon Apr 9 12:53:15 2018 New Revision: 332320 URL: https://svnweb.freebsd.org/changeset/base/332320 Log: MFC ath(4) potential memory disclosure fixes [1] r327499: ath: fix memory disclosure from ath_btcoex_ioctl The ath_btcoex_ioctl handler allocated a buffer without M_ZERO and returned it to userland without writing to it. The device has permissions only for root so this is not urgent, and the fix can be MFCd and considered for a future EN. [2] r327500: ath: fix possible memory disclosures in ioctl handlers Apply the fix from r327499 to additional ioctl handlers. Note: related fix in r327529 does not apply directly to stable/10 and will be addressed in a followup commit. Submitted by: Domagoj Stolfa[1] Reported by: Ilja van Sprundel [1,2] Reviewed by: adrian [1] Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/ath/if_ath_btcoex.c stable/10/sys/dev/ath/if_ath_lna_div.c stable/10/sys/dev/ath/if_ath_spectral.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ath/if_ath_btcoex.c == --- stable/10/sys/dev/ath/if_ath_btcoex.c Mon Apr 9 09:24:26 2018 (r332319) +++ stable/10/sys/dev/ath/if_ath_btcoex.c Mon Apr 9 12:53:15 2018 (r332320) @@ -321,7 +321,7 @@ ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -330,6 +330,7 @@ ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag switch (id) { default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; Modified: stable/10/sys/dev/ath/if_ath_lna_div.c == --- stable/10/sys/dev/ath/if_ath_lna_div.c Mon Apr 9 09:24:26 2018 (r332319) +++ stable/10/sys/dev/ath/if_ath_lna_div.c Mon Apr 9 12:53:15 2018 (r332320) @@ -185,7 +185,7 @@ ath_lna_div_ioctl(struct ath_softc *sc, struct ath_dia * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -194,6 +194,7 @@ ath_lna_div_ioctl(struct ath_softc *sc, struct ath_dia switch (id) { default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; Modified: stable/10/sys/dev/ath/if_ath_spectral.c == --- stable/10/sys/dev/ath/if_ath_spectral.c Mon Apr 9 09:24:26 2018 (r332319) +++ stable/10/sys/dev/ath/if_ath_spectral.c Mon Apr 9 12:53:15 2018 (r332320) @@ -210,7 +210,7 @@ ath_ioctl_spectral(struct ath_softc *sc, struct ath_di * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -273,6 +273,7 @@ ath_ioctl_spectral(struct ath_softc *sc, struct ath_di break; default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332319 - in head/sys: dev/netmap net
Author: vmaffione Date: Mon Apr 9 09:24:26 2018 New Revision: 332319 URL: https://svnweb.freebsd.org/changeset/base/332319 Log: netmap: align codebase to upstream version v11.4 Changelist: - remove unused nkr_slot_flags - new nm_intr adapter callback to enable/disable interrupts - remove unused sysctls and document the other sysctls - new infrastructure to support NS_MOREFRAG for NIC ports - support for external memory allocator (for now linux-only), including linux-specific changes in common headers - optimizations within netmap pipes datapath - improvements on VALE control API - new nm_parse() helper function in netmap_user.h - various bug fixes and code clean up Approved by: hrs (mentor) Modified: head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_ixl_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_ptnet.c head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/if_vtnet_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_generic.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_mem2.c head/sys/dev/netmap/netmap_mem2.h head/sys/dev/netmap/netmap_monitor.c head/sys/dev/netmap/netmap_offloadings.c head/sys/dev/netmap/netmap_pipe.c head/sys/dev/netmap/netmap_pt.c head/sys/dev/netmap/netmap_vale.c head/sys/net/netmap.h head/sys/net/netmap_user.h head/sys/net/netmap_virt.h Modified: head/sys/dev/netmap/if_em_netmap.h == --- head/sys/dev/netmap/if_em_netmap.h Mon Apr 9 08:25:29 2018 (r332318) +++ head/sys/dev/netmap/if_em_netmap.h Mon Apr 9 09:24:26 2018 (r332319) @@ -235,8 +235,6 @@ em_netmap_rxsync(struct netmap_kring *kring, int flags * First part: import newly received packets. */ if (netmap_no_pendintr || force_update) { - uint16_t slot_flags = kring->nkr_slot_flags; - nic_i = rxr->next_to_check; nm_i = netmap_idx_n2k(kring, nic_i); @@ -247,7 +245,7 @@ em_netmap_rxsync(struct netmap_kring *kring, int flags if ((staterr & E1000_RXD_STAT_DD) == 0) break; ring->slot[nm_i].len = le16toh(curr->wb.upper.length); - ring->slot[nm_i].flags = slot_flags; + ring->slot[nm_i].flags = 0; bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[nic_i].map, BUS_DMASYNC_POSTREAD); nm_i = nm_next(nm_i, lim); Modified: head/sys/dev/netmap/if_igb_netmap.h == --- head/sys/dev/netmap/if_igb_netmap.h Mon Apr 9 08:25:29 2018 (r332318) +++ head/sys/dev/netmap/if_igb_netmap.h Mon Apr 9 09:24:26 2018 (r332319) @@ -217,8 +217,6 @@ igb_netmap_rxsync(struct netmap_kring *kring, int flag * First part: import newly received packets. */ if (netmap_no_pendintr || force_update) { - uint16_t slot_flags = kring->nkr_slot_flags; - nic_i = rxr->next_to_check; nm_i = netmap_idx_n2k(kring, nic_i); @@ -229,7 +227,7 @@ igb_netmap_rxsync(struct netmap_kring *kring, int flag if ((staterr & E1000_RXD_STAT_DD) == 0) break; ring->slot[nm_i].len = le16toh(curr->wb.upper.length); - ring->slot[nm_i].flags = slot_flags; + ring->slot[nm_i].flags = 0; bus_dmamap_sync(rxr->ptag, rxr->rx_buffers[nic_i].pmap, BUS_DMASYNC_POSTREAD); nm_i = nm_next(nm_i, lim); Modified: head/sys/dev/netmap/if_ixl_netmap.h == --- head/sys/dev/netmap/if_ixl_netmap.h Mon Apr 9 08:25:29 2018 (r332318) +++ head/sys/dev/netmap/if_ixl_netmap.h Mon Apr 9 09:24:26 2018 (r332319) @@ -331,7 +331,6 @@ ixl_netmap_rxsync(struct netmap_kring *kring, int flag */ if (netmap_no_pendintr || force_update) { int crclen = ixl_crcstrip ? 0 : 4; - uint16_t slot_flags = kring->nkr_slot_flags; nic_i = rxr->next_check; // or also k2n(kring->nr_hwtail) nm_i = netmap_idx_n2k(kring, nic_i); @@ -346,7 +345,7 @@ ixl_netmap_rxsync(struct netmap_kring *kring, int flag break; ring->slot[nm_i].len = ((qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >> I40E_RXD_QW1_LENGTH_PBUF_SHIFT) - crclen; - ring->slot[nm_i].flags = slot_flags; +
Re: svn commit: r332092 - in head/sys: amd64/amd64 sys x86/x86
On Fri, Apr 06, 2018 at 09:17:09AM -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: royger > > Date: Fri Apr 6 11:20:06 2018 > > New Revision: 332092 > > URL: https://svnweb.freebsd.org/changeset/base/332092 > > > > Log: > > remove GiB/MiB macros from param.h > > > > And instead define them in the files where they are used. > > It would of been better to "revert" your prior change and > make a seperate new commit. It is rarely desireable to combine > a revert of a change with anything. A plain revert of r332072 would have left the tree in a broken state, because r332073 depends on those macros. IMO it's better to have a buildable tree at all times in order for it to be bisectable. Roger. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332318 - in stable/11: . sys/net
Author: smh Date: Mon Apr 9 08:25:29 2018 New Revision: 332318 URL: https://svnweb.freebsd.org/changeset/base/332318 Log: MFC r327559: Disabled the use of flowid for lagg by default Sponsored by: Multiplay Modified: stable/11/UPDATING stable/11/sys/net/if_lagg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING == --- stable/11/UPDATING Mon Apr 9 05:48:12 2018(r332317) +++ stable/11/UPDATING Mon Apr 9 08:25:29 2018(r332318) @@ -16,6 +16,14 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20180409: + The use of RSS hash from the network card aka flowid has been + disabled by default for lagg(4) as it's currently incompatible with + the lacp and loadbalance protocols. + + This can be re-enabled by setting the following in loader.conf: + net.link.lagg.default_use_flowid="1" + 20180331: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 6.0.0. Please see the 20141231 entry below for information about Modified: stable/11/sys/net/if_lagg.c == --- stable/11/sys/net/if_lagg.c Mon Apr 9 05:48:12 2018(r332317) +++ stable/11/sys/net/if_lagg.c Mon Apr 9 08:25:29 2018(r332318) @@ -238,7 +238,7 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, "Accept input from any interface in a failover lagg"); /* Default value for using flowid */ -static VNET_DEFINE(int, def_use_flowid) = 1; +static VNET_DEFINE(int, def_use_flowid) = 0; #defineV_def_use_flowidVNET(def_use_flowid) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, _NAME(def_use_flowid), 0, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"