Re: svn commit: r336231 - head/sys/vm
they are modified in 2 places: zone_alloc_item and zone_free_item. this should probably get fixed up at some point, but I have no interest in working on it. On Fri, Jul 13, 2018 at 5:39 AM, Mark Johnston wrote: > On Fri, Jul 13, 2018 at 01:41:46AM +0200, Mateusz Guzik wrote: > > uma_zone_get_cur iterates the per-cpu stats and looks at the zone-global > > stats. The patch only gets rid of rolling them up, thus there is no > > difference from the pov of this func. > > I don't follow the remark about uma_reclaim. > > I'm pointing out that with this change we no longer maintain any > zone-global stats. > > > On Fri, Jul 13, 2018 at 12:58 AM, Mark Johnston > wrote: > > > > > On Thu, Jul 12, 2018 at 10:35:52PM +, Mateusz Guzik wrote: > > > > Author: mjg > > > > Date: Thu Jul 12 22:35:52 2018 > > > > New Revision: 336231 > > > > URL: https://svnweb.freebsd.org/changeset/base/336231 > > > > > > > > Log: > > > > uma: whack main zone counter update in the slow path, freeing side > > > > > > > > See r333052. > > > > > > > > Modified: > > > > head/sys/vm/uma_core.c > > > > > > > > Modified: head/sys/vm/uma_core.c > > > > > > > == > > > > --- head/sys/vm/uma_core.cThu Jul 12 22:34:40 2018 > (r336230) > > > > +++ head/sys/vm/uma_core.cThu Jul 12 22:35:52 2018 > (r336231) > > > > @@ -3135,14 +3135,6 @@ zfree_start: > > > > cpu = curcpu; > > > > cache = >uz_cpu[cpu]; > > > > > > > > - /* > > > > - * Since we have locked the zone we may as well send back our > > > stats. > > > > - */ > > > > - atomic_add_long(>uz_allocs, cache->uc_allocs); > > > > - atomic_add_long(>uz_frees, cache->uc_frees); > > > > - cache->uc_allocs = 0; > > > > - cache->uc_frees = 0; > > > > - > > > > > > Doesn't this break the accounting of these stats? uma_reclaim() > doesn't > > > update them when it frees cached items, and uma_zone_get_cur() doesn't > > > look at the stats for cached buckets. > -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r336231 - head/sys/vm
On Fri, Jul 13, 2018 at 01:41:46AM +0200, Mateusz Guzik wrote: > uma_zone_get_cur iterates the per-cpu stats and looks at the zone-global > stats. The patch only gets rid of rolling them up, thus there is no > difference from the pov of this func. > I don't follow the remark about uma_reclaim. I'm pointing out that with this change we no longer maintain any zone-global stats. > On Fri, Jul 13, 2018 at 12:58 AM, Mark Johnston wrote: > > > On Thu, Jul 12, 2018 at 10:35:52PM +, Mateusz Guzik wrote: > > > Author: mjg > > > Date: Thu Jul 12 22:35:52 2018 > > > New Revision: 336231 > > > URL: https://svnweb.freebsd.org/changeset/base/336231 > > > > > > Log: > > > uma: whack main zone counter update in the slow path, freeing side > > > > > > See r333052. > > > > > > Modified: > > > head/sys/vm/uma_core.c > > > > > > Modified: head/sys/vm/uma_core.c > > > > > == > > > --- head/sys/vm/uma_core.cThu Jul 12 22:34:40 2018(r336230) > > > +++ head/sys/vm/uma_core.cThu Jul 12 22:35:52 2018(r336231) > > > @@ -3135,14 +3135,6 @@ zfree_start: > > > cpu = curcpu; > > > cache = >uz_cpu[cpu]; > > > > > > - /* > > > - * Since we have locked the zone we may as well send back our > > stats. > > > - */ > > > - atomic_add_long(>uz_allocs, cache->uc_allocs); > > > - atomic_add_long(>uz_frees, cache->uc_frees); > > > - cache->uc_allocs = 0; > > > - cache->uc_frees = 0; > > > - > > > > Doesn't this break the accounting of these stats? uma_reclaim() doesn't > > update them when it frees cached items, and uma_zone_get_cur() doesn't > > look at the stats for cached buckets. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336236 - head/sbin/fsck_msdosfs
Author: delphij Date: Fri Jul 13 02:02:16 2018 New Revision: 336236 URL: https://svnweb.freebsd.org/changeset/base/336236 Log: Detect and handle invalid number of FATs If the number of FATs field in the boot sector is zero, give an appropriate error code. Obtained from:Android https://android.googlesource.com/platform/external/fsck_msdos/+/6c29bbe8d58e6fe8755935a04166ecf82ff31f47%5E%21/ MFC after:2 weeks Modified: head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/boot.c == --- head/sbin/fsck_msdosfs/boot.c Fri Jul 13 00:37:47 2018 (r336235) +++ head/sbin/fsck_msdosfs/boot.c Fri Jul 13 02:02:16 2018 (r336236) @@ -87,6 +87,10 @@ readboot(int dosfs, struct bootblock *boot) pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); return FSFATAL; } + if (boot->bpbFATs == 0) { + pfatal("Invalid number of FATs: %u", boot->bpbFATs); + return FSFATAL; + } if (!boot->bpbRootDirEnts) boot->flags |= FAT32; if (boot->flags & FAT32) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336235 - stable/11/kerberos5/usr.bin/verify_krb5_conf
Author: cy Date: Fri Jul 13 00:37:47 2018 New Revision: 336235 URL: https://svnweb.freebsd.org/changeset/base/336235 Log: MFC r336151: Remove redundant space. Modified: stable/11/kerberos5/usr.bin/verify_krb5_conf/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/kerberos5/usr.bin/verify_krb5_conf/Makefile == --- stable/11/kerberos5/usr.bin/verify_krb5_conf/Makefile Thu Jul 12 22:59:02 2018(r336234) +++ stable/11/kerberos5/usr.bin/verify_krb5_conf/Makefile Fri Jul 13 00:37:47 2018(r336235) @@ -3,7 +3,7 @@ PROG= verify_krb5_conf MAN= verify_krb5_conf.8 CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken -LIBADD=krb5 roken vers +LIBADD=krb5 roken vers .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r336231 - head/sys/vm
uma_zone_get_cur iterates the per-cpu stats and looks at the zone-global stats. The patch only gets rid of rolling them up, thus there is no difference from the pov of this func. I don't follow the remark about uma_reclaim. On Fri, Jul 13, 2018 at 12:58 AM, Mark Johnston wrote: > On Thu, Jul 12, 2018 at 10:35:52PM +, Mateusz Guzik wrote: > > Author: mjg > > Date: Thu Jul 12 22:35:52 2018 > > New Revision: 336231 > > URL: https://svnweb.freebsd.org/changeset/base/336231 > > > > Log: > > uma: whack main zone counter update in the slow path, freeing side > > > > See r333052. > > > > Modified: > > head/sys/vm/uma_core.c > > > > Modified: head/sys/vm/uma_core.c > > > == > > --- head/sys/vm/uma_core.cThu Jul 12 22:34:40 2018(r336230) > > +++ head/sys/vm/uma_core.cThu Jul 12 22:35:52 2018(r336231) > > @@ -3135,14 +3135,6 @@ zfree_start: > > cpu = curcpu; > > cache = >uz_cpu[cpu]; > > > > - /* > > - * Since we have locked the zone we may as well send back our > stats. > > - */ > > - atomic_add_long(>uz_allocs, cache->uc_allocs); > > - atomic_add_long(>uz_frees, cache->uc_frees); > > - cache->uc_allocs = 0; > > - cache->uc_frees = 0; > > - > > Doesn't this break the accounting of these stats? uma_reclaim() doesn't > update them when it frees cached items, and uma_zone_get_cur() doesn't > look at the stats for cached buckets. > -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336234 - stable/10/sys/fs/nfsserver
Author: rmacklem Date: Thu Jul 12 22:59:02 2018 New Revision: 336234 URL: https://svnweb.freebsd.org/changeset/base/336234 Log: MFC: r333579 The NFSv4.1 server should return NFSERR_BACKCHANBUSY instead of NFS_OK. When an NFSv4.1 session is busy due to a callback being in progress, nfsrv_freesession() should return NFSERR_BACKCHANBUSY instead of NFS_OK. The only effect this has is that the DestroySession operation will report the failure for this case and this probably has little or no effect on a client. Spotted by inspection and no failures related to this have been reported. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c == --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 12 22:53:37 2018 (r336233) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 12 22:59:02 2018 (r336234) @@ -6002,7 +6002,7 @@ nfsrv_freesession(struct nfsdsession *sep, uint8_t *se if (sep->sess_refcnt > 0) { NFSUNLOCKSESSION(shp); NFSUNLOCKSTATE(); - return (0); + return (NFSERR_BACKCHANBUSY); } LIST_REMOVE(sep, sess_hash); LIST_REMOVE(sep, sess_list); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r336231 - head/sys/vm
On Thu, Jul 12, 2018 at 10:35:52PM +, Mateusz Guzik wrote: > Author: mjg > Date: Thu Jul 12 22:35:52 2018 > New Revision: 336231 > URL: https://svnweb.freebsd.org/changeset/base/336231 > > Log: > uma: whack main zone counter update in the slow path, freeing side > > See r333052. > > Modified: > head/sys/vm/uma_core.c > > Modified: head/sys/vm/uma_core.c > == > --- head/sys/vm/uma_core.cThu Jul 12 22:34:40 2018(r336230) > +++ head/sys/vm/uma_core.cThu Jul 12 22:35:52 2018(r336231) > @@ -3135,14 +3135,6 @@ zfree_start: > cpu = curcpu; > cache = >uz_cpu[cpu]; > > - /* > - * Since we have locked the zone we may as well send back our stats. > - */ > - atomic_add_long(>uz_allocs, cache->uc_allocs); > - atomic_add_long(>uz_frees, cache->uc_frees); > - cache->uc_allocs = 0; > - cache->uc_frees = 0; > - Doesn't this break the accounting of these stats? uma_reclaim() doesn't update them when it frees cached items, and uma_zone_get_cur() doesn't look at the stats for cached buckets. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336233 - stable/11/sys/fs/nfsserver
Author: rmacklem Date: Thu Jul 12 22:53:37 2018 New Revision: 336233 URL: https://svnweb.freebsd.org/changeset/base/336233 Log: MFC: r333579 The NFSv4.1 server should return NFSERR_BACKCHANBUSY instead of NFS_OK. When an NFSv4.1 session is busy due to a callback being in progress, nfsrv_freesession() should return NFSERR_BACKCHANBUSY instead of NFS_OK. The only effect this has is that the DestroySession operation will report the failure for this case and this probably has little or no effect on a client. Spotted by inspection and no failures related to this have been reported. Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c == --- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 12 22:48:18 2018 (r336232) +++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 12 22:53:37 2018 (r336233) @@ -6010,7 +6010,7 @@ nfsrv_freesession(struct nfsdsession *sep, uint8_t *se if (sep->sess_refcnt > 0) { NFSUNLOCKSESSION(shp); NFSUNLOCKSTATE(); - return (0); + return (NFSERR_BACKCHANBUSY); } LIST_REMOVE(sep, sess_hash); LIST_REMOVE(sep, sess_list); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336232 - head/sys/kern
Author: mjg Date: Thu Jul 12 22:48:18 2018 New Revision: 336232 URL: https://svnweb.freebsd.org/changeset/base/336232 Log: fd: stop passing M_ZERO to uma_zalloc The optimisation seen with malloc cannot be used here as zone sizes are now known at compilation. Thus bzero by hand to get the optimisation instead. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cThu Jul 12 22:35:52 2018 (r336231) +++ head/sys/kern/kern_descrip.cThu Jul 12 22:48:18 2018 (r336232) @@ -1865,7 +1865,8 @@ falloc_noinstall(struct thread *td, struct file **resu } return (ENFILE); } - fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO); + fp = uma_zalloc(file_zone, M_WAITOK); + bzero(fp, sizeof(*fp)); refcount_init(>f_count, 1); fp->f_cred = crhold(td->td_ucred); fp->f_ops = ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336231 - head/sys/vm
Author: mjg Date: Thu Jul 12 22:35:52 2018 New Revision: 336231 URL: https://svnweb.freebsd.org/changeset/base/336231 Log: uma: whack main zone counter update in the slow path, freeing side See r333052. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Thu Jul 12 22:34:40 2018(r336230) +++ head/sys/vm/uma_core.c Thu Jul 12 22:35:52 2018(r336231) @@ -3135,14 +3135,6 @@ zfree_start: cpu = curcpu; cache = >uz_cpu[cpu]; - /* -* Since we have locked the zone we may as well send back our stats. -*/ - atomic_add_long(>uz_allocs, cache->uc_allocs); - atomic_add_long(>uz_frees, cache->uc_frees); - cache->uc_allocs = 0; - cache->uc_frees = 0; - bucket = cache->uc_freebucket; if (bucket != NULL && bucket->ub_cnt < bucket->ub_entries) { ZONE_UNLOCK(zone); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336230 - head/sys/sys
Author: mjg Date: Thu Jul 12 22:34:40 2018 New Revision: 336230 URL: https://svnweb.freebsd.org/changeset/base/336230 Log: sx: remove the spurious macro value difference vs rwlocks No functional changes. Modified: head/sys/sys/sx.h Modified: head/sys/sys/sx.h == --- head/sys/sys/sx.h Thu Jul 12 20:46:22 2018(r336229) +++ head/sys/sys/sx.h Thu Jul 12 22:34:40 2018(r336230) @@ -70,8 +70,8 @@ #defineSX_LOCK_SHARED 0x01 #defineSX_LOCK_SHARED_WAITERS 0x02 #defineSX_LOCK_EXCLUSIVE_WAITERS 0x04 -#defineSX_LOCK_RECURSED0x08 -#defineSX_LOCK_WRITE_SPINNER 0x10 +#defineSX_LOCK_WRITE_SPINNER 0x08 +#defineSX_LOCK_RECURSED0x10 #defineSX_LOCK_FLAGMASK \ (SX_LOCK_SHARED | SX_LOCK_SHARED_WAITERS | \ SX_LOCK_EXCLUSIVE_WAITERS | SX_LOCK_RECURSED | SX_LOCK_WRITE_SPINNER) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336229 - in head/sys/fs: nfs nfsclient
Author: rmacklem Date: Thu Jul 12 20:46:22 2018 New Revision: 336229 URL: https://svnweb.freebsd.org/changeset/base/336229 Log: Modify the NFSv4.1 pNFS client to use separate TCP connections for DSs. Without this patch, the NFSv4.1 pNFS client shared a single TCP connection for all DSs that resided on the same machine. This made disabling one of the DSs impossible. Although unlikely, it is possible that the storage subsystem has failed in such a way that the storage for one DS on a machine is no longer functioning correctly, but the storage used by another DS on the same machine is still ok. For this case, it would be nice if a system can fail one of the DSs without failing them all. This patch changes the default behaviour to use separate TCP connections for each DS even if they reside on the same machine. I do not believe that this will be a problem for extant pNFS servers, but a sysctl can be set to restore the old behaviour if this change causes a problem for an extant pNFS server. This patch only affects the NFSv4.1 pNFS client. MFC after:2 weeks Modified: head/sys/fs/nfs/nfsclstate.h head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfsclstate.h == --- head/sys/fs/nfs/nfsclstate.hThu Jul 12 20:28:52 2018 (r336228) +++ head/sys/fs/nfs/nfsclstate.hThu Jul 12 20:46:22 2018 (r336229) @@ -94,6 +94,7 @@ struct nfsclds { #defineNFSCLDS_MDS 0x0002 #defineNFSCLDS_DS 0x0004 #defineNFSCLDS_CLOSED 0x0008 +#defineNFSCLDS_SAMECONN0x0010 struct nfsclclient { LIST_ENTRY(nfsclclient) nfsc_list; Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cThu Jul 12 20:28:52 2018 (r336228) +++ head/sys/fs/nfsclient/nfs_clrpcops.cThu Jul 12 20:46:22 2018 (r336229) @@ -57,6 +57,10 @@ static int nfsignore_eexist = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, ignore_eexist, CTLFLAG_RW, _eexist, 0, "NFS ignore EEXIST replies for mkdir/symlink"); +static int nfscl_dssameconn = 0; +SYSCTL_INT(_vfs_nfs, OID_AUTO, dssameconn, CTLFLAG_RW, +_dssameconn, 0, "Use same TCP connection to multiple DSs"); + /* * Global variables */ @@ -162,7 +166,7 @@ static int nfsrpc_writedsmir(vnode_t, int *, int *, nf struct nfsclds *, uint64_t, int, struct nfsfh *, struct mbuf *, int, int, struct ucred *, NFSPROC_T *); static enum nfsclds_state nfscl_getsameserver(struct nfsmount *, -struct nfsclds *, struct nfsclds **); +struct nfsclds *, struct nfsclds **, uint32_t *); static int nfsio_commitds(vnode_t, uint64_t, int, struct nfsclds *, struct nfsfh *, int, int, struct nfsclwritedsdorpc *, struct ucred *, NFSPROC_T *); @@ -5498,9 +5502,14 @@ nfsrpc_fillsa(struct nfsmount *nmp, struct sockaddr_in dsp->nfsclds_sockp = nrp; if (vers == NFS_VER4) { NFSLOCKMNT(nmp); - retv = nfscl_getsameserver(nmp, dsp, ); + retv = nfscl_getsameserver(nmp, dsp, , + ); NFSCL_DEBUG(3, "getsame ret=%d\n", retv); - if (retv == NFSDSP_USETHISSESSION) { + if (retv == NFSDSP_USETHISSESSION && + nfscl_dssameconn != 0) { + NFSLOCKDS(tdsp); + tdsp->nfsclds_flags |= NFSCLDS_SAMECONN; + NFSUNLOCKDS(tdsp); NFSUNLOCKMNT(nmp); /* * If there is already a session for this @@ -5511,11 +5520,8 @@ nfsrpc_fillsa(struct nfsmount *nmp, struct sockaddr_in *dspp = tdsp; return (0); } - if (retv == NFSDSP_SEQTHISSESSION) + if (retv == NFSDSP_NOTFOUND) sequenceid = - tdsp->nfsclds_sess.nfsess_sequenceid; - else - sequenceid = dsp->nfsclds_sess.nfsess_sequenceid; NFSUNLOCKMNT(nmp); error = nfsrpc_createsession(nmp, >nfsclds_sess, @@ -6516,15 +6522,16 @@ nfscl_freenfsclds(struct nfsclds *dsp) static enum nfsclds_state nfscl_getsameserver(struct nfsmount *nmp, struct nfsclds *newdsp, -struct nfsclds **retdspp) +struct nfsclds **retdspp, uint32_t *sequencep) { - struct nfsclds *dsp, *cur_dsp; + struct nfsclds *dsp; + int fndseq; /* * Search the list of nfsclds structures for one with the same
Re: svn commit: r336227 - head/contrib/llvm/tools/clang/lib/Driver/ToolChains
On 7/12/18 12:03 PM, Dimitry Andric wrote: > Author: dim > Date: Thu Jul 12 19:02:59 2018 > New Revision: 336227 > URL: https://svnweb.freebsd.org/changeset/base/336227 > > Log: > Pull in r336008 from upstream clang trunk: > > Request init/fini array on FreeBSD 12 and later > > Summary: > > It seems a bad idea to change the default in the middle of a release > branch due to possible changes in global ctor / dtor ordering between > .ctors and .init_array. With FreeBSD 11.0's release imminent lets > change the default now for FreeBSD 12 (the current development > stream) and later. > > FreeBSD rtld has supported .init_array / .fini_array for many years. > As of Jan 1 2017 all supported FreeBSD releases and branches will > have support. > > Reviewers: dim, brooks, arichardson > > Reviewed By: dim, brooks, arichardson > > Subscribers: bsdjhb, krytarowski, emaste, cfe-commits > > Differential Revision: https://reviews.llvm.org/D24867 > > Requested by: jhb > MFC after: 3 days I think that this is a flag day for 12 (and I wanted to get this in sooner rather than later so we can test it). I changed the external GCC ports to use init_array and fini_array earlier this week. I think lang/gcc* still need to be updated to enable it for 12.x and later. As long as a single executable or shared library is only using one of .ctors/.dtors vs init_array/fini_array I believe mixing them in a single process will be ok as the order of constructors and destructors doesn't change. I think you can only get into a bind if you mix old and new .o files into a single executable or shared library (and even then I don't think constructor order across different object files is really defined anyway, but I'm not sure if LTO might be affected in some way if you try to mix them). -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336227 - head/contrib/llvm/tools/clang/lib/Driver/ToolChains
Author: dim Date: Thu Jul 12 19:02:59 2018 New Revision: 336227 URL: https://svnweb.freebsd.org/changeset/base/336227 Log: Pull in r336008 from upstream clang trunk: Request init/fini array on FreeBSD 12 and later Summary: It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later. FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support. Reviewers: dim, brooks, arichardson Reviewed By: dim, brooks, arichardson Subscribers: bsdjhb, krytarowski, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D24867 Requested by: jhb MFC after:3 days Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp == --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp Thu Jul 12 18:48:53 2018(r336226) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Gnu.cpp Thu Jul 12 19:02:59 2018(r336227) @@ -2375,6 +2375,8 @@ void Generic_ELF::addClangTargetOptions(const ArgList bool UseInitArrayDefault = getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::aarch64_be || + (getTriple().getOS() == llvm::Triple::FreeBSD && + getTriple().getOSMajorVersion() >= 12) || (getTriple().getOS() == llvm::Triple::Linux && ((!GCCInstallation.isValid() || !V.isOlderThan(4, 7, 0)) || getTriple().isAndroid())) || ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336226 - head/contrib/elftoolchain/elfcopy
Author: markj Date: Thu Jul 12 18:48:53 2018 New Revision: 336226 URL: https://svnweb.freebsd.org/changeset/base/336226 Log: Pass the right sizes to malloc() and realloc(). Reported by: scan-build, via Mark Millard MFC after:1 week Differential Revision:https://reviews.freebsd.org/D16180 Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c == --- head/contrib/elftoolchain/elfcopy/sections.cThu Jul 12 18:44:00 2018(r336225) +++ head/contrib/elftoolchain/elfcopy/sections.cThu Jul 12 18:48:53 2018(r336226) @@ -716,13 +716,13 @@ filter_reloc(struct elfcopy *ecp, struct section *s) #defineCOPYREL(REL, SZ) do { \ if (nrels == 0) { \ if ((REL##SZ = malloc(cap * \ - sizeof(Elf##SZ##_Rel))) == NULL)\ + sizeof(*REL##SZ))) == NULL) \ err(EXIT_FAILURE, "malloc failed"); \ } \ if (nrels >= cap) { \ cap *= 2; \ if ((REL##SZ = realloc(REL##SZ, cap * \ - sizeof(Elf##SZ##_Rel))) == NULL)\ + sizeof(*REL##SZ))) == NULL) \ err(EXIT_FAILURE, "realloc failed");\ } \ REL##SZ[nrels].r_offset = REL.r_offset; \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336225 - in head/sys/dev: ahci usb/controller
Author: markj Date: Thu Jul 12 18:44:00 2018 New Revision: 336225 URL: https://svnweb.freebsd.org/changeset/base/336225 Log: Add PCI IDs for AMD X370 AHCI and XHCI. Submitted by: Greg V MFC after:1 week Differential Revision:https://reviews.freebsd.org/D15398 Modified: head/sys/dev/ahci/ahci_pci.c head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c == --- head/sys/dev/ahci/ahci_pci.cThu Jul 12 18:07:28 2018 (r336224) +++ head/sys/dev/ahci/ahci_pci.cThu Jul 12 18:44:00 2018 (r336225) @@ -69,7 +69,8 @@ static const struct { /* Not sure SB8x0/SB9x0 needs this quirk. Be conservative though */ {0x43951002, 0x00, "AMD SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, {0x43b61022, 0x00, "AMD X399", 0}, - {0x43b71022, 0x00, "AMD 300 Series",0}, + {0x43b51022, 0x00, "AMD 300 Series",0}, /* X370 */ + {0x43b71022, 0x00, "AMD 300 Series",0}, /* B350 */ {0x78001022, 0x00, "AMD Hudson-2", 0}, {0x78011022, 0x00, "AMD Hudson-2", 0}, {0x78021022, 0x00, "AMD Hudson-2", 0}, Modified: head/sys/dev/usb/controller/xhci_pci.c == --- head/sys/dev/usb/controller/xhci_pci.c Thu Jul 12 18:07:28 2018 (r336224) +++ head/sys/dev/usb/controller/xhci_pci.c Thu Jul 12 18:44:00 2018 (r336225) @@ -101,7 +101,8 @@ xhci_pci_match(device_t self) return ("AMD KERNCZ USB 3.0 controller"); case 0x43ba1022: return ("AMD X399 USB 3.0 controller"); - case 0x43bb1022: + case 0x43b91022: /* X370 */ + case 0x43bb1022: /* B350 */ return ("AMD 300 Series USB 3.0 controller"); case 0x78141022: return ("AMD FCH USB 3.0 controller"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336224 - head/sys/net
Author: kp Date: Thu Jul 12 18:07:28 2018 New Revision: 336224 URL: https://svnweb.freebsd.org/changeset/base/336224 Log: pf: Fix typo in r336221 Reported by: olivier@ Modified: head/sys/net/pfvar.h Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hThu Jul 12 17:42:36 2018(r336223) +++ head/sys/net/pfvar.hThu Jul 12 18:07:28 2018(r336224) @@ -623,7 +623,7 @@ struct pf_rule { #define PFSTATE_HIWAT 10 /* default state table size */ #define PFSTATE_ADAPT_START6 /* default adaptive timeout start */ -#define PFSTATE_ADAPT_END 102000 /* default adaptive timeout end */ +#define PFSTATE_ADAPT_END 12 /* default adaptive timeout end */ struct pf_threshold { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336223 - head/sys/dev/ixl
Author: erj Date: Thu Jul 12 17:42:36 2018 New Revision: 336223 URL: https://svnweb.freebsd.org/changeset/base/336223 Log: ixl(4): Set baudrate on link up using proper link_speed variable And remove old, now-completely unused link_speed variable. Reported by: Jacob Keller MFC after:1 month Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_pf.h Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Thu Jul 12 17:22:25 2018(r336222) +++ head/sys/dev/ixl/if_ixl.c Thu Jul 12 17:42:36 2018(r336223) @@ -1181,12 +1181,13 @@ void ixl_update_link_status(struct ixl_pf *pf) { struct ixl_vsi *vsi = >vsi; + struct i40e_hw *hw = >hw; u64 baudrate; if (pf->link_up) { if (vsi->link_active == FALSE) { vsi->link_active = TRUE; - baudrate = ixl_max_aq_speed_to_value(pf->link_speed); + baudrate = ixl_max_aq_speed_to_value(hw->phy.link_info.link_speed); iflib_link_state_change(vsi->ctx, LINK_STATE_UP, baudrate); ixl_link_up_msg(pf); #ifdef PCI_IOV Modified: head/sys/dev/ixl/ixl_pf.h == --- head/sys/dev/ixl/ixl_pf.h Thu Jul 12 17:22:25 2018(r336222) +++ head/sys/dev/ixl/ixl_pf.h Thu Jul 12 17:42:36 2018(r336223) @@ -120,7 +120,6 @@ struct ixl_pf { int rx_itr; boollink_up; - u32 link_speed; int advertised_speed; int fc; /* link flow ctrl setting */ enum ixl_dbg_mask dbg_mask; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336222 - head/tools/boot
Author: ian Date: Thu Jul 12 17:22:25 2018 New Revision: 336222 URL: https://svnweb.freebsd.org/changeset/base/336222 Log: Wee fix: $dev is passed in to the function with the /dev prefix already in place, don't add it. Modified: head/tools/boot/install-boot.sh Modified: head/tools/boot/install-boot.sh == --- head/tools/boot/install-boot.sh Thu Jul 12 16:35:35 2018 (r336221) +++ head/tools/boot/install-boot.sh Thu Jul 12 17:22:25 2018 (r336222) @@ -33,9 +33,9 @@ make_esp() { dev=$1 dst=$2 -newfs_msdos -a 32 /dev/${dev} +newfs_msdos -a 32 ${dev} mntpt=$(mktemp -d /tmp/stand-test.XX) -mount -t msdos /dev/${md} ${mntpt} +mount -t msdos ${dev} ${mntpt} mkdir -p ${mntpt}/efi/boot cp ${dst}/boot/loader.efi ${mntpt}/efi/boot/bootx64.efi umount ${mntpt} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336221 - head/sys/net
Author: kp Date: Thu Jul 12 16:35:35 2018 New Revision: 336221 URL: https://svnweb.freebsd.org/changeset/base/336221 Log: pf: Increate default state table size The typical system now has a lot more memory than when pf was new, and is also expected to handle more connections. Increase the default size of the state table. Note that users can overrule this using 'set limit states' in pf.conf. From OpenBSD: The year is 2018. Mercury, Bowie, Cash, Motorola and DEC all left us. Just pf still has a default state table limit of 1. Had! Now it's a tiny little bit more, 100k. lead guitar: me ok chorus: phessler theo claudio benno background school girl laughing: bob Obtained from:OpenBSD Modified: head/sys/net/pfvar.h Modified: head/sys/net/pfvar.h == --- head/sys/net/pfvar.hThu Jul 12 16:19:17 2018(r336220) +++ head/sys/net/pfvar.hThu Jul 12 16:35:35 2018(r336221) @@ -621,9 +621,9 @@ struct pf_rule { #define PFRULE_IFBOUND 0x0001 /* if-bound */ #define PFRULE_STATESLOPPY 0x0002 /* sloppy state tracking */ -#define PFSTATE_HIWAT 1 /* default state table size */ -#define PFSTATE_ADAPT_START6000/* default adaptive timeout start */ -#define PFSTATE_ADAPT_END 12000 /* default adaptive timeout end */ +#define PFSTATE_HIWAT 10 /* default state table size */ +#define PFSTATE_ADAPT_START6 /* default adaptive timeout start */ +#define PFSTATE_ADAPT_END 102000 /* default adaptive timeout end */ struct pf_threshold { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336220 - head/lib/libefivar
Author: imp Date: Thu Jul 12 16:19:17 2018 New Revision: 336220 URL: https://svnweb.freebsd.org/changeset/base/336220 Log: Fix an obvious 'is odd' check. len % 1 is always true. Fix StrHexToBytes to do a proper odd length check. This was only called by DevPathFromTextGenericPath, ConvertFromTextVendor and DevPathFromTextMAC, which we've not had a need to actually use just yet. Submitted by: David Binderman PR: 229718 Modified: head/lib/libefivar/uefi-dplib.h Modified: head/lib/libefivar/uefi-dplib.h == --- head/lib/libefivar/uefi-dplib.h Thu Jul 12 11:38:18 2018 (r336219) +++ head/lib/libefivar/uefi-dplib.h Thu Jul 12 16:19:17 2018 (r336220) @@ -576,7 +576,7 @@ StrHexToBytes(const char *str, size_t len, uint8_t *bu /* * Sanity check preconditions. */ - if (buflen != len / 2 || (len % 1) == 1) + if (buflen != len / 2 || (len % 2) == 1) return 1; for (i = 0; i < len; i += 2) { if (!isxdigit(str[i]) || !isxdigit(str[i + 1])) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336219 - head/sys/netpfil/ipfw
Author: ae Date: Thu Jul 12 11:38:18 2018 New Revision: 336219 URL: https://svnweb.freebsd.org/changeset/base/336219 Log: Use correct size when we are allocating array for skipto index. Also, there is no need to use M_ZERO for idxmap_back. It will be re-filled just after allocation in update_skipto_cache(). PR: 229665 MFC after:1 week Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c == --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Jul 12 05:37:52 2018 (r336218) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Jul 12 11:38:18 2018 (r336219) @@ -301,10 +301,8 @@ ipfw_init_skipto_cache(struct ip_fw_chain *chain) { int *idxmap, *idxmap_back; - idxmap = malloc(65536 * sizeof(uint32_t *), M_IPFW, - M_WAITOK | M_ZERO); - idxmap_back = malloc(65536 * sizeof(uint32_t *), M_IPFW, - M_WAITOK | M_ZERO); + idxmap = malloc(65536 * sizeof(int), M_IPFW, M_WAITOK | M_ZERO); + idxmap_back = malloc(65536 * sizeof(int), M_IPFW, M_WAITOK); /* * Note we may be called at any time after initialization, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"