svn commit: r335932 - head/sys/netinet
Author: hrs Date: Wed Jul 4 06:47:34 2018 New Revision: 335932 URL: https://svnweb.freebsd.org/changeset/base/335932 Log: - Fix a double unlock in inp_block_unblock_source() and lock leakage in inp_leave_group() which caused a panic. - Make order of CTR1() and IN_MULTI_LIST_LOCK() consistent around inm_merge(). Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Wed Jul 4 03:54:39 2018(r335931) +++ head/sys/netinet/in_mcast.c Wed Jul 4 06:47:34 2018(r335932) @@ -1579,23 +1579,24 @@ inp_block_unblock_source(struct inpcb *inp, struct soc * Begin state merge transaction at IGMP layer. */ IN_MULTI_LOCK(); - IN_MULTI_LIST_LOCK(); CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); + IN_MULTI_LIST_LOCK(); error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); + IN_MULTI_LIST_UNLOCK(); goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); error = igmp_change_state(inm); + IN_MULTI_LIST_UNLOCK(); if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); out_in_multi_locked: IN_MULTI_UNLOCK(); - IN_MULTI_UNLOCK(); out_imf_rollback: if (error) imf_rollback(imf); @@ -2492,6 +2493,7 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); + IN_MULTI_LIST_UNLOCK(); goto out_in_multi_locked; } @@ -2736,12 +2738,12 @@ inp_set_source_filters(struct inpcb *inp, struct socko INP_WLOCK_ASSERT(inp); IN_MULTI_LOCK(); - IN_MULTI_LIST_LOCK(); /* * Begin state merge transaction at IGMP layer. */ CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); + IN_MULTI_LIST_LOCK(); error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Something broke ci.freebsd.org 's FreeBSD-head-{amd64,i386,riscv64}-{images,testvm} : fetch authentication errors
[Note: around -r33590{4,6,7,8} these build attempts broke in some cases but FreeBSD-head-{amd64,i386,riscv64}-{images,testvm} just was never built for such. FreeBSD-head-amd64-testvm first fails at -r335904 but FreeBSD-head-amd64-images built -r335904 and failed for -r335908. Both i386's jumped from -r335902 (built) to -r335907 (failed). riscv64's: from -r335905 (built) to -r335907 (failed).] Example: https://ci.freebsd.org/job/FreeBSD-head-amd64-testvm/8651/console shows: . . . 20:23:29 setup jail FreeBSD-head-amd64-testvm using following parameters: . . . 20:23:29 Certificate verification failed for /CN=artifact.ci.freebsd.org 20:23:29 3436412:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/s3_clnt.c:1269: 20:23:29 fetch: https://artifact.ci.FreeBSD.org/snapshot/head/r329172/amd64/amd64/base.txz: Authentication error . . . 20:24:04 + DIST_PACKAGES='base kernel doc tests base-dbg kernel-dbg lib32 lib32-dbg' 20:24:04 + mkdir -p ufs 20:24:04 + fetch https://artifact.ci.freebsd.org/snapshot/head/r335904/amd64/amd64/base.txz 20:24:04 Certificate verification failed for /CN=artifact.ci.freebsd.org 20:24:04 34364183608:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/s3_clnt.c:1269: 20:24:04 fetch: https://artifact.ci.freebsd.org/snapshot/head/r335904/amd64/amd64/base.txz: Authentication error 20:24:04 Build step 'Execute shell' marked build as failure 20:24:04 FTP: Current build result is [FAILURE], not going to run. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335931 - head/share/man/man9
Author: mmacy Date: Wed Jul 4 03:54:39 2018 New Revision: 335931 URL: https://svnweb.freebsd.org/changeset/base/335931 Log: epoch(9): update in_epoch() description as well Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 == --- head/share/man/man9/epoch.9 Wed Jul 4 03:46:23 2018(r335930) +++ head/share/man/man9/epoch.9 Wed Jul 4 03:54:39 2018(r335931) @@ -61,7 +61,7 @@ .Ft void .Fn epoch_call "epoch_t epoch" "epoch_context_t ctx" "void (*callback) (epoch_context_t)" .Ft int -.Fn in_epoch "void" +.Fn in_epoch "epoch_t epoch" .Sh DESCRIPTION Epochs are used to guarantee liveness and immutability of data by deferring reclamation and mutation until a grace period has elapsed. @@ -111,7 +111,7 @@ in the middle of an epoch section for the same epoch a Be default mutexes cannot be held across .Fn epoch_wait_preempt . To permit this the epoch must be allocated with -.Fn EPOCH_LOCKED . +EPOCH_LOCKED. When doing this one must be cautious of creating a situation where a deadlock is possible. Note that epochs are not a straight replacement for read locks. Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). @@ -121,8 +121,8 @@ in place. An item to be modified must be handled with copy on write and frees must be deferred until after a grace period has elapsed. .Sh RETURN VALUES -.Fn in_epoch -will return 1 if curthread is in an epoch, 0 otherwise. +.Fn in_epoch curepoch +will return 1 if curthread is in curepoch, 0 otherwise. .Sh CAVEATS One must be cautious when using .Fn epoch_wait_preempt ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335930 - head/sys/sys
Author: mmacy Date: Wed Jul 4 03:46:23 2018 New Revision: 335930 URL: https://svnweb.freebsd.org/changeset/base/335930 Log: FreeBSD_version: update for epoch(9) r335924 KPI change Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hWed Jul 4 03:44:36 2018(r335929) +++ head/sys/sys/param.hWed Jul 4 03:46:23 2018(r335930) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200070 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200071 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335929 - head/share/man/man9
Author: mmacy Date: Wed Jul 4 03:44:36 2018 New Revision: 335929 URL: https://svnweb.freebsd.org/changeset/base/335929 Log: epoch(9): update man page for r335924 Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 == --- head/share/man/man9/epoch.9 Wed Jul 4 03:36:46 2018(r335928) +++ head/share/man/man9/epoch.9 Wed Jul 4 03:44:36 2018(r335929) @@ -49,11 +49,11 @@ .Ft void .Fn epoch_enter "epoch_t epoch" .Ft void -.Fn epoch_enter_preempt "epoch_t epoch" +.Fn epoch_enter_preempt "epoch_t epoch" "epoch_tracker_t et" .Ft void .Fn epoch_exit "epoch_t epoch" .Ft void -.Fn epoch_exit_preempt "epoch_t epoch" +.Fn epoch_exit_preempt "epoch_t epoch" "epoch_tracker_t et" .Ft void .Fn epoch_wait "epoch_t epoch" .Ft void @@ -104,12 +104,16 @@ INVARIANTS can assert that a thread is in an epoch by .Fn in_epoch . .Pp The epoch API currently does not support sleeping in epoch_preempt sections. -A caller cannot do epoch_enter recursively on different preemptible epochs. A caller should never call .Fn epoch_wait -in the middle of an epoch section as this will lead to a deadlock. +in the middle of an epoch section for the same epoch as this will lead to a deadlock. .Pp -Note that epochs are not a straight replacement for read locks. +Be default mutexes cannot be held across +.Fn epoch_wait_preempt . +To permit this the epoch must be allocated with +.Fn EPOCH_LOCKED . +When doing this one must be cautious of creating a situation where a deadlock is +possible. Note that epochs are not a straight replacement for read locks. Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). When modifying a list referenced from an epoch section safe removal routines must be used and the caller can no longer modify a list entry ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335928 - in head: share/man/man4 sys/net sys/netpfil/pf
Author: will Date: Wed Jul 4 03:36:46 2018 New Revision: 335928 URL: https://svnweb.freebsd.org/changeset/base/335928 Log: Revert r335833. Several third-parties use at least some of these ioctls. While it would be better for regression testing if they were used in base (or at least in the test suite), it's currently not worth the trouble to push through removal. Submitted by: antoine, markj Modified: head/share/man/man4/pf.4 head/sys/net/pfvar.h head/sys/netpfil/pf/pf_ioctl.c Modified: head/share/man/man4/pf.4 == --- head/share/man/man4/pf.4Wed Jul 4 03:24:11 2018(r335927) +++ head/share/man/man4/pf.4Wed Jul 4 03:36:46 2018(r335928) @@ -139,8 +139,9 @@ Clear the buffer address pool and get a .Va ticket for subsequent .Dv DIOCADDADDR , +.Dv DIOCADDRULE , and -.Dv DIOCADDRULE +.Dv DIOCCHANGERULE calls. .It Dv DIOCADDADDR Fa "struct pfioc_pooladdr *pp" .Pp @@ -148,6 +149,8 @@ Add the pool address .Va addr to the buffer address pool to be used in the following .Dv DIOCADDRULE +or +.Dv DIOCCHANGERULE call. All other members of the structure are ignored. .It Dv DIOCADDRULE Fa "struct pfioc_rule *pr" @@ -316,6 +319,21 @@ This ioctl returns if the given anchor does not exist or .Er EBUSY if another process is concurrently updating a ruleset. +.It Dv DIOCADDSTATE Fa "struct pfioc_state *ps" +Add a state entry. +.Bd -literal +struct pfioc_state { + struct pfsync_state state; +}; +.Ed +.It Dv DIOCGETSTATE Fa "struct pfioc_state *ps" +Extract the entry identified by the +.Va id +and +.Va creatorid +fields of the +.Va state +structure from the state table. .It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk" Remove matching entries from the state table. This ioctl returns the number of killed states in @@ -421,6 +439,11 @@ On exit, is always set to the total size required to hold all state table entries (i.e., it is set to .Li sizeof(struct pf_state) * nr ) . +.It Dv DIOCCHANGERULE Fa "struct pfioc_rule *pcr" +Add or remove the +.Va rule +in the ruleset specified by +.Va rule.action . .Pp The type of operation to be performed is indicated by .Va action , @@ -452,6 +475,15 @@ indicates the rule number against which or .Dv PF_CHANGE_REMOVE actions are applied. +.\" It Dv DIOCCHANGEALTQ Fa "struct pfioc_altq *pcr" +.It Dv DIOCCHANGEADDR Fa "struct pfioc_pooladdr *pca" +Add or remove the pool address +.Va addr +from the rule specified by +.Va r_action , +.Va r_num , +and +.Va anchor . .It Dv DIOCSETTIMEOUT Fa "struct pfioc_tm *pt" .Bd -literal struct pfioc_tm { @@ -478,6 +510,8 @@ Get the state timeout of The value will be placed into the .Va seconds field. +.It Dv DIOCCLRRULECTRS +Clear per-rule statistics. .It Dv DIOCSETLIMIT Fa "struct pfioc_limit *pl" Set the hard limits on the memory pools used by the packet filter. .Bd -literal Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hWed Jul 4 03:24:11 2018(r335927) +++ head/sys/net/pfvar.hWed Jul 4 03:36:46 2018(r335928) @@ -1385,17 +1385,19 @@ struct pfioc_iface { #define DIOCGETRULE_IOWR('D', 7, struct pfioc_rule) /* XXX cut 8 - 17 */ #define DIOCCLRSTATES _IOWR('D', 18, struct pfioc_state_kill) -/* XXX cut 19 */ +#define DIOCGETSTATE _IOWR('D', 19, struct pfioc_state) #define DIOCSETSTATUSIF _IOWR('D', 20, struct pfioc_if) #define DIOCGETSTATUS _IOWR('D', 21, struct pf_status) #define DIOCCLRSTATUS _IO ('D', 22) #define DIOCNATLOOK_IOWR('D', 23, struct pfioc_natlook) #define DIOCSETDEBUG _IOWR('D', 24, u_int32_t) #define DIOCGETSTATES _IOWR('D', 25, struct pfioc_states) +#define DIOCCHANGERULE _IOWR('D', 26, struct pfioc_rule) /* XXX cut 26 - 28 */ #define DIOCSETTIMEOUT _IOWR('D', 29, struct pfioc_tm) #define DIOCGETTIMEOUT _IOWR('D', 30, struct pfioc_tm) -/* XXX cut 31-38 */ +#define DIOCADDSTATE _IOWR('D', 37, struct pfioc_state) +#define DIOCCLRRULECTRS_IO ('D', 38) #define DIOCGETLIMIT _IOWR('D', 39, struct pfioc_limit) #define DIOCSETLIMIT _IOWR('D', 40, struct pfioc_limit) #define DIOCKILLSTATES _IOWR('D', 41, struct pfioc_state_kill) @@ -1404,12 +1406,13 @@ struct pfioc_iface { #define DIOCADDALTQ_IOWR('D', 45, struct pfioc_altq) #define DIOCGETALTQS _IOWR('D', 47, struct pfioc_altq) #define DIOCGETALTQ_IOWR('D', 48, struct pfioc_altq) -/* XXX cut 49 */ +#define DIOCCHANGEALTQ _IOWR('D', 49, struct pfioc_altq) #define DIOCGETQSTATS _IOWR('D', 50, struct pfioc_qstats) #define DIOCBEGINADDRS _IOWR('D', 51, struct pfioc_pooladdr) #define DIOCADDADDR_IOWR('D', 52, struct pfioc_pooladdr) #define DIOCGETADDRS _IOWR('D', 53, struct pfioc_pooladdr) #define DIOCGETADDR_IOWR('D', 54, struct pfioc_pooladdr) +#define DIOCCHANGEADDR _IOWR('D', 55, struct pfioc_pooladdr) /* XXX cut 55 - 57 */ #define
svn commit: r335925 - head/sys/dev/usb/net
Author: gonzo Date: Wed Jul 4 03:02:53 2018 New Revision: 335925 URL: https://svnweb.freebsd.org/changeset/base/335925 Log: muge(4): add DTB blob as one more possible source of MAC address On FDT-enabled platforms check if DTB blob has MAC address configured by a boot loader. This information passed as a "local-mac-address" or "mac-address" property of the device node. For USB NICs node can be found by looking for compatibility string "usbVVV,PPP" where VVV - vendor id (hex) and PPP - product id (hex) Reviewed by: emaste Differential Revision:https://reviews.freebsd.org/D16117 Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c == --- head/sys/dev/usb/net/if_muge.c Wed Jul 4 02:47:16 2018 (r335924) +++ head/sys/dev/usb/net/if_muge.c Wed Jul 4 03:02:53 2018 (r335925) @@ -95,6 +95,12 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" +#ifdef FDT +#include +#include +#include +#endif + #include #include #include @@ -1427,30 +1433,117 @@ tr_setup: } } +#ifdef FDT /** - * muge_attach_post - Called after the driver attached to the USB interface - * @ue: the USB ethernet device + * muge_fdt_find_eth_node - find descendant node with required compatibility + * @start: start node + * @compatible: compatible string used to identify the node * - * This is where the chip is intialised for the first time. This is - * different from the muge_init() function in that that one is designed to - * setup the H/W to match the UE settings and can be called after a reset. + * Loop through all descendant nodes and return first match with required + * compatibility. * + * RETURNS: + * Returns node's phandle on success -1 otherwise */ +static phandle_t +muge_fdt_find_eth_node(phandle_t start, const char *compatible) +{ + phandle_t child, node; + + /* Traverse through entire tree to find usb ethernet nodes. */ + for (node = OF_child(start); node != 0; node = OF_peer(node)) { + if (ofw_bus_node_is_compatible(node, compatible)) + return (node); + child = muge_fdt_find_eth_node(node, compatible); + if (child != -1) + return (child); + } + + return (-1); +} + +/** + * muge_fdt_read_mac_property - read MAC address from node + * @node: USB device node + * @mac: memory to store MAC address to + * + * Check for common properties that might contain MAC address + * passed by boot loader. + * + * RETURNS: + * Returns 0 on success, error code otherwise + */ +static int +muge_fdt_read_mac_property(phandle_t node, unsigned char *mac) +{ + int len; + + /* Check if there is property */ + if ((len = OF_getproplen(node, "local-mac-address")) > 0) { + if (len != ETHER_ADDR_LEN) + return (EINVAL); + + OF_getprop(node, "local-mac-address", mac, + ETHER_ADDR_LEN); + return (0); + } + + if ((len = OF_getproplen(node, "mac-address")) > 0) { + if (len != ETHER_ADDR_LEN) + return (EINVAL); + + OF_getprop(node, "mac-address", mac, + ETHER_ADDR_LEN); + return (0); + } + + return (ENXIO); +} + +/** + * muge_fdt_find_mac - read MAC address from node + * @compatible: compatible string for DTB node in the form "usb[N]NNN,[M]MMM" + * where NNN is vendor id and MMM is product id + * @mac: memory to store MAC address to + * + * Tries to find matching node in DTS and obtain MAC address info from it + * + * RETURNS: + * Returns 0 on success, error code otherwise + */ +static int +muge_fdt_find_mac(const char *compatible, unsigned char *mac) +{ + phandle_t node, root; + + root = OF_finddevice("/"); + node = muge_fdt_find_eth_node(root, compatible); + if (node != -1) { + if (muge_fdt_read_mac_property(node, mac) == 0) + return (0); + } + + return (ENXIO); +} +#endif + +/** + * muge_set_mac_addr - Initiailizes NIC MAC address + * @ue: the USB ethernet device + * + * Tries to obtain MAC address from number of sources: registers, + * EEPROM, DTB blob. If all sources fail - generates random MAC. + */ static void -muge_attach_post(struct usb_ether *ue) +muge_set_mac_addr(struct usb_ether *ue) { struct muge_softc *sc = uether_getsc(ue); uint32_t mac_h, mac_l; - muge_dbg_printf(sc, "Calling muge_attach_post.\n"); +#ifdef FDT + char compatible[16]; + struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); +#endif - /* Setup some of the basics */ - sc->sc_phyno = 1; - - /* -* Attempt to get the mac addre
svn commit: r335924 - in head/sys: dev/cxgbe/cxgbei dev/cxgbe/tom dev/hwpmc kern net netinet netinet/tcp_stacks netinet6 sys
Author: mmacy Date: Wed Jul 4 02:47:16 2018 New Revision: 335924 URL: https://svnweb.freebsd.org/changeset/base/335924 Log: epoch(9): allow preemptible epochs to compose - Add tracker argument to preemptible epochs - Inline epoch read path in kernel and tied modules - Change in_epoch to take an epoch as argument - Simplify tfb_tcp_do_segment to not take a ti_locked argument, there's no longer any benefit to dropping the pcbinfo lock and trying to do so just adds an error prone branchfest to these functions - Remove cases of same function recursion on the epoch as recursing is no longer free. - Remove the the TAILQ_ENTRY and epoch_section from struct thread as the tracker field is now stack or heap allocated as appropriate. Tested by: pho and Limelight Networks Reviewed by: kbowling at llnw dot com Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16066 Added: head/sys/sys/epoch_private.h (contents, props changed) Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tls.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/kern/subr_epoch.c head/sys/net/if.c head/sys/net/if_gif.h head/sys/net/if_gre.h head/sys/net/if_lagg.c head/sys/net/if_me.c head/sys/net/if_var.h head/sys/net/route.c head/sys/net/rtsock.c head/sys/netinet/in_gif.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_divert.c head/sys/netinet/ip_encap.c head/sys/netinet/ip_gre.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_hpts.c head/sys/netinet/tcp_hpts.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_stacks/tcp_rack.h head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_gif.c head/sys/netinet6/ip6_gre.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/udp6_usrreq.c head/sys/sys/epoch.h head/sys/sys/pmckern.h head/sys/sys/proc.h Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Jul 4 00:18:40 2018 (r335923) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Jul 4 02:47:16 2018 (r335924) @@ -343,6 +343,7 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_he struct icl_cxgbei_pdu *icp = toep->ulpcb2; struct icl_pdu *ip; u_int pdu_len, val; + struct epoch_tracker et; MPASS(m == NULL); @@ -411,12 +412,12 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_he SOCKBUF_UNLOCK(sb); INP_WUNLOCK(inp); - INP_INFO_RLOCK(&V_tcbinfo); + INP_INFO_RLOCK_ET(&V_tcbinfo, et); INP_WLOCK(inp); tp = tcp_drop(tp, ECONNRESET); if (tp) INP_WUNLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); icl_cxgbei_conn_pdu_free(NULL, ip); #ifdef INVARIANTS Modified: head/sys/dev/cxgbe/tom/t4_connect.c == --- head/sys/dev/cxgbe/tom/t4_connect.c Wed Jul 4 00:18:40 2018 (r335923) +++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Jul 4 02:47:16 2018 (r335924) @@ -115,18 +115,19 @@ act_open_failure_cleanup(struct adapter *sc, u_int ati struct toepcb *toep = lookup_atid(sc, atid); struct inpcb *inp = toep->inp; struct toedev *tod = &toep->td->tod; + struct epoch_tracker et; free_atid(sc, atid); toep->tid = -1; CURVNET_SET(toep->vnet); if (status != EAGAIN) - INP_INFO_RLOCK(&V_tcbinfo); + INP_INFO_RLOCK_ET(&V_tcbinfo, et); INP_WLOCK(inp); toe_connect_failed(tod, inp, status); final_cpl_received(toep); /* unlocks inp */ if (status != EAGAIN) - INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_RUNLOCK_ET(&V_tcbinfo, et); CURVNET_RESTORE(); } Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c == --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 4 00:18:40 2018 (r335923) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 4 02:47:16 2018 (r335924) @@ -1235,6 +1235,7 @@ do_peer_close(struct sge_iq *iq, const struct rss_head struct inpcb *inp = toep->inp; struct tcpcb *tp = NULL; struct socket *so; + struct epoch_tracker et; #ifdef INVARIANTS unsigned int opco
Re: svn commit: r335916 - head/sys/conf
I didn't want it to be global. Note that I did _exactly_ what John told me to. I don't believe the tone or word choice is justified. -M On Tue, Jul 3, 2018 at 17:32 Warner Losh wrote: > And this is why I wanted it to conform to the current build paradigm in my > review... I'll mop it up once Bryan is done... > > Warner > > On Tue, Jul 3, 2018, 6:05 PM Matt Macy wrote: > >> Author: mmacy >> Date: Tue Jul 3 23:05:42 2018 >> New Revision: 335916 >> URL: https://svnweb.freebsd.org/changeset/base/335916 >> >> Log: >> Enable MODULE_TIED by default for modules compiled with the kernel >> >> Requested by: jhb >> >> Modified: >> head/sys/conf/kern.post.mk >> >> Modified: head/sys/conf/kern.post.mk >> >> == >> --- head/sys/conf/kern.post.mk Tue Jul 3 22:54:46 2018(r335915) >> +++ head/sys/conf/kern.post.mk Tue Jul 3 23:05:42 2018(r335916) >> @@ -14,6 +14,7 @@ MKMODULESENV+=DESTDIR="${DESTDIR}" >> .endif >> SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;:tA} >> MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}" >> +MKMODULESENV+= MODULE_TIED=yes >> >> .if defined(CONF_CFLAGS) >> MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" >> >> ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335836 - head/usr.bin/top
Jilles Tjoelker wrote in <20180703211002.ga11...@stack.nl>: ji> > 3. Print the multibyte characters by using strvisx(3) family, which ji> > supports multibyte character, or swprintf(3) family if you want to ji> > format wide characters directly. Note that buffer length for ji> > strvisx(3) must be calculated by using MB_LEN_MAX. ji> ji> In this case, calling setlocale() and then using strvisx() seems the ji> right solution. If locales differ across processes this may result in ji> mojibake but that cannot really be helped. Even analyzing other ji> processes' locale variables is not fully reliable, since strings may be ji> incorrectly encoded even in the process's real locale, environment ji> variables cannot be read across users and the environment block may be ji> overwritten by a program. ji> ji> In general, although using conversion to wide characters allows users a ji> lot of flexibility, I don't think it is the best in all situations: ji> ji> * The result of mbstowcs() is a UTF-32 string which consumes a lot of ji> memory. A loop with mbrtowc() may also be slow. Many operations can be ji> done directly on UTF-8 strings with no or little additional complexity ji> compared to byte strings. ji> ji> * If there is an invalid multibyte character, there is little ji> flexibility to handle this usefully and securely, since so little is ji> known about the encoding. The best handling may depend on the context. ji> ji> Therefore, in /bin/sh, I have only implemented multibyte support for ji> UTF-8. All other encodings have bytes treated as characters. ji> ji> However, I do agree that getenv("LANG") is bad. Instead, setlocale() ji> should be used. After that, nl_langinfo(CODESET) can be called and the ji> result compared to "UTF-8". Yes, I agree that using mb->wc conversion is not always the best and using strvisx() for cmdbuf, not only for argv, is enough in this case. I thought it was difficult to avoid iswprint() because I was not sure of the goal of r335836 and it looked to me that it aimed to keep the original printable() function. And as you mentioned it may not be worth to try to correctly detect/support locales in different processes, either. Probably one of the simplest ways would be that relying on LC_CTYPE+strvisx() and documenting how top(1) handles multibyte characters in the manual page. -- Hiroki pgpvsXlbgwblW.pgp Description: PGP signature
Re: svn commit: r335916 - head/sys/conf
And this is why I wanted it to conform to the current build paradigm in my review... I'll mop it up once Bryan is done... Warner On Tue, Jul 3, 2018, 6:05 PM Matt Macy wrote: > Author: mmacy > Date: Tue Jul 3 23:05:42 2018 > New Revision: 335916 > URL: https://svnweb.freebsd.org/changeset/base/335916 > > Log: > Enable MODULE_TIED by default for modules compiled with the kernel > > Requested by: jhb > > Modified: > head/sys/conf/kern.post.mk > > Modified: head/sys/conf/kern.post.mk > > == > --- head/sys/conf/kern.post.mk Tue Jul 3 22:54:46 2018(r335915) > +++ head/sys/conf/kern.post.mk Tue Jul 3 23:05:42 2018(r335916) > @@ -14,6 +14,7 @@ MKMODULESENV+=DESTDIR="${DESTDIR}" > .endif > SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;:tA} > MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}" > +MKMODULESENV+= MODULE_TIED=yes > > .if defined(CONF_CFLAGS) > MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335922 - head/sys/conf
Author: bdrewery Date: Wed Jul 4 00:18:36 2018 New Revision: 335922 URL: https://svnweb.freebsd.org/changeset/base/335922 Log: Use OBJS_DEPEND_GUESS for forced opt_global.h dependency. MFC after:2 weeks Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 23:47:20 2018(r335921) +++ head/sys/conf/kern.post.mk Wed Jul 4 00:18:36 2018(r335922) @@ -205,7 +205,8 @@ assym.inc: $S/kern/genassym.sh genassym.o genoffset_te genassym.o: $S/$M/$M/genassym.c offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c -${SYSTEM_OBJS} genoffset.o genassym.o vers.o: opt_global.h +OBJS_DEPEND_GUESS+= opt_global.h +genoffset.o genassym.o vers.o: opt_global.h .if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon) _meta_filemon= 1 Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jul 3 23:47:20 2018(r335921) +++ head/sys/conf/kmod.mk Wed Jul 4 00:18:36 2018(r335922) @@ -476,9 +476,6 @@ DEPENDOBJS+=genoffset.o .endif assym.inc: genassym.o offset.inc: genoffset.o -.if defined(KERNBUILDDIR) -genassym.o: opt_global.h -.endif assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc @@ -492,16 +489,15 @@ genoffset.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/kern/genoffset.c -.if defined(KERNBUILDDIR) -${OBJS}: opt_global.h -.endif - CLEANDEPENDFILES+= ${_ILINKS} # .depend needs include links so we remove them only together. cleanilinks: rm -f ${_ILINKS} OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.if defined(KERNBUILDDIR) +OBJS_DEPEND_GUESS+= opt_global.h +.endif .include .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335923 - head/sys/modules/aic7xxx/ahc
Author: bdrewery Date: Wed Jul 4 00:18:40 2018 New Revision: 335923 URL: https://svnweb.freebsd.org/changeset/base/335923 Log: META_MODE: Fix wanting a meta file in source tree. MFC after:2 weeks Sponsored by: Dell EMC Modified: head/sys/modules/aic7xxx/ahc/Makefile Modified: head/sys/modules/aic7xxx/ahc/Makefile == --- head/sys/modules/aic7xxx/ahc/Makefile Wed Jul 4 00:18:36 2018 (r335922) +++ head/sys/modules/aic7xxx/ahc/Makefile Wed Jul 4 00:18:40 2018 (r335923) @@ -37,7 +37,7 @@ ${GENSRCS}: \ # to appear when building the tree from 8.x worlds where fmake is the # default. fmake doens't define .MAKE.LEVEL so key off that to omit it, # while still allowing more-modern makes to theoretically update things. -${GENSRCS}: +${GENSRCS}: .NOMETA @echo "Error: ${.TARGET} is missing. Run 'make ahcfirmware'" .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335921 - in head: lib/libugidfw sbin/ipfw usr.bin/cpuset usr.bin/sockstat
Author: jamie Date: Tue Jul 3 23:47:20 2018 New Revision: 335921 URL: https://svnweb.freebsd.org/changeset/base/335921 Log: Allow jail names (not just IDs) to be specified for: cpuset(1), ipfw(8), sockstat(1), ugidfw(8) These are the last of the jail-aware userland utilities that didn't work with names. PR: 229266 MFC after:3 days Differential Revision:D16047 Modified: head/lib/libugidfw/ugidfw.c head/sbin/ipfw/Makefile head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c head/usr.bin/cpuset/Makefile head/usr.bin/cpuset/cpuset.1 head/usr.bin/cpuset/cpuset.c head/usr.bin/sockstat/Makefile head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/lib/libugidfw/ugidfw.c == --- head/lib/libugidfw/ugidfw.c Tue Jul 3 23:45:02 2018(r335920) +++ head/lib/libugidfw/ugidfw.c Tue Jul 3 23:47:20 2018(r335921) @@ -34,9 +34,11 @@ */ #include #include +#include #include #include #include +#include #include #include @@ -600,16 +602,45 @@ bsde_parse_gidrange(char *spec, gid_t *min, gid_t *max } static int +bsde_get_jailid(const char *name, size_t buflen, char *errstr) +{ + char *ep; + int jid; + struct iovec jiov[4]; + + /* Copy jail_getid(3) instead of messing with library dependancies */ + jid = strtoul(name, &ep, 10); + if (*name && !*ep) + return jid; + jiov[0].iov_base = __DECONST(char *, "name"); + jiov[0].iov_len = sizeof("name"); + jiov[1].iov_len = strlen(name) + 1; + jiov[1].iov_base = alloca(jiov[1].iov_len); + strcpy(jiov[1].iov_base, name); + if (errstr && buflen) { + jiov[2].iov_base = __DECONST(char *, "errmsg"); + jiov[2].iov_len = sizeof("errmsg"); + jiov[3].iov_base = errstr; + jiov[3].iov_len = buflen; + errstr[0] = 0; + jid = jail_get(jiov, 4, 0); + if (jid < 0 && !errstr[0]) + snprintf(errstr, buflen, "jail_get: %s", + strerror(errno)); + } else + jid = jail_get(jiov, 2, 0); + return jid; +} + +static int bsde_parse_subject(int argc, char *argv[], struct mac_bsdextended_subject *subject, size_t buflen, char *errstr) { int not_seen, flags; int current, neg, nextnot; - char *endp; uid_t uid_min, uid_max; gid_t gid_min, gid_max; int jid = 0; - long value; current = 0; flags = 0; @@ -668,13 +699,9 @@ bsde_parse_subject(int argc, char *argv[], snprintf(errstr, buflen, "one jail only"); return (-1); } - value = strtol(argv[current+1], &endp, 10); - if (*endp != '\0') { - snprintf(errstr, buflen, "invalid jid: '%s'", - argv[current+1]); + jid = bsde_get_jailid(argv[current+1], buflen, errstr); + if (jid < 0) return (-1); - } - jid = value; flags |= MBS_PRISON_DEFINED; if (nextnot) { neg ^= MBS_PRISON_DEFINED; Modified: head/sbin/ipfw/Makefile == --- head/sbin/ipfw/Makefile Tue Jul 3 23:45:02 2018(r335920) +++ head/sbin/ipfw/Makefile Tue Jul 3 23:47:20 2018(r335921) @@ -13,7 +13,7 @@ SRCS+=altq.c CFLAGS+=-DPF .endif -LIBADD=util +LIBADD=jail util MAN= ipfw.8 .include Modified: head/sbin/ipfw/ipfw.8 == --- head/sbin/ipfw/ipfw.8 Tue Jul 3 23:45:02 2018(r335920) +++ head/sbin/ipfw/ipfw.8 Tue Jul 3 23:47:20 2018(r335921) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2018 +.Dd July 3, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -1535,10 +1535,10 @@ Matches all TCP or UDP packets sent by or received for A .Ar group may be specified by name or number. -.It Cm jail Ar prisonID +.It Cm jail Ar jail Matches all TCP or UDP packets sent by or received for the -jail whos prison ID is -.Ar prisonID . +jail whose ID or name is +.Ar jail . .It Cm icmptypes Ar types Matches ICMP packets whose ICMP type is in the list .Ar types . Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Tue Jul 3 23:45:02 2018(r335920) +++ head/sbin/ipfw/ipfw2.c Tue Jul 3 23:47:20 2018(r335921) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include
svn commit: r335920 - head/sys/cddl/compat/opensolaris/sys
Author: mmacy Date: Tue Jul 3 23:45:02 2018 New Revision: 335920 URL: https://svnweb.freebsd.org/changeset/base/335920 Log: opensolaris compat: fix compile error when opensolaris/sys/types.h is included before stddef.h ptrdiff_t would be typedef'd twice Modified: head/sys/cddl/compat/opensolaris/sys/types.h Modified: head/sys/cddl/compat/opensolaris/sys/types.h == --- head/sys/cddl/compat/opensolaris/sys/types.hTue Jul 3 23:30:53 2018(r335919) +++ head/sys/cddl/compat/opensolaris/sys/types.hTue Jul 3 23:45:02 2018(r335920) @@ -72,7 +72,10 @@ typedef u_int minor_t; typedefshort index_t; typedefoff_t offset_t; -typedeflongptrdiff_t; /* pointer difference */ +#ifndef _PTRDIFF_T_DECLARED +typedef__ptrdiff_t ptrdiff_t; /* pointer difference */ +#define _PTRDIFF_T_DECLARED +#endif typedefint64_t rlim64_t; typedefint major_t; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335919 - head/sys/netinet6
Author: mmacy Date: Tue Jul 3 23:30:53 2018 New Revision: 335919 URL: https://svnweb.freebsd.org/changeset/base/335919 Log: udp6_input: validate inpcb before use When traversing pcbinfo lists (rather than calling lookup) we need to explicitly validate an inpcb before use. Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Tue Jul 3 23:29:18 2018 (r335918) +++ head/sys/netinet6/udp6_usrreq.c Tue Jul 3 23:30:53 2018 (r335919) @@ -355,6 +355,10 @@ udp6_input(struct mbuf **mp, int *offp, int proto) int blocked; INP_RLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(inp); + continue; + } bzero(&mcaddr, sizeof(struct sockaddr_in6)); mcaddr.sin6_len = sizeof(struct sockaddr_in6); @@ -382,10 +386,12 @@ udp6_input(struct mbuf **mp, int *offp, int proto) if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) { INP_RLOCK(last); - UDP_PROBE(receive, NULL, last, ip6, - last, uh); - if (udp6_append(last, n, off, fromsa)) - goto inp_lost; + if (__predict_true(inp->inp_flags2 & INP_FREED) == 0) { + UDP_PROBE(receive, NULL, last, ip6, + last, uh); + if (udp6_append(last, n, off, fromsa)) + goto inp_lost; + } INP_RUNLOCK(last); } } @@ -414,10 +420,13 @@ udp6_input(struct mbuf **mp, int *offp, int proto) goto badheadlocked; } INP_RLOCK(last); - INP_INFO_RUNLOCK(pcbinfo); - UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, m, off, fromsa) == 0) + if (__predict_true(inp->inp_flags2 & INP_FREED) == 0) { + UDP_PROBE(receive, NULL, last, ip6, last, uh); + if (udp6_append(last, m, off, fromsa) == 0) + INP_RUNLOCK(last); + } else INP_RUNLOCK(last); + INP_INFO_RUNLOCK(pcbinfo); inp_lost: return (IPPROTO_DONE); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335917 - head/share/man/man9
Author: mmacy Date: Tue Jul 3 23:09:09 2018 New Revision: 335917 URL: https://svnweb.freebsd.org/changeset/base/335917 Log: document MODULE_TIED behavior change Modified: head/share/man/man9/DECLARE_MODULE.9 Modified: head/share/man/man9/DECLARE_MODULE.9 == --- head/share/man/man9/DECLARE_MODULE.9Tue Jul 3 23:05:42 2018 (r335916) +++ head/share/man/man9/DECLARE_MODULE.9Tue Jul 3 23:09:09 2018 (r335917) @@ -65,6 +65,11 @@ is identical to that on which it was built. This declaration should be used by modules which depend on interfaces beyond the stable kernel KBI (such as ABI emulators or hypervisors that rely on internal kernel structures). +.Fn DECLARE_MODULE +will behave like +.Fn DECLARE_MODULE_TIED +when compiled with modules built with the kernel. This allows locks and +other synchronization primitives to be inlined safely. .Pp The arguments are: .Bl -tag -width indent ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335916 - head/sys/conf
Author: mmacy Date: Tue Jul 3 23:05:42 2018 New Revision: 335916 URL: https://svnweb.freebsd.org/changeset/base/335916 Log: Enable MODULE_TIED by default for modules compiled with the kernel Requested by: jhb Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 22:54:46 2018(r335915) +++ head/sys/conf/kern.post.mk Tue Jul 3 23:05:42 2018(r335916) @@ -14,6 +14,7 @@ MKMODULESENV+=DESTDIR="${DESTDIR}" .endif SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;:tA} MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}" +MKMODULESENV+= MODULE_TIED=yes .if defined(CONF_CFLAGS) MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335913 - head/sys/amd64/include
Author: jhb Date: Tue Jul 3 22:03:28 2018 New Revision: 335913 URL: https://svnweb.freebsd.org/changeset/base/335913 Log: Use 'e' instead of 'i' constraints with 64-bit atomic operations on amd64. The ADD, AND, OR, and SUB instructions take at most a 32-bit sign-extended immediate operand. 64-bit constants that do not fit into that constraint need to be loaded into a register. The 'i' constraint tells the compiler it can pass any integer constant to the assembler, whereas the 'e' constrain only permits constants that fit into a 32-bit sign-extended value. This fixes using atomic_add/clear/set/subtract_long/64 with constants that do not fit into a 32-bit sign-extended immediate. Reported by: several folks Tested by:Pete Wright MFC after:2 weeks Modified: head/sys/amd64/include/atomic.h Modified: head/sys/amd64/include/atomic.h == --- head/sys/amd64/include/atomic.h Tue Jul 3 21:29:04 2018 (r335912) +++ head/sys/amd64/include/atomic.h Tue Jul 3 22:03:28 2018 (r335913) @@ -446,10 +446,10 @@ ATOMIC_ASM(clear,int, "andl %1,%0", "ir", ~v); ATOMIC_ASM(add, int, "addl %1,%0", "ir", v); ATOMIC_ASM(subtract, int, "subl %1,%0", "ir", v); -ATOMIC_ASM(set, long, "orq %1,%0", "ir", v); -ATOMIC_ASM(clear,long, "andq %1,%0", "ir", ~v); -ATOMIC_ASM(add, long, "addq %1,%0", "ir", v); -ATOMIC_ASM(subtract, long, "subq %1,%0", "ir", v); +ATOMIC_ASM(set, long, "orq %1,%0", "er", v); +ATOMIC_ASM(clear,long, "andq %1,%0", "er", ~v); +ATOMIC_ASM(add, long, "addq %1,%0", "er", v); +ATOMIC_ASM(subtract, long, "subq %1,%0", "er", v); #defineATOMIC_LOADSTORE(TYPE) \ ATOMIC_LOAD(TYPE); \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335912 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 21:29:04 2018 New Revision: 335912 URL: https://svnweb.freebsd.org/changeset/base/335912 Log: Fix .depend.foo.o tracking for sys/conf/files defined compilations. Some example files: ia32_genassym.o acpi_wakecode.o The old mkdep method also lacked tracking these files. Objects defined in sys/conf/files with no-obj and no-implicit-rule get their own targets defined in the kernel Makefile but lack having their objects added to DEPENDOBJS so never get a .depend file generated. Normally if an object is in OBJS it will get a .depend file. Fix this by looking for .o files in CLEAN and ensuring they are part of the -MD filtering and .depend loading. This is a hack. Other solutions could exist involving sys/conf/files or config(8) to auto add these to DEPENDFILES/DEPENDOBJS but this method seems reliable enough without being intrusive or error-prone for new files. Reported by: bde MFC after:3 weeks Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 21:15:47 2018(r335911) +++ head/sys/conf/kern.post.mk Tue Jul 3 21:29:04 2018(r335912) @@ -230,6 +230,7 @@ SRCS= assym.inc offset.inc vnode_if.h ${BEFORE_DEPEND} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o genoffset.o genoffset_test.o +DEPENDOBJS+= ${CLEAN:M*.o} DEPENDFILES= ${DEPENDOBJS:O:u:C/^/.depend./} .if ${MAKE_VERSION} < 20160220 DEPEND_MP?=-MP ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335911 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 21:15:47 2018 New Revision: 335911 URL: https://svnweb.freebsd.org/changeset/base/335911 Log: Need offset.inc generated early if MODULE_TIED is defined. Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jul 3 21:02:25 2018(r335910) +++ head/sys/conf/kmod.mk Tue Jul 3 21:15:47 2018(r335911) @@ -467,6 +467,9 @@ CLEANFILES+=assym.inc DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif +.if defined(MODULE_TIED) +DPSRCS+= offset.inc +.endif .if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) CLEANFILES+= offset.inc genoffset.o DEPENDOBJS+= genoffset.o ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335836 - head/usr.bin/top
On Tue, Jul 03, 2018 at 02:09:56AM +0900, Hiroki Sato wrote: > 後藤大地 wrote > in <459bd898-8072-426e-a968-96c1382ac...@icloud.com>: > da> > 2018/07/02 15:55、Hiroki Sato のメール: > da> > Eitan Adler wrote > da> > in > : > da> > li> On 1 July 2018 at 10:08, Conrad Meyer wrote: > da> > li> > I don't think code to decode UTF-8 belongs in top(1). I don't > know > da> > li> > what the goal of this routine is, but I doubt this is the right > way to > da> > li> > accomplish it. > da> > li> > da> > li> For the record, I agree. This is why I didn't click "accept" on the > da> > li> revision. I don't fully oppose leaving it in top(1) for now as we > work > da> > li> out the API, but long term its the wrong place. > da> > li> > da> > li> https://reviews.freebsd.org/D16058 is the review. > da> > I strongly object this kind of encoding-specific routine. Please > da> > back out it. The problem is that top(1) does not support multibyte > da> > encoding in functions for printing, and using C99 wide/multibyte > da> > character manipulation API such as iswprint(3) is the way to solve > da> > it. Doing getenv("LANG") and assuming an encoding based on it is a > da> > very bad practice to internationalize software. > da> I respect what you mean. > da> Once I back out, I will begin implementing it in a different way. > da> Please advise which function should be used for implementation > da> (iswprint (3) and what other functions should be used?) > Roughly speaking, POSIX/XPG/C99 I18N model requires the following > steps: > 1. Call setlocale(LC_ALL, "") first. > 2. Use mbs<->wcs and/or mb<->wc conversion functions in C95/C99 to > manipulate characters and strings depending on what you want to > do. The printable() function should use mbtowc(3) and > iswprint(3), for example. And wcslen(3) should be used to > determine the length of characters to be printed instead of > strlen(). > Note that if mbs->wcs or mb->wc conversion fails with EILSEQ at > some point, some of the character(s) are invalid for printing. > This can happen because command-line parameters in top(1) are not > always encoded in one specified in LC_CTYPE or LANG. It should > also be handled as non-printable. However, to make matters worse, > each process does not always use a single, same locale as top(1). > A process invoked with LANG=ja_JP.eucJP may have EUC-JP characters > in its ARGV array even if top(1) runs by another user whose LANG > is en_US.UTF-8. You have to determine which locale should be used > before doing mb->wc conversion. It is not so simple. > 3. Print the multibyte characters by using strvisx(3) family, which > supports multibyte character, or swprintf(3) family if you want to > format wide characters directly. Note that buffer length for > strvisx(3) must be calculated by using MB_LEN_MAX. In this case, calling setlocale() and then using strvisx() seems the right solution. If locales differ across processes this may result in mojibake but that cannot really be helped. Even analyzing other processes' locale variables is not fully reliable, since strings may be incorrectly encoded even in the process's real locale, environment variables cannot be read across users and the environment block may be overwritten by a program. In general, although using conversion to wide characters allows users a lot of flexibility, I don't think it is the best in all situations: * The result of mbstowcs() is a UTF-32 string which consumes a lot of memory. A loop with mbrtowc() may also be slow. Many operations can be done directly on UTF-8 strings with no or little additional complexity compared to byte strings. * If there is an invalid multibyte character, there is little flexibility to handle this usefully and securely, since so little is known about the encoding. The best handling may depend on the context. Therefore, in /bin/sh, I have only implemented multibyte support for UTF-8. All other encodings have bytes treated as characters. However, I do agree that getenv("LANG") is bad. Instead, setlocale() should be used. After that, nl_langinfo(CODESET) can be called and the result compared to "UTF-8". -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335910 - in head/sys: conf modules/linux modules/linux64 modules/vmm
Author: bdrewery Date: Tue Jul 3 21:02:25 2018 New Revision: 335910 URL: https://svnweb.freebsd.org/changeset/base/335910 Log: All genassym.sh usage need offset.inc Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/kmod.mk head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile head/sys/modules/vmm/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Tue Jul 3 21:02:21 2018(r335909) +++ head/sys/conf/files.amd64 Tue Jul 3 21:02:25 2018(r335910) @@ -33,7 +33,7 @@ cloudabi64_vdso_blob.ooptional compat_cloudabi64 \ clean "cloudabi64_vdso_blob.o" # linux32_genassym.o optionalcompat_linux32 \ - dependency "$S/amd64/linux32/linux32_genassym.c" \ + dependency "$S/amd64/linux32/linux32_genassym.c offset.inc" \ compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Tue Jul 3 21:02:21 2018(r335909) +++ head/sys/conf/files.i386Tue Jul 3 21:02:25 2018(r335910) @@ -20,7 +20,7 @@ cloudabi32_vdso_blob.ooptional compat_cloudabi32 \ clean "cloudabi32_vdso_blob.o" # linux_genassym.o optionalcompat_linux\ - dependency "$S/i386/linux/linux_genassym.c"\ + dependency "$S/i386/linux/linux_genassym.c offset.inc" \ compile-with"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jul 3 21:02:21 2018(r335909) +++ head/sys/conf/kmod.mk Tue Jul 3 21:02:25 2018(r335910) @@ -463,8 +463,14 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) -CLEANFILES+= assym.inc genassym.o genoffset.o -DEPENDOBJS+= genassym.o genoffset.o +CLEANFILES+= assym.inc +DEPENDOBJS+= genassym.o +DPSRCS+= offset.inc +.endif +.if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) +CLEANFILES+= offset.inc genoffset.o +DEPENDOBJS+= genoffset.o +.endif assym.inc: genassym.o offset.inc: genoffset.o .if defined(KERNBUILDDIR) @@ -482,7 +488,6 @@ genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/kern/genoffset.c -.endif .if defined(KERNBUILDDIR) ${OBJS}: opt_global.h Modified: head/sys/modules/linux/Makefile == --- head/sys/modules/linux/Makefile Tue Jul 3 21:02:21 2018 (r335909) +++ head/sys/modules/linux/Makefile Tue Jul 3 21:02:25 2018 (r335910) @@ -76,7 +76,7 @@ ${VDSO}.so: linux${SFX}_locore.o strip -N _binary_linux_locore_o_size ${.TARGET} .endif -linux${SFX}_genassym.o: +linux${SFX}_genassym.o: offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) Modified: head/sys/modules/linux64/Makefile == --- head/sys/modules/linux64/Makefile Tue Jul 3 21:02:21 2018 (r335909) +++ head/sys/modules/linux64/Makefile Tue Jul 3 21:02:25 2018 (r335910) @@ -51,7 +51,7 @@ linux_support.o: assym.inc linux_assym.h ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -linux_genassym.o: +linux_genassym.o: offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) Modified: head/sys/modules/vmm/Makefile == --- head/sys/modules/vmm/Makefile Tue Jul 3 21:02:21 2018 (r335909) +++ head/sys/modules/vmm/Makefile Tue Jul 3 21:02:25 2018 (r335910) @@ -4,7 +4,7 @@ KMOD= vmm SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h pcib_if.h acpi_if.h DPSRCS+= vmx_assym.h svm_assym.h -DPSRCS+= vmx_genassym.c svm_genassym.c +DPSRCS+= vmx_genassym.c svm_genassym.c offset.inc CFLAGS+= -DVMM_KEEP_STATS -DSMP CFLAGS+= -I${SRCTOP}/sys/amd64/vmm @@ -74,10 +74,10 @@ svm_support.o: ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} -vmx_genassym.o: +vmx_genassym.o: of
svn commit: r335909 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 21:02:21 2018 New Revision: 335909 URL: https://svnweb.freebsd.org/changeset/base/335909 Log: genoffset.c is not generated Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Tue Jul 3 20:03:19 2018(r335908) +++ head/sys/conf/kern.pre.mk Tue Jul 3 21:02:21 2018(r335909) @@ -195,7 +195,7 @@ OFEDCFLAGS= ${CFLAGS:N-I*} -DCONFIG_INFINIBAND_USER_ME OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C=${OFED_C_NOIMP} ${.IMPSRC} -GEN_CFILES= $S/$M/$M/genassym.c $S/kern/genoffset.c ${MFILES:T:S/.m$/.c/} +GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/} SYSTEM_CFILES= config.c env.c hints.c vnode_if.c SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335908 - head/sys/conf
In message , Bryan Drewery wr ites: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --5LBlvAHx6wd2MBY6ZJGLCKfNccUC2f3P7 > Content-Type: multipart/mixed; boundary="FxkUanNxVoyIpem522qWwd6g1GQCAsxqA"; > protected-headers="v1" > From: Bryan Drewery > To: Cy Schubert > Cc: src-committ...@freebsd.org, svn-src-...@freebsd.org, > svn-src-head@freebsd.org > Message-ID: > Subject: Re: svn commit: r335908 - head/sys/conf > References: <201807032006.w63k6c3e069...@slippy.cwsent.com> > In-Reply-To: <201807032006.w63k6c3e069...@slippy.cwsent.com> > > --FxkUanNxVoyIpem522qWwd6g1GQCAsxqA > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > On 7/3/2018 1:06 PM, Cy Schubert wrote: > > In message <201807032003.w63k3jd3071...@repo.freebsd.org>, Bryan=20 > > Drewery writes > > : > >> Author: bdrewery > >> Date: Tue Jul 3 20:03:19 2018 > >> New Revision: 335908 > >> URL: https://svnweb.freebsd.org/changeset/base/335908 > >> > >> Log: > >> Fix r335906+r335907 to not pass multiple source files to genoffset_t= > est.o t > >> arget. > >> =20 > >> This is working around a bug with the FAST_DEPEND logic with custom = > targets > >> that use .ALLSRC. > >> =20 > >> Reported by: mmacy > >> > >> Modified: > >> head/sys/conf/kern.post.mk > >> > >> Modified: head/sys/conf/kern.post.mk > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > >> =3D > >> --- head/sys/conf/kern.post.mk Tue Jul 3 19:24:52 2018(r33590 > >> 7) > >> +++ head/sys/conf/kern.post.mk Tue Jul 3 20:03:19 2018(r33590 > >> 8) > >> @@ -195,8 +195,8 @@ genoffset.o: $S/kern/genoffset.c > >> # is to exercise the CTASSERT that checks that the offsets in the off= > set.inc > >> # _lite struct(s) match those in the original(s).=20 > >> genoffset_test.o: $S/kern/genoffset.c offset.inc > >> - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c}= > \ > >> - -o ${.TARGET} > >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ > >> + $S/kern/genoffset.c -o ${.TARGET} > >=20 > > This still won't build because of -c and -o. > > -c is just a hint to the compiler to not run the linker. It's fine. We > even have this pattern used in share/mk/bsd.suffixes.mk. I sent my second reply to you before you sent your first one to me. We're good now. Sorry for the spam. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335908 - head/sys/conf
On 7/3/2018 1:06 PM, Cy Schubert wrote: > In message <201807032003.w63k3jd3071...@repo.freebsd.org>, Bryan > Drewery writes > : >> Author: bdrewery >> Date: Tue Jul 3 20:03:19 2018 >> New Revision: 335908 >> URL: https://svnweb.freebsd.org/changeset/base/335908 >> >> Log: >> Fix r335906+r335907 to not pass multiple source files to genoffset_test.o t >> arget. >> >> This is working around a bug with the FAST_DEPEND logic with custom targets >> that use .ALLSRC. >> >> Reported by: mmacy >> >> Modified: >> head/sys/conf/kern.post.mk >> >> Modified: head/sys/conf/kern.post.mk >> = >> = >> --- head/sys/conf/kern.post.mk Tue Jul 3 19:24:52 2018(r33590 >> 7) >> +++ head/sys/conf/kern.post.mk Tue Jul 3 20:03:19 2018(r33590 >> 8) >> @@ -195,8 +195,8 @@ genoffset.o: $S/kern/genoffset.c >> # is to exercise the CTASSERT that checks that the offsets in the offset.inc >> # _lite struct(s) match those in the original(s). >> genoffset_test.o: $S/kern/genoffset.c offset.inc >> -${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ >> --o ${.TARGET} >> +${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ >> +$S/kern/genoffset.c -o ${.TARGET} > > This still won't build because of -c and -o. -c is just a hint to the compiler to not run the linker. It's fine. We even have this pattern used in share/mk/bsd.suffixes.mk. > >> >> assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o >> NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${. >> TARGET} >> > > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r335906 - head/sys/conf
In message <6d02404f-a7bb-01c7-3775-7a0349e30...@freebsd.org>, Bryan Drewery wr ites: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --nrEq6SIfsbZGYTgfSZ5R3mSN64FvoLCIQ > Content-Type: multipart/mixed; boundary="N66uQifSC1aSf1iMifRJdrqNP6RkoOJg1"; > protected-headers="v1" > From: Bryan Drewery > To: Cy Schubert > Cc: src-committ...@freebsd.org, svn-src-...@freebsd.org, > svn-src-head@freebsd.org > Message-ID: <6d02404f-a7bb-01c7-3775-7a0349e30...@freebsd.org> > Subject: Re: svn commit: r335906 - head/sys/conf > References: <201807031959.w63jxpa2069...@slippy.cwsent.com> > In-Reply-To: <201807031959.w63jxpa2069...@slippy.cwsent.com> > > --N66uQifSC1aSf1iMifRJdrqNP6RkoOJg1 > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > On 7/3/2018 12:59 PM, Cy Schubert wrote: > > In message <201807031924.w63joi5w051...@repo.freebsd.org>, Bryan=20 > > Drewery writes > > : > >> Author: bdrewery > >> Date: Tue Jul 3 19:24:44 2018 > >> New Revision: 335906 > >> URL: https://svnweb.freebsd.org/changeset/base/335906 > >> > >> Log: > >> No need to make a copy to build genoffset_test.o > >> > >> Modified: > >> head/sys/conf/kern.post.mk > >> > >> Modified: head/sys/conf/kern.post.mk > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > >> =3D > >> --- head/sys/conf/kern.post.mk Tue Jul 3 19:09:46 2018(r33590 > >> 5) > >> +++ head/sys/conf/kern.post.mk Tue Jul 3 19:24:44 2018(r33590 > >> 6) > >> @@ -191,14 +191,12 @@ offset.inc: $S/kern/genoffset.sh genoffset.o > >> genoffset.o: $S/kern/genoffset.c > >>${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c > >> =20 > >> -genoffset_test.c: $S/kern/genoffset.c > >> - cp $S/kern/genoffset.c genoffset_test.c > >> - > >> # genoffset_test.o is not actually used for anything - the point of c= > ompilin > >> g it > >> # is to exercise the CTASSERT that checks that the offsets in the off= > set.inc > >> # _lite struct(s) match those in the original(s).=20 > >> -genoffset_test.o: genoffset_test.c offset.inc > >> - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.= > c > >> +genoffset_test.o: $S/kern/genoffset.c offset.inc > >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c}= > \ > >> + -o ${.TARGET} > >=20 > > -o with -c in the previous line will cause an error. > > -o and -c are fine together. The problem is .ALLSRC duplicating sources > from the dependencies read from .depend.genoffset_test.o file. > Workaround in r335908. gotcha. Sorry for the second spam. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335906 - head/sys/conf
On 7/3/2018 12:59 PM, Cy Schubert wrote: > In message <201807031924.w63joi5w051...@repo.freebsd.org>, Bryan > Drewery writes > : >> Author: bdrewery >> Date: Tue Jul 3 19:24:44 2018 >> New Revision: 335906 >> URL: https://svnweb.freebsd.org/changeset/base/335906 >> >> Log: >> No need to make a copy to build genoffset_test.o >> >> Modified: >> head/sys/conf/kern.post.mk >> >> Modified: head/sys/conf/kern.post.mk >> = >> = >> --- head/sys/conf/kern.post.mk Tue Jul 3 19:09:46 2018(r33590 >> 5) >> +++ head/sys/conf/kern.post.mk Tue Jul 3 19:24:44 2018(r33590 >> 6) >> @@ -191,14 +191,12 @@ offset.inc: $S/kern/genoffset.sh genoffset.o >> genoffset.o: $S/kern/genoffset.c >> ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c >> >> -genoffset_test.c: $S/kern/genoffset.c >> -cp $S/kern/genoffset.c genoffset_test.c >> - >> # genoffset_test.o is not actually used for anything - the point of compilin >> g it >> # is to exercise the CTASSERT that checks that the offsets in the offset.inc >> # _lite struct(s) match those in the original(s). >> -genoffset_test.o: genoffset_test.c offset.inc >> -${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c >> +genoffset_test.o: $S/kern/genoffset.c offset.inc >> +${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ >> +-o ${.TARGET} > > -o with -c in the previous line will cause an error. -o and -c are fine together. The problem is .ALLSRC duplicating sources from the dependencies read from .depend.genoffset_test.o file. Workaround in r335908. > >> >> assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o >> NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${. >> TARGET} >> > > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r335908 - head/sys/conf
In message <201807032003.w63k3jd3071...@repo.freebsd.org>, Bryan Drewery writes : > Author: bdrewery > Date: Tue Jul 3 20:03:19 2018 > New Revision: 335908 > URL: https://svnweb.freebsd.org/changeset/base/335908 > > Log: > Fix r335906+r335907 to not pass multiple source files to genoffset_test.o t > arget. > > This is working around a bug with the FAST_DEPEND logic with custom targets > that use .ALLSRC. > > Reported by:mmacy > > Modified: > head/sys/conf/kern.post.mk > > Modified: head/sys/conf/kern.post.mk > = > = > --- head/sys/conf/kern.post.mkTue Jul 3 19:24:52 2018(r33590 > 7) > +++ head/sys/conf/kern.post.mkTue Jul 3 20:03:19 2018(r33590 > 8) > @@ -195,8 +195,8 @@ genoffset.o: $S/kern/genoffset.c > # is to exercise the CTASSERT that checks that the offsets in the offset.inc > # _lite struct(s) match those in the original(s). > genoffset_test.o: $S/kern/genoffset.c offset.inc > - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ > - -o ${.TARGET} > + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ > + $S/kern/genoffset.c -o ${.TARGET} This still won't build because of -c and -o. > > assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o > NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${. > TARGET} > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335908 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 20:03:19 2018 New Revision: 335908 URL: https://svnweb.freebsd.org/changeset/base/335908 Log: Fix r335906+r335907 to not pass multiple source files to genoffset_test.o target. This is working around a bug with the FAST_DEPEND logic with custom targets that use .ALLSRC. Reported by: mmacy Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 19:24:52 2018(r335907) +++ head/sys/conf/kern.post.mk Tue Jul 3 20:03:19 2018(r335908) @@ -195,8 +195,8 @@ genoffset.o: $S/kern/genoffset.c # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). genoffset_test.o: $S/kern/genoffset.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ - -o ${.TARGET} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ + $S/kern/genoffset.c -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335906 - head/sys/conf
In message <201807031924.w63joi5w051...@repo.freebsd.org>, Bryan Drewery writes : > Author: bdrewery > Date: Tue Jul 3 19:24:44 2018 > New Revision: 335906 > URL: https://svnweb.freebsd.org/changeset/base/335906 > > Log: > No need to make a copy to build genoffset_test.o > > Modified: > head/sys/conf/kern.post.mk > > Modified: head/sys/conf/kern.post.mk > = > = > --- head/sys/conf/kern.post.mkTue Jul 3 19:09:46 2018(r33590 > 5) > +++ head/sys/conf/kern.post.mkTue Jul 3 19:24:44 2018(r33590 > 6) > @@ -191,14 +191,12 @@ offset.inc: $S/kern/genoffset.sh genoffset.o > genoffset.o: $S/kern/genoffset.c > ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c > > -genoffset_test.c: $S/kern/genoffset.c > - cp $S/kern/genoffset.c genoffset_test.c > - > # genoffset_test.o is not actually used for anything - the point of compilin > g it > # is to exercise the CTASSERT that checks that the offsets in the offset.inc > # _lite struct(s) match those in the original(s). > -genoffset_test.o: genoffset_test.c offset.inc > - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c > +genoffset_test.o: $S/kern/genoffset.c offset.inc > + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ > + -o ${.TARGET} -o with -c in the previous line will cause an error. > > assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o > NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${. > TARGET} > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335906 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 19:24:44 2018 New Revision: 335906 URL: https://svnweb.freebsd.org/changeset/base/335906 Log: No need to make a copy to build genoffset_test.o Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 19:09:46 2018(r335905) +++ head/sys/conf/kern.post.mk Tue Jul 3 19:24:44 2018(r335906) @@ -191,14 +191,12 @@ offset.inc: $S/kern/genoffset.sh genoffset.o genoffset.o: $S/kern/genoffset.c ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c -genoffset_test.c: $S/kern/genoffset.c - cp $S/kern/genoffset.c genoffset_test.c - # genoffset_test.o is not actually used for anything - the point of compiling it # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). -genoffset_test.o: genoffset_test.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c +genoffset_test.o: $S/kern/genoffset.c offset.inc + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST ${.ALLSRC:M*.c} \ + -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335907 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 19:24:52 2018 New Revision: 335907 URL: https://svnweb.freebsd.org/changeset/base/335907 Log: Handle .depend for genoffset_test.o Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 19:24:44 2018(r335906) +++ head/sys/conf/kern.post.mk Tue Jul 3 19:24:52 2018(r335907) @@ -229,7 +229,7 @@ kernel-depend: .depend SRCS= assym.inc offset.inc vnode_if.h ${BEFORE_DEPEND} ${CFILES} \ ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} -DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o genoffset.o +DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o genoffset.o genoffset_test.o DEPENDFILES= ${DEPENDOBJS:O:u:C/^/.depend./} .if ${MAKE_VERSION} < 20160220 DEPEND_MP?=-MP ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335905 - head/usr.bin/rup
Author: jilles Date: Tue Jul 3 19:09:46 2018 New Revision: 335905 URL: https://svnweb.freebsd.org/changeset/base/335905 Log: rup: Fix -Wcast-align warnings Fix possible strict aliasing issue (if time_t is the same size as int but not int but for example long) which also resulted in a false positive warning on systems with 64-bit time_t. Pointer casts are bad; we can just copy the time_t. Elsewhere, avoid casting char * to int * by using memcpy(). Reviewed by: eadler Differential Revision:https://reviews.freebsd.org/D16075 Modified: head/usr.bin/rup/Makefile head/usr.bin/rup/rup.c Modified: head/usr.bin/rup/Makefile == --- head/usr.bin/rup/Makefile Tue Jul 3 18:45:04 2018(r335904) +++ head/usr.bin/rup/Makefile Tue Jul 3 19:09:46 2018(r335905) @@ -4,6 +4,4 @@ PROG= rup LIBADD=rpcsvc -NO_WCAST_ALIGN=# Size is explicitly handled - .include Modified: head/usr.bin/rup/rup.c == --- head/usr.bin/rup/rup.c Tue Jul 3 18:45:04 2018(r335904) +++ head/usr.bin/rup/rup.c Tue Jul 3 19:09:46 2018(r335905) @@ -120,27 +120,16 @@ rstat_reply(statstime *host_stat, struct sockaddr_in * printf("%-*s\t", HOST_WIDTH, host); - if (sizeof(time_t) == sizeof(host_stat->curtime.tv_sec)) { - tmp_time = localtime((time_t *)&host_stat->curtime.tv_sec); - host_time = *tmp_time; + tmp_time_t = host_stat->curtime.tv_sec; + tmp_time = localtime(&tmp_time_t); + host_time = *tmp_time; - host_stat->curtime.tv_sec -= host_stat->boottime.tv_sec; + host_stat->curtime.tv_sec -= host_stat->boottime.tv_sec; - tmp_time = gmtime((time_t *)&host_stat->curtime.tv_sec); - host_uptime = *tmp_time; - } - else { /* non-32-bit time_t */ - tmp_time_t = host_stat->curtime.tv_sec; - tmp_time = localtime(&tmp_time_t); - host_time = *tmp_time; + tmp_time_t = host_stat->curtime.tv_sec; + tmp_time = gmtime(&tmp_time_t); + host_uptime = *tmp_time; - host_stat->curtime.tv_sec -= host_stat->boottime.tv_sec; - - tmp_time_t = host_stat->curtime.tv_sec; - tmp_time = gmtime(&tmp_time_t); - host_uptime = *tmp_time; - } - #define updays (host_stat->curtime.tv_sec / 86400) if (host_uptime.tm_yday != 0) sprintf(days_buf, "%3d day%s, ", updays, @@ -205,7 +194,7 @@ onehost(char *host) return(-1); } - addr.sin_addr.s_addr = *(int *)hp->h_addr; + memcpy(&addr.sin_addr.s_addr, hp->h_addr, sizeof(int)); rstat_reply(&host_stat, &addr); clnt_destroy(rstat_clnt); return (0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335904 - head/sys/conf
Author: bdrewery Date: Tue Jul 3 18:45:04 2018 New Revision: 335904 URL: https://svnweb.freebsd.org/changeset/base/335904 Log: Fix module build when MODULE_TIED=1 is set. Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jul 3 18:39:43 2018(r335903) +++ head/sys/conf/kmod.mk Tue Jul 3 18:45:04 2018(r335904) @@ -472,16 +472,16 @@ genassym.o: opt_global.h .endif assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} -genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c +genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} -genoffset.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c +genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ - ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c + ${SYSDIR}/kern/genoffset.c .endif .if defined(KERNBUILDDIR) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335903 - head/sys/conf
Author: mmacy Date: Tue Jul 3 18:39:43 2018 New Revision: 335903 URL: https://svnweb.freebsd.org/changeset/base/335903 Log: explain the purpose of genoffset_test Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 18:20:42 2018(r335902) +++ head/sys/conf/kern.post.mk Tue Jul 3 18:39:43 2018(r335903) @@ -194,6 +194,9 @@ genoffset.o: $S/kern/genoffset.c genoffset_test.c: $S/kern/genoffset.c cp $S/kern/genoffset.c genoffset_test.c +# genoffset_test.o is not actually used for anything - the point of compiling it +# is to exercise the CTASSERT that checks that the offsets in the offset.inc +# _lite struct(s) match those in the original(s). genoffset_test.o: genoffset_test.c offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335880 - in head/sys: conf kern
On 7/3/2018 11:21 AM, Matthew Macy wrote: > What is the "correct" way to make sure that offset.inc is visible to modules? > Can you answer my question though? Was it a mistake or are you intending there to be a machine-specific genoffset.c? > On Tue, Jul 3, 2018 at 10:39 AM, Bryan Drewery wrote: >> On 7/2/2018 7:50 PM, Matt Macy wrote: >>> Author: mmacy >>> Date: Tue Jul 3 02:50:07 2018 >>> New Revision: 335880 >>> URL: https://svnweb.freebsd.org/changeset/base/335880 >>> >>> Log: >>> expose thread_lite definition to tied modules >>> >>> Modified: >>> head/sys/conf/kmod.mk >>> head/sys/kern/genoffset.sh >>> >>> Modified: head/sys/conf/kmod.mk >>> == >>> --- head/sys/conf/kmod.mk Tue Jul 3 01:55:09 2018(r335879) >>> +++ head/sys/conf/kmod.mk Tue Jul 3 02:50:07 2018(r335880) >>> @@ -463,9 +463,10 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS >>> .endif >>> >>> .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) >>> -CLEANFILES+= assym.inc genassym.o >>> -DEPENDOBJS+= genassym.o >>> +CLEANFILES+= assym.inc genassym.o genoffset.o >>> +DEPENDOBJS+= genassym.o genoffset.o >>> assym.inc: genassym.o >>> +offset.inc: genoffset.o >>> .if defined(KERNBUILDDIR) >>> genassym.o: opt_global.h >>> .endif >>> @@ -475,6 +476,12 @@ genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >>> genassym.o: ${SRCS:Mopt_*.h} >>> ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >>> ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >>> +offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o >>> + sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} >>> +genoffset.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c >>> +genoffset.o: ${SRCS:Mopt_*.h} >>> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >>> + ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c >> >> Why is this using machine-specific genoffset.c but kern.post.mk uses the >> global genoffset.c? >> >> And what even generates the machine-specific genoffset.c file? I see no >> rule for it anywhere. >> >>> .endif >>> >>> .if defined(KERNBUILDDIR) >>> >>> Modified: head/sys/kern/genoffset.sh >>> == >>> --- head/sys/kern/genoffset.shTue Jul 3 01:55:09 2018 >>> (r335879) >>> +++ head/sys/kern/genoffset.shTue Jul 3 02:50:07 2018 >>> (r335880) >>> @@ -39,7 +39,7 @@ work() >>> { >>> echo "#ifndef _OFFSET_INC_" >>> echo "#define _OFFSET_INC_" >>> - echo "#if !defined(GENOFFSET) && !defined(KLD_MODULE)" >>> + echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || >>> defined(KLD_TIED))" >>> ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} ' >>> / C .*_datatype_*/ { >>> type = substr($3, match($3, "_datatype_") + >>> length("_datatype_")) >>> >> >> >> -- >> Regards, >> Bryan Drewery >> -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r335880 - in head/sys: conf kern
What is the "correct" way to make sure that offset.inc is visible to modules? On Tue, Jul 3, 2018 at 10:39 AM, Bryan Drewery wrote: > On 7/2/2018 7:50 PM, Matt Macy wrote: >> Author: mmacy >> Date: Tue Jul 3 02:50:07 2018 >> New Revision: 335880 >> URL: https://svnweb.freebsd.org/changeset/base/335880 >> >> Log: >> expose thread_lite definition to tied modules >> >> Modified: >> head/sys/conf/kmod.mk >> head/sys/kern/genoffset.sh >> >> Modified: head/sys/conf/kmod.mk >> == >> --- head/sys/conf/kmod.mk Tue Jul 3 01:55:09 2018(r335879) >> +++ head/sys/conf/kmod.mk Tue Jul 3 02:50:07 2018(r335880) >> @@ -463,9 +463,10 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS >> .endif >> >> .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) >> -CLEANFILES+= assym.inc genassym.o >> -DEPENDOBJS+= genassym.o >> +CLEANFILES+= assym.inc genassym.o genoffset.o >> +DEPENDOBJS+= genassym.o genoffset.o >> assym.inc: genassym.o >> +offset.inc: genoffset.o >> .if defined(KERNBUILDDIR) >> genassym.o: opt_global.h >> .endif >> @@ -475,6 +476,12 @@ genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >> genassym.o: ${SRCS:Mopt_*.h} >> ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >> ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >> +offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o >> + sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} >> +genoffset.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c >> +genoffset.o: ${SRCS:Mopt_*.h} >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >> + ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c > > Why is this using machine-specific genoffset.c but kern.post.mk uses the > global genoffset.c? > > And what even generates the machine-specific genoffset.c file? I see no > rule for it anywhere. > >> .endif >> >> .if defined(KERNBUILDDIR) >> >> Modified: head/sys/kern/genoffset.sh >> == >> --- head/sys/kern/genoffset.shTue Jul 3 01:55:09 2018 >> (r335879) >> +++ head/sys/kern/genoffset.shTue Jul 3 02:50:07 2018 >> (r335880) >> @@ -39,7 +39,7 @@ work() >> { >> echo "#ifndef _OFFSET_INC_" >> echo "#define _OFFSET_INC_" >> - echo "#if !defined(GENOFFSET) && !defined(KLD_MODULE)" >> + echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || >> defined(KLD_TIED))" >> ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} ' >> / C .*_datatype_*/ { >> type = substr($3, match($3, "_datatype_") + >> length("_datatype_")) >> > > > -- > Regards, > Bryan Drewery > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335902 - head/sys/conf
Author: mmacy Date: Tue Jul 3 18:20:42 2018 New Revision: 335902 URL: https://svnweb.freebsd.org/changeset/base/335902 Log: ensure that offset.inc is generated first Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 18:18:29 2018(r335901) +++ head/sys/conf/kern.post.mk Tue Jul 3 18:20:42 2018(r335902) @@ -156,7 +156,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o .endif ${SYSTEM_LD_TAIL} -OBJS_DEPEND_GUESS+=assym.inc vnode_if.h ${BEFORE_DEPEND:M*.h} \ +OBJS_DEPEND_GUESS+=offset.inc assym.inc vnode_if.h ${BEFORE_DEPEND:M*.h} \ ${MFILES:T:S/.m$/.h/} .for mfile in ${MFILES} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335879 - in head/sys: conf kern sys
genoffset_test tests that the offsets match up On Tue, Jul 3, 2018 at 11:02 AM, Bryan Drewery wrote: > On 7/2/2018 6:55 PM, Matt Macy wrote: >> Author: mmacy >> Date: Tue Jul 3 01:55:09 2018 >> New Revision: 335879 >> URL: https://svnweb.freebsd.org/changeset/base/335879 >> >> Log: >> make critical_{enter, exit} inline >> >> Avoid pulling in all of the dependencies by >> automatically generating a stripped down thread_lite exporting >> only the fields of interest. The field declarations are type checked >> against the original and the offsets of the generated result is >> automatically checked. >> >> kib has expressed disagreement and would have preferred to simply >> use genassym style offsets (which loses type check enforcement). >> jhb has expressed dislike of it due to header pollution and a >> duplicate structure. He would have preferred to just have defined >> thread in _thread.h. Nonetheless, he admits that this is the only >> viable solution at the moment. >> >> The impetus for this came from mjg's D15331: >> "Inline critical_enter/exit for amd64" >> >> Reviewed by: jeff >> Differential Revision: https://reviews.freebsd.org/D16078 >> >> Added: >> head/sys/kern/genoffset.c (contents, props changed) >> head/sys/kern/genoffset.sh (contents, props changed) >> head/sys/sys/kpilite.h (contents, props changed) >> Modified: >> head/sys/conf/kern.post.mk >> head/sys/conf/kern.pre.mk >> head/sys/kern/kern_switch.c >> head/sys/sys/assym.h >> head/sys/sys/systm.h >> >> Modified: head/sys/conf/kern.post.mk >> == >> --- head/sys/conf/kern.post.mkMon Jul 2 22:59:29 2018 >> (r335878) >> +++ head/sys/conf/kern.post.mkTue Jul 3 01:55:09 2018 >> (r335879) >> @@ -185,13 +185,25 @@ hack.pico: Makefile >> ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico >> rm -f hack.c >> >> -assym.inc: $S/kern/genassym.sh genassym.o >> +offset.inc: $S/kern/genoffset.sh genoffset.o >> + NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > >> ${.TARGET} >> + >> +genoffset.o: $S/kern/genoffset.c >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c >> + >> +genoffset_test.c: $S/kern/genoffset.c >> + cp $S/kern/genoffset.c genoffset_test.c >> + >> +genoffset_test.o: genoffset_test.c offset.inc >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c >> + >> +assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o >> NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > >> ${.TARGET} > > What's genoffset_test? Nothing seems to use it. > > -- > Regards, > Bryan Drewery > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335901 - head/sys/compat/freebsd32
Author: oshogbo Date: Tue Jul 3 18:18:29 2018 New Revision: 335901 URL: https://svnweb.freebsd.org/changeset/base/335901 Log: Regen after 335900. PR: 228671 Modified: head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cTue Jul 3 18:17:19 2018(r335900) +++ head/sys/compat/freebsd32/freebsd32_sysent.cTue Jul 3 18:18:29 2018(r335901) @@ -633,7 +633,7 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = freebsd32_fstat */ { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = freebsd32_fstatat */ { AS(freebsd32_fhstat_args), (sy_call_t *)freebsd32_fhstat, AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 553 = freebsd32_fhstat */ - { AS(getdirentries_args), (sy_call_t *)sys_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC },/* 554 = getdirentries */ + { AS(getdirentries_args), (sy_call_t *)sys_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 554 = getdirentries */ { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 555 = statfs */ { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 556 = fstatfs */ { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC },/* 557 = getfsstat */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335900 - head/sys/compat/freebsd32
Author: oshogbo Date: Tue Jul 3 18:17:19 2018 New Revision: 335900 URL: https://svnweb.freebsd.org/changeset/base/335900 Log: capsicum: add getdirentries to the freebsd32 compact There is a getdirentries syscall in freebsd32 and it's capability ready so allow calling it in the capability mode. PR: 228671 Modified: head/sys/compat/freebsd32/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf == --- head/sys/compat/freebsd32/capabilities.conf Tue Jul 3 17:37:16 2018 (r335899) +++ head/sys/compat/freebsd32/capabilities.conf Tue Jul 3 18:17:19 2018 (r335900) @@ -116,6 +116,7 @@ getauid freebsd32_getcontext getdents freebsd32_getdirentries +getdirentries getdomainname getdtablesize getegid ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335879 - in head/sys: conf kern sys
On 7/2/2018 6:55 PM, Matt Macy wrote: > Author: mmacy > Date: Tue Jul 3 01:55:09 2018 > New Revision: 335879 > URL: https://svnweb.freebsd.org/changeset/base/335879 > > Log: > make critical_{enter, exit} inline > > Avoid pulling in all of the dependencies by > automatically generating a stripped down thread_lite exporting > only the fields of interest. The field declarations are type checked > against the original and the offsets of the generated result is > automatically checked. > > kib has expressed disagreement and would have preferred to simply > use genassym style offsets (which loses type check enforcement). > jhb has expressed dislike of it due to header pollution and a > duplicate structure. He would have preferred to just have defined > thread in _thread.h. Nonetheless, he admits that this is the only > viable solution at the moment. > > The impetus for this came from mjg's D15331: > "Inline critical_enter/exit for amd64" > > Reviewed by: jeff > Differential Revision: https://reviews.freebsd.org/D16078 > > Added: > head/sys/kern/genoffset.c (contents, props changed) > head/sys/kern/genoffset.sh (contents, props changed) > head/sys/sys/kpilite.h (contents, props changed) > Modified: > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/kern/kern_switch.c > head/sys/sys/assym.h > head/sys/sys/systm.h > > Modified: head/sys/conf/kern.post.mk > == > --- head/sys/conf/kern.post.mkMon Jul 2 22:59:29 2018 > (r335878) > +++ head/sys/conf/kern.post.mkTue Jul 3 01:55:09 2018 > (r335879) > @@ -185,13 +185,25 @@ hack.pico: Makefile > ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico > rm -f hack.c > > -assym.inc: $S/kern/genassym.sh genassym.o > +offset.inc: $S/kern/genoffset.sh genoffset.o > + NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > > ${.TARGET} > + > +genoffset.o: $S/kern/genoffset.c > + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c > + > +genoffset_test.c: $S/kern/genoffset.c > + cp $S/kern/genoffset.c genoffset_test.c > + > +genoffset_test.o: genoffset_test.c offset.inc > + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c > + > +assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o > NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > > ${.TARGET} What's genoffset_test? Nothing seems to use it. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r335879 - in head/sys: conf kern sys [ broke ci.freebsd.org's FreeBSD-head-amd64-build ]
On 2018-Jul-3, at 10:06 AM, Li-Wen Hsu wrote: > On Tue, Jul 3, 2018 at 5:30 PM Bryan Drewery wrote: >> >> On 7/2/2018 10:46 PM, Mark Millard wrote: >>> -r335879 broke ci.freebsd.org's FreeBSD-head-amd64-build : >>> >>> https://ci.freebsd.org/job/FreeBSD-head-amd64-build/ >>> >>> shows: >>> >>> --- ia32_genassym.o --- >>> In file included from /usr/src/sys/compat/ia32/ia32_genassym.c:6: >>> In file included from /usr/src/sys/sys/systm.h:113: >>> /usr/src/sys/sys/kpilite.h:33:10: fatal error: 'offset.inc' file not found >>> #include "offset.inc" >>> ^~~~ >>> 1 error generated. >>> *** [ia32_genassym.o] Error code 1 >>> >>> Later builds ( -r335880 , -r335881 , -r335882 ) get the same. >>> >>> FreeBSD-head-i386-LINT also fails for such reasons. >>> >> >> r335884 should fix this. > > It seems that amd64 and i386 LINT are still failing. https://ci.freebsd.org/job/FreeBSD-head-amd64-build/ shows that #9303 (-r335884) and later for amd64 are building successfully. But https://ci.freebsd.org/job/FreeBSD-head-i386-LINT/ shows that -r335884 (#6934) and later ( -r335892 so far ) for i386's LINT are still failing with: --- linux_genassym.o --- In file included from /workspace/src/sys/i386/linux/linux_genassym.c:6: In file included from /workspace/src/sys/sys/systm.h:113: /workspace/src/sys/sys/kpilite.h:33:10: fatal error: 'offset.inc' file not found #include "offset.inc" ^~~~ 1 error generated. *** [linux_genassym.o] Error code 1 === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335880 - in head/sys: conf kern
On 7/2/2018 7:50 PM, Matt Macy wrote: > Author: mmacy > Date: Tue Jul 3 02:50:07 2018 > New Revision: 335880 > URL: https://svnweb.freebsd.org/changeset/base/335880 > > Log: > expose thread_lite definition to tied modules > > Modified: > head/sys/conf/kmod.mk > head/sys/kern/genoffset.sh > > Modified: head/sys/conf/kmod.mk > == > --- head/sys/conf/kmod.mk Tue Jul 3 01:55:09 2018(r335879) > +++ head/sys/conf/kmod.mk Tue Jul 3 02:50:07 2018(r335880) > @@ -463,9 +463,10 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS > .endif > > .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) > -CLEANFILES+= assym.inc genassym.o > -DEPENDOBJS+= genassym.o > +CLEANFILES+= assym.inc genassym.o genoffset.o > +DEPENDOBJS+= genassym.o genoffset.o > assym.inc: genassym.o > +offset.inc: genoffset.o > .if defined(KERNBUILDDIR) > genassym.o: opt_global.h > .endif > @@ -475,6 +476,12 @@ genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > genassym.o: ${SRCS:Mopt_*.h} > ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ > ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c > +offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o > + sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} > +genoffset.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c > +genoffset.o: ${SRCS:Mopt_*.h} > + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ > + ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c Why is this using machine-specific genoffset.c but kern.post.mk uses the global genoffset.c? And what even generates the machine-specific genoffset.c file? I see no rule for it anywhere. > .endif > > .if defined(KERNBUILDDIR) > > Modified: head/sys/kern/genoffset.sh > == > --- head/sys/kern/genoffset.shTue Jul 3 01:55:09 2018 > (r335879) > +++ head/sys/kern/genoffset.shTue Jul 3 02:50:07 2018 > (r335880) > @@ -39,7 +39,7 @@ work() > { > echo "#ifndef _OFFSET_INC_" > echo "#define _OFFSET_INC_" > - echo "#if !defined(GENOFFSET) && !defined(KLD_MODULE)" > + echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || > defined(KLD_TIED))" > ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} ' > / C .*_datatype_*/ { > type = substr($3, match($3, "_datatype_") + > length("_datatype_")) > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r335899 - head/contrib/openbsm/bin/auditd
Author: asomers Date: Tue Jul 3 17:37:16 2018 New Revision: 335899 URL: https://svnweb.freebsd.org/changeset/base/335899 Log: auditd(8): register signal handlers interrutibly auditd_wait_for_events() relies on read(2) being interrupted by signals, but it registers signal handlers with signal(3), which sets SA_RESTART. That breaks asynchronous signal handling. It means that signals don't actually get handled until after an audit(8) trigger is received. Symptoms include: * Sending SIGTERM to auditd doesn't kill it right away; you must send SIGTERM and then send a trigger with auditon(2). * Same with SIGHUP * Zombie child processes don't get reaped until auditd receives a trigger sent by auditon. This includes children created by expiring audit trails at auditd startup. Fix by using sigaction(2) instead of signal(3). Cherry pick https://github.com/openbsm/openbsm/commit/d060887 PR: 229381 Reviewed by: cem Obtained from:OpenBSM MFC after:2 weeks Differential Revision:https://github.com/openbsm/openbsm/pull/36 Modified: head/contrib/openbsm/bin/auditd/auditd.c Modified: head/contrib/openbsm/bin/auditd/auditd.c == --- head/contrib/openbsm/bin/auditd/auditd.cTue Jul 3 17:31:45 2018 (r335898) +++ head/contrib/openbsm/bin/auditd/auditd.cTue Jul 3 17:37:16 2018 (r335899) @@ -415,27 +415,35 @@ close_all(void) static int register_daemon(void) { + struct sigaction action; FILE * pidfile; int fd; pid_t pid; /* Set up the signal hander. */ - if (signal(SIGTERM, auditd_relay_signal) == SIG_ERR) { + action.sa_handler = auditd_relay_signal; + /* +* sa_flags must not include SA_RESTART, so that read(2) will be +* interruptible in auditd_wait_for_events +*/ + action.sa_flags = 0; + sigemptyset(&action.sa_mask); + if (sigaction(SIGTERM, &action, NULL) != 0) { auditd_log_err( "Could not set signal handler for SIGTERM"); fail_exit(); } - if (signal(SIGCHLD, auditd_relay_signal) == SIG_ERR) { + if (sigaction(SIGCHLD, &action, NULL) != 0) { auditd_log_err( "Could not set signal handler for SIGCHLD"); fail_exit(); } - if (signal(SIGHUP, auditd_relay_signal) == SIG_ERR) { + if (sigaction(SIGHUP, &action, NULL) != 0) { auditd_log_err( "Could not set signal handler for SIGHUP"); fail_exit(); } - if (signal(SIGALRM, auditd_relay_signal) == SIG_ERR) { + if (sigaction(SIGALRM, &action, NULL) != 0) { auditd_log_err( "Could not set signal handler for SIGALRM"); fail_exit(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335898 - head/lib/libc/gen
Author: jhb Date: Tue Jul 3 17:31:45 2018 New Revision: 335898 URL: https://svnweb.freebsd.org/changeset/base/335898 Log: Clean up the vcs ID strings in libc's gen/ directory. - Move CSRG IDs into __SCCSID(). - When a file has been copied, consistently use 'From: ' for strings referencing the version of the source file copied from in the license block comment. - Some of the 'From:' tags were using $FreeBSD$ that was being expanded on each checkout. Fix those to hardcode the FreeBSD tag from the file that was copied at the time of the copy. - When multiple strings are present list them in "chronological" order, so CSRG (__SCCSID) before FreeBSD (__FBSDID). If a file came from OtherBSD and contains a CSRG ID from the OtherBSD file, use the order CSRG -> OtherBSD -> FreeBSD. Reviewed by: imp Differential Revision:https://reviews.freebsd.org/D15831 Modified: head/lib/libc/gen/__xuname.c head/lib/libc/gen/alarm.c head/lib/libc/gen/assert.c head/lib/libc/gen/clock.c head/lib/libc/gen/closedir.c head/lib/libc/gen/confstr.c head/lib/libc/gen/crypt.c head/lib/libc/gen/daemon.c head/lib/libc/gen/devname.c head/lib/libc/gen/disklabel.c head/lib/libc/gen/err.c head/lib/libc/gen/errlst.c head/lib/libc/gen/exec.c head/lib/libc/gen/fnmatch.c head/lib/libc/gen/fstab.c head/lib/libc/gen/fts-compat.c head/lib/libc/gen/fts-compat11.c head/lib/libc/gen/fts.c head/lib/libc/gen/ftw-compat11.c head/lib/libc/gen/getbootfile.c head/lib/libc/gen/getbsize.c head/lib/libc/gen/getcap.c head/lib/libc/gen/getcwd.c head/lib/libc/gen/getdomainname.c head/lib/libc/gen/getgrouplist.c head/lib/libc/gen/gethostname.c head/lib/libc/gen/getloadavg.c head/lib/libc/gen/getlogin.c head/lib/libc/gen/getmntinfo-compat11.c head/lib/libc/gen/getmntinfo.c head/lib/libc/gen/getnetgrent.c head/lib/libc/gen/getosreldate.c head/lib/libc/gen/getpagesize.c head/lib/libc/gen/getttyent.c head/lib/libc/gen/getusershell.c head/lib/libc/gen/getvfsbyname.c head/lib/libc/gen/glob-compat11.c head/lib/libc/gen/glob.c head/lib/libc/gen/initgroups.c head/lib/libc/gen/isatty.c head/lib/libc/gen/nftw-compat11.c head/lib/libc/gen/nice.c head/lib/libc/gen/nlist.c head/lib/libc/gen/opendir.c head/lib/libc/gen/pause.c head/lib/libc/gen/popen.c head/lib/libc/gen/psignal.c head/lib/libc/gen/pw_scan.c head/lib/libc/gen/raise.c head/lib/libc/gen/readdir-compat11.c head/lib/libc/gen/readdir.c head/lib/libc/gen/rewinddir.c head/lib/libc/gen/scandir-compat11.c head/lib/libc/gen/scandir.c head/lib/libc/gen/seekdir.c head/lib/libc/gen/setdomainname.c head/lib/libc/gen/sethostname.c head/lib/libc/gen/setjmperr.c head/lib/libc/gen/setmode.c head/lib/libc/gen/siginterrupt.c head/lib/libc/gen/siglist.c head/lib/libc/gen/signal.c head/lib/libc/gen/sigsetops.c head/lib/libc/gen/sleep.c head/lib/libc/gen/stringlist.c head/lib/libc/gen/strtofflags.c head/lib/libc/gen/sysconf.c head/lib/libc/gen/sysctl.c head/lib/libc/gen/syslog.c head/lib/libc/gen/telldir.c head/lib/libc/gen/termios.c head/lib/libc/gen/time.c head/lib/libc/gen/times.c head/lib/libc/gen/timezone.c head/lib/libc/gen/ttyname.c head/lib/libc/gen/ttyslot.c head/lib/libc/gen/ualarm.c head/lib/libc/gen/uname.c head/lib/libc/gen/usleep.c head/lib/libc/gen/utime.c head/lib/libc/gen/valloc.c head/lib/libc/gen/wait.c head/lib/libc/gen/wait3.c head/lib/libc/gen/waitpid.c Modified: head/lib/libc/gen/__xuname.c == --- head/lib/libc/gen/__xuname.cTue Jul 3 16:45:49 2018 (r335897) +++ head/lib/libc/gen/__xuname.cTue Jul 3 17:31:45 2018 (r335898) @@ -27,11 +27,10 @@ * 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. + * + * From: @(#)uname.c 8.1 (Berkeley) 1/4/94 */ -#if defined(LIBC_SCCS) && !defined(lint) -/*static char sccsid[] = "From: @(#)uname.c8.1 (Berkeley) 1/4/94";*/ -#endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/gen/alarm.c == --- head/lib/libc/gen/alarm.c Tue Jul 3 16:45:49 2018(r335897) +++ head/lib/libc/gen/alarm.c Tue Jul 3 17:31:45 2018(r335898) @@ -29,10 +29,8 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)alarm.c8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ #include +__SCCSID("@(#)alarm.c 8.1 (Berkeley) 6/4/93"); __FBSDID("$FreeBSD$"); /* Modified: head/lib/libc/gen/assert.c == --- head/lib/libc/gen/assert.c Tue Jul 3 16:45:49 2018(r335897) +++ head/lib/li
Re: svn commit: r335879 - in head/sys: conf kern sys [ broke ci.freebsd.org's FreeBSD-head-amd64-build ]
On Tue, Jul 3, 2018 at 5:30 PM Bryan Drewery wrote: > > On 7/2/2018 10:46 PM, Mark Millard wrote: > > -r335879 broke ci.freebsd.org's FreeBSD-head-amd64-build : > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-build/ > > > > shows: > > > > --- ia32_genassym.o --- > > In file included from /usr/src/sys/compat/ia32/ia32_genassym.c:6: > > In file included from /usr/src/sys/sys/systm.h:113: > > /usr/src/sys/sys/kpilite.h:33:10: fatal error: 'offset.inc' file not found > > #include "offset.inc" > > ^~~~ > > 1 error generated. > > *** [ia32_genassym.o] Error code 1 > > > > Later builds ( -r335880 , -r335881 , -r335882 ) get the same. > > > > FreeBSD-head-i386-LINT also fails for such reasons. > > > > r335884 should fix this. It seems that amd64 and i386 LINT are still failing. -- Li-Wen Hsu https://lwhsu.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335897 - head/lib/libc
Author: jhb Date: Tue Jul 3 16:45:49 2018 New Revision: 335897 URL: https://svnweb.freebsd.org/changeset/base/335897 Log: Strip __RCSID() and __SCCSID() strings by default when building libc. This is in preparation for changes to update the various ID strings in libc's source. CSRG ID strings will use __SCCSID() and there are some existing uses of __RCSID() for NetBSD ID strings already. These are generally under either an explicit #if 0 or an #ifdef LIBC_SCCS so are off by default and this change preserves that existing behavior. Differential Revision:https://reviews.freebsd.org/D15830 Modified: head/lib/libc/Makefile Modified: head/lib/libc/Makefile == --- head/lib/libc/Makefile Tue Jul 3 16:17:59 2018(r335896) +++ head/lib/libc/Makefile Tue Jul 3 16:45:49 2018(r335897) @@ -25,8 +25,10 @@ LIBC_ARCH=${MACHINE_CPUARCH} # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS # below. Note: there are no IDs for syscall stubs whose sources are generated. -# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS -# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. +# To include legacy CSRG SCCS ID strings, remove -DNO__SCCSID from CFLAGS. +# To include RCS ID strings from other BSD projects, remove -DNO__RCSID from CFLAGS. +CFLAGS+=-DNO__SCCSID -DNO__RCSID + LIB=c SHLIB_MAJOR= 7 .if ${MK_SSP} != "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335879 - in head/sys: conf kern sys [ broke ci.freebsd.org's FreeBSD-head-amd64-build ]
On 7/2/2018 10:46 PM, Mark Millard wrote: > -r335879 broke ci.freebsd.org's FreeBSD-head-amd64-build : > > https://ci.freebsd.org/job/FreeBSD-head-amd64-build/ > > shows: > > --- ia32_genassym.o --- > In file included from /usr/src/sys/compat/ia32/ia32_genassym.c:6: > In file included from /usr/src/sys/sys/systm.h:113: > /usr/src/sys/sys/kpilite.h:33:10: fatal error: 'offset.inc' file not found > #include "offset.inc" > ^~~~ > 1 error generated. > *** [ia32_genassym.o] Error code 1 > > Later builds ( -r335880 , -r335881 , -r335882 ) get the same. > > FreeBSD-head-i386-LINT also fails for such reasons. > r335884 should fix this. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r335896 - head/sys/dev/ata
Author: sbruno Date: Tue Jul 3 16:17:59 2018 New Revision: 335896 URL: https://svnweb.freebsd.org/changeset/base/335896 Log: Reset indentiation of ata_suspend() such that its clear we fall through this function and that we aren't supposed to be controlled by the first if() conditional. Found with gcc. No functional change is intended with this commit. Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c == --- head/sys/dev/ata/ata-all.c Tue Jul 3 16:07:04 2018(r335895) +++ head/sys/dev/ata/ata-all.c Tue Jul 3 16:17:59 2018(r335896) @@ -316,13 +316,13 @@ ata_suspend(device_t dev) if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - if (ch->flags & ATA_PERIODIC_POLL) - callout_drain(&ch->poll_callout); - mtx_lock(&ch->state_mtx); - xpt_freeze_simq(ch->sim, 1); - while (ch->state != ATA_IDLE) - msleep(ch, &ch->state_mtx, PRIBIO, "atasusp", hz/100); - mtx_unlock(&ch->state_mtx); +if (ch->flags & ATA_PERIODIC_POLL) + callout_drain(&ch->poll_callout); +mtx_lock(&ch->state_mtx); +xpt_freeze_simq(ch->sim, 1); +while (ch->state != ATA_IDLE) + msleep(ch, &ch->state_mtx, PRIBIO, "atasusp", hz/100); +mtx_unlock(&ch->state_mtx); return(0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335895 - head/tools/boot
Author: ian Date: Tue Jul 3 16:07:04 2018 New Revision: 335895 URL: https://svnweb.freebsd.org/changeset/base/335895 Log: Fix the fstab entries for tests that have an efi partition in slice 1 and put the rootfs on s2. Modified: head/tools/boot/rootgen.sh Modified: head/tools/boot/rootgen.sh == --- head/tools/boot/rootgen.sh Tue Jul 3 15:56:22 2018(r335894) +++ head/tools/boot/rootgen.sh Tue Jul 3 16:07:04 2018(r335895) @@ -237,7 +237,7 @@ mk_nogeli_mbr_ufs_uefi() { img=$2 cat > ${src}/etc/fstab < ${src}/etc/fstab
svn commit: r335894 - head/sys/dev/ata/chipsets
Author: sbruno Date: Tue Jul 3 15:56:22 2018 New Revision: 335894 URL: https://svnweb.freebsd.org/changeset/base/335894 Log: Reset indentation of this flag. No functional change intended. Found with gcc. sys/dev/ata/chipsets/ata-siliconimage.c: In function 'ata_cmd_ch_attach': sys/dev/ata/chipsets/ata-siliconimage.c:187:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (ctlr->chip->cfg2 & SII_INTR) ^~ sys/dev/ata/chipsets/ata-siliconimage.c:190:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' ch->flags |= ATA_NO_ATAPI_DMA; Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c == --- head/sys/dev/ata/chipsets/ata-siliconimage.cTue Jul 3 15:48:34 2018(r335893) +++ head/sys/dev/ata/chipsets/ata-siliconimage.cTue Jul 3 15:56:22 2018(r335894) @@ -187,7 +187,7 @@ ata_cmd_ch_attach(device_t dev) if (ctlr->chip->cfg2 & SII_INTR) ch->hw.status = ata_cmd_status; - ch->flags |= ATA_NO_ATAPI_DMA; +ch->flags |= ATA_NO_ATAPI_DMA; return 0; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
On Tue, Jul 03, 2018 at 08:21:58AM -0700, John Baldwin wrote: > On 7/3/18 8:02 AM, Ruslan Bukin wrote: > > On Tue, Jul 03, 2018 at 07:57:00AM -0700, John Baldwin wrote: > >> On 7/3/18 6:53 AM, Ruslan Bukin wrote: > >>> Author: br > >>> Date: Tue Jul 3 13:53:54 2018 > >>> New Revision: 335888 > >>> URL: https://svnweb.freebsd.org/changeset/base/335888 > >>> > >>> Log: > >>> o Ensure va_list is declared by including stdarg.h. > >>> o Also move printf.h to go after it since it does require declaration > >>> of va_list. > >>> > >>> This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 > >> > >> Normal style(9) is to sort headers. Also, includes > >> already > >> so should already have va_list defined. I think there is some other build > >> problem > >> you are running into with GCC 8.1. Did you ensure you stripped all of the > >> 'include-fixed' headers when you updated riscv64-gcc? This seems to be an > >> issue > >> of busted headers in the compiler and these changes should probably be > >> reverted. > >> > > > > What do you mean stripped? Should I do something with this directory > > The xtoolchain ports and base/gcc remove these entirely since GCC usually > breaks > them. You can just remove that directory if you are building by hand. > It works. Thanks! Ruslan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335893 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
Author: br Date: Tue Jul 3 15:48:34 2018 New Revision: 335893 URL: https://svnweb.freebsd.org/changeset/base/335893 Log: Revert 335888 ("Ensure va_list is declared by including stdarg.h.") The issue was caused by header pollution brought by GCC 8.1. We now have to remove include-fixed headers in the GCC installation directory. Sponsored by: DARPA, AFRL Pointed out by: jhb Modified: head/contrib/blacklist/bin/blacklistctl.c head/lib/libpjdlog/pjdlog.c head/sbin/hastd/pjdlog.c Modified: head/contrib/blacklist/bin/blacklistctl.c == --- head/contrib/blacklist/bin/blacklistctl.c Tue Jul 3 15:24:09 2018 (r335892) +++ head/contrib/blacklist/bin/blacklistctl.c Tue Jul 3 15:48:34 2018 (r335893) @@ -35,7 +35,6 @@ #include __RCSID("$NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $"); -#include #include #include #ifdef HAVE_LIBUTIL_H Modified: head/lib/libpjdlog/pjdlog.c == --- head/lib/libpjdlog/pjdlog.c Tue Jul 3 15:24:09 2018(r335892) +++ head/lib/libpjdlog/pjdlog.c Tue Jul 3 15:48:34 2018(r335893) @@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include #include Modified: head/sbin/hastd/pjdlog.c == --- head/sbin/hastd/pjdlog.cTue Jul 3 15:24:09 2018(r335892) +++ head/sbin/hastd/pjdlog.cTue Jul 3 15:48:34 2018(r335893) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335892 - head/share/mk
Author: jhb Date: Tue Jul 3 15:24:09 2018 New Revision: 335892 URL: https://svnweb.freebsd.org/changeset/base/335892 Log: Don't specify the desired march/mabi for RISC-V in ACFLAGS. ACFLAGS is only used in addition to CFLAGS, so setting the options in both was redundant. However, ACFLAGS is added to the command line after CFLAGS, so the settings from ACFLAGS were applied for assembly files in kernel modules after the kernel-specific march/abi in CFLAGS. As a result, the hard-float ACFLAGS in bsd.cpu.mk was overriding the soft-float CFLAGS.gcc in sys/conf/kern.mk. In particular, dtrace_asm.o was compiled as hard-float and the linker refused to link dtrace.ko since its object files contained a mix of hard and soft float. Reviewed by: br Sponsored by: DARPA / AFRL Differential Revision:https://reviews.freebsd.org/D16054 Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkTue Jul 3 14:57:11 2018(r335891) +++ head/share/mk/bsd.cpu.mkTue Jul 3 15:24:09 2018(r335892) @@ -368,10 +368,8 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -m .if ${MACHINE_CPUARCH} == "riscv" .if ${MACHINE_ARCH:Mriscv*sf} CFLAGS += -march=rv64imac -mabi=lp64 -ACFLAGS += -march=rv64imac -mabi=lp64 .else CFLAGS += -march=rv64imafdc -mabi=lp64d -ACFLAGS += -march=rv64imafdc -mabi=lp64d .endif .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
On 7/3/18 8:02 AM, Ruslan Bukin wrote: > On Tue, Jul 03, 2018 at 07:57:00AM -0700, John Baldwin wrote: >> On 7/3/18 6:53 AM, Ruslan Bukin wrote: >>> Author: br >>> Date: Tue Jul 3 13:53:54 2018 >>> New Revision: 335888 >>> URL: https://svnweb.freebsd.org/changeset/base/335888 >>> >>> Log: >>> o Ensure va_list is declared by including stdarg.h. >>> o Also move printf.h to go after it since it does require declaration >>> of va_list. >>> >>> This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 >> >> Normal style(9) is to sort headers. Also, includes >> already >> so should already have va_list defined. I think there is some other build >> problem >> you are running into with GCC 8.1. Did you ensure you stripped all of the >> 'include-fixed' headers when you updated riscv64-gcc? This seems to be an >> issue >> of busted headers in the compiler and these changes should probably be >> reverted. >> > > What do you mean stripped? Should I do something with this directory The xtoolchain ports and base/gcc remove these entirely since GCC usually breaks them. You can just remove that directory if you are building by hand. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
On Tue, Jul 03, 2018 at 07:57:00AM -0700, John Baldwin wrote: > On 7/3/18 6:53 AM, Ruslan Bukin wrote: > > Author: br > > Date: Tue Jul 3 13:53:54 2018 > > New Revision: 335888 > > URL: https://svnweb.freebsd.org/changeset/base/335888 > > > > Log: > > o Ensure va_list is declared by including stdarg.h. > > o Also move printf.h to go after it since it does require declaration > > of va_list. > > > > This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 > > Normal style(9) is to sort headers. Also, includes > already > so should already have va_list defined. I think there is some other build > problem > you are running into with GCC 8.1. Did you ensure you stripped all of the > 'include-fixed' headers when you updated riscv64-gcc? This seems to be an > issue > of busted headers in the compiler and these changes should probably be > reverted. > What do you mean stripped? Should I do something with this directory 0 pie:/home/br/riscv20180702 >find ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/ ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/ ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/syslimits.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/limits.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/README ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/sys ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/sys/types.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/stddef.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/stdio.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/stdlib.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/unistd.h ./lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed/wchar.h Ruslan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
On 7/3/18 6:53 AM, Ruslan Bukin wrote: > Author: br > Date: Tue Jul 3 13:53:54 2018 > New Revision: 335888 > URL: https://svnweb.freebsd.org/changeset/base/335888 > > Log: > o Ensure va_list is declared by including stdarg.h. > o Also move printf.h to go after it since it does require declaration > of va_list. > > This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 Normal style(9) is to sort headers. Also, includes already so should already have va_list defined. I think there is some other build problem you are running into with GCC 8.1. Did you ensure you stripped all of the 'include-fixed' headers when you updated riscv64-gcc? This seems to be an issue of busted headers in the compiler and these changes should probably be reverted. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335889 - head/usr.bin/top
Author: br Date: Tue Jul 3 14:32:15 2018 New Revision: 335889 URL: https://svnweb.freebsd.org/changeset/base/335889 Log: Fix build: utf8strvisx() does signed data comparisons, but 'char' type is unsigned in riscv GCC, so use guaranted signed char type. Sponsored by: DARPA, AFRL Modified: head/usr.bin/top/utils.c Modified: head/usr.bin/top/utils.c == --- head/usr.bin/top/utils.cTue Jul 3 13:53:54 2018(r335888) +++ head/usr.bin/top/utils.cTue Jul 3 14:32:15 2018(r335889) @@ -344,7 +344,7 @@ static const char *vis_encodes[] = { int utf8strvisx(char *dst, const char *src, size_t src_len) { - const char *src_p; + const signed char *src_p; char *dst_p; int i, j, olen, len; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335887 - head/share/mk
On Tue, Jul 03, 2018 at 10:56:48AM +, Mark Linimon wrote: > On Tue, Jul 03, 2018 at 10:51:59AM +, Ruslan Bukin wrote: > > Add GCC 8.1.0 compiler warning flags. > > I'm sorry, but that is a "what" not a "why". > > As someone who tries to fix ports on tier-2, I really need to > understand the "why". > There are plenty of issues (see warning flags for earlier versions of GCC listed in the same file which are required for GCC 8.1 as well). I think enumeration of all the issues may take some time. You just comment some warning flags and try build world. Ruslan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335888 - in head: contrib/blacklist/bin lib/libpjdlog sbin/hastd
Author: br Date: Tue Jul 3 13:53:54 2018 New Revision: 335888 URL: https://svnweb.freebsd.org/changeset/base/335888 Log: o Ensure va_list is declared by including stdarg.h. o Also move printf.h to go after it since it does require declaration of va_list. This fixes build with latest RISC-V GNU Toolchain with GCC 8.1 Sponsored by: DARPA, AFRL Modified: head/contrib/blacklist/bin/blacklistctl.c head/lib/libpjdlog/pjdlog.c head/sbin/hastd/pjdlog.c Modified: head/contrib/blacklist/bin/blacklistctl.c == --- head/contrib/blacklist/bin/blacklistctl.c Tue Jul 3 10:51:59 2018 (r335887) +++ head/contrib/blacklist/bin/blacklistctl.c Tue Jul 3 13:53:54 2018 (r335888) @@ -35,6 +35,7 @@ #include __RCSID("$NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $"); +#include #include #include #ifdef HAVE_LIBUTIL_H Modified: head/lib/libpjdlog/pjdlog.c == --- head/lib/libpjdlog/pjdlog.c Tue Jul 3 10:51:59 2018(r335887) +++ head/lib/libpjdlog/pjdlog.c Tue Jul 3 13:53:54 2018(r335888) @@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include #include Modified: head/sbin/hastd/pjdlog.c == --- head/sbin/hastd/pjdlog.cTue Jul 3 10:51:59 2018(r335887) +++ head/sbin/hastd/pjdlog.cTue Jul 3 13:53:54 2018(r335888) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335887 - head/share/mk
On Tue, Jul 03, 2018 at 10:51:59AM +, Ruslan Bukin wrote: > Add GCC 8.1.0 compiler warning flags. I'm sorry, but that is a "what" not a "why". As someone who tries to fix ports on tier-2, I really need to understand the "why". mcl ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335887 - head/share/mk
Author: br Date: Tue Jul 3 10:51:59 2018 New Revision: 335887 URL: https://svnweb.freebsd.org/changeset/base/335887 Log: Add GCC 8.1.0 compiler warning flags. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkTue Jul 3 08:50:49 2018(r335886) +++ head/share/mk/bsd.sys.mkTue Jul 3 10:51:59 2018(r335887) @@ -154,6 +154,16 @@ CWARNFLAGS+= -Wno-error=bool-operation \ -Wno-error=stringop-overflow .endif +# GCC 8.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100 +CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations\ + -Wno-error=cast-function-type \ + -Wno-error=multistatement-macros\ + -Wno-error=restrict \ + -Wno-error=sizeof-pointer-memaccess \ + -Wno-error=stringop-truncation +.endif + # How to handle FreeBSD custom printf format specifiers. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r335873 - in head: . sys/amd64/amd64 sys/amd64/include sys/conf sys/i386/i386 sys/i386/include sys/sys sys/vm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Mon, 2 Jul 2018 19:48:38 + (UTC) Matt Macy schrieb: > Author: mmacy > Date: Mon Jul 2 19:48:38 2018 > New Revision: 335873 > URL: https://svnweb.freebsd.org/changeset/base/335873 > > Log: > inline atomics and allow tied modules to inline locks > > - inline atomics in modules on i386 and amd64 (they were always > inline on other arches) > - allow modules to opt in to inlining locks by specifying > MODULE_TIED=1 in the makefile > > Reviewed by: kib > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D16079 > > Deleted: > head/sys/amd64/amd64/atomic.c > head/sys/i386/i386/atomic.c > Modified: > head/UPDATING > head/sys/amd64/include/atomic.h > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/conf/kmod.mk > head/sys/i386/include/atomic.h > head/sys/sys/lock.h > head/sys/sys/module.h > head/sys/sys/mutex.h > head/sys/sys/param.h > head/sys/vm/vm_map.h > head/sys/vm/vm_page.h > > Modified: head/UPDATING > == > --- head/UPDATING Mon Jul 2 19:33:26 2018(r335872) > +++ head/UPDATING Mon Jul 2 19:48:38 2018(r335873) > @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20180702: > + On i386 and amd64 atomics are now inlined. Out of tree modules using > + atomics will need to be rebuilt. > + > 20180701: > The '%I' format in the kern.corefile sysctl limits the number of > core files that a process can generate to the number stored in the > > Modified: head/sys/amd64/include/atomic.h > == > --- head/sys/amd64/include/atomic.h Mon Jul 2 19:33:26 2018 > (r335872) > +++ head/sys/amd64/include/atomic.h Mon Jul 2 19:48:38 2018 > (r335873) > @@ -96,7 +96,7 @@ > * Kernel modules call real functions which are built into the kernel. > * This allows kernel modules to be portable between UP and SMP systems. > */ > -#if defined(KLD_MODULE) || !defined(__GNUCLIKE_ASM) > +#if !defined(__GNUCLIKE_ASM) > #define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \ > void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v); \ > void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) > > Modified: head/sys/conf/files.amd64 > == > --- head/sys/conf/files.amd64 Mon Jul 2 19:33:26 2018(r335872) > +++ head/sys/conf/files.amd64 Mon Jul 2 19:48:38 2018(r335873) > @@ -126,7 +126,6 @@ acpi_wakedata.h optional > acpi \ clean "acpi_wakedata.h" > # > #amd64/amd64/apic_vector.S standard > -amd64/amd64/atomic.c standard > amd64/amd64/bios.c standard > amd64/amd64/bpf_jit_machdep.coptionalbpf_jitter > amd64/amd64/cpu_switch.S standard > > Modified: head/sys/conf/files.i386 > == > --- head/sys/conf/files.i386 Mon Jul 2 19:33:26 2018(r335872) > +++ head/sys/conf/files.i386 Mon Jul 2 19:48:38 2018(r335873) > @@ -474,8 +474,6 @@ i386/bios/smapi.c optional smapi > i386/bios/smapi_bios.S optional smapi > i386/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32 > #i386/i386/apic_vector.s optional apic > -i386/i386/atomic.c standard\ > - compile-with"${CC} -c ${CFLAGS} > ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" i386/i386/bios.c > standard i386/i386/bioscall.s standard > i386/i386/bpf_jit_machdep.c optional bpf_jitter > > Modified: head/sys/conf/kmod.mk > == > --- head/sys/conf/kmod.mk Mon Jul 2 19:33:26 2018(r335872) > +++ head/sys/conf/kmod.mk Mon Jul 2 19:48:38 2018(r335873) > @@ -111,6 +111,9 @@ WERROR?= -Werror > CFLAGS+= ${WERROR} > CFLAGS+= -D_KERNEL > CFLAGS+= -DKLD_MODULE > +.if defined(MODULE_TIED) > +CFLAGS+= -DKLD_TIED > +.endif > > # Don't use any standard or source-relative include directories. > NOSTDINC=-nostdinc > > Modified: head/sys/i386/include/atomic.h > == > --- head/sys/i386/include/atomic.hMon Jul 2 19:33:26 2018 > (r335872) > +++ head/sys/i386/include/atomic.hMon Jul 2 19:48:38 2018 > (r335873) > @@ -104,7 +104,7 @@ __mbu(void) > * Kernel modules call real functions which are built into the kernel. > * This allows kernel modules to be portable between UP and
svn commit: r335886 - head/sbin/pfctl
Author: kp Date: Tue Jul 3 08:50:49 2018 New Revision: 335886 URL: https://svnweb.freebsd.org/changeset/base/335886 Log: pfctl: Don't retrieve interface list if '-n' is set If '-n' is set we don't use the list of skip interfaces, so don't retrieve it. This fixes issues if 'pfctl -n' is used before the pf module is loaded. This was broken by r333181. Reported by: Jakub Chromy MFC after:1 week Modified: head/sbin/pfctl/pfctl.c Modified: head/sbin/pfctl/pfctl.c == --- head/sbin/pfctl/pfctl.c Tue Jul 3 08:44:40 2018(r335885) +++ head/sbin/pfctl/pfctl.c Tue Jul 3 08:50:49 2018(r335886) @@ -2409,7 +2409,7 @@ main(int argc, char *argv[]) } if ((rulesopt != NULL) && (loadopt & PFCTL_FLAG_OPTION) && - !anchorname[0]) + !anchorname[0] && !(opts & PF_OPT_NOACTION)) if (pfctl_get_skip_ifaces()) error = 1; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r335885 - in head: contrib/bsnmp contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_ntp contrib/bsnmp/snmp_target contrib/bsnmp/snmp_usm contrib/bsn...
Author: harti Date: Tue Jul 3 08:44:40 2018 New Revision: 335885 URL: https://svnweb.freebsd.org/changeset/base/335885 Log: Update bsnmp to version 1.13. This does not bring user-visible changes. For developers gensnmptree can now generate functions for enums to convert between enums and strings and to check the validity of a value. The sources in FreeBSD are now in sync with the upstream which allows to bring in IPv6 modifications. Modified: head/contrib/bsnmp/VERSION head/contrib/bsnmp/gensnmptree/gensnmptree.1 head/contrib/bsnmp/gensnmptree/gensnmptree.c head/contrib/bsnmp/lib/snmp.h head/contrib/bsnmp/lib/tc.def head/contrib/bsnmp/snmp_mibII/mibII.c head/contrib/bsnmp/snmp_mibII/mibII_route.c head/contrib/bsnmp/snmp_ntp/snmp_ntp.c head/contrib/bsnmp/snmp_target/target_snmp.c head/contrib/bsnmp/snmp_target/target_tree.def head/contrib/bsnmp/snmp_usm/usm_snmp.c head/contrib/bsnmp/snmp_usm/usm_tree.def head/contrib/bsnmp/snmp_vacm/vacm_snmp.c head/contrib/bsnmp/snmp_vacm/vacm_tree.def head/contrib/bsnmp/snmpd/main.c head/contrib/bsnmp/snmpd/trans_udp.c head/contrib/bsnmp/snmpd/trap.c head/contrib/bsnmp/snmpd/tree.def head/contrib/libbegemot/rpoll.c head/contrib/libbegemot/rpoll.h head/lib/libbsnmp/libbsnmp/Makefile head/share/mk/bsd.snmpmod.mk head/usr.sbin/bsnmpd/bsnmpd/Makefile head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_pf.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c head/usr.sbin/bsnmpd/modules/snmp_target/Makefile head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.c head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c Modified: head/contrib/bsnmp/VERSION == --- head/contrib/bsnmp/VERSION Tue Jul 3 05:56:23 2018(r335884) +++ head/contrib/bsnmp/VERSION Tue Jul 3 08:44:40 2018(r335885) @@ -1 +1 @@ -1.12 +1.13 Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1 == --- head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Jul 3 05:56:23 2018(r335884) +++ head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Jul 3 08:44:40 2018(r335885) @@ -2,7 +2,7 @@ .\" Copyright (c) 2001-2005 .\"Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\"All rights reserved. -.\" Copyright (c) 2006 +.\" Copyright (c) 2006,2018 .\"Hartmut Brandt .\"All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $ .\" -.Dd May 26, 2006 +.Dd June 29, 2018 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd "generate C and header files from a MIB description file" .Sh SYNOPSIS .Nm -.Op Fl dEehlt +.Op Fl dEeFfhlt .Op Fl I Ar directory .Op Fl i Ar infile .Op Fl p Ar prefix @@ -99,6 +99,26 @@ is the length of the OID. .It Va OID_ Ns Ar name is the last component of the OID. .El +.It Fl F +Together with +.Fl E +causes +.Nm +instead of the generation of enum definitions the generation of +functions for checking a value to be one of the enumeration variants and +for conversion between strings and the enum. The file is sent to standard +output and is meant to be included into a C-file for compilation. +.It Fl f +This flag can be used together with +.Fl E +or when generating the tree files. It causes +.Nm +to emit static inline functions for checking a value to be one of the +enumeration values and for conversion between strings and the enum. +If used when generating the tree files, the preprocessor symbol +.Ar SNMPTREE_TYPES +must be defined when including the tree header file for these definitions +to become visible. .It Fl h Print a short help page. .It Fl I Ar directory @@ -116,6 +136,36 @@ Instead of normal output print the resulting tree. Prefix the file names and the table name with .Ar prefix . .El +.Pp +The following functions are generated by +.Fl f +or +.Fl F : +.Pp +.Ft static inline int +.Fn isok_EnumName "enum EnumName" ; +.Pp +.Ft static inline const char * +.Fn tostr_EnumName "enum EnumName" ; +.Pp +.Ft static inline int +.Fn fromstr_EnumName "const char *" "enum EnumName *" ; +.Pp +The +.Fa EnumName +is replaced with the enumeration name. +.Fn isok_EnumName +returns 1 if the argument is one of the valid enum values and 0 otherwise. +.Fn tostr_EnumName +returns a string representat
Re: svn commit: r335833 - in head: share/man/man4 sys/net sys/netpfil/pf
On 3 Jul 2018, at 7:38, Antoine Brodin wrote: On Sun, Jul 1, 2018 at 3:16 AM, Will Andrews wrote: Author: will Date: Sun Jul 1 01:16:03 2018 New Revision: 335833 URL: https://svnweb.freebsd.org/changeset/base/335833 Log: pf: remove unused ioctls. Several ioctls are unused in pf, in the sense that no base utility references them. Additionally, a cursory review of pf-based ports indicates they're not used elsewhere either. Some of them have been unused since the original import. As far as I can tell, they're also unused in OpenBSD. Finally, removing this code removes the need for future pf work to take them into account. Reviewed by: kp Differential Revision:https://reviews.freebsd.org/D16076 Modified: head/share/man/man4/pf.4 head/sys/net/pfvar.h head/sys/netpfil/pf/pf_ioctl.c Hi, This breaks some ports like net/libdnet, please revert or fix the ports fallout. It also uses DIOCCHANGERULE (like sshuttle). Do you know of any other failures? It’d be good to know if reverting just the DIOCCHANGERULE removal would be enough to fix all failures, or if there are others that are used as well. Regards, Kristof ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"