svn commit: r368751 - in head/contrib/unbound: services util

2020-12-17 Thread Xin LI
Author: delphij
Date: Fri Dec 18 04:23:20 2020
New Revision: 368751
URL: https://svnweb.freebsd.org/changeset/base/368751

Log:
  MFV r368746:
  
  Apply upstream fix 08968baec1122a58bb90d8f97ad948a75f8a5d69:
  
  Fix error cases when udp-connect is set and send() returns an error
  
  Obtained from:unbound git
  MFC after:3 days

Modified:
  head/contrib/unbound/services/authzone.c
  head/contrib/unbound/services/outside_network.c
  head/contrib/unbound/util/netevent.c
  head/contrib/unbound/util/netevent.h
Directory Properties:
  head/contrib/unbound/   (props changed)

Modified: head/contrib/unbound/services/authzone.c
==
--- head/contrib/unbound/services/authzone.cFri Dec 18 04:01:05 2020
(r368750)
+++ head/contrib/unbound/services/authzone.cFri Dec 18 04:23:20 2020
(r368751)
@@ -6093,7 +6093,7 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct mod
 
/* send udp packet */
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
-   (struct sockaddr*), addrlen)) {
+   (struct sockaddr*), addrlen, 0)) {
char zname[255+1], as[256];
dname_str(xfr->name, zname);
addr_to_str(, addrlen, as, sizeof(as));

Modified: head/contrib/unbound/services/outside_network.c
==
--- head/contrib/unbound/services/outside_network.c Fri Dec 18 04:01:05 
2020(r368750)
+++ head/contrib/unbound/services/outside_network.c Fri Dec 18 04:23:20 
2020(r368751)
@@ -1870,17 +1870,10 @@ randomize_and_send_udp(struct pending* pend, sldns_buf
log_assert(pend->pc && pend->pc->cp);
 
/* send it over the commlink */
-   if(outnet->udp_connect) {
-   if(!comm_point_send_udp_msg(pend->pc->cp, packet, NULL, 0)) {
-   portcomm_loweruse(outnet, pend->pc);
-   return 0;
-   }
-   } else {
-   if(!comm_point_send_udp_msg(pend->pc->cp, packet,
-   (struct sockaddr*)>addr, pend->addrlen)) {
-   portcomm_loweruse(outnet, pend->pc);
-   return 0;
-   }
+   if(!comm_point_send_udp_msg(pend->pc->cp, packet,
+   (struct sockaddr*)>addr, pend->addrlen, 
outnet->udp_connect)) {
+   portcomm_loweruse(outnet, pend->pc);
+   return 0;
}
 
/* system calls to set timeout after sending UDP to make roundtrip

Modified: head/contrib/unbound/util/netevent.c
==
--- head/contrib/unbound/util/netevent.cFri Dec 18 04:01:05 2020
(r368750)
+++ head/contrib/unbound/util/netevent.cFri Dec 18 04:23:20 2020
(r368751)
@@ -333,7 +333,7 @@ int tcp_connect_errno_needs_log(struct sockaddr* addr,
 /* send a UDP reply */
 int
 comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
-   struct sockaddr* addr, socklen_t addrlen) 
+   struct sockaddr* addr, socklen_t addrlen, int is_connected)
 {
ssize_t sent;
log_assert(c->fd != -1);
@@ -341,8 +341,8 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu
if(sldns_buffer_remaining(packet) == 0)
log_err("error: send empty UDP packet");
 #endif
-   if(addr) {
-   log_assert(addr && addrlen > 0);
+   log_assert(addr && addrlen > 0);
+   if(!is_connected) {
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
sldns_buffer_remaining(packet), 0,
addr, addrlen);
@@ -367,9 +367,14 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu
 #endif
int e;
fd_set_block(c->fd);
-   sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), 
-   sldns_buffer_remaining(packet), 0,
-   addr, addrlen);
+   if (!is_connected) {
+   sent = sendto(c->fd, 
(void*)sldns_buffer_begin(packet),
+   sldns_buffer_remaining(packet), 0,
+   addr, addrlen);
+   } else {
+   sent = send(c->fd, 
(void*)sldns_buffer_begin(packet),
+   sldns_buffer_remaining(packet), 0);
+   }
e = errno;
fd_set_nonblock(c->fd);
errno = e;
@@ -378,8 +383,12 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu
if(sent == -1) {
if(!udp_send_errno_needs_log(addr, addrlen))
return 0;
-   verbose(VERB_OPS, "sendto failed: %s", 

svn commit: r368750 - head/tools/tools/locale

2020-12-17 Thread Yuri Pankov
Author: yuripv
Date: Fri Dec 18 04:01:05 2020
New Revision: 368750
URL: https://svnweb.freebsd.org/changeset/base/368750

Log:
  tools/tools/locale: install generated files in current src checkout

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileFri Dec 18 03:46:50 2020
(r368749)
+++ head/tools/tools/locale/MakefileFri Dec 18 04:01:05 2020
(r368750)
@@ -11,7 +11,7 @@
 .error Do make obj first.
 .endif
 
-LOCALESRCDIR?= ${DESTDIR}/usr/src/share
+LOCALESRCDIR?= ${SRCTOP}/share
 TMPDIR?=   /tmp
 
 BASEDIR=   ${.CURDIR}
___
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: r368749 - head/sys/dev/pci

2020-12-17 Thread Konstantin Belousov
Author: kib
Date: Fri Dec 18 03:46:50 2020
New Revision: 368749
URL: https://svnweb.freebsd.org/changeset/base/368749

Log:
  pci_iov: When pci_iov_detach(9) is called, destroy VF children
  
  instead of bailing out with EBUSY if there are any.
  
  If driver module is unloaded, or just device is forcibly detached from
  the driver, there is no way for driver to correctly unload otherwise.
  Esp. if there are resources dedicated to the VFs which prevent turning
  down other resources.
  
  Reviewed by:  jhb
  Sponsored by: Mellanox Technologies / NVidia Networking
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D27615

Modified:
  head/sys/dev/pci/pci_iov.c

Modified: head/sys/dev/pci/pci_iov.c
==
--- head/sys/dev/pci/pci_iov.c  Fri Dec 18 02:41:12 2020(r368748)
+++ head/sys/dev/pci/pci_iov.c  Fri Dec 18 03:46:50 2020(r368749)
@@ -95,6 +95,7 @@ static void   pci_iov_build_pf_schema(nvlist_t *schema,
nvlist_t **driver_schema);
 static voidpci_iov_build_vf_schema(nvlist_t *schema,
nvlist_t **driver_schema);
+static int pci_iov_delete_iov_children(struct pci_devinfo *dinfo);
 static nvlist_t*pci_iov_get_pf_subsystem_schema(void);
 static nvlist_t*pci_iov_get_vf_subsystem_schema(void);
 
@@ -191,6 +192,7 @@ pci_iov_detach_method(device_t bus, device_t dev)
 {
struct pci_devinfo *dinfo;
struct pcicfg_iov *iov;
+   int error;
 
mtx_lock();
dinfo = device_get_ivars(dev);
@@ -201,11 +203,17 @@ pci_iov_detach_method(device_t bus, device_t dev)
return (0);
}
 
-   if (iov->iov_num_vfs != 0 || iov->iov_flags & IOV_BUSY) {
+   if ((iov->iov_flags & IOV_BUSY) != 0) {
mtx_unlock();
return (EBUSY);
}
 
+   error = pci_iov_delete_iov_children(dinfo);
+   if (error != 0) {
+   mtx_unlock();
+   return (error);
+   }
+
dinfo->cfg.iov = NULL;
 
if (iov->iov_cdev) {
@@ -823,31 +831,20 @@ pci_iov_is_child_vf(struct pcicfg_iov *pf, device_t ch
 }
 
 static int
-pci_iov_delete(struct cdev *cdev)
+pci_iov_delete_iov_children(struct pci_devinfo *dinfo)
 {
device_t bus, dev, vf, *devlist;
-   struct pci_devinfo *dinfo;
struct pcicfg_iov *iov;
int i, error, devcount;
uint32_t iov_ctl;
 
-   mtx_lock();
-   dinfo = cdev->si_drv1;
+   mtx_assert(, MA_OWNED);
+
iov = dinfo->cfg.iov;
dev = dinfo->cfg.dev;
bus = device_get_parent(dev);
devlist = NULL;
 
-   if (iov->iov_flags & IOV_BUSY) {
-   mtx_unlock();
-   return (EBUSY);
-   }
-
-   if (iov->iov_num_vfs == 0) {
-   mtx_unlock();
-   return (ECHILD);
-   }
-
iov->iov_flags |= IOV_BUSY;
 
error = device_get_children(bus, , );
@@ -905,6 +902,32 @@ pci_iov_delete(struct cdev *cdev)
 out:
free(devlist, M_TEMP);
iov->iov_flags &= ~IOV_BUSY;
+   return (error);
+}
+
+static int
+pci_iov_delete(struct cdev *cdev)
+{
+   struct pci_devinfo *dinfo;
+   struct pcicfg_iov *iov;
+   int error;
+
+   mtx_lock();
+   dinfo = cdev->si_drv1;
+   iov = dinfo->cfg.iov;
+
+   if ((iov->iov_flags & IOV_BUSY) != 0) {
+   error = EBUSY;
+   goto out;
+   }
+   if (iov->iov_num_vfs == 0) {
+   error = ECHILD;
+   goto out;
+   }
+
+   error = pci_iov_delete_iov_children(dinfo);
+
+out:
mtx_unlock();
return (error);
 }
___
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: r368747 - head/usr.sbin/bhyve

2020-12-17 Thread Peter Grehan
Author: grehan
Date: Fri Dec 18 00:38:48 2020
New Revision: 368747
URL: https://svnweb.freebsd.org/changeset/base/368747

Log:
  Fix issues with various VNC clients.
  
  - support VNC version 3.3 (macos "Screen Sharing" builtin client)
  - wait until client has requested an update prior to sending framebuffer data
  - don't send an update if no framebuffer updates detected
  - increase framebuffer poll frequency to 30Hz, and double that when
kbd/mouse input detected
  - zero uninitialized array elements in rfb_send_server_init_msg()
  - fix overly large allocation in rfb_init()
  - use atomics for flags shared between input and output threads
  - use #defines for constants
  
   This work was contributed by Marko Kiiskila, with reuse of some earlier
  work by Henrik Gulbrandsen.
  
  Clients tested :
  FreeBSD-current
   - tightvnc
   - tigervnc
   - krdc
   - vinagre
  
  Linux (Ubuntu)
   - krdc
   - vinagre
   - tigervnc
   - xtightvncviewer
   - remmina
  
  MacOS
   - VNC Viewer
   - TigerVNC
   - Screen Sharing (builtin client)
  
  Windows 10
   - Tiger VNC
   - VNC Viewer (cursor lag)
   - UltraVNC (cursor lag)
  
  o/s independent
   - noVNC (browser) using websockify relay
  
  PR: 250795
  Submitted by: Marko Kiiskila 
  Reviewed by:  jhb (bhyve)
  MFC after:3 weeks
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D27605

Modified:
  head/usr.sbin/bhyve/rfb.c

Modified: head/usr.sbin/bhyve/rfb.c
==
--- head/usr.sbin/bhyve/rfb.c   Thu Dec 17 23:35:18 2020(r368746)
+++ head/usr.sbin/bhyve/rfb.c   Fri Dec 18 00:38:48 2020(r368747)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -72,6 +73,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
+/* Delays in microseconds */
+#defineCFD_SEL_DELAY   1
+#defineSCREEN_REFRESH_DELAY33300   /* 30Hz */
+#defineSCREEN_POLL_DELAY   (SCREEN_REFRESH_DELAY / 2)
+
 static int rfb_debug = 0;
 #defineDPRINTF(params) if (rfb_debug) PRINTLN params
 #defineWPRINTF(params) PRINTLN params
@@ -80,6 +86,19 @@ static int rfb_debug = 0;
 #define AUTH_LENGTH16
 #define PASSWD_LENGTH  8
 
+/* Protocol versions */
+#define CVERS_3_3  '3'
+#define CVERS_3_7  '7'
+#define CVERS_3_8  '8'
+
+/* Client-to-server msg types */
+#define CS_SET_PIXEL_FORMAT0
+#define CS_SET_ENCODINGS   2
+#define CS_UPDATE_MSG  3
+#define CS_KEY_EVENT   4
+#define CS_POINTER_EVENT   5
+#define CS_CUT_TEXT6
+
 #define SECURITY_TYPE_NONE 1
 #define SECURITY_TYPE_VNC_AUTH 2
 
@@ -96,16 +115,22 @@ struct rfb_softc {
 
char*password;
 
-   boolenc_raw_ok;
-   boolenc_zlib_ok;
-   boolenc_resize_ok;
+   boolenc_raw_ok;
+   boolenc_zlib_ok;
+   boolenc_resize_ok;
 
z_streamzstream;
uint8_t *zbuf;
int zbuflen;
 
int conn_wait;
-   int sending;
+   int wrcount;
+
+   atomic_bool sending;
+   atomic_bool pending;
+   atomic_bool update_all;
+   atomic_bool input_detected;
+
pthread_mutex_t mtx;
pthread_cond_t  cond;
 
@@ -202,7 +227,6 @@ struct rfb_cuttext_msg {
uint32_tlength;
 };
 
-
 static void
 rfb_send_server_init_msg(int cfd)
 {
@@ -223,6 +247,9 @@ rfb_send_server_init_msg(int cfd)
sinfo.pixfmt.red_shift = 16;
sinfo.pixfmt.green_shift = 8;
sinfo.pixfmt.blue_shift = 0;
+   sinfo.pixfmt.pad[0] = 0;
+   sinfo.pixfmt.pad[1] = 0;
+   sinfo.pixfmt.pad[2] = 0;
sinfo.namelen = htonl(strlen("bhyve"));
(void)stream_write(cfd, , sizeof(sinfo));
(void)stream_write(cfd, "bhyve", strlen("bhyve"));
@@ -265,7 +292,6 @@ rfb_recv_set_encodings_msg(struct rfb_softc *rc, int c
int i;
uint32_t encoding;
 
-   assert((sizeof(enc_msg) - 1) == 3);
(void)stream_read(cfd, ((void *)_msg)+1, sizeof(enc_msg)-1);
 
for (i = 0; i < htons(enc_msg.numencs); i++) {
@@ -308,12 +334,23 @@ fast_crc32(void *buf, int len, uint32_t crcval)
return (crcval);
 }
 
+static int
+rfb_send_update_header(struct rfb_softc *rc, int cfd, int numrects)
+{
+   struct rfb_srvr_updt_msg supdt_msg;
 
+   supdt_msg.type = 0;
+   supdt_msg.pad = 0;
+   supdt_msg.numrects = htons(numrects);
+
+   return stream_write(cfd, _msg,
+   sizeof(struct rfb_srvr_updt_msg));
+}
+
 static int
 rfb_send_rect(struct rfb_softc *rc, int cfd, struct bhyvegc_image *gc,
   int x, int y, int w, int h)
 {
-   struct rfb_srvr_updt_msg supdt_msg;
struct rfb_srvr_rect_hdr srect_hdr;
unsigned long zlen;
ssize_t nwrite, total;
@@ -325,16 +362,6 @@ 

svn commit: r368745 - head/sys/dev/ice

2020-12-17 Thread Ryan Libby
Author: rlibby
Date: Thu Dec 17 22:53:45 2020
New Revision: 368745
URL: https://svnweb.freebsd.org/changeset/base/368745

Log:
  ice: quiet -Wredundant-decls
  
  Reapply r364240 after driver update in r365617.
  
  Reviewed by:  lwhsu
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27561

Modified:
  head/sys/dev/ice/ice_common.h

Modified: head/sys/dev/ice/ice_common.h
==
--- head/sys/dev/ice/ice_common.h   Thu Dec 17 21:58:10 2020
(r368744)
+++ head/sys/dev/ice/ice_common.h   Thu Dec 17 22:53:45 2020
(r368745)
@@ -46,15 +46,6 @@ enum ice_fw_modes {
ICE_FW_MODE_ROLLBACK
 };
 
-/* prototype for functions used for SW locks */
-void ice_free_list(struct LIST_HEAD_TYPE *list);
-void ice_init_lock(struct ice_lock *lock);
-void ice_acquire_lock(struct ice_lock *lock);
-void ice_release_lock(struct ice_lock *lock);
-void ice_destroy_lock(struct ice_lock *lock);
-void *ice_alloc_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m, u64 size);
-void ice_free_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m);
-
 void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 
___
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: r368744 - in head: share/man/man9 sys/fs/nfs

2020-12-17 Thread Brooks Davis
Author: brooks
Date: Thu Dec 17 21:58:10 2020
New Revision: 368744
URL: https://svnweb.freebsd.org/changeset/base/368744

Log:
  VFS_QUOTACTL: Remove needless casts of arg
  
  The argument is a void * so there's no need to cast it to caddr_t.
  
  Update documentation to match function decleration.
  
  Reviewed by:  freqlabs
  Obtained from:CheriBSD
  MFC after:1 week
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D27093

Modified:
  head/share/man/man9/VFS_QUOTACTL.9
  head/sys/fs/nfs/nfs_commonsubs.c

Modified: head/share/man/man9/VFS_QUOTACTL.9
==
--- head/share/man/man9/VFS_QUOTACTL.9  Thu Dec 17 21:54:25 2020
(r368743)
+++ head/share/man/man9/VFS_QUOTACTL.9  Thu Dec 17 21:58:10 2020
(r368744)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 23, 2009
+.Dd December 17, 2020
 .Dt VFS_QUOTACTL 9
 .Os
 .Sh NAME
@@ -39,7 +39,7 @@
 .In sys/mount.h
 .In sys/vnode.h
 .Ft int
-.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "caddr_t arg"
+.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "void *arg"
 .Sh DESCRIPTION
 Implement file system quotas.
 See

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==
--- head/sys/fs/nfs/nfs_commonsubs.cThu Dec 17 21:54:25 2020
(r368743)
+++ head/sys/fs/nfs/nfs_commonsubs.cThu Dec 17 21:58:10 2020
(r368744)
@@ -1903,7 +1903,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
-   USRQUOTA), cred->cr_uid, (caddr_t)))
+   USRQUOTA), cred->cr_uid, ))
freenum = min(dqb.dqb_bhardlimit, freenum);
p->p_cred->p_ruid = savuid;
 #endif /* QUOTA */
@@ -1932,7 +1932,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
-   USRQUOTA), cred->cr_uid, (caddr_t)))
+   USRQUOTA), cred->cr_uid, ))
freenum = min(dqb.dqb_bsoftlimit, freenum);
p->p_cred->p_ruid = savuid;
 #endif /* QUOTA */
