Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Warner Losh
On Fri, Nov 17, 2017 at 6:34 PM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> [ Charset UTF-8 unsupported, converting... ]
> > Kib@ posted to arch that we were removing it, nobody objected, we
> removed
> > it. If it was a working feature that might have a few users, that's one
> > thing. But I don't think make lint has actually worked in at least a
> decade.
>
> Thats a sad state of affairs.


Indeed.

> When I try it today, I get dozens of warnings, and several syntax errors:
> >
> > types.h(289): syntax error [249]
> > nvme.h(79): syntax error [249]
> > nvme.h(105): syntax error [249]
> > nvme.h(137): syntax error [249]
> > nvme.h(160): syntax error [249]
> > nvme.h(160): cannot recover from previous errors [224]
> >
> > since it flags all c99 and newer usages as syntax errors. We've been
> using
> > c99 for the kernel since about 8.x, and in the base longer than that.
> xlint
> > hasn't been useful since we started doing this. The types.h change went
> in:
> > c217b5c12e71 (   mdf 2011-12-12 18:44:17 + 289)typedef _Bool
> bool;
> > which as far as I can make out was between 8.x being branched and 9.x
> being
> > branched. This feature has therefore been broken for 3 major releases
> > without any announcement, or even any bug reports coming in. Not exactly
> a
> > feature that has an audience that needs to be informed of anything...
> While
> > I generally agree one should try to follow proper deprecation process,
> this
> > has been de-facto removed from the source tree for at least 6 years, and
> > likely broken a lot longer than that. At most this deserves a one-liner
> in
> > the release notes. At most.
> >
> > So is this about my forgetting to include a "Release Notes: Yes" line in
> > the commit, or something larger?
>
> Something larger.  Just because the src tree use of lint is failing
> does not meant that someone out there is not using lint in some
> other capacity.  The depreication policy is there to notify them
> that lint well be removed as a program in the next release.
>

Without a working sys/types.h, nothing  non-trivial will work.


> Just because FreeBSD's internal use of lint is broken should in
> no way relieve us of that obligation and stated policy.
>

The policy exists to help our users. I'm under no obligation to blindly
follow a policy that produces no benefit.


> People seem to be axing stuff without following this policy,
> and without even bothering to do a release notes Y.


Lint is totally totally broken. It's a rotting corpse that needs to be just
gone. Since it has been totally broken for several major releases, I see no
benefit from doing anything more than moving forward with removal of the
parts that died years ago. Were this a feature that was still working, or
even barely working, I might feel differently. But even if lint was still
working, it is no longer relevant, and hasn't been in a very long time.
Taken together, I fail to see any value in doing more than removing it.

Warner


> > Warner
> >
> > On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes <
> > free...@pdx.rh.cn85.dnsmgr.net> wrote:
> >
> > > TOP post,sorry
> > >
> > >
> > > Someone needs to follow up with proper deprication procedures on lint.
> > >
> > >
> > > > Author: imp
> > > > Date: Fri Nov 17 18:16:46 2017
> > > > New Revision: 325954
> > > > URL: https://svnweb.freebsd.org/changeset/base/325954
> > > >
> > > > Log:
> > > >   Remove build system support for lint.
> > > >
> > > >   Differential Revision: https://reviews.freebsd.org/D13124
> > > >
> > > > Modified:
> > > >   head/Makefile
> > > >   head/share/mk/bsd.README
> > > >   head/share/mk/bsd.lib.mk
> > > >   head/share/mk/bsd.own.mk
> > > >   head/share/mk/bsd.prog.mk
> > > >   head/share/mk/bsd.subdir.mk
> > > >   head/share/mk/bsd.suffixes.mk
> > > >   head/share/mk/sys.mk
> > > >   head/sys/conf/kern.mk
> > > >   head/sys/conf/kern.post.mk
> > > >   head/sys/conf/kern.pre.mk
> > > >   head/sys/conf/kmod.mk
> > > >   head/usr.sbin/config/mkmakefile.c
> > > >
> > > > Modified: head/Makefile
> > > > 
> > > ==
> > > > --- head/Makefile Fri Nov 17 18:00:52 2017(r325953)
> > > > +++ head/Makefile Fri Nov 17 18:16:46 2017(r325954)
> > > > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars
> > > buildkernel bu
> > > >   everything hier hierarchy install installcheck installkernel \
> > > >   installkernel.debug packagekernel packageworld \
> > > >   reinstallkernel reinstallkernel.debug \
> > > > - installworld kernel-toolchain libraries lint maninstall \
> > > > + installworld kernel-toolchain libraries maninstall \
> > > >   obj objlink showconfig tags toolchain update \
> > > >   _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
> > > >   _build-tools _build-metadata _cross-tools _includes _libraries
> \
> > > >
> > > > Modified: head/share/mk/bsd.README
> > > > 

Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Mark Millard
Pedro Giffuni pfg at FreeBSD.org wrote on
Sat Nov 18 02:31:16 UTC 2017 :

. . .
> I would compare it to the disappearance of the C Preprocessor when we moved 
> to clang, with the significant difference that the lack of C a preprocessor 
> broke some ports.
. . .

Bad example?

# ls -lT /usr/bin/cc /usr/bin/c++ /usr/bin/cpp
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/c++
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/cc
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/cpp

# ls -lT /usr/bin/clang*
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/clang
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/clang++
-r-xr-xr-x  6 root  wheel  61565232 Nov 10 17:53:16 2017 /usr/bin/clang-cpp
-r-xr-xr-x  1 root  wheel   1857624 Nov 10 17:53:18 2017 /usr/bin/clang-format
-r-xr-xr-x  1 root  wheel928016 Nov 10 17:53:15 2017 /usr/bin/clang-tblgen

# cpp --version
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 
5.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin


# uname -apKU
FreeBSD FreeBSDx64OPC 12.0-CURRENT FreeBSD 12.0-CURRENT  r325700M  amd64 amd64 
1200053 1200053

===
Mark Millard
markmi at sl-only.net

___
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: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Pedro Giffuni

> On Nov 17, 2017, at 20:34, Rodney W. Grimes  
> wrote:
> 
> [ Charset UTF-8 unsupported, converting... ]
>> Kib@ posted to arch that we were removing it, nobody objected, we removed
>> it. If it was a working feature that might have a few users, that's one
>> thing. But I don't think make lint has actually worked in at least a decade.
> 
> Thats a sad state of affairs.
> 

t’s not sad, just the way things are, modern compilers are doing much of the 
checking older tools like lint used to do.. OpenBSD and DragonflyBSD both 
killed lint ages ago.

OTOH, we should probably consider other tools, like sparse:

https://sparse.wiki.kernel.org/index.php/Main_Page
 
The license is fine and it plays nice with the compiler.

>> 
>> When I try it today, I get dozens of warnings, and several syntax errors:
>> 
>> types.h(289): syntax error [249]
>> nvme.h(79): syntax error [249]
>> nvme.h(105): syntax error [249]
>> nvme.h(137): syntax error [249]
>> nvme.h(160): syntax error [249]
>> nvme.h(160): cannot recover from previous errors [224]
>> 
>> since it flags all c99 and newer usages as syntax errors. We've been using
>> c99 for the kernel since about 8.x, and in the base longer than that. xlint
>> hasn't been useful since we started doing this. The types.h change went in:
>> c217b5c12e71 (   mdf 2011-12-12 18:44:17 + 289)typedef _Bool bool;
>> which as far as I can make out was between 8.x being branched and 9.x being
>> branched. This feature has therefore been broken for 3 major releases
>> without any announcement, or even any bug reports coming in. Not exactly a
>> feature that has an audience that needs to be informed of anything... While
>> I generally agree one should try to follow proper deprecation process, this
>> has been de-facto removed from the source tree for at least 6 years, and
>> likely broken a lot longer than that. At most this deserves a one-liner in
>> the release notes. At most.
>> 
>> So is this about my forgetting to include a "Release Notes: Yes" line in
>> the commit, or something larger?
> 
> Something larger.  Just because the src tree use of lint is failing
> does not meant that someone out there is not using lint in some
> other capacity.  The depreication policy is there to notify them
> that lint well be removed as a program in the next release.
> 

Where is this policy written? If we have to, my guess is we can announce the 
deprecation in 11.2. A policy that would force us to ship xlint in 12.0 would 
just be a bad policy.

"xlint" is/was an internal development tool not a utility of any usefulness for 
non-developers. I would compare it to the disappearance of the C Preprocessor 
when we moved to clang, with the significant difference that the lack of C a 
preprocessor broke some ports.

> Just because FreeBSD's internal use of lint is broken should in
> no way relieve us of that obligation and stated policy.
> 

If someone needs it the/she may submit it in the ports tree, like we did with 
other stuff that has been deprecated.

> People seem to be axing stuff without following this policy,
> and without even bothering to do a release notes Y.
> 

So … can we remove ctm(1) ?

Pedro.

> 
>> Warner
>> 
>> On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes <
>> free...@pdx.rh.cn85.dnsmgr.net> wrote:
>> 
>>> TOP post,sorry
>>> 
>>> 
>>> Someone needs to follow up with proper deprication procedures on lint.
>>> 
>>> 
 Author: imp
 Date: Fri Nov 17 18:16:46 2017
 New Revision: 325954
 URL: https://svnweb.freebsd.org/changeset/base/325954
 
 Log:
  Remove build system support for lint.
 
  Differential Revision: https://reviews.freebsd.org/D13124
 
 Modified:
  head/Makefile
  head/share/mk/bsd.README
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.own.mk
  head/share/mk/bsd.prog.mk
  head/share/mk/bsd.subdir.mk
  head/share/mk/bsd.suffixes.mk
  head/share/mk/sys.mk
  head/sys/conf/kern.mk
  head/sys/conf/kern.post.mk
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk
  head/usr.sbin/config/mkmakefile.c
 
 Modified: head/Makefile
 
>>> ==
 --- head/Makefile Fri Nov 17 18:00:52 2017(r325953)
 +++ head/Makefile Fri Nov 17 18:16:46 2017(r325954)
 @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars
>>> buildkernel bu
  everything hier hierarchy install installcheck installkernel \
  installkernel.debug packagekernel packageworld \
  reinstallkernel reinstallkernel.debug \
 - installworld kernel-toolchain libraries lint maninstall \
 + installworld kernel-toolchain libraries maninstall \
  obj objlink showconfig tags toolchain update \
  _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
  _build-tools _build-metadata _cross-tools _includes _libraries \

Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Kib@ posted to arch that we were removing it, nobody objected, we removed
> it. If it was a working feature that might have a few users, that's one
> thing. But I don't think make lint has actually worked in at least a decade.

Thats a sad state of affairs.

> 
> When I try it today, I get dozens of warnings, and several syntax errors:
> 
> types.h(289): syntax error [249]
> nvme.h(79): syntax error [249]
> nvme.h(105): syntax error [249]
> nvme.h(137): syntax error [249]
> nvme.h(160): syntax error [249]
> nvme.h(160): cannot recover from previous errors [224]
> 
> since it flags all c99 and newer usages as syntax errors. We've been using
> c99 for the kernel since about 8.x, and in the base longer than that. xlint
> hasn't been useful since we started doing this. The types.h change went in:
> c217b5c12e71 (   mdf 2011-12-12 18:44:17 + 289)typedef _Bool bool;
> which as far as I can make out was between 8.x being branched and 9.x being
> branched. This feature has therefore been broken for 3 major releases
> without any announcement, or even any bug reports coming in. Not exactly a
> feature that has an audience that needs to be informed of anything... While
> I generally agree one should try to follow proper deprecation process, this
> has been de-facto removed from the source tree for at least 6 years, and
> likely broken a lot longer than that. At most this deserves a one-liner in
> the release notes. At most.
> 
> So is this about my forgetting to include a "Release Notes: Yes" line in
> the commit, or something larger?

