Re: svn commit: r358164 - in head: . lib/ncurses/ncurses
On Thu, Feb 20, 2020 at 05:24:13PM -0800, Mark Millard wrote: > [This is not an objection to the version upgrade.] > > FYI: I happen to have updated to head -r358132 on multiple > environments, not having done anything to force rebuilds > of things tied to ncurses. > > armv7 / 32-bit powerpc : poudriere options displays look normal. > > aarch64 / powerpc64 / amd64: they look odd/poor. > (But I could still see what I needed too see to figure out what > to do.) > > The breakage seems to be tied to 64-bit contexts in some way. > Thanks for the information, still the ABI has changed meaning we do need to bump shlibs, the fact that the options on 32bits looks fine does not mean everything is fine. For intance, try tig, or mutt, depending terminal you will see the rendering is not 100% good (tested on armv7). It becomes fine after rebuilding the said tools. Best regards, Bapt signature.asc Description: PGP signature
svn commit: r358194 - head/sys/netgraph
Author: glebius Date: Fri Feb 21 04:18:15 2020 New Revision: 358194 URL: https://svnweb.freebsd.org/changeset/base/358194 Log: Rework second part of r357558. Unroll the macro and allocate memory in sleepable manner before entering the epoch for the send. Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c == --- head/sys/netgraph/ng_socket.c Fri Feb 21 04:10:41 2020 (r358193) +++ head/sys/netgraph/ng_socket.c Fri Feb 21 04:18:15 2020 (r358194) @@ -410,6 +410,7 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr; int len, error; hook_p hook = NULL; + item_p item; charhookname[NG_HOOKSIZ]; if ((pcbp == NULL) || (control != NULL)) { @@ -462,8 +463,10 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, } /* Send data. */ + item = ng_package_data(m, NG_WAITOK); + m = NULL; NET_EPOCH_ENTER(et); - NG_SEND_DATA_FLAGS(error, hook, m, NG_WAITOK); + NG_FWD_ITEM_HOOK(error, item, hook); NET_EPOCH_EXIT(et); release: ___ 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: r358193 - head/sys/netgraph
Author: glebius Date: Fri Feb 21 04:10:41 2020 New Revision: 358193 URL: https://svnweb.freebsd.org/changeset/base/358193 Log: Revert one half of previous change r357558. Don't enter the epoch on sends to control socket. Control socket messages can run constructors of nodes and other stuff that is allowed to M_WAITOK. PR: 244241 Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c == --- head/sys/netgraph/ng_socket.c Fri Feb 21 01:44:31 2020 (r358192) +++ head/sys/netgraph/ng_socket.c Fri Feb 21 04:10:41 2020 (r358193) @@ -219,7 +219,6 @@ static int ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td) { - struct epoch_tracker et; struct ngpcb *const pcbp = sotongpcb(so); struct ngsock *const priv = NG_NODE_PRIVATE(pcbp->sockdata->node); struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr; @@ -338,9 +337,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, item->apply = priv->error = -1; - NET_EPOCH_ENTER(et); error = ng_snd_item(item, 0); - NET_EPOCH_EXIT(et); mtx_lock(>mtx); if (priv->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: r358192 - head/sys/kern
Author: mjg Date: Fri Feb 21 01:44:31 2020 New Revision: 358192 URL: https://svnweb.freebsd.org/changeset/base/358192 Log: vfs: stop duplicating vnode work in audit during path lookup Duplicating the work was putting an avoidable requirement that the filedesc lock is held across the entire operation (otherwise by the time audit reads vnode pointers another thread in the same process can chdir somewhere else, making audit log things using different vnode than the one which will be used for actual lookup). Do the obvious thing and pass down vnodes which will be used. Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Fri Feb 21 01:40:49 2020(r358191) +++ head/sys/kern/vfs_lookup.c Fri Feb 21 01:44:31 2020(r358192) @@ -403,14 +403,6 @@ namei(struct nameidata *ndp) ndp->ni_rootdir = fdp->fd_rdir; ndp->ni_topdir = fdp->fd_jdir; - /* -* If we are auditing the kernel pathname, save the user pathname. -*/ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1(td, ndp->ni_dirfd, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2(td, ndp->ni_dirfd, cnp->cn_pnbuf); - startdir_used = 0; dp = NULL; cnp->cn_nameptr = cnp->cn_pnbuf; @@ -505,6 +497,13 @@ namei(struct nameidata *ndp) ndp->ni_lcf |= NI_LCF_LATCH; } FILEDESC_SUNLOCK(fdp); + /* +* If we are auditing the kernel pathname, save the user pathname. +*/ + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, dp, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, dp, cnp->cn_pnbuf); if (ndp->ni_startdir != NULL && !startdir_used) vrele(ndp->ni_startdir); if (error != 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: r358191 - head/sys/security/audit
Author: mjg Date: Fri Feb 21 01:40:49 2020 New Revision: 358191 URL: https://svnweb.freebsd.org/changeset/base/358191 Log: audit: provide audit_canon_path variant which accepts vnodes Modified: head/sys/security/audit/audit.h head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_bsm_klib.c head/sys/security/audit/audit_private.h Modified: head/sys/security/audit/audit.h == --- head/sys/security/audit/audit.h Fri Feb 21 01:40:20 2020 (r358190) +++ head/sys/security/audit/audit.h Fri Feb 21 01:40:49 2020 (r358191) @@ -120,6 +120,10 @@ voidaudit_arg_upath1(struct thread *td, int dirfd, c voidaudit_arg_upath1_canon(char *upath); voidaudit_arg_upath2(struct thread *td, int dirfd, char *upath); voidaudit_arg_upath2_canon(char *upath); +voidaudit_arg_upath1_vp(struct thread *td, struct vnode *rdir, + struct vnode *cdir, char *upath); +voidaudit_arg_upath2_vp(struct thread *td, struct vnode *rdir, + struct vnode *cdir, char *upath); voidaudit_arg_vnode1(struct vnode *vp); voidaudit_arg_vnode2(struct vnode *vp); voidaudit_arg_text(const char *text); @@ -362,6 +366,16 @@ voidaudit_thread_free(struct thread *td); audit_arg_upath2_canon((upath));\ } while (0) +#defineAUDIT_ARG_UPATH1_VP(td, rdir, cdir, upath) do { \ + if (AUDITING_TD(curthread)) \ + audit_arg_upath1_vp((td), (rdir), (cdir), (upath)); \ +} while (0) + +#defineAUDIT_ARG_UPATH2_VP(td, rdir, cdir, upath) do { \ + if (AUDITING_TD(curthread)) \ + audit_arg_upath2_vp((td), (rdir), (cdir), (upath)); \ +} while (0) + #defineAUDIT_ARG_VALUE(value) do { \ if (AUDITING_TD(curthread)) \ audit_arg_value((value)); \ @@ -448,6 +462,8 @@ void audit_thread_free(struct thread *td); #defineAUDIT_ARG_UPATH1_CANON(upath) #defineAUDIT_ARG_UPATH2(td, dirfd, upath) #defineAUDIT_ARG_UPATH2_CANON(upath) +#defineAUDIT_ARG_UPATH1_VP(td, rdir, cdir, upath) +#defineAUDIT_ARG_UPATH2_VP(td, rdir, cdir, upath) #defineAUDIT_ARG_VALUE(value) #defineAUDIT_ARG_VNODE1(vp) #defineAUDIT_ARG_VNODE2(vp) Modified: head/sys/security/audit/audit_arg.c == --- head/sys/security/audit/audit_arg.c Fri Feb 21 01:40:20 2020 (r358190) +++ head/sys/security/audit/audit_arg.c Fri Feb 21 01:40:49 2020 (r358191) @@ -767,6 +767,44 @@ audit_arg_upath2(struct thread *td, int dirfd, char *u ARG_SET_VALID(ar, ARG_UPATH2); } +static void +audit_arg_upath_vp(struct thread *td, struct vnode *rdir, struct vnode *cdir, +char *upath, char **pathp) +{ + + if (*pathp == NULL) + *pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK); + audit_canon_path_vp(td, rdir, cdir, upath, *pathp); +} + +void +audit_arg_upath1_vp(struct thread *td, struct vnode *rdir, struct vnode *cdir, +char *upath) +{ + struct kaudit_record *ar; + + ar = currecord(); + if (ar == NULL) + return; + + audit_arg_upath_vp(td, rdir, cdir, upath, >k_ar.ar_arg_upath1); + ARG_SET_VALID(ar, ARG_UPATH1); +} + +void +audit_arg_upath2_vp(struct thread *td, struct vnode *rdir, struct vnode *cdir, +char *upath) +{ + struct kaudit_record *ar; + + ar = currecord(); + if (ar == NULL) + return; + + audit_arg_upath_vp(td, rdir, cdir, upath, >k_ar.ar_arg_upath2); + ARG_SET_VALID(ar, ARG_UPATH2); +} + /* * Variants on path auditing that do not canonicalise the path passed in; * these are for use with filesystem-like subsystems that employ string names, Modified: head/sys/security/audit/audit_bsm_klib.c == --- head/sys/security/audit/audit_bsm_klib.cFri Feb 21 01:40:20 2020 (r358190) +++ head/sys/security/audit/audit_bsm_klib.cFri Feb 21 01:40:49 2020 (r358191) @@ -421,38 +421,23 @@ auditon_command_event(int cmd) * leave the filename starting with '/' in the audit log in this case. */ void -audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) +audit_canon_path_vp(struct thread *td, struct vnode *rdir, struct vnode *cdir, +char *path, char *cpath) { struct vnode *vp; char *rbuf, *fbuf, *copy; - struct filedesc *fdp; struct sbuf sbf; - cap_rights_t rights; int error; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d",
svn commit: r358190 - head/sys/security/audit
Author: mjg Date: Fri Feb 21 01:40:20 2020 New Revision: 358190 URL: https://svnweb.freebsd.org/changeset/base/358190 Log: audit: simplify path resolving logic Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c == --- head/sys/security/audit/audit_bsm_klib.cFri Feb 21 01:39:51 2020 (r358189) +++ head/sys/security/audit/audit_bsm_klib.cFri Feb 21 01:40:20 2020 (r358190) @@ -423,50 +423,34 @@ auditon_command_event(int cmd) void audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) { - struct vnode *cvnp, *rvnp; + struct vnode *vp; char *rbuf, *fbuf, *copy; struct filedesc *fdp; struct sbuf sbf; cap_rights_t rights; - int error, needslash; + int error; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", __func__, __FILE__, __LINE__); copy = path; - rvnp = cvnp = NULL; fdp = td->td_proc->p_fd; FILEDESC_SLOCK(fdp); - /* -* Make sure that we handle the chroot(2) case. If there is an -* alternate root directory, prepend it to the audited pathname. -*/ - if (fdp->fd_rdir != NULL && fdp->fd_rdir != rootvnode) { - rvnp = fdp->fd_rdir; - vrefact(rvnp); - } - /* -* If the supplied path is relative, make sure we capture the current -* working directory so we can prepend it to the supplied relative -* path. -*/ - if (*path != '/') { + if (*path == '/') { + vp = fdp->fd_rdir; + vrefact(vp); + } else { if (dirfd == AT_FDCWD) { - cvnp = fdp->fd_cdir; - vrefact(cvnp); + vp = fdp->fd_cdir; + vrefact(vp); } else { - error = fgetvp(td, dirfd, cap_rights_init(), ); - if (error) { + error = fgetvp(td, dirfd, cap_rights_init(), ); + if (error != 0) { FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; - if (rvnp != NULL) - vrele(rvnp); return; } } - needslash = (fdp->fd_rdir != cvnp); - } else { - needslash = 1; } FILEDESC_SUNLOCK(fdp); /* @@ -476,6 +460,8 @@ audit_canon_path(struct thread *td, int dirfd, char *p (void) sbuf_new(, cpath, MAXPATHLEN, SBUF_FIXEDLEN); /* * Strip leading forward slashes. +* +* Note this does nothing to fully canonicalize the path. */ while (*copy == '/') copy++; @@ -487,35 +473,26 @@ audit_canon_path(struct thread *td, int dirfd, char *p * on Darwin. As a result, this may need some additional attention * in the future. */ - if (rvnp != NULL) { - error = vn_fullpath_global(td, rvnp, , ); - vrele(rvnp); - if (error) { - cpath[0] = '\0'; - if (cvnp != NULL) - vrele(cvnp); - return; - } - (void) sbuf_cat(, rbuf); - free(fbuf, M_TEMP); + error = vn_fullpath_global(td, vp, , ); + vrele(vp); + if (error) { + cpath[0] = '\0'; + return; } - if (cvnp != NULL) { - error = vn_fullpath(td, cvnp, , ); - vrele(cvnp); - if (error) { - cpath[0] = '\0'; - return; - } - (void) sbuf_cat(, rbuf); - free(fbuf, M_TEMP); - } - if (needslash) + (void) sbuf_cat(, rbuf); + /* +* We are going to concatenate the resolved path with the passed path +* with all slashes removed and we want them glued with a single slash. +* However, if the directory is /, the slash is already there. +*/ + if (rbuf[1] != '\0') (void) sbuf_putc(, '/'); + free(fbuf, M_TEMP); /* * Now that we have processed any alternate root and relative path * names, add the supplied pathname. */ -(void) sbuf_cat(, copy); + (void) sbuf_cat(, copy); /* * One or more of the previous sbuf operations could have resulted in * the supplied buffer being overflowed. Check to see if this is the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe,
svn commit: r358189 - head/sys/security/audit
Author: mjg Date: Fri Feb 21 01:39:51 2020 New Revision: 358189 URL: https://svnweb.freebsd.org/changeset/base/358189 Log: audit: rely on use count instead of hold count in audit_canon_path Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c == --- head/sys/security/audit/audit_bsm_klib.cFri Feb 21 00:33:21 2020 (r358188) +++ head/sys/security/audit/audit_bsm_klib.cFri Feb 21 01:39:51 2020 (r358189) @@ -443,7 +443,7 @@ audit_canon_path(struct thread *td, int dirfd, char *p */ if (fdp->fd_rdir != NULL && fdp->fd_rdir != rootvnode) { rvnp = fdp->fd_rdir; - vhold(rvnp); + vrefact(rvnp); } /* * If the supplied path is relative, make sure we capture the current @@ -453,19 +453,16 @@ audit_canon_path(struct thread *td, int dirfd, char *p if (*path != '/') { if (dirfd == AT_FDCWD) { cvnp = fdp->fd_cdir; - vhold(cvnp); + vrefact(cvnp); } else { - /* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */ error = fgetvp(td, dirfd, cap_rights_init(), ); if (error) { FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; if (rvnp != NULL) - vdrop(rvnp); + vrele(rvnp); return; } - vhold(cvnp); - vrele(cvnp); } needslash = (fdp->fd_rdir != cvnp); } else { @@ -492,11 +489,11 @@ audit_canon_path(struct thread *td, int dirfd, char *p */ if (rvnp != NULL) { error = vn_fullpath_global(td, rvnp, , ); - vdrop(rvnp); + vrele(rvnp); if (error) { cpath[0] = '\0'; if (cvnp != NULL) - vdrop(cvnp); + vrele(cvnp); return; } (void) sbuf_cat(, rbuf); @@ -504,7 +501,7 @@ audit_canon_path(struct thread *td, int dirfd, char *p } if (cvnp != NULL) { error = vn_fullpath(td, cvnp, , ); - vdrop(cvnp); + vrele(cvnp); if (error) { cpath[0] = '\0'; return; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r358164 - in head: . lib/ncurses/ncurses
[This is not an objection to the version upgrade.] FYI: I happen to have updated to head -r358132 on multiple environments, not having done anything to force rebuilds of things tied to ncurses. armv7 / 32-bit powerpc : poudriere options displays look normal. aarch64 / powerpc64 / amd64: they look odd/poor. (But I could still see what I needed too see to figure out what to do.) The breakage seems to be tied to 64-bit contexts in some way. === 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: r358097 - in head/sys: kern vm
On Fri, 21 Feb 2020, mmats...@cybernet.co.jp wrote: Hi Jeff, From: Jeff Roberson Date: Wed, 19 Feb 2020 08:17:27 + (UTC) Author: jeff Date: Wed Feb 19 08:17:27 2020 New Revision: 358097 URL: https://svnweb.freebsd.org/changeset/base/358097 Log: Eliminate some unnecessary uses of UMA_ZONE_VM. Only zones involved in virtual address or physical page allocation need to be marked with this flag. Reviewed by: markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D23712 Modified: head/sys/kern/subr_vmem.c head/sys/kern/vfs_subr.c head/sys/vm/swap_pager.c head/sys/vm/vm_page.c head/sys/vm/vm_pager.c Modified: head/sys/kern/subr_vmem.c == --- head/sys/kern/subr_vmem.c Wed Feb 19 08:15:20 2020(r358096) +++ head/sys/kern/subr_vmem.c Wed Feb 19 08:17:27 2020(r358097) @@ -561,8 +561,7 @@ qc_init(vmem_t *vm, vmem_size_t qcache_max) qc->qc_vmem = vm; qc->qc_size = size; qc->qc_cache = uma_zcache_create(qc->qc_name, size, - NULL, NULL, NULL, NULL, qc_import, qc_release, qc, - UMA_ZONE_VM); + NULL, NULL, NULL, NULL, qc_import, qc_release, qc, 0); MPASS(qc->qc_cache); } } @@ -668,10 +667,10 @@ vmem_startup(void) mtx_init(_list_lock, "vmem list lock", NULL, MTX_DEF); vmem_zone = uma_zcreate("vmem", sizeof(struct vmem), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_VM); + UMA_ALIGN_PTR, 0); vmem_bt_zone = uma_zcreate("vmem btag", sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, UMA_ZONE_VM); If I'm reading the message correctly, shouldn't the above line be like the following? + UMA_ALIGN_PTR, UMA_ZONE_NOFREE); In this case the commit message wasn't complete. There is no reason to mark the vmem btags as NOFREE because we can allocate them on the fly. There is a reason to mark them ZONE_VM however, because we need them to allocate virtual address space. Thanks, Jeff Regards, Haro =--- _ _Munehiro (haro) Matsuda -|- /_\ |_|_| Cybernet Systems Co., Ltd. /|\ |_| |_|_| ___ 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: r358097 - in head/sys: kern vm
Hi Jeff, From: Jeff Roberson Date: Wed, 19 Feb 2020 08:17:27 + (UTC) >Author: jeff >Date: Wed Feb 19 08:17:27 2020 >New Revision: 358097 >URL: https://svnweb.freebsd.org/changeset/base/358097 > >Log: > Eliminate some unnecessary uses of UMA_ZONE_VM. Only zones involved in > virtual address or physical page allocation need to be marked with this > flag. > > Reviewed by: markj > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D23712 > >Modified: > head/sys/kern/subr_vmem.c > head/sys/kern/vfs_subr.c > head/sys/vm/swap_pager.c > head/sys/vm/vm_page.c > head/sys/vm/vm_pager.c > >Modified: head/sys/kern/subr_vmem.c >== >--- head/sys/kern/subr_vmem.c Wed Feb 19 08:15:20 2020(r358096) >+++ head/sys/kern/subr_vmem.c Wed Feb 19 08:17:27 2020(r358097) >@@ -561,8 +561,7 @@ qc_init(vmem_t *vm, vmem_size_t qcache_max) > qc->qc_vmem = vm; > qc->qc_size = size; > qc->qc_cache = uma_zcache_create(qc->qc_name, size, >- NULL, NULL, NULL, NULL, qc_import, qc_release, qc, >- UMA_ZONE_VM); >+ NULL, NULL, NULL, NULL, qc_import, qc_release, qc, 0); > MPASS(qc->qc_cache); > } > } >@@ -668,10 +667,10 @@ vmem_startup(void) > mtx_init(_list_lock, "vmem list lock", NULL, MTX_DEF); > vmem_zone = uma_zcreate("vmem", > sizeof(struct vmem), NULL, NULL, NULL, NULL, >- UMA_ALIGN_PTR, UMA_ZONE_VM); >+ UMA_ALIGN_PTR, 0); > vmem_bt_zone = uma_zcreate("vmem btag", > sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, >- UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); >+ UMA_ALIGN_PTR, UMA_ZONE_VM); If I'm reading the message correctly, shouldn't the above line be like the following? + UMA_ALIGN_PTR, UMA_ZONE_NOFREE); Regards, Haro =--- _ _Munehiro (haro) Matsuda -|- /_\ |_|_| Cybernet Systems Co., Ltd. /|\ |_| |_|_| ___ 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: r358187 - head/sys/kern
Author: vangyzen Date: Thu Feb 20 23:53:48 2020 New Revision: 358187 URL: https://svnweb.freebsd.org/changeset/base/358187 Log: clamp kernel dump compression level when using gzip If the configured compression level for kernel dumps it outside the supported range, clamp it to the closest supported level. Previously, dumpon would fail. zstd already does this internally, so the compressor needs no change. Reviewed by: cem markj MFC after:2 weeks Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D23765 Modified: head/sys/kern/subr_compressor.c Modified: head/sys/kern/subr_compressor.c == --- head/sys/kern/subr_compressor.c Thu Feb 20 23:47:09 2020 (r358186) +++ head/sys/kern/subr_compressor.c Thu Feb 20 23:53:48 2020 (r358187) @@ -117,6 +117,13 @@ gz_init(size_t maxiosize, int level) s->gz_stream.next_in = Z_NULL; s->gz_stream.avail_in = 0; + if (level != Z_DEFAULT_COMPRESSION) { + if (level < Z_BEST_SPEED) + level = Z_BEST_SPEED; + else if (level > Z_BEST_COMPRESSION) + level = Z_BEST_COMPRESSION; + } + error = deflateInit2(>gz_stream, level, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); if (error != 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: r358186 - head/lib/libc/sys
Author: vangyzen Date: Thu Feb 20 23:47:09 2020 New Revision: 358186 URL: https://svnweb.freebsd.org/changeset/base/358186 Log: truncate(2): extending the file is required by POSIX 2008 Update the man page to mention that extending a file with truncate(2) is required by POSIX as of 2008. Reviewed by: bcr MFC after:2 weeks Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D23354 Modified: head/lib/libc/sys/truncate.2 Modified: head/lib/libc/sys/truncate.2 == --- head/lib/libc/sys/truncate.2Thu Feb 20 21:52:36 2020 (r358185) +++ head/lib/libc/sys/truncate.2Thu Feb 20 23:47:09 2020 (r358186) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 4, 2015 +.Dd January 24, 2020 .Dt TRUNCATE 2 .Os .Sh NAME @@ -160,6 +160,9 @@ system calls appeared in These calls should be generalized to allow ranges of bytes in a file to be discarded. .Pp -Use of +Historically, the use of .Fn truncate -to extend a file is not portable. +or +.Fn ftruncate +to extend a file was not portable, but this behavior became required in +.St -p1003.1-2008 . ___ 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: r358153 - head/usr.sbin/services_mkdb
[ Charset UTF-8 unsupported, converting... ] > On Thu, 20 Feb 2020 at 09:54, Pedro Giffuni wrote: > > > > On 2020-02-20 09:46, Ed Maste wrote: > > > On Thu, 20 Feb 2020 at 04:56, Li-Wen Hsu wrote: > > >> Please note this is not fixed in ci.freebsd.org yet. The reason is it > > >> directly goes to src/release and perform `make packagesystem` to > > >> generate kernel.txz and base.txz. If I read release(7) correctly, > > >> this should be performed under a fresh installed environment. I am > > >> checking how to fix this. > > > Should we revert the change until a build fix can be committed too? > > > > I am OK with reverting the change, and I am rather surprised such a > > simply change could have broken the build. > > Indeed, this has uncovered a broken dependency in our build process > (i.e., that the build host's services_mkdb is being used). > > IMO we should: > > 1. Revert the change for now (pfg will you take care of it?) > 2. MFC the MAX_PROTO increase as soon as possible > 3. Try to fix the use of host's services_mkdb > 4. Recommit after either #3 is done, or FreeBSD 12.2 and 11.4 are released Agree fully with items 1 to 3, as to item 4 I think needs some work: 4. Recommit services to head after #3 is done 5. MFC Fixes #2 and #3 after a short bake in ^head (1 or 2 weeks) 6. MFC of services file to stable/12&11 after #2 and #3 are shipped in 12.2 and 11.4 respectfully. This should ensure no disruptions to anyone on stable/ happens, though I could probably be convinced that once #3 is fixed the risk here is low. -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358183 - head/usr.bin/dtc
Author: bcran Date: Thu Feb 20 21:29:59 2020 New Revision: 358183 URL: https://svnweb.freebsd.org/changeset/base/358183 Log: dtc: remove unknown option printf, since getopt will print it Since we don't set opterr to 0, getopt prints a message when it encounters an unknown/invalid option. We therefore don't need to print our own message in the default handler. Reviewed by: kevans, theraven Differential Revision:https://reviews.freebsd.org/D23662 Modified: head/usr.bin/dtc/dtc.cc Modified: head/usr.bin/dtc/dtc.cc == --- head/usr.bin/dtc/dtc.cc Thu Feb 20 21:25:12 2020(r358182) +++ head/usr.bin/dtc/dtc.cc Thu Feb 20 21:29:59 2020(r358183) @@ -304,7 +304,10 @@ main(int argc, char **argv) } break; default: - fprintf(stderr, "Unknown option %c\n", ch); + /* +* Since opterr is non-zero, getopt will have +* already printed an error message. +*/ return EXIT_FAILURE; } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358182 - head/sys/kern
Author: kib Date: Thu Feb 20 21:25:12 2020 New Revision: 358182 URL: https://svnweb.freebsd.org/changeset/base/358182 Log: Fix a bug in r358168, do not call sigfastblock_setpend() under a mutex. PR: 244250 Reported and tested by: lwhsu Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_trap.c == --- head/sys/kern/subr_trap.c Thu Feb 20 21:12:10 2020(r358181) +++ head/sys/kern/subr_trap.c Thu Feb 20 21:25:12 2020(r358182) @@ -326,21 +326,23 @@ ast(struct trapframe *framep) if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 || !SIGISEMPTY(p->p_siglist)) { sigfastblock_fetch(td); - PROC_LOCK(p); - mtx_lock(>p_sigacts->ps_mtx); if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 && td->td_sigblock_val != 0) { sigfastblock_setpend(td); + PROC_LOCK(p); reschedule_signals(p, fastblock_mask, - SIGPROCMASK_PS_LOCKED | SIGPROCMASK_FASTBLK); + SIGPROCMASK_FASTBLK); + PROC_UNLOCK(p); } else { + PROC_LOCK(p); + mtx_lock(>p_sigacts->ps_mtx); while ((sig = cursig(td)) != 0) { KASSERT(sig >= 0, ("sig %d", sig)); postsig(sig); } + mtx_unlock(>p_sigacts->ps_mtx); + PROC_UNLOCK(p); } - mtx_unlock(>p_sigacts->ps_mtx); - PROC_UNLOCK(p); } /* ___ 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: r358181 - head/usr.sbin/pstat
To be clear, the before and after should have read: Before: $ swapinfo -h Device 1K-blocks Used Avail Capacity /dev/gpt/swapfs 1048576 0B 1.0G 0% $ After: $ swapinfo -h Device Size Used Avail Capacity /dev/gpt/swapfs 1.0G 0B 1.0G 0% $ On Thu, Feb 20, 2020 at 09:12:10PM +, Christian S.J. Peron wrote: > Author: csjp > Date: Thu Feb 20 21:12:10 2020 > New Revision: 358181 > URL: https://svnweb.freebsd.org/changeset/base/358181 > > Log: > - Implement -h (human readable) for the size of the underlying block disk. > Currently, the size of the swap device is unconditionally reported using > blocks, even if -h has been used. > - While here, switch to CONVERT_BLOCKS() instead of CONVERT() which will > avoid overflowing size counters (in human readable form see: r196244) > - Update the column headers to reflect that a size is being reported instead > of the block size units being used > > Before: > > $ swapinfo > Device 1K-blocks UsedAvail Capacity > /dev/gpt/swapfs 10485760 1048576 0% > $ > > After: > > $ swapinfo -h > Device Size UsedAvail Capacity > /dev/gpt/swapfs1.0G 0B 1.0G 0% > $ > > Differential Revision: https://reviews.freebsd.org/D23758 > Reviewed by:kevans > MFC after: 3 weeks > > Modified: > head/usr.sbin/pstat/pstat.c > > Modified: head/usr.sbin/pstat/pstat.c > == > --- head/usr.sbin/pstat/pstat.c Thu Feb 20 21:07:23 2020 > (r358180) > +++ head/usr.sbin/pstat/pstat.c Thu Feb 20 21:12:10 2020 > (r358181) > @@ -95,6 +95,8 @@ static struct { > #define NNAMES (sizeof(namelist) / sizeof(*namelist)) > static struct nlist nl[NNAMES]; > > +#define SIZEHDR "Size" > + > static int humanflag; > static int usenumflag; > static int totalflag; > @@ -471,7 +473,12 @@ print_swap_header(void) > long blocksize; > const char *header; > > - header = getbsize(, ); > + if (humanflag) { > + header = SIZEHDR; > + hlen = sizeof(SIZEHDR); > + } else { > + header = getbsize(, ); > + } > if (totalflag == 0) > (void)printf("%-15s %*s %8s %8s %8s\n", > "Device", hlen, header, > @@ -484,23 +491,30 @@ print_swap_line(const char *swdevname, intmax_t nblks, > { > char usedbuf[5]; > char availbuf[5]; > + char sizebuf[5]; > int hlen, pagesize; > long blocksize; > > pagesize = getpagesize(); > getbsize(, ); > > - printf("%-15s %*jd ", swdevname, hlen, CONVERT(nblks)); > + printf("%-15s ", swdevname); > if (humanflag) { > + humanize_number(sizebuf, sizeof(sizebuf), > + CONVERT_BLOCKS(nblks), "", > + HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); > humanize_number(usedbuf, sizeof(usedbuf), > CONVERT_BLOCKS(bused), "", > HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); > humanize_number(availbuf, sizeof(availbuf), > CONVERT_BLOCKS(bavail), "", > HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); > - printf("%8s %8s %5.0f%%\n", usedbuf, availbuf, bpercent); > + printf("%8s %8s %8s %5.0f%%\n", sizebuf, > + usedbuf, availbuf, bpercent); > } else { > - printf("%8jd %8jd %5.0f%%\n", (intmax_t)CONVERT(bused), > + printf("%*jd %8jd %8jd %5.0f%%\n", hlen, > + (intmax_t)CONVERT(nblks), > + (intmax_t)CONVERT(bused), > (intmax_t)CONVERT(bavail), bpercent); > } > } ___ 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: r358181 - head/usr.sbin/pstat
Author: csjp Date: Thu Feb 20 21:12:10 2020 New Revision: 358181 URL: https://svnweb.freebsd.org/changeset/base/358181 Log: - Implement -h (human readable) for the size of the underlying block disk. Currently, the size of the swap device is unconditionally reported using blocks, even if -h has been used. - While here, switch to CONVERT_BLOCKS() instead of CONVERT() which will avoid overflowing size counters (in human readable form see: r196244) - Update the column headers to reflect that a size is being reported instead of the block size units being used Before: $ swapinfo Device 1K-blocks UsedAvail Capacity /dev/gpt/swapfs 10485760 1048576 0% $ After: $ swapinfo -h Device Size UsedAvail Capacity /dev/gpt/swapfs1.0G 0B 1.0G 0% $ Differential Revision:https://reviews.freebsd.org/D23758 Reviewed by: kevans MFC after:3 weeks Modified: head/usr.sbin/pstat/pstat.c Modified: head/usr.sbin/pstat/pstat.c == --- head/usr.sbin/pstat/pstat.c Thu Feb 20 21:07:23 2020(r358180) +++ head/usr.sbin/pstat/pstat.c Thu Feb 20 21:12:10 2020(r358181) @@ -95,6 +95,8 @@ static struct { #define NNAMES (sizeof(namelist) / sizeof(*namelist)) static struct nlist nl[NNAMES]; +#defineSIZEHDR "Size" + static int humanflag; static int usenumflag; static int totalflag; @@ -471,7 +473,12 @@ print_swap_header(void) long blocksize; const char *header; - header = getbsize(, ); + if (humanflag) { + header = SIZEHDR; + hlen = sizeof(SIZEHDR); + } else { + header = getbsize(, ); + } if (totalflag == 0) (void)printf("%-15s %*s %8s %8s %8s\n", "Device", hlen, header, @@ -484,23 +491,30 @@ print_swap_line(const char *swdevname, intmax_t nblks, { char usedbuf[5]; char availbuf[5]; + char sizebuf[5]; int hlen, pagesize; long blocksize; pagesize = getpagesize(); getbsize(, ); - printf("%-15s %*jd ", swdevname, hlen, CONVERT(nblks)); + printf("%-15s ", swdevname); if (humanflag) { + humanize_number(sizebuf, sizeof(sizebuf), + CONVERT_BLOCKS(nblks), "", + HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); humanize_number(usedbuf, sizeof(usedbuf), CONVERT_BLOCKS(bused), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); humanize_number(availbuf, sizeof(availbuf), CONVERT_BLOCKS(bavail), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - printf("%8s %8s %5.0f%%\n", usedbuf, availbuf, bpercent); + printf("%8s %8s %8s %5.0f%%\n", sizebuf, + usedbuf, availbuf, bpercent); } else { - printf("%8jd %8jd %5.0f%%\n", (intmax_t)CONVERT(bused), + printf("%*jd %8jd %8jd %5.0f%%\n", hlen, + (intmax_t)CONVERT(nblks), + (intmax_t)CONVERT(bused), (intmax_t)CONVERT(bavail), bpercent); } } ___ 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: r358180 - head/usr.sbin/bhyve
Author: vmaffione Date: Thu Feb 20 21:07:23 2020 New Revision: 358180 URL: https://svnweb.freebsd.org/changeset/base/358180 Log: bhyve: enable virtio-net mergeable rx buffers for tap(4) This patch adds a new netbe_peek_recvlen() function to the net backend API. The new function allows the virtio-net receive code to know in advance how many virtio descriptors chains will be needed to receive the next packet. As a result, the implementation of the virtio-net mergeable rx buffers feature becomes efficient, so that we can enable it also with the tap(4) backend. For the tap(4) backend, a bounce buffer is introduced to implement the peeck_recvlen() callback, which implies an additional packet copy on the receive datapath. In the future, it should be possible to remove the bounce buffer (and so the additional copy), by obtaining the length of the next packet from kevent data. Reviewed by:grehan, aleksandr.fedo...@itglobal.com MFC after: 1 week Differential Revision:https://reviews.freebsd.org/D23472 Modified: head/usr.sbin/bhyve/iov.c head/usr.sbin/bhyve/iov.h head/usr.sbin/bhyve/net_backends.c head/usr.sbin/bhyve/net_backends.h head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/iov.c == --- head/usr.sbin/bhyve/iov.c Thu Feb 20 19:07:29 2020(r358179) +++ head/usr.sbin/bhyve/iov.c Thu Feb 20 21:07:23 2020(r358180) @@ -119,24 +119,25 @@ iov_to_buf(const struct iovec *iov, int niov, void **b } ssize_t -buf_to_iov(const void *buf, size_t buflen, struct iovec *iov, int niov, +buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, int niov, size_t seek) { struct iovec *diov; - int ndiov, i; size_t off = 0, len; + int i; if (seek > 0) { + int ndiov; + diov = malloc(sizeof(struct iovec) * niov); seek_iov(iov, niov, diov, , seek); - } else { - diov = iov; - ndiov = niov; + iov = diov; + niov = ndiov; } - for (i = 0; i < ndiov && off < buflen; i++) { - len = MIN(diov[i].iov_len, buflen - off); - memcpy(diov[i].iov_base, buf + off, len); + for (i = 0; i < niov && off < buflen; i++) { + len = MIN(iov[i].iov_len, buflen - off); + memcpy(iov[i].iov_base, buf + off, len); off += len; } Modified: head/usr.sbin/bhyve/iov.h == --- head/usr.sbin/bhyve/iov.h Thu Feb 20 19:07:29 2020(r358179) +++ head/usr.sbin/bhyve/iov.h Thu Feb 20 21:07:23 2020(r358180) @@ -38,7 +38,7 @@ void seek_iov(const struct iovec *iov1, int niov1, str void truncate_iov(struct iovec *iov, int *niov, size_t length); size_t count_iov(const struct iovec *iov, int niov); ssize_t iov_to_buf(const struct iovec *iov, int niov, void **buf); -ssize_t buf_to_iov(const void *buf, size_t buflen, struct iovec *iov, int niov, -size_t seek); +ssize_t buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, +int niov, size_t seek); #endif /* _IOV_H_ */ Modified: head/usr.sbin/bhyve/net_backends.c == --- head/usr.sbin/bhyve/net_backends.c Thu Feb 20 19:07:29 2020 (r358179) +++ head/usr.sbin/bhyve/net_backends.c Thu Feb 20 21:07:23 2020 (r358180) @@ -103,6 +103,13 @@ struct net_backend { int iovcnt); /* +* Get the length of the next packet that can be received from +* the backend. If no packets are currently available, this +* function returns 0. +*/ + ssize_t (*peek_recvlen)(struct net_backend *be); + + /* * Called to receive a packet from the backend. When the function * returns a positive value 'len', the scatter-gather vector * provided by the caller contains a packet with such length. @@ -167,6 +174,13 @@ SET_DECLARE(net_backend_set, struct net_backend); struct tap_priv { struct mevent *mevp; + /* +* A bounce buffer that allows us to implement the peek_recvlen +* callback. In the future we may get the same information from +* the kevent data. +*/ + char bbuf[1 << 16]; + ssize_t bbuflen; }; static void @@ -223,6 +237,9 @@ tap_init(struct net_backend *be, const char *devname, errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif + memset(priv->bbuf, 0, sizeof(priv->bbuf)); + priv->bbuflen = 0; + priv->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param); if (priv->mevp == NULL) { WPRINTF(("Could not register event")); @@ -246,15 +263,56 @@ tap_send(struct net_backend *be, const struct iovec
Re: svn commit: r358170 - head/usr.sbin/services_mkdb
On Thu, 20 Feb 2020 at 10:52, Pedro F. Giffuni wrote: > > Author: pfg > Date: Thu Feb 20 15:52:36 2020 > New Revision: 358170 > URL: https://svnweb.freebsd.org/changeset/base/358170 > > Log: > Revert r358153: it is causing unexpected issues with the build system. Thanks Pedro. As an aside free pre-commit testing is available via GitHub and Cirrus-CI (if you have a GitHub fork of FreeBSD). Cirrus-CI just needs to be enabled (from the "Marketplace") for your GitHub account. https://github.com/marketplace/cirrus-ci Choose Public Repositories $0 Either grant Cirrus-CI access to all of your repositories, or just FreeBSD, as you see fit. Every time you push to your GitHub fork Cirrus-CI will build and do a boot smoke-test (in QEMU) of your changes. Here's a failing run of one of my test branches, rebased after r358153: https://cirrus-ci.com/build/4641705500606464 And then a passing run, rebased after the revert: https://cirrus-ci.com/build/6173402775945216 ___ 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: r358178 - head/sys/dev/virtio/mmio
Author: kp Date: Thu Feb 20 17:26:08 2020 New Revision: 358178 URL: https://svnweb.freebsd.org/changeset/base/358178 Log: virtio: Pass the interrupt type in mmio mode When we register an interrupt handler we need to pass the intr_type along in bus_setup_intr(). The interrupt type matters because it is used to decide if we need to enter NET_EPOCH. That meant that vtmmio-based if_vtnet did not, which led to panics with INVARIANTS set. Sponsored by: Axiado Modified: head/sys/dev/virtio/mmio/virtio_mmio.c Modified: head/sys/dev/virtio/mmio/virtio_mmio.c == --- head/sys/dev/virtio/mmio/virtio_mmio.c Thu Feb 20 17:20:50 2020 (r358177) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Thu Feb 20 17:26:08 2020 (r358178) @@ -196,7 +196,7 @@ vtmmio_setup_intr(device_t dev, enum intr_type type) return (ENXIO); } - if (bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, + if (bus_setup_intr(dev, sc->res[1], type | INTR_MPSAFE, NULL, vtmmio_vq_intr, sc, >ih)) { device_printf(dev, "Can't setup the interrupt\n"); return (ENXIO); ___ 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: r358177 - head/sys/compat/linuxkpi/common/include/linux
Author: manu Date: Thu Feb 20 17:20:50 2020 New Revision: 358177 URL: https://svnweb.freebsd.org/changeset/base/358177 Log: linuxkpi: Add str_has_prefix This function test if the string str begins with the string pointed at by prefix. Reviewed by: hselasky MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23767 Modified: head/sys/compat/linuxkpi/common/include/linux/string.h Modified: head/sys/compat/linuxkpi/common/include/linux/string.h == --- head/sys/compat/linuxkpi/common/include/linux/string.h Thu Feb 20 17:19:16 2020(r358176) +++ head/sys/compat/linuxkpi/common/include/linux/string.h Thu Feb 20 17:20:50 2020(r358177) @@ -154,4 +154,13 @@ memchr_inv(const void *start, int c, size_t length) return (NULL); } +static inline size_t +str_has_prefix(const char *str, const char *prefix) +{ + size_t len; + + len = strlen(prefix); + return (strncmp(str, prefix, len) == 0 ? len : 0); +} + #endif /* _LINUX_STRING_H_ */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358176 - head/sys/compat/linuxkpi/common/include/linux
Author: manu Date: Thu Feb 20 17:19:16 2020 New Revision: 358176 URL: https://svnweb.freebsd.org/changeset/base/358176 Log: linuxkpi: Add list_is_first function This function just test if the element is the first of the list. Reviewed by: hselasky MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23766 Modified: head/sys/compat/linuxkpi/common/include/linux/list.h Modified: head/sys/compat/linuxkpi/common/include/linux/list.h == --- head/sys/compat/linuxkpi/common/include/linux/list.hThu Feb 20 17:10:25 2020(r358175) +++ head/sys/compat/linuxkpi/common/include/linux/list.hThu Feb 20 17:19:16 2020(r358176) @@ -449,6 +449,13 @@ static inline void list_cut_position(struct list_head __list_cut_position(list, head, entry); } +static inline int list_is_first(const struct list_head *list, + const struct list_head *head) +{ + + return (list->prev == head); +} + static inline int list_is_last(const struct list_head *list, const struct list_head *head) { ___ 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: r358175 - head/usr.sbin/pciconf
Author: kib Date: Thu Feb 20 17:10:25 2020 New Revision: 358175 URL: https://svnweb.freebsd.org/changeset/base/358175 Log: Print out some newly added PCIe extended capabilities and subclasses. Taken from https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_11__v24_Jan_2019.pdf Submitted by: Dmitry Luhtionov MFC after:1 week Modified: head/usr.sbin/pciconf/cap.c head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/cap.c == --- head/usr.sbin/pciconf/cap.c Thu Feb 20 17:08:52 2020(r358174) +++ head/usr.sbin/pciconf/cap.c Thu Feb 20 17:10:25 2020(r358175) @@ -1015,6 +1015,20 @@ static struct { { PCIZ_LN_REQ, "LN Requester" }, { PCIZ_DPC, "Downstream Port Containment" }, { PCIZ_L1PM, "L1 PM Substates" }, + { PCIZ_PTM, "Precision Time Measurement" }, + { PCIZ_M_PCIE, "PCIe over M-PHY" }, + { PCIZ_FRS, "FRS Queuing" }, + { PCIZ_RTR, "Readiness Time Reporting" }, + { PCIZ_DVSEC, "Designated Vendor-Specific" }, + { PCIZ_VF_REBAR, "VF Resizable BAR" }, + { PCIZ_DLNK, "Data Link Feature" }, + { PCIZ_16GT, "Physical Layer 16.0 GT/s" }, + { PCIZ_LMR, "Lane Margining at Receiver" }, + { PCIZ_HIER_ID, "Hierarchy ID" }, + { PCIZ_NPEM, "Native PCIe Enclosure Management" }, + { PCIZ_PL32, "Physical Layer 32.0 GT/s" }, + { PCIZ_AP, "Alternate Protocol" }, + { PCIZ_SFI, "System Firmware Intermediary" }, { 0, NULL } }; Modified: head/usr.sbin/pciconf/pciconf.c == --- head/usr.sbin/pciconf/pciconf.c Thu Feb 20 17:08:52 2020 (r358174) +++ head/usr.sbin/pciconf/pciconf.c Thu Feb 20 17:10:25 2020 (r358175) @@ -665,12 +665,17 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, + {PCIC_STORAGE, PCIS_STORAGE_UFS, "UFS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, {PCIC_NETWORK, PCIS_NETWORK_FDDI, "fddi"}, {PCIC_NETWORK, PCIS_NETWORK_ATM, "ATM"}, {PCIC_NETWORK, PCIS_NETWORK_ISDN, "ISDN"}, + {PCIC_NETWORK, PCIS_NETWORK_WORLDFIP, "WorldFip"}, + {PCIC_NETWORK, PCIS_NETWORK_PICMG, "PICMG"}, + {PCIC_NETWORK, PCIS_NETWORK_INFINIBAND,"InfiniBand"}, + {PCIC_NETWORK, PCIS_NETWORK_HFC, "host fabric"}, {PCIC_DISPLAY, -1, "display"}, {PCIC_DISPLAY, PCIS_DISPLAY_VGA, "VGA"}, {PCIC_DISPLAY, PCIS_DISPLAY_XGA, "XGA"}, @@ -693,6 +698,11 @@ static struct {PCIC_BRIDGE, PCIS_BRIDGE_NUBUS, "PCI-NuBus"}, {PCIC_BRIDGE, PCIS_BRIDGE_CARDBUS,"PCI-CardBus"}, {PCIC_BRIDGE, PCIS_BRIDGE_RACEWAY,"PCI-RACEway"}, + {PCIC_BRIDGE, PCIS_BRIDGE_PCI_TRANSPARENT, + "Semi-transparent PCI-to-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_INFINIBAND, "InfiniBand-PCI"}, + {PCIC_BRIDGE, PCIS_BRIDGE_AS_PCI, + "AdvancedSwitching-PCI"}, {PCIC_SIMPLECOMM, -1, "simple comms"}, {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_UART, "UART"},/* could detect 16550 */ {PCIC_SIMPLECOMM, PCIS_SIMPLECOMM_PAR,"parallel port"}, @@ -706,6 +716,8 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_IOMMU, "IOMMU"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RCEC, + "Root Complex Event Collector"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, @@ -721,10 +733,23 @@ static struct {PCIC_SERIALBUS,PCIS_SERIALBUS_USB, "USB"}, {PCIC_SERIALBUS,PCIS_SERIALBUS_FC, "Fibre Channel"}, {PCIC_SERIALBUS,PCIS_SERIALBUS_SMBUS, "SMBus"}, + {PCIC_SERIALBUS,PCIS_SERIALBUS_INFINIBAND, "InfiniBand"}, + {PCIC_SERIALBUS,PCIS_SERIALBUS_IPMI,"IPMI"}, + {PCIC_SERIALBUS,PCIS_SERIALBUS_SERCOS, "SERCOS"}, + {PCIC_SERIALBUS,PCIS_SERIALBUS_CANBUS, "CANbus"}, + {PCIC_SERIALBUS,PCIS_SERIALBUS_MIPI_I3C,"MIPI I3C"},
svn commit: r358174 - head/sys/dev/pci
Author: kib Date: Thu Feb 20 17:08:52 2020 New Revision: 358174 URL: https://svnweb.freebsd.org/changeset/base/358174 Log: Add more values for PCI capabilities, PCIe extended capabilities, and subclasses. Taken from https://pcisig.com/sites/default/files/files/PCI_Code-ID_r_1_11__v24_Jan_2019.pdf Submitted by: Dmitry Luhtionov MFC after:1 week Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h == --- head/sys/dev/pci/pcireg.h Thu Feb 20 16:58:57 2020(r358173) +++ head/sys/dev/pci/pcireg.h Thu Feb 20 17:08:52 2020(r358174) @@ -151,6 +151,7 @@ #definePCIY_SATA 0x12/* SATA */ #definePCIY_PCIAF 0x13/* PCI Advanced Features */ #definePCIY_EA 0x14/* PCI Extended Allocation */ +#definePCIY_FPB0x15/* Flattening Portal Bridge */ /* Extended Capability Register Fields */ @@ -194,6 +195,20 @@ #definePCIZ_LN_REQ 0x001c /* LN Requester */ #definePCIZ_DPC0x001d /* Downstream Port Containment */ #definePCIZ_L1PM 0x001e /* L1 PM Substates */ +#definePCIZ_PTM0x001f /* Precision Time Measurement */ +#definePCIZ_M_PCIE 0x0020 /* PCIe over M-PHY */ +#definePCIZ_FRS0x0021 /* FRS Queuing */ +#definePCIZ_RTR0x0022 /* Readiness Time Reporting */ +#definePCIZ_DVSEC 0x0023 /* Designated Vendor-Specific */ +#definePCIZ_VF_REBAR 0x0024 /* VF Resizable BAR */ +#definePCIZ_DLNK 0x0025 /* Data Link Feature */ +#definePCIZ_16GT 0x0026 /* Physical Layer 16.0 GT/s */ +#definePCIZ_LMR0x0027 /* Lane Margining at Receiver */ +#definePCIZ_HIER_ID0x0028 /* Hierarchy ID */ +#definePCIZ_NPEM 0x0029 /* Native PCIe Enclosure Management */ +#definePCIZ_PL32 0x002a /* Physical Layer 32.0 GT/s */ +#definePCIZ_AP 0x002b /* Alternate Protocol */ +#definePCIZ_SFI0x002c /* System Firmware Intermediary */ /* config registers for header type 0 devices */ @@ -334,6 +349,8 @@ #definePCIS_STORAGE_NVM0x08 #definePCIP_STORAGE_NVM_NVMHCI_1_0 0x01 #definePCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 +#definePCIS_STORAGE_UFS0x09 +#definePCIP_STORAGE_UFS_UFSHCI_1_0 0x01 #definePCIS_STORAGE_OTHER 0x80 #definePCIC_NETWORK0x02 @@ -344,6 +361,8 @@ #definePCIS_NETWORK_ISDN 0x04 #definePCIS_NETWORK_WORLDFIP 0x05 #definePCIS_NETWORK_PICMG 0x06 +#definePCIS_NETWORK_INFINIBAND 0x07 +#definePCIS_NETWORK_HFC0x08 #definePCIS_NETWORK_OTHER 0x80 #definePCIC_DISPLAY0x03 @@ -357,6 +376,7 @@ #definePCIS_MULTIMEDIA_AUDIO 0x01 #definePCIS_MULTIMEDIA_TELE0x02 #definePCIS_MULTIMEDIA_HDA 0x03 +#definePCIP_MULTIMEDIA_HDA_VENDOR 0x01 #definePCIS_MULTIMEDIA_OTHER 0x80 #definePCIC_MEMORY 0x05 @@ -377,6 +397,8 @@ #definePCIS_BRIDGE_RACEWAY 0x08 #definePCIS_BRIDGE_PCI_TRANSPARENT 0x09 #definePCIS_BRIDGE_INFINIBAND 0x0a +#definePCIS_BRIDGE_AS_PCI 0x0b +#definePCIS_BRIDGE_AS_PCI_ASI_SIG 0x01 #definePCIS_BRIDGE_OTHER 0x80 #definePCIC_SIMPLECOMM 0x07 @@ -408,6 +430,7 @@ #definePCIS_BASEPERIPH_PCIHOT 0x04 #definePCIS_BASEPERIPH_SDHC0x05 #definePCIS_BASEPERIPH_IOMMU 0x06 +#definePCIS_BASEPERIPH_RCEC0x07 #definePCIS_BASEPERIPH_OTHER 0x80 #definePCIC_INPUTDEV 0x09 @@ -450,6 +473,7 @@ #definePCIP_SERIALBUS_IPMI_BT 0x02 #definePCIS_SERIALBUS_SERCOS 0x08 #definePCIS_SERIALBUS_CANBUS 0x09 +#definePCIS_SERIALBUS_MIPI_I3C 0x0a #definePCIC_WIRELESS 0x0d #definePCIS_WIRELESS_IRDA 0x00 @@ -459,6 +483,8 @@ #definePCIS_WIRELESS_BROADBAND 0x12 #definePCIS_WIRELESS_80211A0x20 #definePCIS_WIRELESS_80211B0x21 +#definePCIS_WIRELESS_CELL 0x40 +#definePCIS_WIRELESS_CELL_E0x41 #definePCIS_WIRELESS_OTHER 0x80 #definePCIC_INTELLIIO 0x0e ___ 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: r358172 - in head: lib/libc/stdlib libexec/rtld-elf/rtld-libc sys/bsm sys/compat/freebsd32 sys/kern sys/security/audit sys/sys usr.bin/truss
Author: mjg Date: Thu Feb 20 16:58:19 2020 New Revision: 358172 URL: https://svnweb.freebsd.org/changeset/base/358172 Log: vfs: add realpathat syscall realpath(3) is used a lot e.g., by clang and is a major source of getcwd and fstatat calls. This can be done more efficiently in the kernel. This works by performing a regular lookup while saving the name and found parent directory. If the terminal vnode is a directory we can resolve it using usual means. Otherwise we can use the name saved by lookup and resolve the parent. See the review for sample syscall counts. Reviewed by: kib Differential Revision:https://reviews.freebsd.org/D23574 Modified: head/lib/libc/stdlib/realpath.c head/libexec/rtld-elf/rtld-libc/Makefile.inc head/sys/bsm/audit_kevents.h head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master head/sys/kern/vfs_cache.c head/sys/security/audit/audit_bsm.c head/sys/sys/param.h head/usr.bin/truss/syscalls.c Modified: head/lib/libc/stdlib/realpath.c == --- head/lib/libc/stdlib/realpath.c Thu Feb 20 16:38:30 2020 (r358171) +++ head/lib/libc/stdlib/realpath.c Thu Feb 20 16:58:19 2020 (r358172) @@ -42,14 +42,19 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "un-namespace.h" +#include "libc_private.h" +extern int __realpathat(int fd, const char *path, char *buf, size_t size, +int flags); + /* * Find the real name of path, by removing all ".", ".." and symlink * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ -static char * +static char * __noinline realpath1(const char *path, char *resolved) { struct stat sb; @@ -222,6 +227,10 @@ realpath(const char * __restrict path, char * __restri m = resolved = malloc(PATH_MAX); if (resolved == NULL) return (NULL); + } + if (__getosreldate() >= 1300080) { + if (__realpathat(AT_FDCWD, path, resolved, PATH_MAX, 0) == 0) + return (resolved); } res = realpath1(path, resolved); if (res == NULL) Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc == --- head/libexec/rtld-elf/rtld-libc/Makefile.incThu Feb 20 16:38:30 2020(r358171) +++ head/libexec/rtld-elf/rtld-libc/Makefile.incThu Feb 20 16:58:19 2020(r358172) @@ -49,7 +49,7 @@ _libc_other_objects= sigsetjmp lstat stat fstat fstata sysarch __sysctl issetugid __getcwd utrace \ thr_self thr_kill pread mmap lseek _exit _fstat _fstatat _fstatfs \ getdirentries _getdirentries _close _fcntl _open _openat _read \ -_sigprocmask _write readlink _setjmp setjmp setjmperr +_sigprocmask _write readlink __realpathat _setjmp setjmp setjmperr # Finally add additional architecture-dependent libc dependencies Modified: head/sys/bsm/audit_kevents.h == --- head/sys/bsm/audit_kevents.hThu Feb 20 16:38:30 2020 (r358171) +++ head/sys/bsm/audit_kevents.hThu Feb 20 16:58:19 2020 (r358172) @@ -657,6 +657,7 @@ #defineAUE_LGETUUID43261 /* CADETS. */ #defineAUE_EXECVEAT43262 /* FreeBSD/Linux. */ #defineAUE_SHMRENAME 43263 /* FreeBSD-specific. */ +#defineAUE_REALPATHAT 43264 /* FreeBSD-specific. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Thu Feb 20 16:38:30 2020 (r358171) +++ head/sys/compat/freebsd32/syscalls.master Thu Feb 20 16:58:19 2020 (r358172) @@ -1160,5 +1160,7 @@ 572AUE_SHMRENAME NOPROTO { int shm_rename(const char *path_from, \ const char *path_to, int flags); } 573AUE_NULLNOPROTO { int sigfastblock(int cmd, uint32_t *ptr); } +574AUE_REALPATHAT NOPROTO { int __realpathat(int fd, const char *path, \ + char *buf, size_t size, int flags); } ; vim: syntax=off Modified: head/sys/kern/syscalls.master == --- head/sys/kern/syscalls.master Thu Feb 20 16:38:30 2020 (r358171) +++ head/sys/kern/syscalls.master Thu Feb 20 16:58:19 2020 (r358172) @@ -3218,6 +3218,15 @@ _Inout_opt_ uint32_t *ptr ); } +574AUE_REALPATHAT STD { + int __realpathat( + int fd, +
svn commit: r358173 - in head/sys: compat/freebsd32 kern sys
Author: mjg Date: Thu Feb 20 16:58:57 2020 New Revision: 358173 URL: https://svnweb.freebsd.org/changeset/base/358173 Log: make sysent for r358172 ("vfs: add realpathat syscall") Modified: head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Feb 20 16:58:19 2020(r358172) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Feb 20 16:58:57 2020(r358173) @@ -500,4 +500,5 @@ #defineFREEBSD32_SYS_shm_open2 571 #defineFREEBSD32_SYS_shm_rename572 #defineFREEBSD32_SYS_sigfastblock 573 -#defineFREEBSD32_SYS_MAXSYSCALL574 +#defineFREEBSD32_SYS___realpathat 574 +#defineFREEBSD32_SYS_MAXSYSCALL575 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Feb 20 16:58:19 2020(r358172) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Feb 20 16:58:57 2020(r358173) @@ -610,4 +610,5 @@ const char *freebsd32_syscallnames[] = { "shm_open2",/* 571 = shm_open2 */ "shm_rename", /* 572 = shm_rename */ "sigfastblock", /* 573 = sigfastblock */ + "__realpathat", /* 574 = __realpathat */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cThu Feb 20 16:58:19 2020(r358172) +++ head/sys/compat/freebsd32/freebsd32_sysent.cThu Feb 20 16:58:57 2020(r358173) @@ -663,4 +663,5 @@ struct sysent freebsd32_sysent[] = { { AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */ { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ + { AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c == --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Feb 20 16:58:19 2020(r358172) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Feb 20 16:58:57 2020(r358173) @@ -3363,6 +3363,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 2; break; } + /* __realpathat */ + case 574: { + struct __realpathat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* const char * */ + uarg[2] = (intptr_t) p->buf; /* char * */ + uarg[3] = p->size; /* size_t */ + iarg[4] = p->flags; /* int */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -9062,6 +9073,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* __realpathat */ + case 574: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland const char *"; + break; + case 2: + p = "userland char *"; + break; + case 3: + p = "size_t"; + break; + case 4: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10953,6 +10986,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* sigfastblock */ case 573: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* __realpathat */ + case 574: if (ndx == 0 || ndx == 1)
svn commit: r358171 - head
Author: bapt Date: Thu Feb 20 16:38:30 2020 New Revision: 358171 URL: https://svnweb.freebsd.org/changeset/base/358171 Log: Use OLD_LIBS instead of OLD_FILES so the user get a chance to keep them around if needed Reported by: tijl Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Feb 20 15:52:36 2020(r358170) +++ head/ObsoleteFiles.inc Thu Feb 20 16:38:30 2020(r358171) @@ -37,10 +37,10 @@ # done # 20200220: Upgrade of ncurses, shlib bumped to version 9 -OLD_FILES+=lib/libncurses.so.8 -OLD_FILES+=lib/libncursesw.so.8 -OLD_FILES+=usr/lib32/libncurses.so.8 -OLD_FILES+=usr/lib32/libncursesw.so.8 +OLD_LIBS+=lib/libncurses.so.8 +OLD_LIBS+=lib/libncursesw.so.8 +OLD_LIBS+=usr/lib32/libncurses.so.8 +OLD_LIBS+=usr/lib32/libncursesw.so.8 # 20200206: Remove elf2aout OLD_FILES+=usr/bin/elf2aout ___ 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: r358170 - head/usr.sbin/services_mkdb
Author: pfg Date: Thu Feb 20 15:52:36 2020 New Revision: 358170 URL: https://svnweb.freebsd.org/changeset/base/358170 Log: Revert r358153: it is causing unexpected issues with the build system. Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services == --- head/usr.sbin/services_mkdb/servicesThu Feb 20 15:37:44 2020 (r358169) +++ head/usr.sbin/services_mkdb/servicesThu Feb 20 15:52:36 2020 (r358170) @@ -1,62 +1,65 @@ # # Network services, Internet style # -# Service names and port numbers are used to distinguish between different -# services that run over transport protocols such as TCP, UDP, DCCP, and -# SCTP. +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. # # The latest IANA port assignments can be gotten from # -# https://www.iana.org/assignments/service-names-port-numbers/ +# http://www.iana.org/assignments/port-numbers # -# System Ports are those from 0 through 1023. -# User Ports are those from 1024 through 49151. -# Dynamic and/or Private Ports are those from 49152 through 65535. +# The Well Known Ports are those from 0 through 1023. +# The Registered Ports are those from 1024 through 49151 +# The Dynamic and/or Private Ports are those from 49152 through 65535 # -# Note that it is presently the policy of IANA to assign a single well-known -# port number for both TCP and UDP; hence, most entries here have two entries -# even if the protocol doesn't support UDP operations. +# Kerberos services are for Kerberos v4, and are unofficial. Sites running +# v5 should uncomment v5 entries and comment v4 entries. # # $FreeBSD$ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS # +rtmp 1/ddp#Routing Table Maintenance Protocol tcpmux 1/tcp#TCP Port Service Multiplexer tcpmux 1/udp#TCP Port Service Multiplexer +nbp 2/ddp#Name Binding Protocol compressnet 2/tcp#Management Utility compressnet 2/udp#Management Utility compressnet 3/tcp#Compression Process compressnet 3/udp#Compression Process +echo 4/ddp#AppleTalk Echo Protocol rje 5/tcp#Remote Job Entry rje 5/udp#Remote Job Entry +zip 6/ddp#Zone Information Protocol +echo 7/sctp echo 7/tcp echo 7/udp -echo 7/sctp +discard 9/sctp sink null discard 9/tcpsink null discard 9/udpsink null -discard 9/sctp sink null systat 11/tcpusers#Active Users systat 11/udpusers#Active Users +daytime 13/sctp daytime 13/tcp daytime 13/udp -daytime 13/sctp qotd17/tcpquote#Quote of the Day qotd17/udpquote#Quote of the Day msp 18/tcp#Message Send Protocol msp 18/udp#Message Send Protocol +chargen 19/sctp ttytst source#Character Generator chargen 19/tcpttytst source#Character Generator chargen 19/udpttytst source#Character Generator -chargen 19/sctp ttytst source#Character Generator +ftp-data20/sctp #File Transfer [Default Data] ftp-data20/tcp#File Transfer [Default Data] ftp-data20/udp#File Transfer [Default Data] -ftp-data20/sctp #File Transfer [Default Data] +ftp 21/sctp #File Transfer [Control] ftp 21/tcp#File Transfer [Control] ftp 21/udp#File Transfer [Control] -ftp 21/sctp #File Transfer [Control] +ssh 22/sctp #Secure Shell Login ssh 22/tcp#Secure Shell Login ssh 22/udp#Secure Shell Login -ssh 22/sctp #Secure Shell Login telnet 23/tcp telnet 23/udp # 24/tcpany private mail system @@ -111,22 +114,24 @@ isi-gl 55/tcp#ISI Graphics Language isi-gl 55/udp#ISI Graphics Language xns-auth56/tcp#XNS Authentication xns-auth56/udp#XNS Authentication -# 57/tcpany private terminal access -# 57/udpany private terminal access +# 57/tcpany private terminal access +# 57/udpany private terminal access xns-mail58/tcp#XNS Mail xns-mail58/udp#XNS Mail # 59/tcpany private file service # 59/udpany private file service +ni-mail
svn commit: r358169 - head/sys/netinet
Author: tuexen Date: Thu Feb 20 15:37:44 2020 New Revision: 358169 URL: https://svnweb.freebsd.org/changeset/base/358169 Log: Remove an unused timer type. MFC after:1 week Modified: head/sys/netinet/sctp_constants.h Modified: head/sys/netinet/sctp_constants.h == --- head/sys/netinet/sctp_constants.h Thu Feb 20 15:34:02 2020 (r358168) +++ head/sys/netinet/sctp_constants.h Thu Feb 20 15:37:44 2020 (r358169) @@ -543,14 +543,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_TIMER_TYPE_ASCONF 10 #define SCTP_TIMER_TYPE_SHUTDOWNGUARD 11 #define SCTP_TIMER_TYPE_AUTOCLOSE 12 -#define SCTP_TIMER_TYPE_EVENTWAKE 13 -#define SCTP_TIMER_TYPE_STRRESET14 -#define SCTP_TIMER_TYPE_INPKILL 15 -#define SCTP_TIMER_TYPE_ASOCKILL16 -#define SCTP_TIMER_TYPE_ADDR_WQ 17 -#define SCTP_TIMER_TYPE_PRIM_DELETED18 +#define SCTP_TIMER_TYPE_STRRESET 13 +#define SCTP_TIMER_TYPE_INPKILL14 +#define SCTP_TIMER_TYPE_ASOCKILL 15 +#define SCTP_TIMER_TYPE_ADDR_WQ16 +#define SCTP_TIMER_TYPE_PRIM_DELETED 17 /* add new timers here - and increment LAST */ -#define SCTP_TIMER_TYPE_LAST19 +#define SCTP_TIMER_TYPE_LAST 18 #define SCTP_IS_TIMER_TYPE_VALID(t)(((t) > SCTP_TIMER_TYPE_NONE) && \ ((t) < SCTP_TIMER_TYPE_LAST)) ___ 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: r358153 - head/usr.sbin/services_mkdb
On 20/02/2020 10:09, Ed Maste wrote: On Thu, 20 Feb 2020 at 09:54, Pedro Giffuni wrote: On 2020-02-20 09:46, Ed Maste wrote: On Thu, 20 Feb 2020 at 04:56, Li-Wen Hsu wrote: Please note this is not fixed in ci.freebsd.org yet. The reason is it directly goes to src/release and perform `make packagesystem` to generate kernel.txz and base.txz. If I read release(7) correctly, this should be performed under a fresh installed environment. I am checking how to fix this. Should we revert the change until a build fix can be committed too? I am OK with reverting the change, and I am rather surprised such a simply change could have broken the build. Indeed, this has uncovered a broken dependency in our build process (i.e., that the build host's services_mkdb is being used). IMO we should: 1. Revert the change for now (pfg will you take care of it?) Yes, Give me some minutes ... 2. MFC the MAX_PROTO increase as soon as possible 3. Try to fix the use of host's services_mkdb 4. Recommit after either #3 is done, or FreeBSD 12.2 and 11.4 are released Pedro. ___ 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: r358168 - in head/sys: kern sys
Author: kib Date: Thu Feb 20 15:34:02 2020 New Revision: 358168 URL: https://svnweb.freebsd.org/changeset/base/358168 Log: Do not read sigfastblock word on syscall entry. On machines with SMAP, fueword executes two serializing instructions which can be seen in microbenchmarks. As a measure to restore microbenchmark numbers, only read the word on the attempt to deliver signal in ast(). If the word is set, signal is not delivered and word is kept, preventing interruption of interruptible sleeps by signals until userspace calls sigfastblock(UNBLOCK) which clears the word. This way, the spurious EINTR that userspace can see while in critical section is on first interruptible sleep, if a signal is pending, and on signal posting. It is believed that it is not important for rtld and lbithr critical sections. It might be visible for the application code e.g. for the callback of dl_iterate_phdr(3), but again the belief is that the non-compliance is acceptable. Most important is that the retry of the sleeping syscall does not interrupt unless additional signal is posted. For now I added the knob kern.sigfastblock_fetch_always to enable the word read on syscall entry to be able to diagnose possible issues due to spurious EINTR. While there, do some code restructuting to have all sigfastblock() handling located in kern_sig.c. Reviewed by: jeff Discussed with: mjg Tested by:pho Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D23622 Modified: head/sys/kern/kern_exec.c head/sys/kern/kern_sig.c head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_exec.c == --- head/sys/kern/kern_exec.c Thu Feb 20 10:56:12 2020(r358167) +++ head/sys/kern/kern_exec.c Thu Feb 20 15:34:02 2020(r358168) @@ -1035,9 +1035,7 @@ exec_new_vmspace(struct image_params *imgp, struct sys imgp->vmspace_destroyed = 1; imgp->sysent = sv; - td->td_pflags &= ~TDP_SIGFASTBLOCK; - td->td_sigblock_ptr = NULL; - td->td_sigblock_val = 0; + sigfastblock_clear(td); /* May be called with Giant held */ EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cThu Feb 20 10:56:12 2020(r358167) +++ head/sys/kern/kern_sig.cThu Feb 20 15:34:02 2020(r358168) @@ -157,6 +157,12 @@ static int kern_lognosys = 0; SYSCTL_INT(_kern, OID_AUTO, lognosys, CTLFLAG_RWTUN, _lognosys, 0, "Log invalid syscalls"); +__read_frequently bool sigfastblock_fetch_always = false; +SYSCTL_BOOL(_kern, OID_AUTO, sigfastblock_fetch_always, CTLFLAG_RWTUN, +_fetch_always, 0, +"Fetch sigfastblock word on each syscall entry for proper " +"blocking semantic"); + SYSINIT(signal, SI_SUB_P1003_1B, SI_ORDER_FIRST+3, sigqueue_start, NULL); /* @@ -2005,6 +2011,7 @@ trapsignal(struct thread *td, ksiginfo_t *ksi) code = ksi->ksi_code; KASSERT(_SIG_VALID(sig), ("invalid signal")); + sigfastblock_fetch(td); PROC_LOCK(p); ps = p->p_sigacts; mtx_lock(>ps_mtx); @@ -3952,6 +3959,42 @@ sig_drop_caught(struct proc *p) } } +static void +sigfastblock_failed(struct thread *td, bool sendsig, bool write) +{ + ksiginfo_t ksi; + + /* +* Prevent further fetches and SIGSEGVs, allowing thread to +* issue syscalls despite corruption. +*/ + sigfastblock_clear(td); + + if (!sendsig) + return; + ksiginfo_init_trap(); + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = write ? SEGV_ACCERR : SEGV_MAPERR; + ksi.ksi_addr = td->td_sigblock_ptr; + trapsignal(td, ); +} + +static bool +sigfastblock_fetch_sig(struct thread *td, bool sendsig, uint32_t *valp) +{ + uint32_t res; + + if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0) + return (true); + if (fueword32((void *)td->td_sigblock_ptr, ) == -1) { + sigfastblock_failed(td, sendsig, false); + return (false); + } + *valp = res; + td->td_sigblock_val = res & ~SIGFASTBLOCK_FLAGS; + return (true); +} + int sys_sigfastblock(struct thread *td, struct sigfastblock_args *uap) { @@ -3960,6 +4003,7 @@ sys_sigfastblock(struct thread *td, struct sigfastbloc uint32_t oldval; error = 0; + p = td->td_proc; switch (uap->cmd) { case SIGFASTBLOCK_SETPTR: if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0) { @@ -3975,18 +4019,22 @@ sys_sigfastblock(struct thread *td, struct sigfastbloc break; case SIGFASTBLOCK_UNBLOCK: - if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0) { +
Re: svn commit: r358153 - head/usr.sbin/services_mkdb
On Thu, 20 Feb 2020 at 09:54, Pedro Giffuni wrote: > > On 2020-02-20 09:46, Ed Maste wrote: > > On Thu, 20 Feb 2020 at 04:56, Li-Wen Hsu wrote: > >> Please note this is not fixed in ci.freebsd.org yet. The reason is it > >> directly goes to src/release and perform `make packagesystem` to > >> generate kernel.txz and base.txz. If I read release(7) correctly, > >> this should be performed under a fresh installed environment. I am > >> checking how to fix this. > > Should we revert the change until a build fix can be committed too? > > I am OK with reverting the change, and I am rather surprised such a > simply change could have broken the build. Indeed, this has uncovered a broken dependency in our build process (i.e., that the build host's services_mkdb is being used). IMO we should: 1. Revert the change for now (pfg will you take care of it?) 2. MFC the MAX_PROTO increase as soon as possible 3. Try to fix the use of host's services_mkdb 4. Recommit after either #3 is done, or FreeBSD 12.2 and 11.4 are released ___ 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: r358153 - head/usr.sbin/services_mkdb
On 2020-02-20 09:46, Ed Maste wrote: > On Thu, 20 Feb 2020 at 04:56, Li-Wen Hsu wrote: >> Please note this is not fixed in ci.freebsd.org yet. The reason is it >> directly goes to src/release and perform `make packagesystem` to >> generate kernel.txz and base.txz. If I read release(7) correctly, >> this should be performed under a fresh installed environment. I am >> checking how to fix this. > Should we revert the change until a build fix can be committed too? I am OK with reverting the change, and I am rather surprised such a simply change could have broken the build. This said, it is probably good that the error is reproducible. Pedro. ___ 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: r358153 - head/usr.sbin/services_mkdb
On Thu, 20 Feb 2020 at 04:56, Li-Wen Hsu wrote: > > Please note this is not fixed in ci.freebsd.org yet. The reason is it > directly goes to src/release and perform `make packagesystem` to > generate kernel.txz and base.txz. If I read release(7) correctly, > this should be performed under a fresh installed environment. I am > checking how to fix this. Should we revert the change until a build fix can be committed too? ___ 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: r358164 - in head: . lib/ncurses/ncurses
On Thu, 20 Feb 2020 09:12:07 + (UTC) Baptiste Daroussin wrote: > Author: bapt > Date: Thu Feb 20 09:12:07 2020 > New Revision: 358164 > URL: https://svnweb.freebsd.org/changeset/base/358164 > > Log: > ncurses: bump shlib number to version 9 > > ABI has change in between ncurses 5 or 6. While theorically ncurses 6 is > buildable with > backward compatibility, I fail at building in a way where the application > linked against > the previous version of ncurses are rendering properly. > Let's go on the new ABI which provides all the latest features. > > A compat12x package is cooking for backward compatibility > > Modified: > head/ObsoleteFiles.inc > head/lib/ncurses/ncurses/Makefile > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incThu Feb 20 09:02:59 2020(r358163) > +++ head/ObsoleteFiles.incThu Feb 20 09:12:07 2020(r358164) > @@ -36,6 +36,12 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200220: Upgrade of ncurses, shlib bumped to version 9 > +OLD_FILES+=lib/libncurses.so.8 > +OLD_FILES+=lib/libncursesw.so.8 > +OLD_FILES+=usr/lib32/libncurses.so.8 > +OLD_FILES+=usr/lib32/libncursesw.so.8 This should be OLD_LIBS instead of OLD_FILES. ___ 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: r358167 - head/sys/netinet6
Author: bz Date: Thu Feb 20 10:56:12 2020 New Revision: 358167 URL: https://svnweb.freebsd.org/changeset/base/358167 Log: ip6_output: improve extension header handling Move IPv6 source address checks from after extension header heandling to the top of the function. If we do not pass these checks there is no reason to do a lot of work upfront. Fold extension header preparations and length calculations together into a single branch and macro rather than doing them sequentially. Likewise move extension header concatination into a single branch block only doing it if we recorded any extension header length length. Reviewed by: melifaro (earlier version), markj, gallatin Sponsored by: Netflix (partially, originally) MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23740 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c == --- head/sys/netinet6/ip6_output.c Thu Feb 20 09:33:14 2020 (r358166) +++ head/sys/netinet6/ip6_output.c Thu Feb 20 10:56:12 2020 (r358167) @@ -156,10 +156,10 @@ static int copypktopts(struct ip6_pktopts *, struct ip /* - * Make an extension header from option data. hp is the source, and - * mp is the destination. + * Make an extension header from option data. hp is the source, + * mp is the destination, and _ol is the optlen. */ -#define MAKE_EXTHDR(hp, mp)\ +#defineMAKE_EXTHDR(hp, mp, _ol) \ do { \ if (hp) { \ struct ip6_ext *eh = (struct ip6_ext *)(hp);\ @@ -167,6 +167,7 @@ static int copypktopts(struct ip6_pktopts *, struct ip ((eh)->ip6e_len + 1) << 3); \ if (error) \ goto freehdrs; \ + (_ol) += (*(mp))->m_len;\ } \ } while (/*CONSTCOND*/ 0) @@ -384,22 +385,23 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_hdr *ip6; struct ifnet *ifp, *origifp; struct mbuf *m = m0; - struct mbuf *mprev = NULL; + struct mbuf *mprev; int hlen, tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; struct in6_addr odst; + u_char *nexthdrp; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; int alwaysfrag, dontfrag; - u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; + u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int hdrsplit = 0; + bool hdrsplit; int sw_csum, tso; int needfiblookup; uint32_t fibnum; @@ -436,13 +438,50 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } #endif /* IPSEC */ + /* Source address validation. */ + ip6 = mtod(m, struct ip6_hdr *); + if (IN6_IS_ADDR_UNSPECIFIED(>ip6_src) && + (flags & IPV6_UNSPECSRC) == 0) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + if (IN6_IS_ADDR_MULTICAST(>ip6_src)) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + + /* +* If we are given packet options to add extension headers prepare them. +* Calculate the total length of the extension header chain. +* Keep the length of the unfragmentable part for fragmentation. +*/ bzero(, sizeof(exthdrs)); + optlen = 0; + unfragpartlen = 0; if (opt) { /* Hop-by-Hop options header. */ - MAKE_EXTHDR(opt->ip6po_hbh, _hbh); + MAKE_EXTHDR(opt->ip6po_hbh, _hbh, optlen); + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { +#ifndef RTHDR_SUPPORT_IMPLEMENTED /* +* If there is a routing header, discard the packet +* right away here. RH0/1 are obsolete and we do not +* currently support RH2/3/4. +* People trying to use RH253/254 may want to disable +* this check. +* The moment we do support any routing header (again) +* this block should check the routing type more +*
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On Wed, Feb 19, 2020 at 7:09 PM Li-Wen Hsu wrote: > > On Wed, Feb 19, 2020 at 5:04 PM Dimitry Andric wrote: > > > > On 2020-02-18 09:11, Baptiste Daroussin wrote: > > > Author: bapt > > > Date: Tue Feb 18 08:11:52 2020 > > > New Revision: 358062 > > > URL: https://svnweb.freebsd.org/changeset/base/358062 > > > > > > Log: > > >Update ncurses to 20200118 > > > > Apparently this breaks the gcc builds, because it can't find the > > function "box" anymore: > > > > --- all_subdir_usr.bin/clang/lldb --- > > /usr/local/bin/x86_64-unknown-freebsd12.0-ld: > > /tmp/obj/workspace/src/amd64.amd64/lib/clang/liblldb/liblldb.a(IOHandler.o): > > in function `curses::Window::Box(unsigned int, unsigned int)': > > /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: > > undefined reference to `box' > > /usr/local/bin/x86_64-unknown-freebsd12.0-ld: > > /workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: > > undefined reference to `box' > > collect2: error: ld returned 1 exit status > > *** [lldb.full] Error code 1 > > > > See also: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/13322/ > > For more information, currently the FreeBSD-head-amd64-gcc is using > amd64-gcc package via amd64-xtoolchain-gcc, which is 6.4 > A test build with amd64-gcc6, which is 6.5, just completed and it's fine. > I haven't checked this failure is due to our code itself, gcc versions > or the difference in the configuration of two gcc ports. Correct myself, gcc 6.5 has the same failure. There was an issue in the previous build. https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc6_build/1/console > I think I will create FreeBSD-head-amd64-gcc6 job uses newer and > preferred external tool chain, then the experimental ones like > FreeBSD-head-amd64-gcc9, 10 and llvm-devel. These are still in the CI roadmap. Li-Wen ___ 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: r358153 - head/usr.sbin/services_mkdb
On Thu, Feb 20, 2020 at 2:06 PM Xin Li wrote: > > > > On 2/19/20 10:01 PM, Yuri Pankov wrote: > > On 20 Feb 2020, at 06:54, Pedro F. Giffuni wrote: > >> > >> Author: pfg > >> Date: Thu Feb 20 03:54:07 2020 > >> New Revision: 358153 > >> URL: https://svnweb.freebsd.org/changeset/base/358153 > >> > >> Log: > >> /etc/services: attempt bring the database to this century. > >> > >> Document better this file, updating the URL to the IANA registry and > >> closely > >> match the official services. > >> > >> For system ports (0 to 1023) we now try to follow the registry closely, > >> noting > >> some historical differences where applicable. > >> For the User ports (1024 - 49151) we try to keep some sensible balance > >> only > >> of services that are likely to be found on FreeBSD/UNIX systems. This > >> attempts > >> to strike a balance between complexity and usefulness. > >> > >> As a side effect: drop references to unofficial Kerberos IV which was > >> EOL'ed > >> on Oct 2006[1]. While it is conceivable some people may still use it in > >> some > >> very old FreeBSD machines that can't be replaced easily, the use of it is > >> considered a security risk. Also drop the unofficial netatalk, which we > >> supported long ago in the kernel but was dropped long ago. > >> > >> [1] https://web.mit.edu/kerberos/krb4-end-of-life.html > >> > >> MFC after: 3 weeks (likely to 12-stable only) > >> Differential Revision: https://reviews.freebsd.org/D23621 > >> > >> Modified: > >> head/usr.sbin/services_mkdb/services > > > > I noticed `mergemaster` failing, and it seems to be not happy with this > > change: > > > > # make installconfig > > installing DIRS CONFSDIR > > install -d -m 0755 -o root -g wheel /etc > > install -C -o root -g wheel -m 644 > > /usr/src/usr.sbin/services_mkdb/services /etc/services > > services_mkdb -l -q -o /var/db/services.db /etc/services > > services_mkdb: Ran out of protocols adding `divert'; recompile with larger > > PROTOMAX > > *** Error code 1 > > > > Stop. > > make: stopped in /usr/src/usr.sbin/services_mkdb > > Fixed in r358154. Please merge the revision with r358153 when MFC'ing. Please note this is not fixed in ci.freebsd.org yet. The reason is it directly goes to src/release and perform `make packagesystem` to generate kernel.txz and base.txz. If I read release(7) correctly, this should be performed under a fresh installed environment. I am checking how to fix this. delphij and I were trying to propagate ${IMAKEENV} to these targets but I'm not sure if this is correct way. Best, Li-Wen ___ 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: r358166 - head
Author: bapt Date: Thu Feb 20 09:33:14 2020 New Revision: 358166 URL: https://svnweb.freebsd.org/changeset/base/358166 Log: Update the UPDATING information now that ncurses shlib has been bumped Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Thu Feb 20 09:17:45 2020(r358165) +++ head/UPDATING Thu Feb 20 09:33:14 2020(r358166) @@ -26,10 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20200218: - ncurses has been updated to a newer version (6.1-20200118). After an - update some applications using ncurses may results have some rendering - problems and would need to be rebuilt. +20200220: + ncurses has been updated to a newer version (6.1-20200118). Given the ABI + has changed, users will have to rebuild all the ports that are linked to + ncurses. 20200217: The size of struct vnet and the magic cookie have changed. ___ 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: r358165 - head/sys/sys
Author: bapt Date: Thu Feb 20 09:17:45 2020 New Revision: 358165 URL: https://svnweb.freebsd.org/changeset/base/358165 Log: Bump __FreeBSD_version after bumping ncurses shlib Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hThu Feb 20 09:12:07 2020(r358164) +++ head/sys/sys/param.hThu Feb 20 09:17:45 2020(r358165) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300078 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300079 /* 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"
Re: svn commit: r358153 - head/usr.sbin/services_mkdb
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Oops! Sorry was AFK ... Thanks! Pedro. On Thursday, February 20, 2020, 1:06 AM, Xin Li wrote: On 2/19/20 10:01 PM, Yuri Pankov wrote: > On 20 Feb 2020, at 06:54, Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Thu Feb 20 03:54:07 2020 >> New Revision: 358153 >> URL: https://svnweb.freebsd.org/changeset/base/358153 >> >> Log: >> /etc/services: attempt bring the database to this century. >> >> Document better this file, updating the URL to the IANA registry and closely >> match the official services. >> >> For system ports (0 to 1023) we now try to follow the registry closely, >>noting >> some historical differences where applicable. >> For the User ports (1024 - 49151) we try to keep some sensible balance only >> of services that are likely to be found on FreeBSD/UNIX systems. This >>attempts >> to strike a balance between complexity and usefulness. >> >> As a side effect: drop references to unofficial Kerberos IV which was EOL'ed >> on Oct 2006[1]. While it is conceivable some people may still use it in some >> very old FreeBSD machines that can't be replaced easily, the use of it is >> considered a security risk. Also drop the unofficial netatalk, which we >> supported long ago in the kernel but was dropped long ago. >> >> [1] https://web.mit.edu/kerberos/krb4-end-of-life.html >> >> MFC after: 3 weeks (likely to 12-stable only) >> Differential Revision: https://reviews.freebsd.org/D23621 >> >> Modified: >> head/usr.sbin/services_mkdb/services > > I noticed `mergemaster` failing, and it seems to be not happy with this > change: > > # make installconfig > installing DIRS CONFSDIR > install -d -m 0755 -o root -g wheel /etc > install -C -o root -g wheel -m 644 > /usr/src/usr.sbin/services_mkdb/services /etc/services > services_mkdb -l -q -o /var/db/services.db /etc/services > services_mkdb: Ran out of protocols adding `divert'; recompile with larger > PROTOMAX > *** Error code 1 > > Stop. > make: stopped in /usr/src/usr.sbin/services_mkdb Fixed in r358154. Please merge the revision with r358153 when MFC'ing. ___ 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: r358164 - in head: . lib/ncurses/ncurses
Author: bapt Date: Thu Feb 20 09:12:07 2020 New Revision: 358164 URL: https://svnweb.freebsd.org/changeset/base/358164 Log: ncurses: bump shlib number to version 9 ABI has change in between ncurses 5 or 6. While theorically ncurses 6 is buildable with backward compatibility, I fail at building in a way where the application linked against the previous version of ncurses are rendering properly. Let's go on the new ABI which provides all the latest features. A compat12x package is cooking for backward compatibility Modified: head/ObsoleteFiles.inc head/lib/ncurses/ncurses/Makefile Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Feb 20 09:02:59 2020(r358163) +++ head/ObsoleteFiles.inc Thu Feb 20 09:12:07 2020(r358164) @@ -36,6 +36,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20200220: Upgrade of ncurses, shlib bumped to version 9 +OLD_FILES+=lib/libncurses.so.8 +OLD_FILES+=lib/libncursesw.so.8 +OLD_FILES+=usr/lib32/libncurses.so.8 +OLD_FILES+=usr/lib32/libncursesw.so.8 + # 20200206: Remove elf2aout OLD_FILES+=usr/bin/elf2aout OLD_FILES+=usr/share/man/man1/elf2aout.1.gz Modified: head/lib/ncurses/ncurses/Makefile == --- head/lib/ncurses/ncurses/Makefile Thu Feb 20 09:02:59 2020 (r358163) +++ head/lib/ncurses/ncurses/Makefile Thu Feb 20 09:12:07 2020 (r358164) @@ -13,7 +13,7 @@ MK_MAN=no .include "${.CURDIR:H}/config.mk" LIB= ncurses${LIB_SUFFIX} -SHLIB_MAJOR= 8 +SHLIB_MAJOR= 9 NO_LINT= @@ -292,7 +292,6 @@ CLEANFILES= ${GENSRCS} ${GENHDRS} keys.list make_hash make_keys MKterm.h.awk comp_captab.c curses.head CFLAGS+= -DFREEBSD_NATIVE -DTERMIOS -CFLAGS.lib_freeall.c+= -Wno-missing-prototypes # Installed HEADERS= curses.h term.h termcap.h unctrl.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358163 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 09:02:59 2020 New Revision: 358163 URL: https://svnweb.freebsd.org/changeset/base/358163 Log: efi_register_handles() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/handles.c Modified: head/stand/efi/libefi/handles.c == --- head/stand/efi/libefi/handles.c Thu Feb 20 09:00:20 2020 (r358162) +++ head/stand/efi/libefi/handles.c Thu Feb 20 09:02:59 2020 (r358163) @@ -52,6 +52,8 @@ efi_register_handles(struct devsw *sw, EFI_HANDLE *han nentries += count; sz = nentries * sizeof(struct entry); entry = (entry == NULL) ? malloc(sz) : realloc(entry, sz); + if (entry == NULL) + return (ENOMEM); for (unit = 0; idx < nentries; idx++, unit++) { entry[idx].handle = handles[unit]; if (aliases != NULL) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358162 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 09:00:20 2020 New Revision: 358162 URL: https://svnweb.freebsd.org/changeset/base/358162 Log: insert_zfs() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efizfs.c Modified: head/stand/efi/libefi/efizfs.c == --- head/stand/efi/libefi/efizfs.c Thu Feb 20 08:58:09 2020 (r358161) +++ head/stand/efi/libefi/efizfs.c Thu Feb 20 09:00:20 2020 (r358162) @@ -86,9 +86,11 @@ insert_zfs(EFI_HANDLE handle, uint64_t guid) zfsinfo_t *zi; zi = malloc(sizeof(zfsinfo_t)); -zi->zi_handle = handle; -zi->zi_pool_guid = guid; -STAILQ_INSERT_TAIL(, zi, zi_link); + if (zi != NULL) { + zi->zi_handle = handle; + zi->zi_pool_guid = guid; + STAILQ_INSERT_TAIL(, zi, zi_link); + } } void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358160 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 08:56:56 2020 New Revision: 358160 URL: https://svnweb.freebsd.org/changeset/base/358160 Log: efipart_inithandles() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efipart.c Modified: head/stand/efi/libefi/efipart.c == --- head/stand/efi/libefi/efipart.c Thu Feb 20 08:55:18 2020 (r358159) +++ head/stand/efi/libefi/efipart.c Thu Feb 20 08:56:56 2020 (r358160) @@ -363,6 +363,8 @@ efipart_inithandles(void) status = BS->LocateHandle(ByProtocol, _guid, 0, , hin); if (status == EFI_BUFFER_TOO_SMALL) { hin = malloc(sz); + if (hin == NULL) + return (ENOMEM); status = BS->LocateHandle(ByProtocol, _guid, 0, , hin); if (EFI_ERROR(status)) ___ 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: r358159 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 08:55:18 2020 New Revision: 358159 URL: https://svnweb.freebsd.org/changeset/base/358159 Log: connect_controllers() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efi_driver_utils.c Modified: head/stand/efi/libefi/efi_driver_utils.c == --- head/stand/efi/libefi/efi_driver_utils.cThu Feb 20 08:53:04 2020 (r358158) +++ head/stand/efi/libefi/efi_driver_utils.cThu Feb 20 08:55:18 2020 (r358159) @@ -52,6 +52,8 @@ connect_controllers(EFI_GUID *filter) } handles = malloc(hsize); + if (handles == NULL) + return (EFI_OUT_OF_RESOURCES); nhandles = hsize / sizeof(EFI_HANDLE); status = BS->LocateHandle(ByProtocol, filter, NULL, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r358158 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 08:53:04 2020 New Revision: 358158 URL: https://svnweb.freebsd.org/changeset/base/358158 Log: efihttp_fs_seek() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c == --- head/stand/efi/libefi/efihttp.c Thu Feb 20 08:48:34 2020 (r358157) +++ head/stand/efi/libefi/efihttp.c Thu Feb 20 08:53:04 2020 (r358158) @@ -701,6 +701,8 @@ efihttp_fs_seek(struct open_file *f, off_t offset, int return (0); if (where == SEEK_SET && fh->offset < offset) { buf = malloc(1500); + if (buf == NULL) + return (ENOMEM); res = offset - fh->offset; while (res > 0) { err = _efihttp_fs_read(f, buf, min(1500, res), ); ___ 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: r358157 - head/stand/efi/libefi
Author: tsoome Date: Thu Feb 20 08:48:34 2020 New Revision: 358157 URL: https://svnweb.freebsd.org/changeset/base/358157 Log: efinet_dev_init() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efinet.c Modified: head/stand/efi/libefi/efinet.c == --- head/stand/efi/libefi/efinet.c Thu Feb 20 07:12:43 2020 (r358156) +++ head/stand/efi/libefi/efinet.c Thu Feb 20 08:48:34 2020 (r358157) @@ -371,6 +371,8 @@ efinet_dev_init() status = BS->LocateHandle(ByProtocol, _guid, NULL, , NULL); if (status == EFI_BUFFER_TOO_SMALL) { handles = (EFI_HANDLE *)malloc(sz); + if (handles == NULL) + return (ENOMEM); status = BS->LocateHandle(ByProtocol, _guid, NULL, , handles); if (EFI_ERROR(status)) ___ 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"