@@ -1958,7 +1958,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
-   USRQUOTA), cred->cr_uid, (caddr_t)))
+   USRQUOTA), cred->cr_uid, ))
freenum = dqb.dqb_curblocks;
p->p_cred->p_ruid = savuid;
 #endif /* QUOTA */
@@ -2704,7 +2704,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
-   cred->cr_uid, (caddr_t)))
+   cred->cr_uid, ))
freenum = min(dqb.dqb_isoftlimit-dqb.dqb_curinodes,
freenum);
p->p_cred->p_ruid = savuid;
@@ -2811,7 +2811,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
-   cred->cr_uid, (caddr_t)))
+   cred->cr_uid, ))
freenum = min(dqb.dqb_bhardlimit, freenum);
p->p_cred->p_ruid = savuid;
 #endif /* QUOTA */
@@ -2835,7 +2835,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
-   cred->cr_uid, (caddr_t)))
+   cred->cr_uid, ))
freenum = min(dqb.dqb_bsoftlimit, freenum);
p->p_cred->p_ruid = savuid;
 #endif /* QUOTA */
@@ -2856,7 +2856,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
savuid = p->p_cred->p_ruid;
p->p_cred->p_ruid = cred->cr_uid;
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
-   cred->cr_uid, 

svn commit: r368743 - head/tests/sys/net

2020-12-17 Thread Kristof Provost
Author: kp
Date: Thu Dec 17 21:54:25 2020
New Revision: 368743
URL: https://svnweb.freebsd.org/changeset/base/368743

Log:
  net tests: Re-enable most if_clone tests
  
  All but one of these (tap_ipv6_up_stress) currently pass, so we should enable
  them so we don't regress.

Modified:
  head/tests/sys/net/if_clone_test.sh

Modified: head/tests/sys/net/if_clone_test.sh
==
--- head/tests/sys/net/if_clone_test.sh Thu Dec 17 21:02:58 2020
(r368742)
+++ head/tests/sys/net/if_clone_test.sh Thu Dec 17 21:54:25 2020
(r368743)
@@ -47,9 +47,6 @@ epair_stress_head()
 }
 epair_stress_body()
 {
-   if [ "$(atf_config_get ci false)" = "true" ]; then
-   atf_skip "https://bugs.freebsd.org/246443;
-   fi
do_stress "epair"
 }
 epair_stress_cleanup()
@@ -80,7 +77,6 @@ epair_ipv6_up_stress_head()
 }
 epair_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: page fault in in6_unlink_ifa (PR 225438)"
do_up_stress "epair" "6" ""
 }
 epair_ipv6_up_stress_cleanup()
@@ -111,7 +107,6 @@ faith_up_stress_head()
 }
 faith_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "faith" "" ""
 }
 faith_up_stress_cleanup()
@@ -127,7 +122,6 @@ faith_ipv6_up_stress_head()
 }
 faith_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "faith" "6" ""
 }
 faith_ipv6_up_stress_cleanup()
@@ -158,7 +152,6 @@ gif_up_stress_head()
 }
 gif_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "gif" "" "p2p"
 }
 gif_up_stress_cleanup()
@@ -174,7 +167,6 @@ gif_ipv6_up_stress_head()
 }
 gif_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: rt_tables_get_rnh_ptr: fam out of bounds."
do_up_stress "gif" "6" "p2p"
 }
 gif_ipv6_up_stress_cleanup()
@@ -205,7 +197,6 @@ lo_up_stress_head()
 }
 lo_up_stress_body()
 {
-   atf_skip "Quickly panics: GPF in rtsock_routemsg"
do_up_stress "lo" "" ""
 }
 lo_up_stress_cleanup()
@@ -221,7 +212,6 @@ lo_ipv6_up_stress_head()
 }
 lo_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: page fault in rtsock_addrmsg"
do_up_stress "lo" "6" ""
 }
 lo_ipv6_up_stress_cleanup()
@@ -252,7 +242,6 @@ tap_up_stress_head()
 }
 tap_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "tap" "" ""
 }
 tap_up_stress_cleanup()
@@ -299,7 +288,6 @@ tun_up_stress_head()
 }
 tun_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "tun" "" "p2p"
 }
 tun_up_stress_cleanup()
@@ -315,7 +303,6 @@ tun_ipv6_up_stress_head()
 }
 tun_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "tun" "6" "p2p"
 }
 tun_ipv6_up_stress_cleanup()
@@ -346,7 +333,6 @@ vlan_up_stress_head()
 }
 vlan_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "vlan" "" ""
 }
 vlan_up_stress_cleanup()
@@ -362,7 +348,6 @@ vlan_ipv6_up_stress_head()
 }
 vlan_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "vlan" "6" ""
 }
 vlan_ipv6_up_stress_cleanup()
@@ -408,7 +393,6 @@ vmnet_ipv6_up_stress_head()
 }
 vmnet_ipv6_up_stress_body()
 {
-   atf_skip "Quickly panics: if_freemulti: protospec not NULL"
do_up_stress "vmnet" "6" ""
 }
 vmnet_ipv6_up_stress_cleanup()
___
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: r368721 - head/stand/efi/loader

2020-12-17 Thread Warner Losh
On Thu, Dec 17, 2020 at 1:00 PM Andrew Gallatin 
wrote:

> On 12/17/20 2:49 PM, Kyle Evans wrote:
> > On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin 
> wrote:
> >>
> >> On 12/17/20 12:02 PM, Warner Losh wrote:
> >>> Author: imp
> >>> Date: Thu Dec 17 17:02:09 2020
> >>> New Revision: 368721
> >>> URL:
> https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$
> >>>
> >>> Log:
> >>> Drop EFI_STAGING_SIZE back down to 64M
> >>>
> >>> vmware can't cope with anything larger than 64MB. Drop this back to
> >>> 64MB everywhere but arm.
> >>
> >> There were all kinds of booting problems before this was bumped up.
> >> In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed
> >> it be be able to boot when using Nvidia graphics.  By reducing this, I
> >> feel like we're just playing whack-a-mole.
> >>
> >
> > IIRC those have long since become OBE as we'll now grow the staging
> > area to accommodate nvidia.
> >
>
> Ah, OK. cool!
>
> Thanks & sorry for the noise.
>

We added the 100 as a hack and then fixed the underlying problem. If 64
doesn't work for you, please let me know and I'll work with you to make it
right.

Warner
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368742 - head/share/man/man9

2020-12-17 Thread Alexander Motin
Author: mav
Date: Thu Dec 17 21:02:58 2020
New Revision: 368742
URL: https://svnweb.freebsd.org/changeset/base/368742

Log:
  Fix f_pkt_into_t typo.
  
  MFC after:1 week

Modified:
  head/share/man/man9/iflibtxrx.9