Something larger.  Just because the src tree use of lint is failing
does not meant that someone out there is not using lint in some
other capacity.  The depreication policy is there to notify them
that lint well be removed as a program in the next release.

Just because FreeBSD's internal use of lint is broken should in
no way relieve us of that obligation and stated policy.

People seem to be axing stuff without following this policy,
and without even bothering to do a release notes Y.


> Warner
> 
> On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes <
> free...@pdx.rh.cn85.dnsmgr.net> wrote:
> 
> > TOP post,sorry
> >
> >
> > Someone needs to follow up with proper deprication procedures on lint.
> >
> >
> > > Author: imp
> > > Date: Fri Nov 17 18:16:46 2017
> > > New Revision: 325954
> > > URL: https://svnweb.freebsd.org/changeset/base/325954
> > >
> > > Log:
> > >   Remove build system support for lint.
> > >
> > >   Differential Revision: https://reviews.freebsd.org/D13124
> > >
> > > Modified:
> > >   head/Makefile
> > >   head/share/mk/bsd.README
> > >   head/share/mk/bsd.lib.mk
> > >   head/share/mk/bsd.own.mk
> > >   head/share/mk/bsd.prog.mk
> > >   head/share/mk/bsd.subdir.mk
> > >   head/share/mk/bsd.suffixes.mk
> > >   head/share/mk/sys.mk
> > >   head/sys/conf/kern.mk
> > >   head/sys/conf/kern.post.mk
> > >   head/sys/conf/kern.pre.mk
> > >   head/sys/conf/kmod.mk
> > >   head/usr.sbin/config/mkmakefile.c
> > >
> > > Modified: head/Makefile
> > > 
> > ==
> > > --- head/Makefile Fri Nov 17 18:00:52 2017(r325953)
> > > +++ head/Makefile Fri Nov 17 18:16:46 2017(r325954)
> > > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars
> > buildkernel bu
> > >   everything hier hierarchy install installcheck installkernel \
> > >   installkernel.debug packagekernel packageworld \
> > >   reinstallkernel reinstallkernel.debug \
> > > - installworld kernel-toolchain libraries lint maninstall \
> > > + installworld kernel-toolchain libraries maninstall \
> > >   obj objlink showconfig tags toolchain update \
> > >   _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
> > >   _build-tools _build-metadata _cross-tools _includes _libraries \
> > >
> > > Modified: head/share/mk/bsd.README
> > > 
> > ==
> > > --- head/share/mk/bsd.README  Fri Nov 17 18:00:52 2017(r325953)
> > > +++ head/share/mk/bsd.README  Fri Nov 17 18:16:46 2017(r325954)
> > > @@ -250,8 +250,6 @@ It has seven targets:
> > >   beforeinstall and afterinstall may also be used to cause
> > >   actions immediately before and after the install target
> > >   is executed.
> > > - lint:
> > > - run lint on the source files
> > >   tags:
> > >   create a tags file for the source files.
> > >
> > > @@ -488,18 +486,17 @@ ${MOD}_oid.hA header which programmatically
> > describes
> > >
> > >  The include file  contains the default targets for
> > building
> > >  subdirectories.  It has the same seven targets as : all,
> > clean,
> > > -cleandir, depend, install, lint, and tags.  For all of the directories
> > > -listed in the variable SUBDIRS, the specified directory will 

svn commit: r325963 - head/sys/kern

2017-11-17 Thread Mateusz Guzik
Author: mjg
Date: Fri Nov 17 23:27:06 2017
New Revision: 325963
URL: https://svnweb.freebsd.org/changeset/base/325963

Log:
  locks: fix compilation issues without SMP or KDTRACE_HOOKS

Modified:
  head/sys/kern/kern_mutex.c
  head/sys/kern/kern_sx.c

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Fri Nov 17 23:25:06 2017(r325962)
+++ head/sys/kern/kern_mutex.c  Fri Nov 17 23:27:06 2017(r325963)
@@ -462,9 +462,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v)
struct mtx *m;
struct turnstile *ts;
uintptr_t tid;
-#ifdef ADAPTIVE_MUTEXES
struct thread *owner;
-#endif
 #ifdef KTR
int cont_logged = 0;
 #endif
@@ -628,6 +626,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v)
 */
 #ifdef KDTRACE_HOOKS
sleep_time -= lockstat_nsecs(>lock_object);
+#endif
+#ifndef ADAPTIVE_MUTEXES
+   owner = mtx_owner(m);
 #endif
MPASS(owner == mtx_owner(m));
turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE);

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Fri Nov 17 23:25:06 2017(r325962)
+++ head/sys/kern/kern_sx.c Fri Nov 17 23:27:06 2017(r325963)
@@ -520,8 +520,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t
 #endif
 #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
uintptr_t state;
-   int extra_work;
 #endif
+   int extra_work = 0;
 
if (SCHEDULER_STOPPED())
return (0);
@@ -880,8 +880,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi
 #endif
 #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
uintptr_t state;
-   int extra_work;
 #endif
+   int extra_work = 0;
 
if (SCHEDULER_STOPPED())
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: r325962 - head/sys/netpfil/ipfw

2017-11-17 Thread Andrey V. Elsukov
Author: ae
Date: Fri Nov 17 23:25:06 2017
New Revision: 325962
URL: https://svnweb.freebsd.org/changeset/base/325962

Log:
  Add comment for accidentally committed unrelated change in r325960.
  
  Do not invoke IPv4 NAT handler for non IPv4 packets. Libalias expects
  a packet is IPv4. And in case when it is IPv6, it just translates them
  as IPv4. This leads to corruption and in some cases to panics.
  In particular a panic can happen when value of ip6_plen modified to
  something that leads to IP fragmentation, but actual packet length does
  not match the IP length.
  
  Packets that are not IPv4 will be dropped by NAT rule.
  
  Reported by:  Viktor Dukhovni 
  MFC after:1 week

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Fri Nov 17 23:22:39 2017
(r325961)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Fri Nov 17 23:25:06 2017
(r325962)
@@ -2560,6 +2560,10 @@ do { 
\
case O_NAT:
l = 0;  /* exit inner loop */
done = 1;   /* exit outer loop */
+   /*
+* Ensure that we do not invoke NAT handler for
+* non IPv4 packets. Libalias expects only IPv4.
+*/
if (!is_ipv4 || !IPFW_NAT_LOADED) {
retval = IP_FW_DENY;
break;
___
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: r325961 - in head/sys/dev/cxgbe: . common

2017-11-17 Thread Navdeep Parhar
Author: np
Date: Fri Nov 17 23:22:39 2017
New Revision: 325961
URL: https://svnweb.freebsd.org/changeset/base/325961

Log:
  cxgbe(4): Add core Vdd to the sysctl MIB.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/common/common.h
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/common/common.h
==
--- head/sys/dev/cxgbe/common/common.h  Fri Nov 17 22:40:02 2017
(r325960)
+++ head/sys/dev/cxgbe/common/common.h  Fri Nov 17 23:22:39 2017
(r325961)
@@ -332,6 +332,7 @@ struct adapter_params {
struct devlog_params devlog;/* PF-only */
struct rss_params rss;  /* VF-only */
struct vf_resources vfres;  /* VF-only */
+   unsigned int core_vdd;
 
unsigned int sf_size; /* serial flash size in bytes */
unsigned int sf_nsec; /* # of flash sectors */

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cFri Nov 17 22:40:02 2017
(r325960)
+++ head/sys/dev/cxgbe/t4_main.cFri Nov 17 23:22:39 2017
(r325961)
@@ -3435,7 +3435,10 @@ get_params__post_init(struct adapter *sc)
param[3] = FW_PARAM_PFVF(FILTER_END);
param[4] = FW_PARAM_PFVF(L2T_START);
param[5] = FW_PARAM_PFVF(L2T_END);
-   rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val);
+   param[6] = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
+   V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) |
+   V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_VDD);
+   rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 7, param, val);
if (rc != 0) {
device_printf(sc->dev,
"failed to query parameters (post_init): %d.\n", rc);
@@ -3453,6 +3456,7 @@ get_params__post_init(struct adapter *sc)
KASSERT(sc->vres.l2t.size <= L2T_SIZE,
("%s: L2 table size (%u) larger than expected (%u)",
__func__, sc->vres.l2t.size, L2T_SIZE));
+   sc->params.core_vdd = val[6];
 
/*
 * MPSBGMAP is queried separately because only recent firmwares support
@@ -5159,6 +5163,9 @@ t4_sysctls(struct adapter *sc)
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT |
CTLFLAG_RD, sc, 0, sysctl_temperature, "I",
"chip temperature (in Celsius)");
+
+   SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_vdd", CTLFLAG_RD,
+   >params.core_vdd, 0, "core Vdd (in mV)");
 
 #ifdef SBUF_DRAIN
/*
___
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: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Warner Losh
Kib@ posted to arch that we were removing it, nobody objected, we removed
it. If it was a working feature that might have a few users, that's one
thing. But I don't think make lint has actually worked in at least a decade.

When I try it today, I get dozens of warnings, and several syntax errors:

types.h(289): syntax error [249]
nvme.h(79): syntax error [249]
nvme.h(105): syntax error [249]
nvme.h(137): syntax error [249]
nvme.h(160): syntax error [249]
nvme.h(160): cannot recover from previous errors [224]

since it flags all c99 and newer usages as syntax errors. We've been using
c99 for the kernel since about 8.x, and in the base longer than that. xlint
hasn't been useful since we started doing this. The types.h change went in:
c217b5c12e71 (   mdf 2011-12-12 18:44:17 + 289)typedef _Bool bool;
which as far as I can make out was between 8.x being branched and 9.x being
branched. This feature has therefore been broken for 3 major releases
without any announcement, or even any bug reports coming in. Not exactly a
feature that has an audience that needs to be informed of anything... While
I generally agree one should try to follow proper deprecation process, this
has been de-facto removed from the source tree for at least 6 years, and
likely broken a lot longer than that. At most this deserves a one-liner in
the release notes. At most.

So is this about my forgetting to include a "Release Notes: Yes" line in
the commit, or something larger?

Warner

On Fri, Nov 17, 2017 at 11:31 AM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> TOP post,sorry
>
>
> Someone needs to follow up with proper deprication procedures on lint.
>
>
> > Author: imp
> > Date: Fri Nov 17 18:16:46 2017
> > New Revision: 325954
> > URL: https://svnweb.freebsd.org/changeset/base/325954
> >
> > Log:
> >   Remove build system support for lint.
> >
> >   Differential Revision: https://reviews.freebsd.org/D13124
> >
> > Modified:
> >   head/Makefile
> >   head/share/mk/bsd.README
> >   head/share/mk/bsd.lib.mk
> >   head/share/mk/bsd.own.mk
> >   head/share/mk/bsd.prog.mk
> >   head/share/mk/bsd.subdir.mk
> >   head/share/mk/bsd.suffixes.mk
> >   head/share/mk/sys.mk
> >   head/sys/conf/kern.mk
> >   head/sys/conf/kern.post.mk
> >   head/sys/conf/kern.pre.mk
> >   head/sys/conf/kmod.mk
> >   head/usr.sbin/config/mkmakefile.c
> >
> > Modified: head/Makefile
> > 
> ==
> > --- head/Makefile Fri Nov 17 18:00:52 2017(r325953)
> > +++ head/Makefile Fri Nov 17 18:16:46 2017(r325954)
> > @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars
> buildkernel bu
> >   everything hier hierarchy install installcheck installkernel \
> >   installkernel.debug packagekernel packageworld \
> >   reinstallkernel reinstallkernel.debug \
> > - installworld kernel-toolchain libraries lint maninstall \
> > + installworld kernel-toolchain libraries maninstall \
> >   obj objlink showconfig tags toolchain update \
> >   _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
> >   _build-tools _build-metadata _cross-tools _includes _libraries \
> >
> > Modified: head/share/mk/bsd.README
> > 
> ==
> > --- head/share/mk/bsd.README  Fri Nov 17 18:00:52 2017(r325953)
> > +++ head/share/mk/bsd.README  Fri Nov 17 18:16:46 2017(r325954)
> > @@ -250,8 +250,6 @@ It has seven targets:
> >   beforeinstall and afterinstall may also be used to cause
> >   actions immediately before and after the install target
> >   is executed.
> > - lint:
> > - run lint on the source files
> >   tags:
> >   create a tags file for the source files.
> >
> > @@ -488,18 +486,17 @@ ${MOD}_oid.hA header which programmatically
> describes
> >
> >  The include file  contains the default targets for
> building
> >  subdirectories.  It has the same seven targets as : all,
> clean,
> > -cleandir, depend, install, lint, and tags.  For all of the directories
> > -listed in the variable SUBDIRS, the specified directory will be visited
> > -and the target made.  There is also a default target which allows the
> > -command "make subdir" where subdir is any directory listed in the
> variable
> > -SUBDIRS.
> > +cleandir, depend, install, and tags.  For all of the directories listed
> in the
> > +variable SUBDIRS, the specified directory will be visited and the
> target made.
> > +There is also a default target which allows the command "make subdir"
> where
> > +subdir is any directory listed in the variable SUBDIRS.
> >
> >  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-=-=
> >
> > -The include file  has support for building libraries.  It
> has
> > -the same seven targets as : all, clean, cleandir, depend,
> > -install, lint, and tags.  It has a limited number 

svn commit: r325960 - in head/sys: modules/ipfw netpfil/ipfw

2017-11-17 Thread Andrey V. Elsukov
Author: ae
Date: Fri Nov 17 22:40:02 2017
New Revision: 325960
URL: https://svnweb.freebsd.org/changeset/base/325960

Log:
  Unconditionally enable support for O_IPSEC opcode.
  
  IPsec support can be loaded as kernel module, thus do not depend from
  kernel option IPSEC and always build O_IPSEC opcode implementation as
  enabled.
  
  Obtained from:Yandex LLC
  MFC after:1 week
  Sponsored by: Yandex LLC

Modified:
  head/sys/modules/ipfw/Makefile
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/modules/ipfw/Makefile
==
--- head/sys/modules/ipfw/Makefile  Fri Nov 17 20:53:52 2017
(r325959)
+++ head/sys/modules/ipfw/Makefile  Fri Nov 17 22:40:02 2017
(r325960)
@@ -7,7 +7,7 @@ SRCS=   ip_fw2.c ip_fw_pfil.c ip_fw_bpf.c
 SRCS+= ip_fw_dynamic.c ip_fw_log.c ip_fw_eaction.c
 SRCS+= ip_fw_sockopt.c ip_fw_table.c ip_fw_table_algo.c ip_fw_iface.c
 SRCS+= ip_fw_table_value.c
-SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h opt_ipsec.h
+SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h
 
 CFLAGS+= -DIPFIREWALL
 #

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Fri Nov 17 20:53:52 2017
(r325959)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Fri Nov 17 22:40:02 2017
(r325960)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
 #error "IPFIREWALL requires INET"
 #endif /* INET */
 #include "opt_inet6.h"
-#include "opt_ipsec.h"
 
 #include 
 #include 
@@ -1945,10 +1944,8 @@ do { 
\
break;
 
case O_IPSEC:
-#ifdef IPSEC
match = (m_tag_find(m,
PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL);
-#endif
/* otherwise no match */
break;
 
@@ -2563,7 +2560,7 @@ do {  
\
case O_NAT:
l = 0;  /* exit inner loop */
done = 1;   /* exit outer loop */
-   if (!IPFW_NAT_LOADED) {
+   if (!is_ipv4 || !IPFW_NAT_LOADED) {
retval = IP_FW_DENY;
break;
}
___
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: r325957 - in head: sys/kern tests/sys/vfs

2017-11-17 Thread Conrad Meyer
Yes.


On Fri, Nov 17, 2017 at 12:30 PM Oliver Pinter <
oliver.pin...@hardenedbsd.org> wrote:

>
>
> On Friday, November 17, 2017, Conrad Meyer  wrote:
>
>> Author: cem
>> Date: Fri Nov 17 19:25:39 2017
>> New Revision: 325957
>> URL: https://svnweb.freebsd.org/changeset/base/325957
>>
>> Log:
>>   vfs_lookup: Allow PATH_MAX-1 symlinks
>>
>>   Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2.
>>
>>   Add a short test case to verify the change.
>>
>>   Submitted by: Gaurav Gangalwar 
>>   Reviewed by:  kib
>>   Sponsored by: Dell EMC Isilon
>>   Differential Revision:https://reviews.freebsd.org/D12589
>>
>> Added:
>>   head/tests/sys/vfs/lookup_test.sh   (contents, props changed)
>> Modified:
>>   head/sys/kern/vfs_lookup.c
>>   head/tests/sys/vfs/Makefile
>>
>> Modified: head/sys/kern/vfs_lookup.c
>>
>> ==
>> --- head/sys/kern/vfs_lookup.c  Fri Nov 17 19:10:10 2017(r325956)
>> +++ head/sys/kern/vfs_lookup.c  Fri Nov 17 19:25:39 2017(r325957)
>> @@ -499,7 +499,7 @@ namei(struct nameidata *ndp)
>> error = ENOENT;
>> break;
>> }
>> -   if (linklen + ndp->ni_pathlen >= MAXPATHLEN) {
>> +   if (linklen + ndp->ni_pathlen > MAXPATHLEN) {
>> if (ndp->ni_pathlen > 1)
>> uma_zfree(namei_zone, cp);
>> error = ENAMETOOLONG;
>>
>> Modified: head/tests/sys/vfs/Makefile
>>
>> ==
>> --- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017(r325956)
>> +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017(r325957)
>> @@ -7,6 +7,8 @@ TESTSDIR=   ${TESTSBASE}/sys/vfs
>>  ATF_TESTS_C+=  lookup_cap_dotdot
>>  CFLAGS.lookup_cap_dotdot.c+=   -I${SRCTOP}/tests
>>
>> +#ATF_TESTS_SH+=lookup_test
>
>
> This commented out line is intended?
>
>
>> +
>>  TAP_TESTS_SH+= trailing_slash
>>
>>  .include 
>>
>> Added: head/tests/sys/vfs/lookup_test.sh
>>
>> ==
>> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
>> +++ head/tests/sys/vfs/lookup_test.sh   Fri Nov 17 19:25:39 2017
>> (r325957)
>> @@ -0,0 +1,17 @@
>> +# $FreeBSD$
>> +
>> +long_symlink_head()
>> +{
>> +   atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support"
>> +}
>> +long_symlink_body()
>> +{
>> +   atf_check -s exit:0 ln -s
>> aaa/aaa/aaa/aa
>>  a sym_long
>> +   # was: "stat: sym_long: stat: File name too long"; exit 1
>> +   atf_check -s exit:0 -o ignore stat -L sym_long
>> +}
>> +
>> +atf_init_test_cases()
>> +{
>> +   atf_add_test_case long_symlink
>> +}
>>
> ___
>> 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-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: r325959 - head/sys/cam/scsi

2017-11-17 Thread Alan Somers
Author: asomers
Date: Fri Nov 17 20:53:52 2017
New Revision: 325959
URL: https://svnweb.freebsd.org/changeset/base/325959

Log:
  Add assertion in probedone() that we're holding the device lock.
  
  Submitted by: ken
  Reviewed by:  asomers
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/scsi/scsi_xpt.c
==
--- head/sys/cam/scsi/scsi_xpt.cFri Nov 17 20:41:17 2017
(r325958)
+++ head/sys/cam/scsi/scsi_xpt.cFri Nov 17 20:53:52 2017
(r325959)
@@ -1171,6 +1171,7 @@ probedone(struct cam_periph *periph, union ccb *done_c
softc = (probe_softc *)periph->softc;
path = done_ccb->ccb_h.path;
priority = done_ccb->ccb_h.pinfo.priority;
+   cam_periph_assert(periph, MA_OWNED);
 
switch (softc->action) {
case PROBE_TUR:
___
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: r325958 - in head: share/man/man9 sys/conf sys/kern

2017-11-17 Thread Mateusz Guzik
Author: mjg
Date: Fri Nov 17 20:41:17 2017
New Revision: 325958
URL: https://svnweb.freebsd.org/changeset/base/325958

Log:
  lockmgr: remove the ADAPTIVE_LOCKMGRS option
  
  The code was never enabled and is very heavy weight.
  
  A revamped adaptive spinning may show up at a later time.
  
  Discussed with:   kib

Modified:
  head/share/man/man9/lock.9
  head/sys/conf/options
  head/sys/kern/kern_lock.c

Modified: head/share/man/man9/lock.9
==
--- head/share/man/man9/lock.9  Fri Nov 17 19:25:39 2017(r325957)
+++ head/share/man/man9/lock.9  Fri Nov 17 20:41:17 2017(r325958)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 2, 2014
+.Dd November 17, 2017
 .Dt LOCK 9
 .Os
 .Sh NAME
@@ -93,9 +93,6 @@ The timeout value passed to
 .It Fa flags
 The flags the lock is to be initialized with:
 .Bl -tag -width ".Dv LK_CANRECURSE"
-.It Dv LK_ADAPTIVE
-Enable adaptive spinning for this lock if the kernel is compiled with the
-ADAPTIVE_LOCKMGRS option.
 .It Dv LK_CANRECURSE
 Allow recursive exclusive locks.
 .It Dv LK_NOPROFILE

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Fri Nov 17 19:25:39 2017(r325957)
+++ head/sys/conf/options   Fri Nov 17 20:41:17 2017(r325958)
@@ -69,7 +69,6 @@ TEXTDUMP_VERBOSE  opt_ddb.h
 NUM_CORE_FILES opt_global.h
 
 # Miscellaneous options.
-ADAPTIVE_LOCKMGRS
 ALQ
 ALTERA_SDCARD_FAST_SIM opt_altera_sdcard.h
 ATSE_CFI_HACK  opt_cfi.h

Modified: head/sys/kern/kern_lock.c
==
--- head/sys/kern/kern_lock.c   Fri Nov 17 19:25:39 2017(r325957)
+++ head/sys/kern/kern_lock.c   Fri Nov 17 20:41:17 2017(r325958)
@@ -26,7 +26,6 @@
  * DAMAGE.
  */
 
-#include "opt_adaptive_lockmgrs.h"
 #include "opt_ddb.h"
 #include "opt_hwpmc_hooks.h"
 
@@ -159,15 +158,6 @@ struct lock_class lock_class_lockmgr = {
 #endif
 };
 
-#ifdef ADAPTIVE_LOCKMGRS
-static u_int alk_retries = 10;
-static u_int alk_loops = 1;
-static SYSCTL_NODE(_debug, OID_AUTO, lockmgr, CTLFLAG_RD, NULL,
-"lockmgr debugging");
-SYSCTL_UINT(_debug_lockmgr, OID_AUTO, retries, CTLFLAG_RW, _retries, 0, 
"");
-SYSCTL_UINT(_debug_lockmgr, OID_AUTO, loops, CTLFLAG_RW, _loops, 0, "");
-#endif
-
 static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp,
 int flags);
 static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t x);
@@ -661,10 +651,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo
uint64_t waittime = 0;
int contested = 0;
 #endif
-#ifdef ADAPTIVE_LOCKMGRS
-   volatile struct thread *owner;
-   u_int i, spintries = 0;
-#endif
 
error = 0;
tid = (uintptr_t)curthread;
@@ -748,76 +734,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo
break;
}
 
-#ifdef ADAPTIVE_LOCKMGRS
/*
-* If the owner is running on another CPU, spin until
-* the owner stops running or the state of the lock
-* changes.  We need a double-state handle here
-* because for a failed acquisition the lock can be
-* either held in exclusive mode or shared mode
-* (for the writer starvation avoidance technique).
-*/
-   if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 &&
-   LK_HOLDER(x) != LK_KERNPROC) {
-   owner = (struct thread *)LK_HOLDER(x);
-   if (LOCK_LOG_TEST(>lock_object, 0))
-   CTR3(KTR_LOCK,
-   "%s: spinning on %p held by %p",
-   __func__, lk, owner);
-   KTR_STATE1(KTR_SCHED, "thread",
-   sched_tdname(td), "spinning",
-   "lockname:\"%s\"", lk->lock_object.lo_name);
-
-   /*
-* If we are holding also an interlock drop it
-* in order to avoid a deadlock if the lockmgr
-* owner is adaptively spinning on the
-* interlock itself.
-*/
-   if (flags & LK_INTERLOCK) {
-   class->lc_unlock(ilk);
-   flags &= ~LK_INTERLOCK;
-   }
-   GIANT_SAVE();
-   while (LK_HOLDER(lk->lk_lock) ==
-   (uintptr_t)owner && 

Re: svn commit: r325957 - in head: sys/kern tests/sys/vfs

2017-11-17 Thread Oliver Pinter
On Friday, November 17, 2017, Conrad Meyer  wrote:

> Author: cem
> Date: Fri Nov 17 19:25:39 2017
> New Revision: 325957
> URL: https://svnweb.freebsd.org/changeset/base/325957
>
> Log:
>   vfs_lookup: Allow PATH_MAX-1 symlinks
>
>   Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2.
>
>   Add a short test case to verify the change.
>
>   Submitted by: Gaurav Gangalwar 
>   Reviewed by:  kib
>   Sponsored by: Dell EMC Isilon
>   Differential Revision:https://reviews.freebsd.org/D12589
>
> Added:
>   head/tests/sys/vfs/lookup_test.sh   (contents, props changed)
> Modified:
>   head/sys/kern/vfs_lookup.c
>   head/tests/sys/vfs/Makefile
>
> Modified: head/sys/kern/vfs_lookup.c
> 
> ==
> --- head/sys/kern/vfs_lookup.c  Fri Nov 17 19:10:10 2017(r325956)
> +++ head/sys/kern/vfs_lookup.c  Fri Nov 17 19:25:39 2017(r325957)
> @@ -499,7 +499,7 @@ namei(struct nameidata *ndp)
> error = ENOENT;
> break;
> }
> -   if (linklen + ndp->ni_pathlen >= MAXPATHLEN) {
> +   if (linklen + ndp->ni_pathlen > MAXPATHLEN) {
> if (ndp->ni_pathlen > 1)
> uma_zfree(namei_zone, cp);
> error = ENAMETOOLONG;
>
> Modified: head/tests/sys/vfs/Makefile
> 
> ==
> --- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017(r325956)
> +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017(r325957)
> @@ -7,6 +7,8 @@ TESTSDIR=   ${TESTSBASE}/sys/vfs
>  ATF_TESTS_C+=  lookup_cap_dotdot
>  CFLAGS.lookup_cap_dotdot.c+=   -I${SRCTOP}/tests
>
> +#ATF_TESTS_SH+=lookup_test


This commented out line is intended?


> +
>  TAP_TESTS_SH+= trailing_slash
>
>  .include 
>
> Added: head/tests/sys/vfs/lookup_test.sh
> 
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/tests/sys/vfs/lookup_test.sh   Fri Nov 17 19:25:39 2017
> (r325957)
> @@ -0,0 +1,17 @@
> +# $FreeBSD$
> +
> +long_symlink_head()
> +{
> +   atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support"
> +}
> +long_symlink_body()
> +{
> +   atf_check -s exit:0 ln -s aa
> 
> 
> 
> a/
> 
> 
> 
> 
> aaa/aa
> 
> 
> 
> a/
> 
> 
> 
> aa
>  a sym_long
> +   # was: "stat: sym_long: stat: File name too long"; exit 1
> +   atf_check -s exit:0 -o ignore stat -L sym_long
> +}
> +
> +atf_init_test_cases()
> +{
> +   atf_add_test_case long_symlink
> +}
> ___
> 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-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: r321477 - head/sys/net

2017-11-17 Thread Ryan Stone
On Tue, Jul 25, 2017 at 10:41 AM, Sean Bruno  wrote:
> Author: sbruno
> Date: Tue Jul 25 14:41:50 2017
> New Revision: 321477
> URL: https://svnweb.freebsd.org/changeset/base/321477
>
> Log:
>   Don't hold the RM lock during lagg_proto_addport() to avoid an LOR.

Can lagg_proto_addport() really be safely called without a lock held?
That seems extremely dubious to me.
___
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: r325930 - head/sys/contrib/zstd/programs

2017-11-17 Thread Conrad Meyer
Hi Bapt,

I don't think this is a sufficient fix.  Our zstd is still deleting
source files, differing from upstream for no reason.

Best,
Conrad

On Fri, Nov 17, 2017 at 1:33 AM, Baptiste Daroussin  wrote:
> Author: bapt
> Date: Fri Nov 17 09:33:29 2017
> New Revision: 325930
> URL: https://svnweb.freebsd.org/changeset/base/325930
>
> Log:
>   Actually commit the right patch for r325929
>
> Modified:
>   head/sys/contrib/zstd/programs/zstdcli.c
>
> Modified: head/sys/contrib/zstd/programs/zstdcli.c
> ==
> --- head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:29:26 2017  
>   (r325929)
> +++ head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:33:29 2017  
>   (r325930)
> @@ -421,7 +421,7 @@ int main(int argCount, const char* argv[])
>  /* preset behaviors */
>  if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0;
>  if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress;
> -if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
> forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
> g_removeSrcFile=0; }
> +if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
> forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
> FIO_setRemoveSrcFile(0); }
>  if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; 
> FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); }/* 
> behave like gzip */
>  if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; 
> FIO_setRemoveSrcFile(1); }  /* behave 
> like gunzip */
>  if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; 
> forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
> }  /* behave like gzcat */
>
___
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: r325957 - in head: sys/kern tests/sys/vfs

2017-11-17 Thread Conrad Meyer
Author: cem
Date: Fri Nov 17 19:25:39 2017
New Revision: 325957
URL: https://svnweb.freebsd.org/changeset/base/325957

Log:
  vfs_lookup: Allow PATH_MAX-1 symlinks
  
  Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2.
  
  Add a short test case to verify the change.
  
  Submitted by: Gaurav Gangalwar 
  Reviewed by:  kib
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D12589

Added:
  head/tests/sys/vfs/lookup_test.sh   (contents, props changed)
Modified:
  head/sys/kern/vfs_lookup.c
  head/tests/sys/vfs/Makefile

Modified: head/sys/kern/vfs_lookup.c
==
--- head/sys/kern/vfs_lookup.c  Fri Nov 17 19:10:10 2017(r325956)
+++ head/sys/kern/vfs_lookup.c  Fri Nov 17 19:25:39 2017(r325957)
@@ -499,7 +499,7 @@ namei(struct nameidata *ndp)
error = ENOENT;
break;
}
-   if (linklen + ndp->ni_pathlen >= MAXPATHLEN) {
+   if (linklen + ndp->ni_pathlen > MAXPATHLEN) {
if (ndp->ni_pathlen > 1)
uma_zfree(namei_zone, cp);
error = ENAMETOOLONG;

Modified: head/tests/sys/vfs/Makefile
==
--- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017(r325956)
+++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017(r325957)
@@ -7,6 +7,8 @@ TESTSDIR=   ${TESTSBASE}/sys/vfs
 ATF_TESTS_C+=  lookup_cap_dotdot
 CFLAGS.lookup_cap_dotdot.c+=   -I${SRCTOP}/tests
 
+#ATF_TESTS_SH+=lookup_test
+
 TAP_TESTS_SH+= trailing_slash
 
 .include 

Added: head/tests/sys/vfs/lookup_test.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/vfs/lookup_test.sh   Fri Nov 17 19:25:39 2017
(r325957)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+long_symlink_head()
+{
+   atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support"
+}
+long_symlink_body()
+{
+   atf_check -s exit:0 ln -s 
aaa/aaa/aaa/aa
 a sym_long
+   # was: "stat: sym_long: stat: File name too long"; exit 1
+   atf_check -s exit:0 -o ignore stat -L sym_long
+}
+
+atf_init_test_cases()
+{
+   atf_add_test_case long_symlink
+}
___
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: r316980 - head/contrib/zstd/programs

2017-11-17 Thread Conrad Meyer
On Fri, Nov 17, 2017 at 1:34 AM, Baptiste Daroussin  wrote:
> On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote:
>> Please revert this change.
>>
>> First, it introduces the POLA-violating behavior that zstdcat deletes
>> its source files.  This is not how zcat/bzcat behaves.
>
> I have modified zstdcat to behave like zcat/bzcat.
>
> The commit you stated is exactly to ensure the zstd(1) command is behaving 
> like
> xz, gzip, etc (to the exception of zstdcat which was buggy) this commit is
> needed to have those tools a drop-in replacement for other compression 
> programs.
> (which is necessary for example to have newsyslog being able to use zstd.)
>
> I committed a change needed in base and I will start a discussion with 
> upstream
>
> Best regards,
> Bapt

Hi Bapt,

I don't think that's a good enough reason to differ from upstream.
Furthermore, the change isn't documented.

For compatibility with gzip/xz, you could simply add a new
FreeBSD-specific zstd frontend with the behavior you want — instead of
changing every other frontend.  That way the behavior and
documentation would match both the documentation we ship and the
upstream documentation and behavior.  No surprises for anyone.

I really want to emphasize that *deleting user files when we claim we
will not* is an awful design choice to make.  I think this change
should be reverted until at minimum our documentation is updated to
inform users we do not --keep by default.

(I think we should stay with upstream regardless, but if we're going
to make a major change like this it MUST be documented.)

Best,
Conrad
___
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: r325956 - in head/share/man: man7 man9

2017-11-17 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 17 19:10:10 2017
New Revision: 325956
URL: https://svnweb.freebsd.org/changeset/base/325956

Log:
  Bump dates after lint removal.
  
  Noted by: wblock
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man7/hier.7
  head/share/man/man9/style.9

Modified: head/share/man/man7/hier.7
==
--- head/share/man/man7/hier.7  Fri Nov 17 18:34:14 2017(r325955)
+++ head/share/man/man7/hier.7  Fri Nov 17 19:10:10 2017(r325956)
@@ -28,7 +28,7 @@
 .\"@(#)hier.7  8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd June 10, 2017
+.Dd November 16, 2017
 .Dt HIER 7
 .Os
 .Sh NAME

Modified: head/share/man/man9/style.9
==
--- head/share/man/man9/style.9 Fri Nov 17 18:34:14 2017(r325955)
+++ head/share/man/man9/style.9 Fri Nov 17 19:10:10 2017(r325956)
@@ -26,7 +26,7 @@
 .\"From: @(#)style 1.14 (Berkeley) 4/28/95
 .\" $FreeBSD$
 .\"
-.Dd October 5, 2016
+.Dd November 16, 2017
 .Dt STYLE 9
 .Os
 .Sh NAME
___
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: r321476 - head/sys/dev/ixgbe

2017-11-17 Thread Ryan Stone
On Tue, Jul 25, 2017 at 10:38 AM, Sean Bruno  wrote:
> Author: sbruno
> Date: Tue Jul 25 14:38:30 2017
> New Revision: 321476
> URL: https://svnweb.freebsd.org/changeset/base/321476
>
> Log:
>   Drop ixgbe RX lock during TCP_LRO processing.  This eliminates a "storm"
>   of LOR detection and a bit of lock release/acquire collision when using LRO.

Without the lock held how do we guarantee that multiple threads can't
be processing LRO at the same time?
___
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: r325955 - head/usr.sbin/config

2017-11-17 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 17 18:34:14 2017
New Revision: 325955
URL: https://svnweb.freebsd.org/changeset/base/325955

Log:
  Fix 'local' to not look in the source tree for the file.
  
  Usually 'local' is used along with other rules such as 'no-implicit-rule' or
  'dependency' which avoids this problem.  It's possible to need to use 'local'
  while relying on the default rules though for a file which is not in the 
source
  tree nor generated in the kernel.
  
  Sponsored by: Dell
  Differential Revision:https://reviews.freebsd.org/D13125

Modified:
  head/usr.sbin/config/config.h
  head/usr.sbin/config/configvers.h
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/config.h
==
--- head/usr.sbin/config/config.h   Fri Nov 17 18:16:46 2017
(r325954)
+++ head/usr.sbin/config/config.h   Fri Nov 17 18:34:14 2017
(r325955)
@@ -54,6 +54,7 @@ struct file_list {
char*f_clean;   /* File list to add to clean rule */
char*f_warn;/* warning message */
const char *f_objprefix;/* prefix string for object name */
+   const char *f_srcprefix;/* source prefix such as $S/ */
 };
 
 struct files_name {

Modified: head/usr.sbin/config/configvers.h
==
--- head/usr.sbin/config/configvers.h   Fri Nov 17 18:16:46 2017
(r325954)
+++ head/usr.sbin/config/configvers.h   Fri Nov 17 18:34:14 2017
(r325955)
@@ -49,5 +49,5 @@
  *
  * $FreeBSD$
  */
-#defineCONFIGVERS  600014
+#defineCONFIGVERS  600015
 #defineMAJOR_VERS(x)   ((x) / 10)

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Fri Nov 17 18:16:46 2017
(r325954)
+++ head/usr.sbin/config/mkmakefile.c   Fri Nov 17 18:34:14 2017
(r325955)
@@ -496,6 +496,10 @@ nextparam:;
tp = new_fent();
tp->f_fn = this;
tp->f_type = filetype;
+   if (filetype == LOCAL)
+   tp->f_srcprefix = "";
+   else
+   tp->f_srcprefix = "$S/";
if (imp_rule)
tp->f_flags |= NO_IMPLCT_RULE;
if (no_obj)
@@ -571,7 +575,8 @@ do_before_depend(FILE *fp)
if (tp->f_flags & NO_IMPLCT_RULE)
fprintf(fp, "%s ", tp->f_fn);
else
-   fprintf(fp, "$S/%s ", tp->f_fn);
+   fprintf(fp, "%s%s ", tp->f_srcprefix,
+   tp->f_fn);
lpos += len + 1;
}
if (lpos != 8)
@@ -636,10 +641,7 @@ do_xxfiles(char *tag, FILE *fp)
lpos = 8;
fputs("\\\n\t", fp);
}
-   if (tp->f_type != LOCAL)
-   fprintf(fp, "$S/%s ", tp->f_fn);
-   else
-   fprintf(fp, "%s ", tp->f_fn);
+   fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn);
lpos += len + 1;
}
free(suff);
@@ -685,18 +687,21 @@ do_rules(FILE *f)
else {
*cp = '\0';
if (och == 'o') {
-   fprintf(f, "%s%so:\n\t-cp $S/%so .\n\n",
-   ftp->f_objprefix, tail(np), np);
+   fprintf(f, "%s%so:\n\t-cp %s%so .\n\n",
+   ftp->f_objprefix, tail(np),
+   ftp->f_srcprefix, np);
continue;
}
if (ftp->f_depends) {
-   fprintf(f, "%s%so: $S/%s%c %s\n",
-   ftp->f_objprefix, tail(np), np, och,
+   fprintf(f, "%s%so: %s%s%c %s\n",
+   ftp->f_objprefix, tail(np),
+   ftp->f_srcprefix, np, och,
ftp->f_depends);
}
else {
-   fprintf(f, "%s%so: $S/%s%c\n",
-   ftp->f_objprefix, tail(np), np, och);
+   fprintf(f, "%s%so: %s%s%c\n",
+   ftp->f_objprefix, tail(np),
+   ftp->f_srcprefix, np, och);
}
}
compilewith = ftp->f_compilewith;
@@ -725,7 +730,8 @@ do_rules(FILE *f)

Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Rodney W. Grimes
TOP post,sorry


Someone needs to follow up with proper deprication procedures on lint.


> Author: imp
> Date: Fri Nov 17 18:16:46 2017
> New Revision: 325954
> URL: https://svnweb.freebsd.org/changeset/base/325954
> 
> Log:
>   Remove build system support for lint.
>   
>   Differential Revision: https://reviews.freebsd.org/D13124
> 
> Modified:
>   head/Makefile
>   head/share/mk/bsd.README
>   head/share/mk/bsd.lib.mk
>   head/share/mk/bsd.own.mk
>   head/share/mk/bsd.prog.mk
>   head/share/mk/bsd.subdir.mk
>   head/share/mk/bsd.suffixes.mk
>   head/share/mk/sys.mk
>   head/sys/conf/kern.mk
>   head/sys/conf/kern.post.mk
>   head/sys/conf/kern.pre.mk
>   head/sys/conf/kmod.mk
>   head/usr.sbin/config/mkmakefile.c
> 
> Modified: head/Makefile
> ==
> --- head/Makefile Fri Nov 17 18:00:52 2017(r325953)
> +++ head/Makefile Fri Nov 17 18:16:46 2017(r325954)
> @@ -129,7 +129,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel bu
>   everything hier hierarchy install installcheck installkernel \
>   installkernel.debug packagekernel packageworld \
>   reinstallkernel reinstallkernel.debug \
> - installworld kernel-toolchain libraries lint maninstall \
> + installworld kernel-toolchain libraries maninstall \
>   obj objlink showconfig tags toolchain update \
>   _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
>   _build-tools _build-metadata _cross-tools _includes _libraries \
> 
> Modified: head/share/mk/bsd.README
> ==
> --- head/share/mk/bsd.README  Fri Nov 17 18:00:52 2017(r325953)
> +++ head/share/mk/bsd.README  Fri Nov 17 18:16:46 2017(r325954)
> @@ -250,8 +250,6 @@ It has seven targets:
>   beforeinstall and afterinstall may also be used to cause
>   actions immediately before and after the install target
>   is executed.
> - lint:
> - run lint on the source files
>   tags:
>   create a tags file for the source files.
>  
> @@ -488,18 +486,17 @@ ${MOD}_oid.hA header which programmatically 
> describes
>  
>  The include file  contains the default targets for building
>  subdirectories.  It has the same seven targets as : all, clean,
> -cleandir, depend, install, lint, and tags.  For all of the directories
> -listed in the variable SUBDIRS, the specified directory will be visited
> -and the target made.  There is also a default target which allows the
> -command "make subdir" where subdir is any directory listed in the variable
> -SUBDIRS.
> +cleandir, depend, install, and tags.  For all of the directories listed in 
> the
> +variable SUBDIRS, the specified directory will be visited and the target 
> made.
> +There is also a default target which allows the command "make subdir" where
> +subdir is any directory listed in the variable SUBDIRS.
>  
>  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  
> -The include file  has support for building libraries.  It has
> -the same seven targets as : all, clean, cleandir, depend,
> -install, lint, and tags.  It has a limited number of suffixes, consistent
> -with the current needs of the BSD tree.
> +The include file  has support for building libraries.  It has the
> +same seven targets as : all, clean, cleandir, depend, install, 
> and
> +tags.  It has a limited number of suffixes, consistent with the current 
> needs of
> +the BSD tree.
>  
>  It sets/uses the following variables:
>  
> @@ -530,8 +527,6 @@ LIB_CXX   The name of the library to build. It 
> also cau
>   will be built.  NO_PIC can be set to only build a static
>   library.
>  
> -LINTLIBDIR   Target directory for lint libraries.
> -
>  MAN  The manual pages to be installed. See bsd.man.mk for more
>   details.
>  
> @@ -588,8 +583,6 @@ It has seven targets:
>  targets beforeinstall and afterinstall may also be used
>  to cause actions immediately before and after the
>  install target is executed.
> - lint:
> - run lint on the source files.
>   tags:
>   create a tags file for the source files.
>  
> 
> Modified: head/share/mk/bsd.lib.mk
> ==
> --- head/share/mk/bsd.lib.mk  Fri Nov 17 18:00:52 2017(r325953)
> +++ head/share/mk/bsd.lib.mk  Fri Nov 17 18:16:46 2017(r325954)
> @@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS}
>   ${RANLIB} ${RANLIBFLAGS} ${.TARGET}
>  .endif
>  
> -.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
> -LINTLIB= llib-l${LIB}.ln
> -_LIBS+=  ${LINTLIB}
> -LINTOBJS+=   ${SRCS:M*.c:.c=.ln}
> -CLEANFILES+= ${LINTOBJS}
> -
> -${LINTLIB}: ${LINTOBJS}
> - @${ECHO} 

svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config

2017-11-17 Thread Warner Losh
Author: imp
Date: Fri Nov 17 18:16:46 2017
New Revision: 325954
URL: https://svnweb.freebsd.org/changeset/base/325954

Log:
  Remove build system support for lint.
  
  Differential Revision: https://reviews.freebsd.org/D13124

Modified:
  head/Makefile
  head/share/mk/bsd.README
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.own.mk
  head/share/mk/bsd.prog.mk
  head/share/mk/bsd.subdir.mk
  head/share/mk/bsd.suffixes.mk
  head/share/mk/sys.mk
  head/sys/conf/kern.mk
  head/sys/conf/kern.post.mk
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk
  head/usr.sbin/config/mkmakefile.c

Modified: head/Makefile
==
--- head/Makefile   Fri Nov 17 18:00:52 2017(r325953)
+++ head/Makefile   Fri Nov 17 18:16:46 2017(r325954)
@@ -129,7 +129,7 @@ TGTS=   all all-man buildenv buildenvvars buildkernel bu
everything hier hierarchy install installcheck installkernel \
installkernel.debug packagekernel packageworld \
reinstallkernel reinstallkernel.debug \
-   installworld kernel-toolchain libraries lint maninstall \
+   installworld kernel-toolchain libraries maninstall \
obj objlink showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _build-metadata _cross-tools _includes _libraries \