Modified: head/share/man/man9/iflibtxrx.9
==
--- head/share/man/man9/iflibtxrx.9 Thu Dec 17 20:45:10 2020
(r368741)
+++ head/share/man/man9/iflibtxrx.9 Thu Dec 17 21:02:58 2020
(r368742)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd April 16, 2019
+.Dd December 17, 2020
 .Dt IFLIBTXTX 9
 .Os
 .Sh NAME
@@ -11,7 +11,7 @@
 .Ft int
 .Fo isc_txd_encap
 .Fa "void *sc"
-.Fa "if_pkt_into_t pi"
+.Fa "if_pkt_info_t pi"
 .Fc
 .Ft void
 .Fo isc_txd_flush
___
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: r368741 - in head/sys/dev/usb: . controller

2020-12-17 Thread John Baldwin
Author: jhb
Date: Thu Dec 17 20:45:10 2020
New Revision: 368741
URL: https://svnweb.freebsd.org/changeset/base/368741

Log:
  Use __containerof() instead of home-rolled versions.
  
  Reviewed by:  imp, hselasky
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D27582

Modified:
  head/sys/dev/usb/controller/ehci.c
  head/sys/dev/usb/controller/ohci.c
  head/sys/dev/usb/controller/uhci.c
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/usb_transfer.h

Modified: head/sys/dev/usb/controller/ehci.c
==
--- head/sys/dev/usb/controller/ehci.c  Thu Dec 17 20:31:45 2020
(r368740)
+++ head/sys/dev/usb/controller/ehci.c  Thu Dec 17 20:45:10 2020
(r368741)
@@ -90,8 +90,7 @@
 #include 
 
 #defineEHCI_BUS2SC(bus) \