Modified: head/share/mk/bsd.README
==
--- head/share/mk/bsd.READMEFri Nov 17 18:00:52 2017(r325953)
+++ head/share/mk/bsd.READMEFri Nov 17 18:16:46 2017(r325954)
@@ -250,8 +250,6 @@ It has seven targets:
beforeinstall and afterinstall may also be used to cause
actions immediately before and after the install target
is executed.
-   lint:
-   run lint on the source files
tags:
create a tags file for the source files.
 
@@ -488,18 +486,17 @@ ${MOD}_oid.h  A header which programmatically 
describes
 
 The include file  contains the default targets for building
 subdirectories.  It has the same seven targets as : all, clean,
-cleandir, depend, install, lint, and tags.  For all of the directories
-listed in the variable SUBDIRS, the specified directory will be visited
-and the target made.  There is also a default target which allows the
-command "make subdir" where subdir is any directory listed in the variable
-SUBDIRS.
+cleandir, depend, install, and tags.  For all of the directories listed in the
+variable SUBDIRS, the specified directory will be visited and the target made.
+There is also a default target which allows the command "make subdir" where
+subdir is any directory listed in the variable SUBDIRS.
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-The include file  has support for building libraries.  It has
-the same seven targets as : all, clean, cleandir, depend,
-install, lint, and tags.  It has a limited number of suffixes, consistent
-with the current needs of the BSD tree.
+The include file  has support for building libraries.  It has the
+same seven targets as : all, clean, cleandir, depend, install, and
+tags.  It has a limited number of suffixes, consistent with the current needs 
of
+the BSD tree.
 
 It sets/uses the following variables:
 