-   ((ehci_softc_t *)(((uint8_t *)(bus)) - \
-((uint8_t *)&(((ehci_softc_t *)0)->sc_bus
+   __containerof(bus, ehci_softc_t, sc_bus)
 
 #ifdef USB_DEBUG
 static int ehcidebug = 0;

Modified: head/sys/dev/usb/controller/ohci.c
==
--- head/sys/dev/usb/controller/ohci.c  Thu Dec 17 20:31:45 2020
(r368740)
+++ head/sys/dev/usb/controller/ohci.c  Thu Dec 17 20:45:10 2020
(r368741)
@@ -79,8 +79,7 @@
 #include 
 
 #defineOHCI_BUS2SC(bus) \
-   ((ohci_softc_t *)(((uint8_t *)(bus)) - \
-((uint8_t *)&(((ohci_softc_t *)0)->sc_bus
+   __containerof(bus, ohci_softc_t, sc_bus)
 
 #ifdef USB_DEBUG
 static int ohcidebug = 0;

Modified: head/sys/dev/usb/controller/uhci.c
==
--- head/sys/dev/usb/controller/uhci.c  Thu Dec 17 20:31:45 2020
(r368740)
+++ head/sys/dev/usb/controller/uhci.c  Thu Dec 17 20:45:10 2020
(r368741)
@@ -83,8 +83,7 @@
 
 #definealt_next next
 #defineUHCI_BUS2SC(bus) \
-   ((uhci_softc_t *)(((uint8_t *)(bus)) - \
-((uint8_t *)&(((uhci_softc_t *)0)->sc_bus
+   __containerof(bus, uhci_softc_t, sc_bus)
 
 #ifdef USB_DEBUG
 static int uhcidebug = 0;

Modified: head/sys/dev/usb/controller/xhci.c
==
--- head/sys/dev/usb/controller/xhci.c  Thu Dec 17 20:31:45 2020
(r368740)
+++ head/sys/dev/usb/controller/xhci.c  Thu Dec 17 20:45:10 2020
(r368741)
@@ -86,8 +86,7 @@
 #include 
 
 #defineXHCI_BUS2SC(bus) \
-   ((struct xhci_softc *)(((uint8_t *)(bus)) - \
-((uint8_t *)&(((struct xhci_softc *)0)->sc_bus
+   __containerof(bus, struct xhci_softc, sc_bus)
 
 static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
 "USB XHCI");

Modified: head/sys/dev/usb/usb_transfer.h
==
--- head/sys/dev/usb/usb_transfer.h Thu Dec 17 20:31:45 2020
(r368740)
+++ head/sys/dev/usb/usb_transfer.h Thu Dec 17 20:45:10 2020
(r368741)
@@ -153,9 +153,7 @@ struct usb_done_msg {
 };
 
 #defineUSB_DMATAG_TO_XROOT(dpt)\
-  ((struct usb_xfer_root *)(   \
-   ((uint8_t *)(dpt)) -\
-   ((uint8_t *)&((struct usb_xfer_root *)0)->dma_parent_tag)))
+   __containerof(dpt, struct usb_xfer_root, dma_parent_tag)
 
 /*
  * The following structure is used to keep information about memory
___
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: r368738 - head/sys/compat/linuxkpi/common/include/linux

2020-12-17 Thread Jessica Clarke
On 17 Dec 2020, at 20:28, John Baldwin  wrote:
> 
> Author: jhb
> Date: Thu Dec 17 20:28:53 2020
> New Revision: 368738
> URL: https://svnweb.freebsd.org/changeset/base/368738
> 
> Log:
>  Cleanups to *ERR* compat shims.
> 
>  - Use [u]intptr_t casts to convert pointers to integers.
> 
>  - Change IS_ERR* to return bool instead of long.
> 
>  Reviewed by: manu
>  Obtained from:   CheriBSD
>  Sponsored by:DARPA
>  Differential Revision:   https://reviews.freebsd.org/D27577
> 
> Modified:
>  head/sys/compat/linuxkpi/common/include/linux/err.h
> 
> Modified: head/sys/compat/linuxkpi/common/include/linux/err.h
> ==
> --- head/sys/compat/linuxkpi/common/include/linux/err.h   Thu Dec 17 
> 20:11:31 2020(r368737)
> +++ head/sys/compat/linuxkpi/common/include/linux/err.h   Thu Dec 17 
> 20:28:53 2020(r368738)
> @@ -37,30 +37,30 @@
> 
> #define MAX_ERRNO 4095
> 
> -#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
> +#define IS_ERR_VALUE(x) unlikely((x) >= (uintptr_t)-MAX_ERRNO)
> 
> static inline void *
> ERR_PTR(long error)
> {
> - return (void *)error;
> + return (void *)(intptr_t)error;
> }
> 
> static inline long
> PTR_ERR(const void *ptr)
> {
> - return (long)ptr;
> + return (intptr_t)ptr;

This should probably be (long)(intptr_t) after no longer changing the
return type to intptr_t?

Jess

___
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: r368740 - head/tools/tools/git/hooks

2020-12-17 Thread Ed Maste
Author: emaste
Date: Thu Dec 17 20:31:45 2020
New Revision: 368740
URL: https://svnweb.freebsd.org/changeset/base/368740

Log:
  Describe the commit message template our git hook script produces
  
  Reported by:  rpokala

Modified:
  head/tools/tools/git/hooks/prepare-commit-msg

Modified: head/tools/tools/git/hooks/prepare-commit-msg
==
--- head/tools/tools/git/hooks/prepare-commit-msg   Thu Dec 17 20:31:17 
2020(r368739)
+++ head/tools/tools/git/hooks/prepare-commit-msg   Thu Dec 17 20:31:45 
2020(r368740)
@@ -16,8 +16,17 @@ merge)
 esac
 
 outfile=$(mktemp /tmp/freebsd-git-commit.)
-cat >$outfile <$outfile 

svn commit: r368739 - in head/sys: conf kern tools

2020-12-17 Thread John Baldwin
Author: jhb
Date: Thu Dec 17 20:31:17 2020
New Revision: 368739
URL: https://svnweb.freebsd.org/changeset/base/368739

Log:
  Use a template assembly file for firmware object files.
  
  Similar to r366897, this uses the .incbin directive to pull in a
  firmware file's contents into a .fwo file.  The same scheme for
  computing symbol names from the filename is used as before to maximize
  compatiblity and not require rebuilding existing .fwo files for
  NO_CLEAN builds.  Using ld -o binary requires extra hacks in linkers
  to either specify ABI options (e.g. soft- vs hard-float) or to ignore
  ABI incompatiblities when linking certain objects (e.g.  object files
  with only data).  Using the compiler driver avoids the need for these
  hacks as the compiler driver is able to set all the appropriate ABI
  options.
  
  Reviewed by:  imp, markj
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D27579

Added:
  head/sys/kern/firmw.S   (contents, props changed)
Modified:
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk
  head/sys/tools/fw_stub.awk

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Thu Dec 17 20:28:53 2020(r368738)
+++ head/sys/conf/kern.pre.mk   Thu Dec 17 20:31:17 2020(r368739)
@@ -184,8 +184,9 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC}
  ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
 
 NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC}
-NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \
-   -m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw}
+NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \
+   $S/kern/firmw.S -DFIRMW_FILE="${.ALLSRC:M*.fw}" \
+   -DFIRMW_SYMBOL="${.ALLSRC:M*.fw:C/[-.\/]/_/g}"
 
 # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS)
 ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} 
-I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} -Wno-inline 
-Wno-missing-prototypes ${PROF} -U__BMI__ ${.IMPSRC}

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Thu Dec 17 20:28:53 2020(r368738)
+++ head/sys/conf/kmod.mk   Thu Dec 17 20:31:17 2020(r368739)
@@ -187,19 +187,13 @@ SRCS+=${KMOD:S/$/.c/}
 CLEANFILES+=   ${KMOD:S/$/.c/}
 
 .for _firmw in ${FIRMWS}
-${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//}
+${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} ${SYSDIR}/kern/firmw.S
@${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}}
-   @if [ -e ${_firmw:C/\:.*$//} ]; then\
-   ${LD} -b binary --no-warn-mismatch ${_LDFLAGS}  \
-   -m ${LD_EMULATION} -r -d\
-   -o ${.TARGET} ${_firmw:C/\:.*$//};  \
-   else\
-   ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \
-   ${LD} -b binary --no-warn-mismatch ${_LDFLAGS}  \
-   -m ${LD_EMULATION} -r -d\
-   -o ${.TARGET} ${_firmw:C/\:.*$//};  \
-   rm ${_firmw:C/\:.*$//}; \
-   fi
+   ${CC:N${CCACHE_BIN}} -c -x assembler-with-cpp -DLOCORE  \
+   ${CFLAGS} ${WERROR} \
+   -DFIRMW_FILE="${.ALLSRC:M*${_firmw:C/\:.*$//}}" \
+   -DFIRMW_SYMBOL="${_firmw:C/\:.*$//:C/[-.\/]/_/g}"   \
+   ${SYSDIR}/kern/firmw.S -o ${.TARGET}
 
 OBJS+= ${_firmw:C/\:.*$/.fwo/:T}
 .endfor

Added: head/sys/kern/firmw.S
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/kern/firmw.S   Thu Dec 17 20:31:17 2020(r368739)
@@ -0,0 +1,49 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2020 John Baldwin 
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory (Department of Computer Science and
+ * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the
+ * DARPA SSITH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 

svn commit: r368738 - head/sys/compat/linuxkpi/common/include/linux

2020-12-17 Thread John Baldwin
Author: jhb
Date: Thu Dec 17 20:28:53 2020
New Revision: 368738
URL: https://svnweb.freebsd.org/changeset/base/368738

Log:
  Cleanups to *ERR* compat shims.
  
  - Use [u]intptr_t casts to convert pointers to integers.
  
  - Change IS_ERR* to return bool instead of long.
  
  Reviewed by:  manu
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D27577

Modified:
  head/sys/compat/linuxkpi/common/include/linux/err.h

Modified: head/sys/compat/linuxkpi/common/include/linux/err.h
==
--- head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec 17 20:11:31 
2020(r368737)
+++ head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec 17 20:28:53 
2020(r368738)
@@ -37,30 +37,30 @@
 
 #define MAX_ERRNO  4095
 
-#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
+#define IS_ERR_VALUE(x) unlikely((x) >= (uintptr_t)-MAX_ERRNO)
 
 static inline void *
 ERR_PTR(long error)
 {
-   return (void *)error;
+   return (void *)(intptr_t)error;
 }
 
 static inline long
 PTR_ERR(const void *ptr)
 {
-   return (long)ptr;
+   return (intptr_t)ptr;
 }
 
-static inline long
+static inline bool
 IS_ERR(const void *ptr)
 {
-   return IS_ERR_VALUE((unsigned long)ptr);
+   return IS_ERR_VALUE((uintptr_t)ptr);
 }
 
-static inline long
+static inline bool
 IS_ERR_OR_NULL(const void *ptr)
 {
-   return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+   return !ptr || IS_ERR_VALUE((uintptr_t)ptr);
 }
 
 static inline 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: r368737 - head/tools/tools/git/hooks

2020-12-17 Thread Ed Maste
Author: emaste
Date: Thu Dec 17 20:11:31 2020
New Revision: 368737
URL: https://svnweb.freebsd.org/changeset/base/368737

Log:
  chmod +x the git commit message prep hook

Modified:
Directory Properties:
  head/tools/tools/git/hooks/prepare-commit-msg   (props 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"


Re: svn commit: r368721 - head/stand/efi/loader

2020-12-17 Thread Andrew Gallatin

On 12/17/20 2:49 PM, Kyle Evans wrote:

On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin  wrote:


On 12/17/20 12:02 PM, Warner Losh wrote:

Author: imp
Date: Thu Dec 17 17:02:09 2020
New Revision: 368721
URL: 
https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$

Log:
Drop EFI_STAGING_SIZE back down to 64M

vmware can't cope with anything larger than 64MB. Drop this back to
64MB everywhere but arm.


There were all kinds of booting problems before this was bumped up.
In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed
it be be able to boot when using Nvidia graphics.  By reducing this, I
feel like we're just playing whack-a-mole.



IIRC those have long since become OBE as we'll now grow the staging
area to accommodate nvidia.



Ah, OK. cool!

Thanks & sorry for the noise.

Drew
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368736 - head/tools/tools/git/hooks

2020-12-17 Thread Ed Maste
Author: emaste
Date: Thu Dec 17 19:58:29 2020
New Revision: 368736
URL: https://svnweb.freebsd.org/changeset/base/368736

Log:
  Add initial version of git commit message preparation hook
  
  Start with a slightly modified version of the SVN commit template, to
  allow developers to experiment.  This will be updated in the future as
  our process and techniques evolve.
  
  This can be installed by copying or symlinking into the .git/hooks/
  directory.
  
  Feedback from:cem, jhb
  Reviewed by:  imp
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D27633

Added:
  head/tools/tools/git/hooks/
  head/tools/tools/git/hooks/prepare-commit-msg   (contents, props changed)

Added: head/tools/tools/git/hooks/prepare-commit-msg
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/git/hooks/prepare-commit-msg   Thu Dec 17 19:58:29 
2020(r368736)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+case "$2" in
+commit|message)
+   # It appears git invokes this script for interactive rebase but does
+   # not remove commented lines, so just exit if we're not called with the
+   # default (comment-containing) template.
+   egrep -q '^#' "$1" || return 0
+   ;;
+template)
+   return 0
+   ;;
+merge)
+   return 0
+   ;;
+esac
+
+outfile=$(mktemp /tmp/freebsd-git-commit.)
+cat >$outfile 

svn commit: r368735 - head/sys/kern

2020-12-17 Thread Konstantin Belousov
Author: kib
Date: Thu Dec 17 19:51:39 2020
New Revision: 368735
URL: https://svnweb.freebsd.org/changeset/base/368735

Log:
  Fix a race in tty_signal_sessleader() with unlocked read of s_leader.
  
  Since we do not own the session lock, a parallel killjobc() might
  reset s_leader to NULL after we checked it.  Read s_leader only once
  and ensure that compiler is not allowed to reload.
  
  While there, make access to t_session somewhat more pretty by using
  local variable.
  
  PR:   251915
  Submitted by: Jakub Piecuch 
  MFC after:1 week

Modified:
  head/sys/kern/tty.c

Modified: head/sys/kern/tty.c
==
--- head/sys/kern/tty.c Thu Dec 17 19:50:41 2020(r368734)
+++ head/sys/kern/tty.c Thu Dec 17 19:51:39 2020(r368735)
@@ -1474,6 +1474,7 @@ void
 tty_signal_sessleader(struct tty *tp, int sig)
 {
struct proc *p;
+   struct session *s;
 
tty_assert_locked(tp);
MPASS(sig >= 1 && sig < NSIG);
@@ -1482,8 +1483,14 @@ tty_signal_sessleader(struct tty *tp, int sig)
tp->t_flags &= ~TF_STOPPED;
tp->t_termios.c_lflag &= ~FLUSHO;
 
-   if (tp->t_session != NULL && tp->t_session->s_leader != NULL) {
-   p = tp->t_session->s_leader;
+   /*
+* Load s_leader exactly once to avoid race where s_leader is
+* set to NULL by a concurrent invocation of killjobc() by the
+* session leader.  Note that we are not holding t_session's
+* lock for the read.
+*/
+   if ((s = tp->t_session) != NULL &&
+   (p = atomic_load_ptr(>s_leader)) != NULL) {
PROC_LOCK(p);
kern_psignal(p, sig);
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"


svn commit: r368734 - head/usr.sbin/unbound

2020-12-17 Thread Cy Schubert
Author: cy
Date: Thu Dec 17 19:50:41 2020
New Revision: 368734
URL: https://svnweb.freebsd.org/changeset/base/368734

Log:
  Update the unbound version number from r368478.
  
  Updating the version number is an extra manual step.
  
  Pointy hat to:cy
  Reported by:  Herbert J. Skuhra 
  MFC after:3 days

Modified:
  head/usr.sbin/unbound/config.h

Modified: head/usr.sbin/unbound/config.h
==
--- head/usr.sbin/unbound/config.h  Thu Dec 17 19:49:17 2020
(r368733)
+++ head/usr.sbin/unbound/config.h  Thu Dec 17 19:50:41 2020
(r368734)
@@ -731,7 +731,7 @@
 #define PACKAGE_NAME "unbound"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "unbound 1.12.0"
+#define PACKAGE_STRING "unbound 1.13.0"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "unbound"
@@ -740,7 +740,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.12.0"
+#define PACKAGE_VERSION "1.13.0"
 
 /* default pidfile location */
 #define PIDFILE "/var/unbound/unbound.pid"
@@ -762,7 +762,7 @@
 #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
 
 /* version number for resource files */
-#define RSRC_PACKAGE_VERSION 1,12,0,0
+#define RSRC_PACKAGE_VERSION 1,13,0,0
 
 /* Directory to chdir to */
 #define RUN_DIR "/var/unbound"
___
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: r368721 - head/stand/efi/loader

2020-12-17 Thread Kyle Evans
On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin  wrote:
>
> On 12/17/20 12:02 PM, Warner Losh wrote:
> > Author: imp
> > Date: Thu Dec 17 17:02:09 2020
> > New Revision: 368721
> > URL: 
> > https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$
> >
> > Log:
> >Drop EFI_STAGING_SIZE back down to 64M
> >
> >vmware can't cope with anything larger than 64MB. Drop this back to
> >64MB everywhere but arm.
>
> There were all kinds of booting problems before this was bumped up.
> In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed
> it be be able to boot when using Nvidia graphics.  By reducing this, I
> feel like we're just playing whack-a-mole.
>

IIRC those have long since become OBE as we'll now grow the staging
area to accommodate nvidia.
___
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: r368721 - head/stand/efi/loader

2020-12-17 Thread Andrew Gallatin

On 12/17/20 12:02 PM, Warner Losh wrote:

Author: imp
Date: Thu Dec 17 17:02:09 2020
New Revision: 368721
URL: 
https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$

Log:
   Drop EFI_STAGING_SIZE back down to 64M
   
   vmware can't cope with anything larger than 64MB. Drop this back to

   64MB everywhere but arm.


There were all kinds of booting problems before this was bumped up.
In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed
it be be able to boot when using Nvidia graphics.  By reducing this, I
feel like we're just playing whack-a-mole.

Drew
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368732 - head/sys/kern

2020-12-17 Thread Mateusz Guzik
Author: mjg
Date: Thu Dec 17 18:52:30 2020
New Revision: 368732
URL: https://svnweb.freebsd.org/changeset/base/368732

Log:
  fd: reimplement close_range to avoid spurious relocking

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cThu Dec 17 18:52:04 2020
(r368731)
+++ head/sys/kern/kern_descrip.cThu Dec 17 18:52:30 2020
(r368732)
@@ -307,6 +307,7 @@ fdfree(struct filedesc *fdp, int fd)
 {
struct filedescent *fde;
 
+   FILEDESC_XLOCK_ASSERT(fdp);
fde = >fd_ofiles[fd];
 #ifdef CAPABILITIES
seqc_write_begin(>fde_seqc);
@@ -1367,12 +1368,10 @@ int
 kern_close_range(struct thread *td, u_int lowfd, u_int highfd)
 {
struct filedesc *fdp;
-   int fd, ret, lastfile;
+   const struct fdescenttbl *fdt;
+   struct file *fp;
+   int fd;
 
-   ret = 0;
-   fdp = td->td_proc->p_fd;
-   FILEDESC_SLOCK(fdp);
-
/*
 * Check this prior to clamping; closefrom(3) with only fd 0, 1, and 2
 * open should not be a usage error.  From a close_range() perspective,
@@ -1380,30 +1379,36 @@ kern_close_range(struct thread *td, u_int lowfd, u_int
 * be a usage error as all fd above 3 are in-fact already closed.
 */
if (highfd < lowfd) {
-   ret = EINVAL;
-   goto out;
+   return (EINVAL);
}
 
-   /*
-* If lastfile == -1, we're dealing with either a fresh file
-* table or one in which every fd has been closed.  Just return
-* successful; there's nothing left to do.
-*/
-   lastfile = fdlastfile(fdp);
-   if (lastfile == -1)
-   goto out;
-   /* Clamped to [lowfd, lastfile] */
-   highfd = MIN(highfd, lastfile);
-   for (fd = lowfd; fd <= highfd; fd++) {
-   if (fdp->fd_ofiles[fd].fde_file != NULL) {
-   FILEDESC_SUNLOCK(fdp);
-   (void)kern_close(td, fd);
-   FILEDESC_SLOCK(fdp);
+   fdp = td->td_proc->p_fd;
+   FILEDESC_XLOCK(fdp);
+   fdt = atomic_load_ptr(>fd_files);
+   highfd = MIN(highfd, fdt->fdt_nfiles - 1);
+   fd = lowfd;
+   if (__predict_false(fd > highfd)) {
+   goto out_locked;
+   }
+   for (;;) {
+   fp = fdt->fdt_ofiles[fd].fde_file;
+   if (fp == NULL) {
+   if (fd == highfd)
+   goto out_locked;
+   } else {
+   fdfree(fdp, fd);
+   (void) closefp(fdp, fd, fp, td, true, true);
+   if (fd == highfd)
+   goto out_unlocked;
+   FILEDESC_XLOCK(fdp);
+   fdt = atomic_load_ptr(>fd_files);
}
+   fd++;
}
-out:
-   FILEDESC_SUNLOCK(fdp);
-   return (ret);
+out_locked:
+   FILEDESC_XUNLOCK(fdp);
+out_unlocked:
+   return (0);
 }
 
 #ifndef _SYS_SYSPROTO_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: r368731 - in head/sys: kern security/audit

2020-12-17 Thread Mateusz Guzik
Author: mjg
Date: Thu Dec 17 18:52:04 2020
New Revision: 368731
URL: https://svnweb.freebsd.org/changeset/base/368731

Log:
  audit: rework AUDIT_SYSCLOSE
  
  This in particular avoids spurious lookups on close.

Modified:
  head/sys/kern/kern_descrip.c
  head/sys/security/audit/audit.h
  head/sys/security/audit/audit_arg.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cThu Dec 17 18:51:09 2020
(r368730)
+++ head/sys/kern/kern_descrip.cThu Dec 17 18:52:04 2020
(r368731)
@@ -107,7 +107,7 @@ __read_mostly uma_zone_t pwd_zone;
 VFS_SMR_DECLARE;
 
 static int closefp(struct filedesc *fdp, int fd, struct file *fp,
-   struct thread *td, bool holdleaders);
+   struct thread *td, bool holdleaders, bool audit);
 static int fd_first_free(struct filedesc *fdp, int low, int size);
 static voidfdgrowtable(struct filedesc *fdp, int nfd);
 static voidfdgrowtable_exp(struct filedesc *fdp, int nfd);
@@ -998,7 +998,7 @@ kern_dup(struct thread *td, u_int mode, int flags, int
error = 0;
 
if (delfp != NULL) {
-   (void) closefp(fdp, new, delfp, td, true);
+   (void) closefp(fdp, new, delfp, td, true, false);
FILEDESC_UNLOCK_ASSERT(fdp);
} else {
 unlock:
@@ -1240,7 +1240,8 @@ fgetown(struct sigio **sigiop)
 }
 
 static int
-closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td)
+closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
+bool audit)
 {
int error;
 
@@ -1262,6 +1263,10 @@ closefp_impl(struct filedesc *fdp, int fd, struct file
mq_fdclose(td, fd, fp);
FILEDESC_XUNLOCK(fdp);
 
+#ifdef AUDIT
+   if (AUDITING_TD(td) && audit)
+   audit_sysclose(td, fd, fp);
+#endif
error = closef(fp, td);
 
/*
@@ -1277,7 +1282,7 @@ closefp_impl(struct filedesc *fdp, int fd, struct file
 
 static int
 closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
-bool holdleaders)
+bool holdleaders, bool audit)
 {
int error;
 
@@ -1295,7 +1300,7 @@ closefp_hl(struct filedesc *fdp, int fd, struct file *
}
}
 
-   error = closefp_impl(fdp, fd, fp, td);
+   error = closefp_impl(fdp, fd, fp, td, audit);
if (holdleaders) {
FILEDESC_XLOCK(fdp);
fdp->fd_holdleaderscount--;
@@ -1311,15 +1316,15 @@ closefp_hl(struct filedesc *fdp, int fd, struct file *
 
 static int
 closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
-bool holdleaders)
+bool holdleaders, bool audit)
 {
 
FILEDESC_XLOCK_ASSERT(fdp);
 
if (__predict_false(td->td_proc->p_fdtol != NULL)) {
-   return (closefp_hl(fdp, fd, fp, td, holdleaders));
+   return (closefp_hl(fdp, fd, fp, td, holdleaders, audit));
} else {
-   return (closefp_impl(fdp, fd, fp, td));
+   return (closefp_impl(fdp, fd, fp, td, audit));
}
 }
 
@@ -1347,8 +1352,6 @@ kern_close(struct thread *td, int fd)
 
fdp = td->td_proc->p_fd;
 
-   AUDIT_SYSCLOSE(td, fd);
-
FILEDESC_XLOCK(fdp);
if ((fp = fget_locked(fdp, fd)) == NULL) {
FILEDESC_XUNLOCK(fdp);
@@ -1357,7 +1360,7 @@ kern_close(struct thread *td, int fd)
fdfree(fdp, fd);
 
/* closefp() drops the FILEDESC lock for us. */
-   return (closefp(fdp, fd, fp, td, true));
+   return (closefp(fdp, fd, fp, td, true, true));
 }
 
 int
@@ -2671,7 +2674,7 @@ fdcloseexec(struct thread *td)
(fde->fde_flags & UF_EXCLOSE))) {
FILEDESC_XLOCK(fdp);
fdfree(fdp, i);
-   (void) closefp(fdp, i, fp, td, false);
+   (void) closefp(fdp, i, fp, td, false, false);
FILEDESC_UNLOCK_ASSERT(fdp);
}
}

Modified: head/sys/security/audit/audit.h
==
--- head/sys/security/audit/audit.h Thu Dec 17 18:51:09 2020
(r368730)
+++ head/sys/security/audit/audit.h Thu Dec 17 18:52:04 2020
(r368731)
@@ -140,7 +140,7 @@ void audit_arg_argv(char *argv, int argc, int 
length)
 voidaudit_arg_envv(char *envv, int envc, int length);
 voidaudit_arg_rights(cap_rights_t *rightsp);
 voidaudit_arg_fcntl_rights(uint32_t fcntlrights);
-voidaudit_sysclose(struct thread *td, int fd);
+voidaudit_sysclose(struct thread *td, int fd, struct file *fp);
 voidaudit_cred_copy(struct ucred *src, struct ucred *dest);
 voidaudit_cred_destroy(struct ucred *cred);
 voidaudit_cred_init(struct ucred *cred);

Modified: head/sys/security/audit/audit_arg.c

svn commit: r368730 - head/sys/kern

2020-12-17 Thread Mateusz Guzik
Author: mjg
Date: Thu Dec 17 18:51:09 2020
New Revision: 368730
URL: https://svnweb.freebsd.org/changeset/base/368730

Log:
  fd: refactor closefp in preparation for close_range rework

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cThu Dec 17 18:29:30 2020
(r368729)
+++ head/sys/kern/kern_descrip.cThu Dec 17 18:51:09 2020
(r368730)
@@ -107,7 +107,7 @@ __read_mostly uma_zone_t pwd_zone;
 VFS_SMR_DECLARE;
 
 static int closefp(struct filedesc *fdp, int fd, struct file *fp,
-   struct thread *td, int holdleaders);
+   struct thread *td, bool holdleaders);
 static int fd_first_free(struct filedesc *fdp, int low, int size);
 static voidfdgrowtable(struct filedesc *fdp, int nfd);
 static voidfdgrowtable_exp(struct filedesc *fdp, int nfd);
@@ -998,7 +998,7 @@ kern_dup(struct thread *td, u_int mode, int flags, int
error = 0;
 
if (delfp != NULL) {
-   (void) closefp(fdp, new, delfp, td, 1);
+   (void) closefp(fdp, new, delfp, td, true);
FILEDESC_UNLOCK_ASSERT(fdp);
} else {
 unlock:
@@ -1239,29 +1239,13 @@ fgetown(struct sigio **sigiop)
return (pgid);
 }
 
-/*
- * Function drops the filedesc lock on return.
- */
 static int
-closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
-int holdleaders)
+closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td)
 {
int error;
 
FILEDESC_XLOCK_ASSERT(fdp);
 
-   if (holdleaders) {
-   if (td->td_proc->p_fdtol != NULL) {
-   /*
-* Ask fdfree() to sleep to ensure that all relevant
-* process leaders can be traversed in closef().
-*/
-   fdp->fd_holdleaderscount++;
-   } else {
-   holdleaders = 0;
-   }
-   }
-
/*
 * We now hold the fp reference that used to be owned by the
 * descriptor array.  We have to unlock the FILEDESC *AFTER*
@@ -1288,7 +1272,31 @@ closefp(struct filedesc *fdp, int fd, struct file *fp,
if (error == ERESTART)
error = EINTR;
 
+   return (error);
+}
+
+static int
+closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
+bool holdleaders)
+{
+   int error;
+
+   FILEDESC_XLOCK_ASSERT(fdp);
+
if (holdleaders) {
+   if (td->td_proc->p_fdtol != NULL) {
+   /*
+* Ask fdfree() to sleep to ensure that all relevant
+* process leaders can be traversed in closef().
+*/
+   fdp->fd_holdleaderscount++;
+   } else {
+   holdleaders = false;
+   }
+   }
+
+   error = closefp_impl(fdp, fd, fp, td);
+   if (holdleaders) {
FILEDESC_XLOCK(fdp);
fdp->fd_holdleaderscount--;
if (fdp->fd_holdleaderscount == 0 &&
@@ -1301,6 +1309,20 @@ closefp(struct filedesc *fdp, int fd, struct file *fp,
return (error);
 }
 
+static int
+closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td,
+bool holdleaders)
+{
+
+   FILEDESC_XLOCK_ASSERT(fdp);
+
+   if (__predict_false(td->td_proc->p_fdtol != NULL)) {
+   return (closefp_hl(fdp, fd, fp, td, holdleaders));
+   } else {
+   return (closefp_impl(fdp, fd, fp, td));
+   }
+}
+
 /*
  * Close a file descriptor.
  */
@@ -1335,7 +1357,7 @@ kern_close(struct thread *td, int fd)
fdfree(fdp, fd);
 
/* closefp() drops the FILEDESC lock for us. */
-   return (closefp(fdp, fd, fp, td, 1));
+   return (closefp(fdp, fd, fp, td, true));
 }
 
 int
@@ -2649,7 +2671,7 @@ fdcloseexec(struct thread *td)
(fde->fde_flags & UF_EXCLOSE))) {
FILEDESC_XLOCK(fdp);
fdfree(fdp, i);
-   (void) closefp(fdp, i, fp, td, 0);
+   (void) closefp(fdp, i, fp, td, false);
FILEDESC_UNLOCK_ASSERT(fdp);
}
}
___
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: r368729 - in head: stand/lua tools/boot

2020-12-17 Thread Kyle Evans
Author: kevans
Date: Thu Dec 17 18:29:30 2020
New Revision: 368729
URL: https://svnweb.freebsd.org/changeset/base/368729

Log:
  lualoader: fix lua-lint run
  
  luacheck rightfully complains that i is unused in the show-module-options
  loop at the end (it was used for some debugging in the process).
  
  We've added a new pager module that's compiled in, so declare that as an
  acceptable global.

Modified:
  head/stand/lua/cli.lua
  head/tools/boot/lua-lint.sh

Modified: head/stand/lua/cli.lua
==
--- head/stand/lua/cli.lua  Thu Dec 17 18:24:36 2020(r368728)
+++ head/stand/lua/cli.lua  Thu Dec 17 18:29:30 2020(r368729)
@@ -234,7 +234,7 @@ cli["show-module-options"] = function()
end
 
pager.open()
-   for i, v in ipairs(lines) do
+   for _, v in ipairs(lines) do
pager.output(v .. "\n")
end
pager.close()

Modified: head/tools/boot/lua-lint.sh
==
--- head/tools/boot/lua-lint.sh Thu Dec 17 18:24:36 2020(r368728)
+++ head/tools/boot/lua-lint.sh Thu Dec 17 18:29:30 2020(r368729)
@@ -17,4 +17,5 @@ LUACHECK=$(which luacheck)
 cd $(make -V SRCTOP)/stand
 ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \
--globals io.ischar --globals printc --globals cli_execute \
-   --globals cli_execute_unparsed --globals try_include --std lua53
+   --globals cli_execute_unparsed --globals try_include \
+   --globals pager --std lua53
___
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: r368728 - head/stand/lua

2020-12-17 Thread Kyle Evans
Author: kevans
Date: Thu Dec 17 18:24:36 2020
New Revision: 368728
URL: https://svnweb.freebsd.org/changeset/base/368728

Log:
  lualoader: cli: provide a show-module-options loader command
  
  This effectively dumps everything lualoader knows about to the console using
  the libsa pager; that particular lua interface was added in r368591.
  
  A pager stub implementation has been added that just dumps the output as-is
  as a compat shim for older loader binaries that do not have lpager. This
  stub should be moved into a more appropriate .lua file if we add anything
  else that needs the pager.

Modified:
  head/stand/lua/cli.lua
  head/stand/lua/cli.lua.8
  head/stand/lua/config.lua
  head/stand/lua/config.lua.8

Modified: head/stand/lua/cli.lua
==
--- head/stand/lua/cli.lua  Thu Dec 17 18:15:07 2020(r368727)
+++ head/stand/lua/cli.lua  Thu Dec 17 18:24:36 2020(r368728)
@@ -32,6 +32,18 @@ local core = require("core")
 
 local cli = {}
 
+if not pager then
+   -- shim for the pager module that just doesn't do it.
+   -- XXX Remove after 12.2 goes EoL.
+   pager = {
+   open = function() end,
+   close = function() end,
+   output = function(str)
+   printc(str)
+   end,
+   }
+end
+
 -- Internal function
 -- Parses arguments to boot and returns two values: kernel_name, argstr
 -- Defaults to nil and "" respectively.
@@ -171,6 +183,61 @@ cli["toggle-module"] = function(...)
 
local module = argv[1]
setModule(module, not config.isModuleEnabled(module))
+end
+
+cli["show-module-options"] = function()
+   local module_info = config.getModuleInfo()
+   local modules = module_info['modules']
+   local blacklist = module_info['blacklist']
+   local lines = {}
+
+   for module, info in pairs(modules) do
+   if #lines > 0 then
+   lines[#lines + 1] = ""
+   end
+
+   lines[#lines + 1] = "Name:" .. module
+   if info.name then
+   lines[#lines + 1] = "Path:" .. info.name
+   end
+
+   if info.type then
+   lines[#lines + 1] = "Type:" .. info.type
+   end
+
+   if info.flags then
+   lines[#lines + 1] = "Flags:   " .. info.flags
+   end
+
+   if info.before then
+   lines[#lines + 1] = "Before load: " .. info.before
+   end
+
+   if info.after then
+   lines[#lines + 1] = "After load:  " .. info.after
+   end
+
+   if info.error then
+   lines[#lines + 1] = "Error:   " .. info.error
+   end
+
+   local status
+   if blacklist[module] and not info.force then
+   status = "Blacklisted"
+   elseif info.load == "YES" then
+   status = "Load"
+   else
+   status = "Don't load"
+   end
+
+   lines[#lines + 1] = "Status:  " .. status
+   end
+
+   pager.open()
+   for i, v in ipairs(lines) do
+   pager.output(v .. "\n")
+   end
+   pager.close()
 end
 
 -- Used for splitting cli varargs into cmd_name and the rest of argv

Modified: head/stand/lua/cli.lua.8
==
--- head/stand/lua/cli.lua.8Thu Dec 17 18:15:07 2020(r368727)
+++ head/stand/lua/cli.lua.8Thu Dec 17 18:24:36 2020(r368728)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 12, 2020
+.Dd December 17, 2020
 .Dt CLI.LUA 8
 .Os
 .Sh NAME
@@ -96,6 +96,8 @@ module provides the following default commands:
 .Ic disable-module
 .It
 .Ic toggle-module
+.It
+.Ic show-module-options
 .El
 .Pp
 For
@@ -125,6 +127,10 @@ commands manipulate the list of modules to be loaded a
 Modules blacklisted are considered disabled by
 .Ic toggle-module .
 These commands will override any such restriction as needed.
+The
+.Ic show-module-options
+command will dump the list of modules that loader has been made aware of and
+any applicable options using paged output.
 .Ss Exported Functions
 The following functions are exported from
 .Nm :

Modified: head/stand/lua/config.lua
==
--- head/stand/lua/config.lua   Thu Dec 17 18:15:07 2020(r368727)
+++ head/stand/lua/config.lua   Thu Dec 17 18:24:36 2020(r368728)
@@ -721,6 +721,13 @@ function config.isModuleEnabled(modname)
return not blacklist[modname]
 end
 
+function config.getModuleInfo()
+   return {
+   modules = modules,
+   blacklist = getBlacklist()
+   }
+end
+
 

svn commit: r368727 - head/sys/netgraph

2020-12-17 Thread Aleksandr Fedorov
Author: afedorov
Date: Thu Dec 17 18:15:07 2020
New Revision: 368727
URL: https://svnweb.freebsd.org/changeset/base/368727

Log:
  [ng_socket] Don't take the SOCKBUF_LOCK() twice in the RX data path.
  
  This is just a minor optimization, but it's sensitive. This gives an 
improvement of 30-50 kpps.
  
  Reviewed by:  kp, markj, glebius, lutz_donnerhacke.de
  Approved by:  vmaffione (mentor)
  Sponsored by: vstack.com
  Differential Revision:https://reviews.freebsd.org/D27382

Modified:
  head/sys/netgraph/ng_socket.c

Modified: head/sys/netgraph/ng_socket.c
==
--- head/sys/netgraph/ng_socket.c   Thu Dec 17 17:21:12 2020
(r368726)
+++ head/sys/netgraph/ng_socket.c   Thu Dec 17 18:15:07 2020
(r368727)
@@ -987,6 +987,8 @@ ngs_rcvmsg(node_p node, item_p item, hook_p lasthook)
m_freem(m);
return (ENOBUFS);
}
+
+   /* sorwakeup_locked () releases the lock internally. */
sorwakeup_locked(so);
 
return (error);
@@ -1025,12 +1027,17 @@ ngs_rcvdata(hook_p hook, item_p item)
addr->sg_data[addrlen] = '\0';
 
/* Try to tell the socket which hook it came in on. */
-   if (sbappendaddr(>so_rcv, (struct sockaddr *)addr, m, NULL) == 0) {
+   SOCKBUF_LOCK(>so_rcv);
+   if (sbappendaddr_locked(>so_rcv, (struct sockaddr *)addr, m,
+   NULL) == 0) {
+   SOCKBUF_UNLOCK(>so_rcv);
m_freem(m);
TRAP_ERROR;
return (ENOBUFS);
}
-   sorwakeup(so);
+
+   /* sorwakeup_locked () releases the lock internally. */
+   sorwakeup_locked(so);
return (0);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368725 - head/sys/dev/spibus

2020-12-17 Thread Emmanuel Vadot
Author: manu
Date: Thu Dec 17 17:11:14 2020
New Revision: 368725
URL: https://svnweb.freebsd.org/changeset/base/368725

Log:
  Add IRQ resource to SPIBUS
  
  Add capability to SPIBUS to have child device with IRQ.
  For example many ADC chip have a dedicated pin to signal "data ready"
  and the host can just wait for a interrupt to go out and read the result.
  
  It is the same code as in R282674 and R282702 for IICBUS by Michal Meloun
  
  Submitted by: Oskar Holmund 
  Differential Revision:https://reviews.freebsd.org/D27396

Modified:
  head/sys/dev/spibus/ofw_spibus.c
  head/sys/dev/spibus/spibus.c
  head/sys/dev/spibus/spibusvar.h

Modified: head/sys/dev/spibus/ofw_spibus.c
==
--- head/sys/dev/spibus/ofw_spibus.cThu Dec 17 17:09:43 2020
(r368724)
+++ head/sys/dev/spibus/ofw_spibus.cThu Dec 17 17:11:14 2020
(r368725)
@@ -152,6 +152,10 @@ ofw_spibus_attach(device_t dev)
continue;
}
childdev = device_add_child(dev, NULL, -1);
+
+   resource_list_init(>opd_dinfo.rl);
+   ofw_bus_intr_to_rl(childdev, child,
+   >opd_dinfo.rl, NULL);
device_set_ivars(childdev, dinfo);
}
 
@@ -198,6 +202,15 @@ ofw_spibus_get_devinfo(device_t bus, device_t dev)
return (>opd_obdinfo);
 }
 
+static struct resource_list *
+ofw_spibus_get_resource_list(device_t bus __unused, device_t child)
+{
+   struct spibus_ivar *devi;
+
+   devi = SPIBUS_IVAR(child);
+   return (>rl);
+}
+
 static device_method_t ofw_spibus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ofw_spibus_probe),
@@ -206,6 +219,7 @@ static device_method_t ofw_spibus_methods[] = {
/* Bus interface */
DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str),
DEVMETHOD(bus_add_child,ofw_spibus_add_child),
+   DEVMETHOD(bus_get_resource_list, ofw_spibus_get_resource_list),
 
/* ofw_bus interface */
DEVMETHOD(ofw_bus_get_devinfo,  ofw_spibus_get_devinfo),

Modified: head/sys/dev/spibus/spibus.c
==
--- head/sys/dev/spibus/spibus.cThu Dec 17 17:09:43 2020
(r368724)
+++ head/sys/dev/spibus/spibus.cThu Dec 17 17:11:14 2020
(r368725)
@@ -101,6 +101,8 @@ spibus_print_child(device_t dev, device_t child)
retval += bus_print_child_header(dev, child);
retval += printf(" at cs %d", devi->cs);
retval += printf(" mode %d", devi->mode);
+   retval += resource_list_print_type(>rl, "irq",
+   SYS_RES_IRQ, "%jd");
retval += bus_print_child_footer(dev, child);
 
return (retval);
@@ -202,6 +204,7 @@ spibus_add_child(device_t dev, u_int order, const char
device_delete_child(dev, child);
return (0);
}
+   resource_list_init(>rl);
device_set_ivars(child, devi);
return (child);
 }
@@ -210,6 +213,7 @@ static void
 spibus_hinted_child(device_t bus, const char *dname, int dunit)
 {
device_t child;
+   int irq;
struct spibus_ivar *devi;
 
child = BUS_ADD_CHILD(bus, 0, dname, dunit);
@@ -218,8 +222,22 @@ spibus_hinted_child(device_t bus, const char *dname, i
resource_int_value(dname, dunit, "clock", >clock);
resource_int_value(dname, dunit, "cs", >cs);
resource_int_value(dname, dunit, "mode", >mode);
+   if (resource_int_value(dname, dunit, "irq", ) == 0) {
+   if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0)
+   device_printf(bus,
+   "Warning: bus_set_resource() failed\n");
+   }
 }
 
+static struct resource_list *
+spibus_get_resource_list(device_t bus __unused, device_t child)
+{
+   struct spibus_ivar *devi;
+
+   devi = SPIBUS_IVAR(child);
+   return (>rl);
+}
+
 static int
 spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd)
 {
@@ -236,6 +254,17 @@ static device_method_t spibus_methods[] = {
DEVMETHOD(device_resume,spibus_resume),
 
/* Bus interface */
+   DEVMETHOD(bus_setup_intr,   bus_generic_setup_intr),
+   DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr),
+   DEVMETHOD(bus_release_resource, bus_generic_release_resource),
+   DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
+   DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+   DEVMETHOD(bus_adjust_resource,  bus_generic_adjust_resource),
+   DEVMETHOD(bus_alloc_resource,   bus_generic_rl_alloc_resource),
+   DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
+   DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
+   DEVMETHOD(bus_get_resource_list, spibus_get_resource_list),
+
 

svn commit: r368724 - head/sys/arm/samsung

2020-12-17 Thread Emmanuel Vadot
Author: manu
Date: Thu Dec 17 17:09:43 2020
New Revision: 368724
URL: https://svnweb.freebsd.org/changeset/base/368724

Log:
  arm: Remove samsung exnynos port
  
  Remove the exynos SoC support, this haven't been updated in a while,
  isn't present in GENERIC and nobody is motivated to resurect it.
  
  Differential Revision:https://reviews.freebsd.org/D2

Deleted:
  head/sys/arm/samsung/
___
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: r368723 - head/include

2020-12-17 Thread Konstantin Belousov
Author: kib
Date: Thu Dec 17 17:08:25 2020
New Revision: 368723
URL: https://svnweb.freebsd.org/changeset/base/368723

Log:
  Change POSIX compliance level for visibility of strerror_l(3).
  
  Third-party code tests for strerror_l(3) without specifying
  _POSIX_SOURCE, and then expects that the function is prototyped with
  _POSIX_SOURCE set to 200112.
  
  Reported and tested by:   antoine
  Sponsored by: The FreeBSD Foundation
  MFC after:13 days

Modified:
  head/include/string.h

Modified: head/include/string.h
==
--- head/include/string.h   Thu Dec 17 17:06:57 2020(r368722)
+++ head/include/string.h   Thu Dec 17 17:08:25 2020(r368723)
@@ -140,7 +140,7 @@ int  timingsafe_bcmp(const void *, const void *, size_
 int timingsafe_memcmp(const void *, const void *, size_t);
 #endif /* __BSD_VISIBLE */
 
-#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
+#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_)
 #include 
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368722 - head/usr.bin/kyua

2020-12-17 Thread Emmanuel Vadot
Author: manu
Date: Thu Dec 17 17:06:57 2020
New Revision: 368722
URL: https://svnweb.freebsd.org/changeset/base/368722

Log:
  kyua: Only install examples if requested
  
  Reviewed by:  brooks
  Differential Revision:https://reviews.freebsd.org/D27638

Modified:
  head/usr.bin/kyua/Makefile

Modified: head/usr.bin/kyua/Makefile
==
--- head/usr.bin/kyua/Makefile  Thu Dec 17 17:02:09 2020(r368721)
+++ head/usr.bin/kyua/Makefile  Thu Dec 17 17:06:57 2020(r368722)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 .include "${SRCTOP}/lib/kyua/Makefile.kyua"
 
 .PATH: ${KYUA_SRCDIR}
@@ -28,7 +30,11 @@ CFLAGS+= -I${KYUA_SRCDIR}
 # kyua uses auto_ptr
 CFLAGS+=   -Wno-deprecated-declarations
 
-FILESGROUPS=   DOCS EXAMPLES MISC STORE
+FILESGROUPS=   DOCS MISC STORE
+
+.if ${MK_EXAMPLES} != "no"
+FILESGROUPS+=  EXAMPLES
+.endif
 
 # Install a minimal default config that uses the 'tests' user.
 # The examples config is not appropriate for general use.
___
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: r368721 - head/stand/efi/loader

2020-12-17 Thread Warner Losh
Author: imp
Date: Thu Dec 17 17:02:09 2020
New Revision: 368721
URL: https://svnweb.freebsd.org/changeset/base/368721

Log:
  Drop EFI_STAGING_SIZE back down to 64M
  
  vmware can't cope with anything larger than 64MB. Drop this back to
  64MB everywhere but arm.
  
  PR: 251866
  MFC After: 1 week

Modified:
  head/stand/efi/loader/copy.c

Modified: head/stand/efi/loader/copy.c
==
--- head/stand/efi/loader/copy.cThu Dec 17 16:52:40 2020
(r368720)
+++ head/stand/efi/loader/copy.cThu Dec 17 17:02:09 2020
(r368721)
@@ -174,9 +174,7 @@ out:
 #endif /* __i386__ || __amd64__ */
 
 #ifndef EFI_STAGING_SIZE
-#if defined(__amd64__)
-#defineEFI_STAGING_SIZE100
-#elif defined(__arm__)
+#if defined(__arm__)
 #defineEFI_STAGING_SIZE32
 #else
 #defineEFI_STAGING_SIZE64
___
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: r368720 - head/usr.sbin/bhyve

2020-12-17 Thread Aleksandr Fedorov
Author: afedorov
Date: Thu Dec 17 16:52:40 2020
New Revision: 368720
URL: https://svnweb.freebsd.org/changeset/base/368720

Log:
  [bhyve] virtio-net: Do not allow receiving packets until features have been 
negotiated.
  
  Enforce the requirement that the RX callback cannot be called after a reset 
until the features have been negotiated.
  This fixes a race condition where the receive callback is called during a 
device reset.
  
  Reviewed by:  vmaffione, grehan
  Approved by:  vmaffione (mentor)
  Sponsored by: vstack.com
  Differential Revision:https://reviews.freebsd.org/D27381

Modified:
  head/usr.sbin/bhyve/pci_virtio_net.c

Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==
--- head/usr.sbin/bhyve/pci_virtio_net.cThu Dec 17 15:00:19 2020
(r368719)
+++ head/usr.sbin/bhyve/pci_virtio_net.cThu Dec 17 16:52:40 2020
(r368720)
@@ -111,6 +111,8 @@ struct pci_vtnet_softc {
 
net_backend_t   *vsc_be;
 
+   boolfeatures_negotiated;/* protected by rx_mtx */
+
int resetting;  /* protected by tx_mtx */
 
uint64_tvsc_features;   /* negotiated features */
@@ -176,6 +178,7 @@ pci_vtnet_reset(void *vsc)
 * Receive operation will be enabled again once the guest adds
 * the first receive buffers and kicks us.
 */
+   sc->features_negotiated = false;
netbe_rx_disable(sc->vsc_be);
 
/* Set sc->resetting and give a chance to the TX thread to stop. */
@@ -246,6 +249,12 @@ pci_vtnet_rx(struct pci_vtnet_softc *sc)
struct vqueue_info *vq;
 
vq = >vsc_queues[VTNET_RXQ];
+
+   /* Features must be negotiated */
+   if (!sc->features_negotiated) {
+   return;
+   }
+
for (;;) {
struct virtio_net_rxhdr *hdr;
uint32_t riov_bytes;
@@ -406,8 +415,14 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq)
 
/*
 * A qnotify means that the rx process can now begin.
+* Enable RX only if features are negotiated.
 */
pthread_mutex_lock(>rx_mtx);
+   if (!sc->features_negotiated) {
+   pthread_mutex_unlock(>rx_mtx);
+   return;
+   }
+
vq_kick_disable(vq);
netbe_rx_enable(sc->vsc_be);
pthread_mutex_unlock(>rx_mtx);
@@ -750,6 +765,10 @@ pci_vtnet_neg_features(void *vsc, uint64_t negotiated_
netbe_set_cap(sc->vsc_be, negotiated_features, sc->vhdrlen);
sc->be_vhdrlen = netbe_get_vnet_hdr_len(sc->vsc_be);
assert(sc->be_vhdrlen == 0 || sc->be_vhdrlen == sc->vhdrlen);
+
+   pthread_mutex_lock(>rx_mtx);
+   sc->features_negotiated = true;
+   pthread_mutex_unlock(>rx_mtx);
 }
 
 #ifdef BHYVE_SNAPSHOT
___
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: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string

2020-12-17 Thread Antoine Brodin
On Thu, Dec 17, 2020 at 4:53 PM Konstantin Belousov  wrote:
>
> On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote:
> > On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov
> >  wrote:
> > > Could you please try the following, which might be a right thing to do
> > > regardless p11-kit quirk.
> >
> > Hi,
> >
> > This change fixes p11-kit.
> Initially you said that there are ports broken by the change, and reply
> mention only p11-kit as fixed.  Are there more broken ports ?

I don't know,  it takes 2 or 3 days for bulk -a to complete.

Antoine
___
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: r368714 - head/lib/libc/string

2020-12-17 Thread Jessica Clarke
On 17 Dec 2020, at 16:22, Konstantin Belousov  wrote:
> On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
>> On 17 Dec 2020, at 12:53, Konstantin Belousov  wrote:
>>> 
>>> On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski wrote:
 Author: 0mp (doc,ports committer)
 Date: Thu Dec 17 12:41:47 2020
 New Revision: 368714
 URL: https://svnweb.freebsd.org/changeset/base/368714
 
 Log:
 strerror.3: Add an example for perror()
 
 This is a nice and quick reference.
 
 Reviewed by:   jilles, yuripv
 MFC after: 2 weeks
 Differential Revision: https://reviews.freebsd.org/D27623
 
 Modified:
 head/lib/libc/string/strerror.3
 
 Modified: head/lib/libc/string/strerror.3
 ==
 --- head/lib/libc/string/strerror.3Thu Dec 17 03:42:54 2020
 (r368713)
 +++ head/lib/libc/string/strerror.3Thu Dec 17 12:41:47 2020
 (r368714)
 @@ -32,7 +32,7 @@
 .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
 -.Dd December 7, 2020
 +.Dd December 17, 2020
 .Dt STRERROR 3
 .Os
 .Sh NAME
 @@ -170,6 +170,31 @@ The use of these variables is deprecated;
 or
 .Fn strerror_r
 should be used instead.
 +.Sh EXAMPLES
 +The following example shows how to use
 +.Fn perror
 +to report an error.
 +.Bd -literal -offset 2n
 +#include 
 +#include 
 +#include 
 +
 +int
 +main(void)
 +{
 +  int fd;
 +
 +  if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
 +  perror("open()");
 +  exit(1);
 +  }
 +printf("File descriptor: %d\en", fd);
>>> This lines is indented with spaces, while other lines have tabs.
>>> 
 +  return (0);
>>> return (0) is redundand.
>> 
>> It's not required as per the standard, but omitting it is needlessly
>> obfuscating it and bad practice. C lets you do a whole load of things
>> that are a bad idea, and whilst this one is harmless, it is nonetheless
>> confusing to anyone who is not intimately acquainted quirks like this
>> special case in the standard.
> Why it is bad practice ?
> 
> C is a small language, and while knowing some quirks (like this one)
> seems to be optional, others are not. And worse, that other quirks are
> essential for writing correct code at all. Consequence is that ignoring
> details indicates insufficient knowledge of the fundamentals and lowers
> the trust in the provided suggestion.

Small does not mean simple. You admit that the language has quirks you
need to know in order to be able to write correct code, so why should
we confound the problem by forcing people to be aware of additional
optional quirks? This is just another kind of code golfing that
achieves nothing other than confuse some people (how many C courses do
you know of that actually teach you that you can omit the final return
statement from main?) and possibly mask a bug if you meant to return a
non-zero value (generally unlikely as error conditions will be handled
early, but maybe you have a final ret value lying around you meant to
return), when the alternative is just to add a single extra line to be
explicit about what you want. Especially since this is example code, we
should be seeking to provide as simple and clear code as is possible,
though I would not like to see this kind of code enter the base system
either.

Jess

___
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: r368714 - head/lib/libc/string

2020-12-17 Thread Ian Lepore
On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote:
> On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
> > On 17 Dec 2020, at 12:53, Konstantin Belousov 
> > wrote:
> > > 
> > > On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski
> > > wrote:
> > > > Author: 0mp (doc,ports committer)
> > > > Date: Thu Dec 17 12:41:47 2020
> > > > New Revision: 368714
> > > > URL: https://svnweb.freebsd.org/changeset/base/368714
> > > > 
> > > > Log:
> > > >  strerror.3: Add an example for perror()
> > > > 
> > > >  This is a nice and quick reference.
> > > > 
> > > >  Reviewed by:   jilles, yuripv
> > > >  MFC after: 2 weeks
> > > >  Differential Revision: https://reviews.freebsd.org/D27623
> > > > 
> > > > Modified:
> > > >  head/lib/libc/string/strerror.3
> > > > 
> > > > Modified: head/lib/libc/string/strerror.3
> > > > ===
> > > > ===
> > > > --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54
> > > > 2020(r368713)
> > > > +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47
> > > > 2020(r368714)
> > > > @@ -32,7 +32,7 @@
> > > > .\" @(#)strerror.3  8.1 (Berkeley) 6/9/93
> > > > .\" $FreeBSD$
> > > > .\"
> > > > -.Dd December 7, 2020
> > > > +.Dd December 17, 2020
> > > > .Dt STRERROR 3
> > > > .Os
> > > > .Sh NAME
> > > > @@ -170,6 +170,31 @@ The use of these variables is deprecated;
> > > > or
> > > > .Fn strerror_r
> > > > should be used instead.
> > > > +.Sh EXAMPLES
> > > > +The following example shows how to use
> > > > +.Fn perror
> > > > +to report an error.
> > > > +.Bd -literal -offset 2n
> > > > +#include 
> > > > +#include 
> > > > +#include 
> > > > +
> > > > +int
> > > > +main(void)
> > > > +{
> > > > +   int fd;
> > > > +
> > > > +   if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
> > > > +   perror("open()");
> > > > +   exit(1);
> > > > +   }
> > > > +printf("File descriptor: %d\en", fd);
> > > 
> > > This lines is indented with spaces, while other lines have tabs.
> > > 
> > > > +   return (0);
> > > 
> > > return (0) is redundand.
> > 
> > It's not required as per the standard, but omitting it is needlessly
> > obfuscating it and bad practice. C lets you do a whole load of things
> > that are a bad idea, and whilst this one is harmless, it is nonetheless
> > confusing to anyone who is not intimately acquainted quirks like this
> > special case in the standard.
> 
> Why it is bad practice ?
> 
> C is a small language, and while knowing some quirks (like this one)
> seems to be optional, others are not. And worse, that other quirks are
> essential for writing correct code at all. Consequence is that ignoring
> details indicates insufficient knowledge of the fundamentals and lowers
> the trust in the provided suggestion.

I completely disagree.  Writing example code where you fail to return a
value and just fall out the bottom of some function that declares it
returns an int is just Bad Code.  Using some obscure quirk of the
language as justification for that bad code doesn't help the situation
at all.

How obscure is this quirk?  I've been writing C code since 1983,
including having released a freeware compiler (pre-gcc days) and
working on a commercial C compiler.  I used to moderate the c_language
conference on BIX (back when that was a thing).  I make my living
writing C and C++ code every day.  And yet, I had completely forgotten
about this quirk.

Example code shouldn't be used to establish how much more clever you
are than the reader, it should be as easy to understand as possible.

-- Ian


___
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: r368714 - head/lib/libc/string

2020-12-17 Thread Konstantin Belousov
On Thu, Dec 17, 2020 at 01:01:01PM +, Jessica Clarke wrote:
> On 17 Dec 2020, at 12:53, Konstantin Belousov  wrote:
> > 
> > On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski wrote:
> >> Author: 0mp (doc,ports committer)
> >> Date: Thu Dec 17 12:41:47 2020
> >> New Revision: 368714
> >> URL: https://svnweb.freebsd.org/changeset/base/368714
> >> 
> >> Log:
> >>  strerror.3: Add an example for perror()
> >> 
> >>  This is a nice and quick reference.
> >> 
> >>  Reviewed by:  jilles, yuripv
> >>  MFC after:2 weeks
> >>  Differential Revision:https://reviews.freebsd.org/D27623
> >> 
> >> Modified:
> >>  head/lib/libc/string/strerror.3
> >> 
> >> Modified: head/lib/libc/string/strerror.3
> >> ==
> >> --- head/lib/libc/string/strerror.3Thu Dec 17 03:42:54 2020
> >> (r368713)
> >> +++ head/lib/libc/string/strerror.3Thu Dec 17 12:41:47 2020
> >> (r368714)
> >> @@ -32,7 +32,7 @@
> >> .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
> >> .\" $FreeBSD$
> >> .\"
> >> -.Dd December 7, 2020
> >> +.Dd December 17, 2020
> >> .Dt STRERROR 3
> >> .Os
> >> .Sh NAME
> >> @@ -170,6 +170,31 @@ The use of these variables is deprecated;
> >> or
> >> .Fn strerror_r
> >> should be used instead.
> >> +.Sh EXAMPLES
> >> +The following example shows how to use
> >> +.Fn perror
> >> +to report an error.
> >> +.Bd -literal -offset 2n
> >> +#include 
> >> +#include 
> >> +#include 
> >> +
> >> +int
> >> +main(void)
> >> +{
> >> +  int fd;
> >> +
> >> +  if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
> >> +  perror("open()");
> >> +  exit(1);
> >> +  }
> >> +printf("File descriptor: %d\en", fd);
> > This lines is indented with spaces, while other lines have tabs.
> > 
> >> +  return (0);
> > return (0) is redundand.
> 
> It's not required as per the standard, but omitting it is needlessly
> obfuscating it and bad practice. C lets you do a whole load of things
> that are a bad idea, and whilst this one is harmless, it is nonetheless
> confusing to anyone who is not intimately acquainted quirks like this
> special case in the standard.
Why it is bad practice ?

C is a small language, and while knowing some quirks (like this one)
seems to be optional, others are not. And worse, that other quirks are
essential for writing correct code at all. Consequence is that ignoring
details indicates insufficient knowledge of the fundamentals and lowers
the trust in the provided suggestion.
___
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: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string

2020-12-17 Thread Konstantin Belousov
On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote:
> On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov
>  wrote:
> > Could you please try the following, which might be a right thing to do
> > regardless p11-kit quirk.
> 
> Hi,
> 
> This change fixes p11-kit.
Initially you said that there are ports broken by the change, and reply
mention only p11-kit as fixed.  Are there more broken ports ?
___
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: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string

2020-12-17 Thread Antoine Brodin
On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov
 wrote:
>
> On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote:
> > On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov  
> > wrote:
> > >
> > > Author: kib
> > > Date: Wed Dec 16 09:02:09 2020
> > > New Revision: 368692
> > > URL: https://svnweb.freebsd.org/changeset/base/368692
> > >
> > > Log:
> > >   Implement strerror_l().
> > >
> > >   Only for the arches that provide user-mode TLS.
> > >
> > >   PR: 251651
> > >   Requested by: yuri
> > >   Discussed with:   emaste, jilles, tijl
> > >   Sponsored by: The FreeBSD Foundation
> > >   Differential revision:https://reviews.freebsd.org/D27495
> > >   MFC after:2 weeks
> >
> > Hi,
> >
> > It seems that this change broke some ports.
> > For instance:
> > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log
>
> p11-kit does strange/stupid thing.  It checks for strerror_l() without
> namespace restriction, but then in common/message.c, before actually using it,
> it does
> #define _POSIX_C_SOURCE 200112L
>
> Could you please try the following, which might be a right thing to do
> regardless p11-kit quirk.

Hi,

This change fixes p11-kit.

Cheers,

Antoine

> diff --git a/include/string.h b/include/string.h
> index 3c5cceaeb85..774cf5fe975 100644
> --- a/include/string.h
> +++ b/include/string.h
> @@ -140,7 +140,7 @@ int  timingsafe_bcmp(const void *, const void *, size_t);
>  int timingsafe_memcmp(const void *, const void *, size_t);
>  #endif /* __BSD_VISIBLE */
>
> -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
> +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_)
>  #include 
>  #endif
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368719 - head/usr.sbin/bsdinstall/partedit

2020-12-17 Thread Mitchell Horne
Author: mhorne
Date: Thu Dec 17 15:00:19 2020
New Revision: 368719
URL: https://svnweb.freebsd.org/changeset/base/368719

Log:
  bsdinstall: remove VTOC8 partition scheme option
  
  Now that sparc64 has been removed, there are no kernels built with
  support for the VTOC8 partitioning scheme by default. Remove the option
  from the installer, as it is unsupported on all installer images
  produced by re@.
  
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D27641

Modified:
  head/usr.sbin/bsdinstall/partedit/gpart_ops.c

Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c
==
--- head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Thu Dec 17 14:20:36 
2020(r368718)
+++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c   Thu Dec 17 15:00:19 
2020(r368719)
@@ -223,8 +223,6 @@ choose_part_type(const char *def_scheme)
"Bootable on most x86 systems and EFI aware ARM64", 0 },
{"MBR", "DOS Partitions",
"Bootable on most x86 systems", 0 },
-   {"VTOC8", "Sun VTOC8 Partition Table",
-   "Bootable on Sun SPARC systems", 0 },
};
 
 parttypemenu:
@@ -724,11 +722,6 @@ set_default_part_metadata(const char *name, const char
else if (mountpoint == NULL || strlen(mountpoint) == 0)
mountpoint = default_bootmount;
}
-
-   /* VTOC8 needs partcode at the start of partitions */
-   if (strcmp(scheme, "VTOC8") == 0 && (strcmp(type, "freebsd-ufs") == 0
-   || strcmp(type, "freebsd-zfs") == 0))
-   md->bootcode = 1;
 
if (mountpoint == NULL || mountpoint[0] == '\0') {
if (md->fstab != 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: r368718 - head/sys/modules/if_wg

2020-12-17 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Thu Dec 17 14:20:36 2020
New Revision: 368718
URL: https://svnweb.freebsd.org/changeset/base/368718

Log:
  Make non-debug kernels installable.
  
  Setting DEBUG_FLAGS results in make installkernel trying to install debug
  information that doesn't exist if the kernel was built without it.

Modified:
  head/sys/modules/if_wg/Makefile

Modified: head/sys/modules/if_wg/Makefile
==
--- head/sys/modules/if_wg/Makefile Thu Dec 17 13:17:26 2020
(r368717)
+++ head/sys/modules/if_wg/Makefile Thu Dec 17 14:20:36 2020
(r368718)
@@ -15,8 +15,6 @@ CFLAGS+= -I${INCDIR}
 
 CFLAGS+= -D__KERNEL__
 
-DEBUG_FLAGS=-g
-
 SRCS= opt_inet.h opt_inet6.h device_if.h bus_if.h ifdi_if.h
 
 SRCS+= if_wg_session.c module.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r368714 - head/lib/libc/string

2020-12-17 Thread Jessica Clarke
On 17 Dec 2020, at 12:53, Konstantin Belousov  wrote:
> 
> On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski wrote:
>> Author: 0mp (doc,ports committer)
>> Date: Thu Dec 17 12:41:47 2020
>> New Revision: 368714
>> URL: https://svnweb.freebsd.org/changeset/base/368714
>> 
>> Log:
>>  strerror.3: Add an example for perror()
>> 
>>  This is a nice and quick reference.
>> 
>>  Reviewed by:jilles, yuripv
>>  MFC after:  2 weeks
>>  Differential Revision:  https://reviews.freebsd.org/D27623
>> 
>> Modified:
>>  head/lib/libc/string/strerror.3
>> 
>> Modified: head/lib/libc/string/strerror.3
>> ==
>> --- head/lib/libc/string/strerror.3  Thu Dec 17 03:42:54 2020
>> (r368713)
>> +++ head/lib/libc/string/strerror.3  Thu Dec 17 12:41:47 2020
>> (r368714)
>> @@ -32,7 +32,7 @@
>> .\" @(#)strerror.3   8.1 (Berkeley) 6/9/93
>> .\" $FreeBSD$
>> .\"
>> -.Dd December 7, 2020
>> +.Dd December 17, 2020
>> .Dt STRERROR 3
>> .Os
>> .Sh NAME
>> @@ -170,6 +170,31 @@ The use of these variables is deprecated;
>> or
>> .Fn strerror_r
>> should be used instead.
>> +.Sh EXAMPLES
>> +The following example shows how to use
>> +.Fn perror
>> +to report an error.
>> +.Bd -literal -offset 2n
>> +#include 
>> +#include 
>> +#include 
>> +
>> +int
>> +main(void)
>> +{
>> +int fd;
>> +
>> +if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
>> +perror("open()");
>> +exit(1);
>> +}
>> +printf("File descriptor: %d\en", fd);
> This lines is indented with spaces, while other lines have tabs.
> 
>> +return (0);
> return (0) is redundand.

It's not required as per the standard, but omitting it is needlessly
obfuscating it and bad practice. C lets you do a whole load of things
that are a bad idea, and whilst this one is harmless, it is nonetheless
confusing to anyone who is not intimately acquainted quirks like this
special case in the standard.

Jess

___
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: r368714 - head/lib/libc/string

2020-12-17 Thread Konstantin Belousov
On Thu, Dec 17, 2020 at 12:41:47PM +, Mateusz Piotrowski wrote:
> Author: 0mp (doc,ports committer)
> Date: Thu Dec 17 12:41:47 2020
> New Revision: 368714
> URL: https://svnweb.freebsd.org/changeset/base/368714
> 
> Log:
>   strerror.3: Add an example for perror()
>   
>   This is a nice and quick reference.
>   
>   Reviewed by:jilles, yuripv
>   MFC after:  2 weeks
>   Differential Revision:  https://reviews.freebsd.org/D27623
> 
> Modified:
>   head/lib/libc/string/strerror.3
> 
> Modified: head/lib/libc/string/strerror.3
> ==
> --- head/lib/libc/string/strerror.3   Thu Dec 17 03:42:54 2020
> (r368713)
> +++ head/lib/libc/string/strerror.3   Thu Dec 17 12:41:47 2020
> (r368714)
> @@ -32,7 +32,7 @@
>  .\" @(#)strerror.3   8.1 (Berkeley) 6/9/93
>  .\" $FreeBSD$
>  .\"
> -.Dd December 7, 2020
> +.Dd December 17, 2020
>  .Dt STRERROR 3
>  .Os
>  .Sh NAME
> @@ -170,6 +170,31 @@ The use of these variables is deprecated;
>  or
>  .Fn strerror_r
>  should be used instead.
> +.Sh EXAMPLES
> +The following example shows how to use
> +.Fn perror
> +to report an error.
> +.Bd -literal -offset 2n
> +#include 
> +#include 
> +#include 
> +
> +int
> +main(void)
> +{
> + int fd;
> +
> + if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
> + perror("open()");
> + exit(1);
> + }
> +printf("File descriptor: %d\en", fd);
This lines is indented with spaces, while other lines have tabs.

> + return (0);
return (0) is redundand.

> +}
> +.Ed
> +.Pp
> +When executed, the program will print an error message along the lines of
> +.Ql "open(): No such file or directory" .
>  .Sh SEE ALSO
>  .Xr intro 2 ,
>  .Xr err 3 ,
___
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: r368714 - head/lib/libc/string

2020-12-17 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Thu Dec 17 12:41:47 2020
New Revision: 368714
URL: https://svnweb.freebsd.org/changeset/base/368714

Log:
  strerror.3: Add an example for perror()
  
  This is a nice and quick reference.
  
  Reviewed by:  jilles, yuripv
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D27623

Modified:
  head/lib/libc/string/strerror.3

Modified: head/lib/libc/string/strerror.3
==
--- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020
(r368713)
+++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020
(r368714)
@@ -32,7 +32,7 @@
 .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2020
+.Dd December 17, 2020
 .Dt STRERROR 3
 .Os
 .Sh NAME
@@ -170,6 +170,31 @@ The use of these variables is deprecated;
 or
 .Fn strerror_r
 should be used instead.
+.Sh EXAMPLES
+The following example shows how to use
+.Fn perror
+to report an error.
+.Bd -literal -offset 2n
+#include 
+#include 
+#include 
+
+int
+main(void)
+{
+   int fd;
+
+   if ((fd = open("/nonexistent", O_RDONLY)) == -1) {
+   perror("open()");
+   exit(1);
+   }
+printf("File descriptor: %d\en", fd);
+   return (0);
+}
+.Ed
+.Pp
+When executed, the program will print an error message along the lines of
+.Ql "open(): No such file or directory" .
 .Sh SEE ALSO
 .Xr intro 2 ,
 .Xr err 3 ,
___
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: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string

2020-12-17 Thread Konstantin Belousov
On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote:
> On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov  wrote:
> >
> > Author: kib
> > Date: Wed Dec 16 09:02:09 2020
> > New Revision: 368692
> > URL: https://svnweb.freebsd.org/changeset/base/368692
> >
> > Log:
> >   Implement strerror_l().
> >
> >   Only for the arches that provide user-mode TLS.
> >
> >   PR: 251651
> >   Requested by: yuri
> >   Discussed with:   emaste, jilles, tijl
> >   Sponsored by: The FreeBSD Foundation
> >   Differential revision:https://reviews.freebsd.org/D27495
> >   MFC after:2 weeks
> 
> Hi,
> 
> It seems that this change broke some ports.
> For instance:
> http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log

p11-kit does strange/stupid thing.  It checks for strerror_l() without
namespace restriction, but then in common/message.c, before actually using it,
it does
#define _POSIX_C_SOURCE 200112L

Could you please try the following, which might be a right thing to do
regardless p11-kit quirk.

diff --git a/include/string.h b/include/string.h
index 3c5cceaeb85..774cf5fe975 100644
--- a/include/string.h
+++ b/include/string.h
@@ -140,7 +140,7 @@ int  timingsafe_bcmp(const void *, const void *, size_t);
 int timingsafe_memcmp(const void *, const void *, size_t);
 #endif /* __BSD_VISIBLE */
 
-#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
+#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_)
 #include 
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string

2020-12-17 Thread Antoine Brodin
On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov  wrote:
>
> Author: kib
> Date: Wed Dec 16 09:02:09 2020
> New Revision: 368692
> URL: https://svnweb.freebsd.org/changeset/base/368692
>
> Log:
>   Implement strerror_l().
>
>   Only for the arches that provide user-mode TLS.
>
>   PR: 251651
>   Requested by: yuri
>   Discussed with:   emaste, jilles, tijl
>   Sponsored by: The FreeBSD Foundation
>   Differential revision:https://reviews.freebsd.org/D27495
>   MFC after:2 weeks

Hi,

It seems that this change broke some ports.
For instance:
http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log

Cheers,

Antoine
___
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"