@@ -530,8 +527,6 @@ LIB_CXX The name of the library to build. It 
also cau
will be built.  NO_PIC can be set to only build a static
library.
 
-LINTLIBDIR Target directory for lint libraries.
-
 MANThe manual pages to be installed. See bsd.man.mk for more
details.
 
@@ -588,8 +583,6 @@ It has seven targets:
 targets beforeinstall and afterinstall may also be used
 to cause actions immediately before and after the
 install target is executed.
-   lint:
-   run lint on the source files.
tags:
create a tags file for the source files.
 

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkFri Nov 17 18:00:52 2017(r325953)
+++ head/share/mk/bsd.lib.mkFri Nov 17 18:16:46 2017(r325954)
@@ -285,18 +285,6 @@ lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS}
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
 .endif
 
-.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
-LINTLIB=   llib-l${LIB}.ln
-_LIBS+=${LINTLIB}
-LINTOBJS+= ${SRCS:M*.c:.c=.ln}
-CLEANFILES+=   ${LINTOBJS}
-
-${LINTLIB}: ${LINTOBJS}
-   @${ECHO} building lint library ${.TARGET}
-   @rm -f ${.TARGET}
-   ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
-.endif
-
 .endif # !defined(INTERNALLIB)
 
 .if defined(_SKIP_BUILD)
@@ -403,10 +391,6 @@ _libinstall:
${INSTALL} 

svn commit: r325953 - in head/release: amd64 arm64 i386 powerpc sparc64

2017-11-17 Thread Glen Barber
Author: gjb
Date: Fri Nov 17 18:00:52 2017
New Revision: 325953
URL: https://svnweb.freebsd.org/changeset/base/325953

Log:
  Add general configuration files used by release/release.sh for
  big-iron installation images.
  
  MFC after:3 days
  MFC with: r325948, r325949, r325950, r325951
  Sponsored by: The FreeBSD Foundation

Added:
  head/release/amd64/amd64.conf   (contents, props changed)
  head/release/arm64/aarch64.conf   (contents, props changed)
  head/release/i386/i386.conf   (contents, props changed)
  head/release/powerpc/powerpc.conf   (contents, props changed)
  head/release/powerpc/powerpc64.conf   (contents, props changed)
  head/release/powerpc/powerpcspe.conf   (contents, props changed)
  head/release/sparc64/sparc64.conf   (contents, props changed)

Added: head/release/amd64/amd64.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/amd64/amd64.conf   Fri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build amd64/amd64.
+
+TARGET="amd64"
+TARGET_ARCH="amd64"
+KERNEL="GENERIC"

Added: head/release/arm64/aarch64.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/arm64/aarch64.conf Fri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build arm64/aarch64
+# big-iron installation images (not system-on-chip (SoC) images).
+
+TARGET="arm64"
+TARGET_ARCH="aarch64"
+KERNEL="GENERIC"

Added: head/release/i386/i386.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/i386/i386.conf Fri Nov 17 18:00:52 2017(r325953)
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build i386/i386.
+# Note: CHROOT_MAKEENV assumes the build host is amd64.
+
+TARGET="i386"
+TARGET_ARCH="i386"
+KERNEL="GENERIC"
+CHROOT_MAKEENV="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}"

Added: head/release/powerpc/powerpc.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/powerpc/powerpc.conf   Fri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build powerpc/powerpc.
+
+TARGET="powerpc"
+TARGET_ARCH="powerpc"
+KERNEL="GENERIC"

Added: head/release/powerpc/powerpc64.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/powerpc/powerpc64.conf Fri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build powerpc/powerpc64.
+
+TARGET="powerpc"
+TARGET_ARCH="powerpc64"
+KERNEL="GENERIC64"

Added: head/release/powerpc/powerpcspe.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/powerpc/powerpcspe.confFri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build powerpc/powerpcspe.
+
+TARGET="powerpc"
+TARGET_ARCH="powerpcspe"
+KERNEL="MPC85XXSPE"

Added: head/release/sparc64/sparc64.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/sparc64/sparc64.conf   Fri Nov 17 18:00:52 2017
(r325953)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Configuration file for release/release.sh to build sparc64/sparc64.
+
+TARGET="sparc64"
+TARGET_ARCH="sparc64"
+KERNEL="GENERIC"
___
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: r325952 - head/sys/x86/include

2017-11-17 Thread Ruslan Bukin
Author: br
Date: Fri Nov 17 17:54:10 2017
New Revision: 325952
URL: https://svnweb.freebsd.org/changeset/base/325952

Log:
  Add Intel Processor Trace registers for:
  - CPUID
  - Table of Physical Addresses (ToPA).
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/x86/include/specialreg.h

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Fri Nov 17 17:40:53 2017
(r325951)
+++ head/sys/x86/include/specialreg.h   Fri Nov 17 17:54:10 2017
(r325952)
@@ -188,6 +188,35 @@
 #defineCPUTPM1_ARAT0x0004
 #defineCPUTPM2_EFFREQ  0x0001
 
+/* Intel Processor Trace CPUID. */
+
+/* Leaf 0 ebx. */
+#defineCPUPT_CR3   (1 << 0)/* CR3 Filtering 
Support */
+#defineCPUPT_PSB   (1 << 1)/* Configurable PSB and 
Cycle-Accurate Mode Supported */
+#defineCPUPT_IPF   (1 << 2)/* IP Filtering and 
TraceStop supported */
+#defineCPUPT_MTC   (1 << 3)/* MTC Supported */
+#defineCPUPT_PRW   (1 << 4)/* PTWRITE Supported */
+#defineCPUPT_PWR   (1 << 5)/* Power Event Trace 
Supported */
+
+/* Leaf 0 ecx. */
+#defineCPUPT_TOPA  (1 << 0)/* ToPA Output 
Supported */
+#defineCPUPT_TOPA_MULTI(1 << 1)/* ToPA Tables Allow 
Multiple Output Entries */
+#defineCPUPT_SINGLE(1 << 2)/* Single-Range Output 
Supported */
+#defineCPUPT_TT_OUT(1 << 3)/* Output to Trace 
Transport Subsystem Supported */
+#defineCPUPT_LINEAR_IP (1 << 31)   /* IP Payloads are 
Linear IP, otherwise IP is effective */
+
+/* Leaf 1 eax. */
+#defineCPUPT_NADDR_S   0   /* Number of Address Ranges */
+#defineCPUPT_NADDR_M   (0x7 << CPUPT_NADDR_S)
+#defineCPUPT_MTC_BITMAP_S  16  /* Bitmap of supported MTC 
Period Encodings */
+#defineCPUPT_MTC_BITMAP_M  (0x << CPUPT_MTC_BITMAP_S)
+
+/* Leaf 1 ebx. */
+#defineCPUPT_CT_BITMAP_S   0   /* Bitmap of supported Cycle 
Threshold values */
+#defineCPUPT_CT_BITMAP_M   (0x << CPUPT_CT_BITMAP_S)
+#defineCPUPT_PFE_BITMAP_S  16  /* Bitmap of supported 
Configurable PSB Frequency encoding */
+#defineCPUPT_PFE_BITMAP_M  (0x << CPUPT_PFE_BITMAP_S)
+
 /*
  * Important bits in the AMD extended cpuid flags
  */
@@ -601,6 +630,29 @@
 #defineMSR_IA32_RTIT_ADDR2_B   0x585   /* Region 2 End Address 
(R/W) */
 #defineMSR_IA32_RTIT_ADDR3_A   0x586   /* Region 3 Start 
Address (R/W) */
 #defineMSR_IA32_RTIT_ADDR3_B   0x587   /* Region 3 End Address 
(R/W) */
+
+/* Intel Processor Trace Table of Physical Addresses (ToPA). */
+#defineTOPA_SIZE_S 6
+#defineTOPA_SIZE_M (0xf << TOPA_SIZE_S)
+#defineTOPA_SIZE_4K(0 << TOPA_SIZE_S)
+#defineTOPA_SIZE_8K(1 << TOPA_SIZE_S)
+#defineTOPA_SIZE_16K   (2 << TOPA_SIZE_S)
+#defineTOPA_SIZE_32K   (3 << TOPA_SIZE_S)
+#defineTOPA_SIZE_64K   (4 << TOPA_SIZE_S)
+#defineTOPA_SIZE_128K  (5 << TOPA_SIZE_S)
+#defineTOPA_SIZE_256K  (6 << TOPA_SIZE_S)
+#defineTOPA_SIZE_512K  (7 << TOPA_SIZE_S)
+#defineTOPA_SIZE_1M(8 << TOPA_SIZE_S)
+#defineTOPA_SIZE_2M(9 << TOPA_SIZE_S)
+#defineTOPA_SIZE_4M(10 << TOPA_SIZE_S)
+#defineTOPA_SIZE_8M(11 << TOPA_SIZE_S)
+#defineTOPA_SIZE_16M   (12 << TOPA_SIZE_S)
+#defineTOPA_SIZE_32M   (13 << TOPA_SIZE_S)
+#defineTOPA_SIZE_64M   (14 << TOPA_SIZE_S)
+#defineTOPA_SIZE_128M  (15 << TOPA_SIZE_S)
+#defineTOPA_STOP   (1 << 4)
+#defineTOPA_INT(1 << 2)
+#defineTOPA_END(1 << 0)
 
 /*
  * Constants related to MSR's.
___
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: r325951 - head/release/arm64

2017-11-17 Thread Glen Barber
Author: gjb
Date: Fri Nov 17 17:40:53 2017
New Revision: 325951
URL: https://svnweb.freebsd.org/changeset/base/325951

Log:
  Fix indentation.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm64/RPI3.conf

Modified: head/release/arm64/RPI3.conf
==
--- head/release/arm64/RPI3.confFri Nov 17 17:36:45 2017
(r325950)
+++ head/release/arm64/RPI3.confFri Nov 17 17:40:53 2017
(r325951)
@@ -41,9 +41,9 @@ arm_install_uboot() {
done
 
BOOTFILES="$(chroot ${CHROOTDIR} \
-   env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
-   WITH_UNIFIED_OBJDIR=yes \
-   make -C ${WORLDDIR}/stand -V .OBJDIR)"
+   env TARGET=${EMBEDDED_TARGET} 
TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
+   WITH_UNIFIED_OBJDIR=yes \
+   make -C ${WORLDDIR}/stand -V .OBJDIR)"
BOOTFILES="$(realpath ${BOOTFILES})"
 
chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
___
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: r325950 - head/release/arm

2017-11-17 Thread Glen Barber
Author: gjb
Date: Fri Nov 17 17:36:45 2017
New Revision: 325950
URL: https://svnweb.freebsd.org/changeset/base/325950

Log:
  Sort variables for consistency.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm/BANANAPI.conf
  head/release/arm/BEAGLEBONE.conf
  head/release/arm/CUBIEBOARD.conf
  head/release/arm/CUBIEBOARD2.conf
  head/release/arm/CUBOX-HUMMINGBOARD.conf
  head/release/arm/GUMSTIX.conf
  head/release/arm/PANDABOARD.conf
  head/release/arm/RPI-B.conf
  head/release/arm/RPI2.conf
  head/release/arm/WANDBOARD.conf

Modified: head/release/arm/BANANAPI.conf
==
--- head/release/arm/BANANAPI.conf  Fri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/BANANAPI.conf  Fri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="armv7"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-bananapi"
-KERNEL="GENERIC"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="32m -b 1m"
 FAT_TYPE="16"
+IMAGE_SIZE="3072M"
+KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="BANANAPI"
 
 arm_install_uboot() {

Modified: head/release/arm/BEAGLEBONE.conf
==
--- head/release/arm/BEAGLEBONE.confFri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/BEAGLEBONE.confFri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="armv7"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-beaglebone"
-KERNEL="GENERIC"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="2m"
 FAT_TYPE="12"
+IMAGE_SIZE="3072M"
+KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="BEAGLEBONE"
 
 arm_install_uboot() {

Modified: head/release/arm/CUBIEBOARD.conf
==
--- head/release/arm/CUBIEBOARD.confFri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/CUBIEBOARD.confFri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="armv7"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-cubieboard"
-KERNEL="GENERIC"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="32m -b 1m"
 FAT_TYPE="16"
+IMAGE_SIZE="3072M"
+KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="CUBIEBOARD"
 
 arm_install_uboot() {

Modified: head/release/arm/CUBIEBOARD2.conf
==
--- head/release/arm/CUBIEBOARD2.conf   Fri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/CUBIEBOARD2.conf   Fri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="armv7"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-cubieboard2"
-KERNEL="GENERIC"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="32m -b 1m"
 FAT_TYPE="16"
+IMAGE_SIZE="3072M"
+KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="CUBIEBOARD2"
 
 arm_install_uboot() {

Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf
==
--- head/release/arm/CUBOX-HUMMINGBOARD.confFri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/CUBOX-HUMMINGBOARD.confFri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="armv7"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard"
-KERNEL="IMX6"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="50m -b 16384"
 FAT_TYPE="16"
+IMAGE_SIZE="3072M"
+KERNEL="IMX6"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="CUBOX-HUMMINGBOARD"
 
 arm_install_uboot() {

Modified: head/release/arm/GUMSTIX.conf
==
--- head/release/arm/GUMSTIX.conf   Fri Nov 17 17:34:52 2017
(r325949)
+++ head/release/arm/GUMSTIX.conf   Fri Nov 17 17:36:45 2017
(r325950)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm"
 EMBEDDED_TARGET_ARCH="arm"
+EMBEDDED_TARGET="arm"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-duovero"
-KERNEL="GUMSTIX"
-IMAGE_SIZE="3072M"
-PART_SCHEME="MBR"
 FAT_SIZE="2m"
 FAT_TYPE="12"
+IMAGE_SIZE="3072M"
+KERNEL="GUMSTIX"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 
 arm_install_uboot() {
UBOOT_DIR="/usr/local/share/u-boot/u-boot-duovero"

Modified: head/release/arm/PANDABOARD.conf

svn commit: r325949 - head/release/arm64

2017-11-17 Thread Glen Barber
Author: gjb
Date: Fri Nov 17 17:34:52 2017
New Revision: 325949
URL: https://svnweb.freebsd.org/changeset/base/325949

Log:
  Sort variables in arm64 SoC configurations.
  Remove an unneeded UBLDR_LOADADDR from RPI3.conf.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm64/PINE64.conf
  head/release/arm64/RPI3.conf

Modified: head/release/arm64/PINE64.conf
==
--- head/release/arm64/PINE64.conf  Fri Nov 17 17:33:06 2017
(r325948)
+++ head/release/arm64/PINE64.conf  Fri Nov 17 17:34:52 2017
(r325949)
@@ -3,17 +3,17 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm64"
 EMBEDDED_TARGET_ARCH="aarch64"
+EMBEDDED_TARGET="arm64"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-pine64"
-KERNEL="GENERIC"
-IMAGE_SIZE="2560M"
-PART_SCHEME="MBR"
 FAT_SIZE="54m -b 1m"
 FAT_TYPE="16"
+IMAGE_SIZE="2560M"
+KERNEL="GENERIC"
 MD_ARGS="-x 16384 -y 255"
 NODOC=1
+PART_SCHEME="MBR"
 export BOARDNAME="PINE64"
 
 arm_install_uboot() {

Modified: head/release/arm64/RPI3.conf
==
--- head/release/arm64/RPI3.confFri Nov 17 17:33:06 2017
(r325948)
+++ head/release/arm64/RPI3.confFri Nov 17 17:34:52 2017
(r325949)
@@ -3,21 +3,20 @@
 # $FreeBSD$
 #
 
-EMBEDDEDBUILD=1
-EMBEDDED_TARGET="arm64"
+DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot;
+DTB="bcm2710-rpi-3-b.dtb"
 EMBEDDED_TARGET_ARCH="aarch64"
+EMBEDDED_TARGET="arm64"
+EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss"
-KERNEL="GENERIC"
-WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x4200"
-IMAGE_SIZE="2560M"
-PART_SCHEME="MBR"
 FAT_SIZE="50m -b 1m"
 FAT_TYPE="16"
+IMAGE_SIZE="2560M"
+KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
-DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot;
-DTB="bcm2710-rpi-3-b.dtb"
 OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo"
+PART_SCHEME="MBR"
 export BOARDNAME="RPI3"
 
 arm_install_uboot() {
___
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: r325948 - head/release/arm64

2017-11-17 Thread Glen Barber
Author: gjb
Date: Fri Nov 17 17:33:06 2017
New Revision: 325948
URL: https://svnweb.freebsd.org/changeset/base/325948

Log:
  Remove stray SRCBRANCH included by mistake.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm64/PINE64.conf
  head/release/arm64/RPI3.conf

Modified: head/release/arm64/PINE64.conf
==
--- head/release/arm64/PINE64.conf  Fri Nov 17 17:13:00 2017
(r325947)
+++ head/release/arm64/PINE64.conf  Fri Nov 17 17:33:06 2017
(r325948)
@@ -3,7 +3,6 @@
 # $FreeBSD$
 #
 
-SRCBRANCH="base/head@rHEAD"
 EMBEDDEDBUILD=1
 EMBEDDED_TARGET="arm64"
 EMBEDDED_TARGET_ARCH="aarch64"

Modified: head/release/arm64/RPI3.conf
==
--- head/release/arm64/RPI3.confFri Nov 17 17:13:00 2017
(r325947)
+++ head/release/arm64/RPI3.confFri Nov 17 17:33:06 2017
(r325948)
@@ -3,7 +3,6 @@
 # $FreeBSD$
 #
 
-SRCBRANCH="base/head@rHEAD"
 EMBEDDEDBUILD=1
 EMBEDDED_TARGET="arm64"
 EMBEDDED_TARGET_ARCH="aarch64"
___
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: r324938 - head/contrib/jemalloc/include/jemalloc/internal

2017-11-17 Thread Tijl Coosemans
On Mon, 23 Oct 2017 21:31:04 + (UTC) Dimitry Andric  
wrote:
> Author: dim
> Date: Mon Oct 23 21:31:04 2017
> New Revision: 324938
> URL: https://svnweb.freebsd.org/changeset/base/324938
> 
> Log:
>   After jemalloc was updated to version 5.0.0 in r319971, i386 executables
>   linked with AddressSanitizer (even those linked on earlier versions of
>   FreeBSD, or with external versions of clang) started failing with errors
>   similar to:
>   
> ==14688==AddressSanitizer CHECK failed:
> /usr/src/contrib/compiler-rt/lib/asan/asan_poisoning.cc:36
> "((AddrIsAlignedByGranularity(addr))) != (0)" (0x0, 0x0)
>   
>   This is because AddressSanitizer expects all the TLS data in the program
>   to be aligned to at least 8 bytes.
>   
>   Before the jemalloc 5.0.0 update, all the TLS data in the i386 version
>   of libc.so added up to 80 bytes (a multiple of 8), but 5.0.0 made this
>   grow to 2404 bytes (not a multiple of 8).  This is due to added caching
>   data in jemalloc's internal struct tsd_s.
>   
>   To fix AddressSanitizer, ensure this struct is aligned to at least 16
>   bytes, which can be done unconditionally for all architectures.  (An
>   earlier version of the fix aligned the struct to 8 bytes, but only for
>   ILP32 architectures.  This was deemed unnecessarily complicated.)
>   
>   PR: 221337
>   X-MFC-With: r319971
> 
> Modified:
>   head/contrib/jemalloc/include/jemalloc/internal/tsd.h
> 
> Modified: head/contrib/jemalloc/include/jemalloc/internal/tsd.h
> ==
> --- head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Oct 23 
> 20:50:08 2017(r324937)
> +++ head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Oct 23 
> 21:31:04 2017(r324938)
> @@ -120,7 +120,8 @@ struct tsd_s {
>   t use_a_getter_or_setter_instead_##n;
>  MALLOC_TSD
>  #undef O
> -};
> +/* AddressSanitizer requires TLS data to be aligned to at least 8 bytes. */
> +} JEMALLOC_ALIGNED(16);
>  
>  /*
>   * Wrapper around tsd_t that makes it possible to avoid implicit conversion
> 

On amd64 this commit causes kded4 to crash in libnvidia-tls.so.1 (from
x11/nvidia-driver-304) during KDE startup.  Lowering to 8 byte alignment
fixes the crash.  Note that in libc the TLS segment alignment is 16 now
but the memory size isn't a multiple of 16.  Does rtld handle this
correctly?

Application: KDE Daemon (kded4), signal: Segmentation fault
[KCrash Handler]
#8  0x00081cea3761 in _nv024tls () from /usr/local/lib/libnvidia-tls.so.1
#9  0x00081c7a698c in ?? () from /usr/local/lib/libGL-NVIDIA.so.1
#10 0x00081c78915d in ?? () from /usr/local/lib/libGL-NVIDIA.so.1
#11 0x00081c78966a in ?? () from /usr/local/lib/libGL-NVIDIA.so.1
#12 0x000800616c08 in objlist_call_init (list=0x7fffd100, 
lockstate=0x7fffd098) at /usr/src/libexec/rtld-elf/rtld.c:2670
#13 0x00080061cae2 in dlopen_object (name=0x801fd0c98 
"/usr/local/lib/kde4/kded_powerdevil.so", fd=-1, refobj=0x80063b000, 
lo_flags=2, mode=1, lockstate=0x7fffd098) at 
/usr/src/libexec/rtld-elf/rtld.c:3389
#14 0x000800617fba in rtld_dlopen (name=0x801fd0c98 
"/usr/local/lib/kde4/kded_powerdevil.so", fd=-1, mode=1) at 
/usr/src/libexec/rtld-elf/rtld.c:3264
#15 0x000800617e52 in dlopen (name=0x801fd0c98 
"/usr/local/lib/kde4/kded_powerdevil.so", mode=1) at 
/usr/src/libexec/rtld-elf/rtld.c:3231
#16 0x000802190ddf in ?? () from /usr/local/lib/qt4/libQtCore.so.4
#17 0x00080218959b in ?? () from /usr/local/lib/qt4/libQtCore.so.4
#18 0x000801898d47 in KPluginLoader::load() () from 
/usr/local/lib/libkdecore.so.5
#19 0x000801898b37 in KPluginLoader::factory() () from 
/usr/local/lib/libkdecore.so.5
#20 0x00080c31b473 in ?? () from /usr/local/lib/libkdeinit4_kded4.so
#21 0x00080c31ab29 in ?? () from /usr/local/lib/libkdeinit4_kded4.so
.

% readelf -l /usr/local/lib/libnvidia-tls.so

Elf file type is DYN (Shared object file)
Entry point 0x640
There are 6 program headers, starting at offset 64

Program Headers:
  Type   Offset VirtAddr   PhysAddr
 FileSizMemSiz  FlgAlign
  LOAD   0x 0x 0x
 0x0af0 0x0af0  R E0x20
  LOAD   0x0af0 0x00200af0 0x00200af0
 0x01fc 0x0260  RW 0x20
  DYNAMIC0x0af8 0x00200af8 0x00200af8
 0x0190 0x0190  RW 0x8
  NOTE   0x0ad0 0x0ad0 0x0ad0
 0x0020 0x0020  R  0x4
  TLS0x0af0 0x00200af0 0x00200af0
 0x 0x0030  R  0x8
  GNU_STACK  0x 

svn commit: r325947 - head/sys/cam/scsi

2017-11-17 Thread Alan Somers
Author: asomers
Date: Fri Nov 17 17:13:00 2017
New Revision: 325947
URL: https://svnweb.freebsd.org/changeset/base/325947

Log:
  Fix potential NULL pointer dereference of device physical path
  
  In scsi_dev_advinfo(), if the physical path is being stored and there is a
  malloc failure (malloc(9) is called with M_NOWAIT), we could wind up in a
  situation where the device's physpath_len is set to the length the user
  provided, but the physpath itself is NULL.
  
  If another context then comes in to fetch the physical path value, we would
  wind up trying to memcpy a NULL pointer into the caller's buffer.
  
  So, set the physpath_len to 0 when we free the physpath on entry into the
  store case for the physical path.  Reset the length to a non-zero value only
  after we've successfully malloced a buffer to hold it.
  
  Submitted by: ken
  Reviewed by:  asomers
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/scsi/scsi_xpt.c
==
--- head/sys/cam/scsi/scsi_xpt.cFri Nov 17 16:04:37 2017
(r325946)
+++ head/sys/cam/scsi/scsi_xpt.cFri Nov 17 17:13:00 2017
(r325947)
@@ -2549,8 +2549,8 @@ scsi_dev_advinfo(union ccb *start_ccb)
if (device->physpath != NULL) {
free(device->physpath, M_CAMXPT);
device->physpath = NULL;
+   device->physpath_len = 0;
}
-   device->physpath_len = cdai->bufsiz;
/* Clear existing buffer if zero length */
if (cdai->bufsiz == 0)
break;
@@ -2559,6 +2559,7 @@ scsi_dev_advinfo(union ccb *start_ccb)
start_ccb->ccb_h.status = CAM_REQ_ABORTED;
return;
}
+   device->physpath_len = cdai->bufsiz;
memcpy(device->physpath, cdai->buf, cdai->bufsiz);
} else {
cdai->provsiz = device->physpath_len;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325942 - head

2017-11-17 Thread Gary Jennejohn
On Fri, 17 Nov 2017 15:46:19 + (UTC)
Gordon Tetlow  wrote:

> Author: gordon
> Date: Fri Nov 17 15:46:19 2017
> New Revision: 325942
> URL: https://svnweb.freebsd.org/changeset/base/325942
> 
> Log:
>   Correct grammar nit.
> 
> Modified:
>   head/UPDATING
> 
> Modified: head/UPDATING
> ==
> --- head/UPDATING Fri Nov 17 15:45:35 2017(r325941)
> +++ head/UPDATING Fri Nov 17 15:46:19 2017(r325942)
> @@ -66,7 +66,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
>  20171102:
>   Building in a FreeBSD src checkout will automatically create object
>   directories now rather than store files in the current directory if
> - 'make obj' was not ran.  Calling 'make obj' is no longer necesarry.
> + 'make obj' was not ran.  Calling 'make obj' is no longer necessary.
>   This feature can be disabled by setting WITHOUT_AUTO_OBJ=yes in
>   /etc/src-env.conf (not /etc/src.conf), or passing the option in the
>   environment.
>

"not ran" is bad english. "not run" is correct.

-- 
Gary Jennejohn
___
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: r325946 - head/share/man/man9

2017-11-17 Thread Alan Somers
Author: asomers
Date: Fri Nov 17 16:04:37 2017
New Revision: 325946
URL: https://svnweb.freebsd.org/changeset/base/325946

Log:
  VOP_LOOKUP.9: update locking info
  
  The old description has been inaccurate since at least 243271, if not
  before.
  
  Submitted by: will
  Reviewed by:  kib
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D13108

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

Modified: head/share/man/man9/VOP_LOOKUP.9
==
--- head/share/man/man9/VOP_LOOKUP.9Fri Nov 17 15:49:01 2017
(r325945)
+++ head/share/man/man9/VOP_LOOKUP.9Fri Nov 17 16:04:37 2017
(r325946)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 27, 2017
+.Dd November 17, 2017
 .Dt VOP_LOOKUP 9
 .Os
 .Sh NAME
@@ -121,19 +121,9 @@ If not at end, add name to cache; if at end and neithe
 nor deleting, add name to cache.
 .Ed
 .Sh LOCKS
-The directory,
+The directory
 .Fa dvp
-should be locked on entry.
-If an error (note: the return value
-.Er EJUSTRETURN
-is not considered an error)
-is detected, it will be returned locked.
-Otherwise, it will be unlocked unless both
-.Dv LOCKPARENT
-and
-.Dv ISLASTCN
-are specified in
-.Fa cnp->cn_flags .
+should be locked on entry and exit, regardless of error condition.
 If an entry is found in the directory, it will be returned locked.
 .Sh RETURN VALUES
 Zero is returned with
___
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: r325942 - head

2017-11-17 Thread Gordon Tetlow
Author: gordon
Date: Fri Nov 17 15:46:19 2017
New Revision: 325942
URL: https://svnweb.freebsd.org/changeset/base/325942

Log:
  Correct grammar nit.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Fri Nov 17 15:45:35 2017(r325941)
+++ head/UPDATING   Fri Nov 17 15:46:19 2017(r325942)
@@ -66,7 +66,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 20171102:
Building in a FreeBSD src checkout will automatically create object
directories now rather than store files in the current directory if
-   'make obj' was not ran.  Calling 'make obj' is no longer necesarry.
+   'make obj' was not ran.  Calling 'make obj' is no longer necessary.
This feature can be disabled by setting WITHOUT_AUTO_OBJ=yes in
/etc/src-env.conf (not /etc/src.conf), or passing the option in the
environment.
___
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: r325934 - in head: sbin/fsck_ffs sbin/newfs sys/sys

2017-11-17 Thread Scott Long
Author: scottl
Date: Fri Nov 17 13:12:20 2017
New Revision: 325934
URL: https://svnweb.freebsd.org/changeset/base/325934

Log:
  Rename P_OSREL_CK_CLYGRP to P_OSREL_CK_CYLGRP

Modified:
  head/sbin/fsck_ffs/pass5.c
  head/sbin/newfs/mkfs.c
  head/sys/sys/param.h

Modified: head/sbin/fsck_ffs/pass5.c
==
--- head/sbin/fsck_ffs/pass5.c  Fri Nov 17 13:01:56 2017(r325933)
+++ head/sbin/fsck_ffs/pass5.c  Fri Nov 17 13:12:20 2017(r325934)
@@ -74,7 +74,7 @@ pass5(void)
newcg->cg_niblk = fs->fs_ipg;
if (preen == 0 && yflag == 0 && fs->fs_magic == FS_UFS2_MAGIC &&
fswritefd != -1 && (fs->fs_metackhash & CK_CYLGRP) == 0 &&
-   getosreldate() >= P_OSREL_CK_CLYGRP &&
+   getosreldate() >= P_OSREL_CK_CYLGRP &&
reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) {
fs->fs_metackhash |= CK_CYLGRP;
rewritecg = 1;

Modified: head/sbin/newfs/mkfs.c
==
--- head/sbin/newfs/mkfs.c  Fri Nov 17 13:01:56 2017(r325933)
+++ head/sbin/newfs/mkfs.c  Fri Nov 17 13:12:20 2017(r325934)
@@ -496,7 +496,7 @@ restart:
/*
 * Set flags for metadata that is being check-hashed.
 */
-   if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP)
+   if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CYLGRP)
sblock.fs_metackhash = CK_CYLGRP;
 
/*

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hFri Nov 17 13:01:56 2017(r325933)
+++ head/sys/sys/param.hFri Nov 17 13:12:20 2017(r325934)
@@ -84,7 +84,7 @@
 #defineP_OSREL_SHUTDOWN_ENOTCONN   1100077
 #defineP_OSREL_MAP_GUARD   1200035
 #defineP_OSREL_WRFSBASE1200041
-#defineP_OSREL_CK_CLYGRP   1200046
+#defineP_OSREL_CK_CYLGRP   1200046
 #defineP_OSREL_VMTOTAL64   1200054
 
 #defineP_OSREL_MAJOR(x)((x) / 10)
___
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: r316980 - head/contrib/zstd/programs

2017-11-17 Thread Baptiste Daroussin
On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote:
> Please revert this change.
> 
> First, it introduces the POLA-violating behavior that zstdcat deletes
> its source files.  This is not how zcat/bzcat behaves.

I have modified zstdcat to behave like zcat/bzcat.

The commit you stated is exactly to ensure the zstd(1) command is behaving like
xz, gzip, etc (to the exception of zstdcat which was buggy) this commit is
needed to have those tools a drop-in replacement for other compression programs.
(which is necessary for example to have newsyslog being able to use zstd.)

I committed a change needed in base and I will start a discussion with upstream

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r325930 - head/sys/contrib/zstd/programs

2017-11-17 Thread Baptiste Daroussin
Author: bapt
Date: Fri Nov 17 09:33:29 2017
New Revision: 325930
URL: https://svnweb.freebsd.org/changeset/base/325930

Log:
  Actually commit the right patch for r325929

Modified:
  head/sys/contrib/zstd/programs/zstdcli.c

Modified: head/sys/contrib/zstd/programs/zstdcli.c
==
--- head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:29:26 2017
(r325929)
+++ head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:33:29 2017
(r325930)
@@ -421,7 +421,7 @@ int main(int argCount, const char* argv[])
 /* preset behaviors */
 if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0;
 if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress;
-if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
g_removeSrcFile=0; }
+if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
FIO_setRemoveSrcFile(0); }
 if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; 
FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); }/* 
behave like gzip */
 if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; 
FIO_setRemoveSrcFile(1); }  /* behave 
like gunzip */
 if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } 
 /* behave like gzcat */
___
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: r325929 - head/sys/contrib/zstd/programs

2017-11-17 Thread Baptiste Daroussin
Author: bapt
Date: Fri Nov 17 09:29:26 2017
New Revision: 325929
URL: https://svnweb.freebsd.org/changeset/base/325929

Log:
  Do not remove the sources when zstd is called as zstdcat

Modified:
  head/sys/contrib/zstd/programs/zstdcli.c

Modified: head/sys/contrib/zstd/programs/zstdcli.c
==
--- head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:14:18 2017
(r325928)
+++ head/sys/contrib/zstd/programs/zstdcli.cFri Nov 17 09:29:26 2017
(r325929)
@@ -421,7 +421,7 @@ int main(int argCount, const char* argv[])
 /* preset behaviors */
 if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0;
 if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress;
-if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; }
+if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; 
g_removeSrcFile=0; }
 if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; 
FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); }/* 
behave like gzip */
 if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; 
FIO_setRemoveSrcFile(1); }  /* behave 
like gunzip */
 if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; 
forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } 
 /* behave like gzcat */
___
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"