Re: svn commit: r313821 - in head/sys: dev/cxgb/ulp/iw_cxgb fs/nfsserver kern netinet netinet/libalias netpfil/ipfw

2017-02-16 Thread Bruce Evans

On Thu, 16 Feb 2017, Gleb Smirnoff wrote:


 heh, things are worse. Multiple places you changes are CTR()
macros. Neither inet_ntoa() nor inet_ntoa_r() will work with
them. :(

Basicly non-constant strings can not be logged with KTR. All
the lines you touched should log actual binary value of the
IPv4 address.

I am not asking you to do this work! :) But I couldn't leave
that without a comment.


Nothing in KTR printing (exept %% and literals) works right.  %s is
only works for strings in kernel memory (fetched by kread() in
ktrdump(8)).  All args, even for the string pointers for %s, have type
u_long.  ktrdump doesn't check or translate formats, so all format
descriptors except %lu (possibly qualified) except %lu give undefined
behaviour that mostly works.  ktr_tracepoint() only takes (printing)
args of type u_long, and CTR6() casts to this.  These casts inhibit
type checking, and printf format is defeated by the use of non-const
strings when ktrdump sees the format and by not using a variadic
printf-like function for ktr_tracepoint().


On Thu, Feb 16, 2017 at 08:47:41PM +, Eric van Gyzen wrote:
E> Author: vangyzen
E> Date: Thu Feb 16 20:47:41 2017
E> New Revision: 313821
E> URL: https://svnweb.freebsd.org/changeset/base/313821
E>
E> Log:
E>   Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel
E>
E>   inet_ntoa() cannot be used safely in a multithreaded environment
E>   because it uses a static local buffer. Instead, use inet_ntoa_r()
E>   with a buffer on the caller's stack.


This is a lot of churn.  _r functions are hard to use.  If inet_ntoa()
had not already existed, then someone should have invented it.

It used to be a reasonable hack for functions that return static buffers
to use an array of such buffers, with each caller getting a unique
buffer unless the calls arrive at a high rate or the buffers remain
in use for too long.  This is not good enough with threads and/or
preemption.  The kernel inet_ntoa() didn't even do that.

A good enough inet_ntoa() is easy to implement using alloca().  Something
like:

#define inet_ntoa(in) __extension__ ({  \
char *__cp; \
\
__cp = alloca(16);  \
inet_ntoa_r(in, __cp, 16);  \
})

I don't know how to do this using VLAs.  The allocation must live until
after leaving the the macro.  alloc() maks it live until the end of the
function.  Kernel use must be careful not to allocate too much using
alloca(), but this is not much harder than using explicit auto
declarations.  Compilers usually pessimize the auto declarations for
space, so their space is not overlapped or reclaimed until the end of
the function.  alloca() only creates garbage at a higher rate if it
is used in a loop.

Converting to use malloc() would be worse than using auto declarations,
since malloc() is slower and messier to clean up, though the actual
malloc() can be hidden in a macro like the above.  Implementations
of alloca() on to of malloc() try to do garbage collection on function
return (really on the next call to alloca(), if it detects that results
of previous call(s) are garbage by looking at magic related to the calls).
The latter is related to the simpler implementation with an array of static
buffers.

Even more simply and portably, I think it works to use a per-thread buffer:

chartd_msgbuf[32];  /* Buffer for small messages. */
...
#define td_alloc_msg(size)  ...
#define inet_ntoa(in)   inet_ntoa_r(in, td_alloc_msg(16), 16)

where td_alloc_msg(size) has to allocate 'size' bytes in
curthread->td_msbug, circularly, starting at the previous position.
This is the implementation using a static array, except I made
td_msgbuf[64] generic so that it can be used for other functions with
small buffer sizes other than 16.  The sub-buffers are unique for each
thread provided too many of them aren't used in a single statement.
64 allows just 2 buffers of size 16 for use in code like:

printf("src %s, dst %s\n", inet_ntoa(src), inet_ntoa(dst));

You can also have 2 active assignments of inet_ntoa(any) at a time.  If
you want more, then expand the 32.  This is already easier to use than
the old inet_ntoa(9) -- using that required the discipline of only
having 1 active assignment at a time, and using a UP && !PREEMPTION
kernel to avoid races.

Even more simpler to implement, but harder to use:

chartd_inet_ntoa_buf[16];
...
#define inet_ntoa(in)   inet_ntoa_r(in, curthread->td_inet_ntoa_buf, 16)

Callers now have to copy the result if they want to use more than 1 result.
Old code already did this.

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


svn commit: r313862 - in stable/11/sys/i386: i386 include

2017-02-16 Thread Jason A. Harmening
Author: jah
Date: Fri Feb 17 07:08:37 2017
New Revision: 313862
URL: https://svnweb.freebsd.org/changeset/base/313862

Log:
  MFC r312952:
  
  Implement get_pcpu() for i386 and use it to replace pcpu_find(curcpu)
  in the i386 pmap.
  
  The curcpu macro loads the per-cpu data pointer as its first step,
  so the remaining steps of pcpu_find(curcpu) are circular.

Modified:
  stable/11/sys/i386/i386/pmap.c
  stable/11/sys/i386/include/pcpu.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/i386/i386/pmap.c
==
--- stable/11/sys/i386/i386/pmap.c  Fri Feb 17 06:49:54 2017
(r313861)
+++ stable/11/sys/i386/i386/pmap.c  Fri Feb 17 07:08:37 2017
(r313862)
@@ -441,7 +441,7 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 * CMAP1/CMAP2 are used for zeroing and copying pages.
 * CMAP3 is used for the idle process page zeroing.
 */
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
mtx_init(>pc_cmap_lock, "SYSMAPS", NULL, MTX_DEF);
SYSMAP(caddr_t, pc->pc_cmap_pte1, pc->pc_cmap_addr1, 1)
SYSMAP(caddr_t, pc->pc_cmap_pte2, pc->pc_cmap_addr2, 1)
@@ -4253,7 +4253,7 @@ pmap_zero_page(vm_page_t m)
struct pcpu *pc;
 
sched_pin();
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
cmap_pte2 = pc->pc_cmap_pte2;
mtx_lock(>pc_cmap_lock);
if (*cmap_pte2)
@@ -4286,7 +4286,7 @@ pmap_zero_page_area(vm_page_t m, int off
struct pcpu *pc;
 
sched_pin();
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
cmap_pte2 = pc->pc_cmap_pte2;
mtx_lock(>pc_cmap_lock);
if (*cmap_pte2)
@@ -4337,7 +4337,7 @@ pmap_copy_page(vm_page_t src, vm_page_t 
struct pcpu *pc;
 
sched_pin();
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
cmap_pte1 = pc->pc_cmap_pte1; 
cmap_pte2 = pc->pc_cmap_pte2;
mtx_lock(>pc_cmap_lock);
@@ -4372,7 +4372,7 @@ pmap_copy_pages(vm_page_t ma[], vm_offse
int cnt;
 
sched_pin();
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
cmap_pte1 = pc->pc_cmap_pte1; 
cmap_pte2 = pc->pc_cmap_pte2;
mtx_lock(>pc_cmap_lock);
@@ -5368,7 +5368,7 @@ pmap_flush_page(vm_page_t m)
useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0;
if (useclflushopt || (cpu_feature & CPUID_CLFSH) != 0) {
sched_pin();
-   pc = pcpu_find(curcpu);
+   pc = get_pcpu();
cmap_pte2 = pc->pc_cmap_pte2; 
mtx_lock(>pc_cmap_lock);
if (*cmap_pte2)

Modified: stable/11/sys/i386/include/pcpu.h
==
--- stable/11/sys/i386/include/pcpu.h   Fri Feb 17 06:49:54 2017
(r313861)
+++ stable/11/sys/i386/include/pcpu.h   Fri Feb 17 07:08:37 2017
(r313862)
@@ -76,6 +76,7 @@
 
 extern struct pcpu *pcpup;
 
+#defineget_pcpu()  (pcpup)
 #definePCPU_GET(member)(pcpup->pc_ ## member)
 #definePCPU_ADD(member, val)   (pcpup->pc_ ## member += (val))
 #definePCPU_INC(member)PCPU_ADD(member, 1)
@@ -196,6 +197,15 @@ extern struct pcpu *pcpup;
}   \
 } while (0)
 
+#defineget_pcpu() __extension__ ({ 
\
+   struct pcpu *__pc;  \
+   \
+   __asm __volatile("movl %%fs:%1,%0"  \
+   : "=r" (__pc)   \
+   : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace;  \
+   __pc;   \
+})
+
 #definePCPU_GET(member)__PCPU_GET(pc_ ## member)
 #definePCPU_ADD(member, val)   __PCPU_ADD(pc_ ## member, val)
 #definePCPU_INC(member)__PCPU_INC(pc_ ## member)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313860 - head/sys/dev/aha

2017-02-16 Thread Warner Losh
Author: imp
Date: Fri Feb 17 06:49:46 2017
New Revision: 313860
URL: https://svnweb.freebsd.org/changeset/base/313860

Log:
  Remove residuals of mca support

Modified:
  head/sys/dev/aha/aha.c
  head/sys/dev/aha/ahareg.h

Modified: head/sys/dev/aha/aha.c
==
--- head/sys/dev/aha/aha.c  Fri Feb 17 06:45:04 2017(r313859)
+++ head/sys/dev/aha/aha.c  Fri Feb 17 06:49:46 2017(r313860)
@@ -1,9 +1,8 @@
 /*
- * Generic register and struct definitions for the Adaptech 154x/164x
+ * Generic register and struct definitions for the Adaptech 154x
  * SCSI host adapters. Product specific probe and attach routines can
  * be found in:
  *  aha 1542A/1542B/1542C/1542CF/1542CPaha_isa.c
- *  aha 1640   aha_mca.c
  */
 /*-
  * Copyright (c) 1998 M. Warner Losh.
@@ -339,9 +338,6 @@ aha_fetch_adapter_info(struct aha_softc 
case BOARD_1542:
snprintf(aha->model, sizeof(aha->model), "1540/1542 64 head 
BIOS");
break;
-   case BOARD_1640:
-   snprintf(aha->model, sizeof(aha->model), "1640");
-   break;
case BOARD_1740:
snprintf(aha->model, sizeof(aha->model), "1740A/1742A/1744");
break;

Modified: head/sys/dev/aha/ahareg.h
==
--- head/sys/dev/aha/ahareg.h   Fri Feb 17 06:45:04 2017(r313859)
+++ head/sys/dev/aha/ahareg.h   Fri Feb 17 06:49:46 2017(r313860)
@@ -1,8 +1,8 @@
 /*-
  * Generic register and struct definitions for the Adaptech 1540, 1542,
- * 1640, 1642 SCSI host adapters. Product specific probe and attach
+ * SCSI host adapters. Product specific probe and attach
  * routines can be found in:
- * aha_isa.c, aha_mca.c
+ * aha_isa.c
  *
  * Derived from bt.c written by:
  *
@@ -157,7 +157,6 @@ typedef struct {
 #defineBOARD_1540_16HEAD_BIOS  0x00
 #defineBOARD_1540_64HEAD_BIOS  0x30
 #defineBOARD_1542  0x41/* aha-1540/1542 w/64-h 
bios */
-#defineBOARD_1640  0x42/* aha-1640 */
 #defineBOARD_1740  0x43/* aha-1740A/1742A/1744 
*/
 #defineBOARD_1542C 0x44/* aha-1542C */
 #defineBOARD_1542CF0x45/* aha-1542CF */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313861 - in head: share/man/man4 sys/dev/aha

2017-02-16 Thread Warner Losh
Author: imp
Date: Fri Feb 17 06:49:54 2017
New Revision: 313861
URL: https://svnweb.freebsd.org/changeset/base/313861

Log:
  Remove ahb references as well as 1640 info in aha.4

Modified:
  head/share/man/man4/aha.4
  head/sys/dev/aha/aha.c
  head/sys/dev/aha/ahareg.h

Modified: head/share/man/man4/aha.4
==
--- head/share/man/man4/aha.4   Fri Feb 17 06:49:46 2017(r313860)
+++ head/share/man/man4/aha.4   Fri Feb 17 06:49:54 2017(r313861)
@@ -54,14 +54,9 @@ In
 .Sh DESCRIPTION
 This driver provides access to the
 .Tn SCSI
-bus connected to the Adaptec AHA-154x and AHA-1640 SCSI host adapters.
+bus connected to the Adaptec AHA-154x SCSI host adapters.
 x is 0 for controllers without a floppy drive and 2 for controllers
 that have them.
-For optimum
-performance, Adaptec AHA-174x controllers should be configured in
-enhanced mode and attached via the
-.Xr ahb 4
-driver.
 .Pp
 One device hint entry for every card to be attached by the system is
 required.
@@ -89,16 +84,11 @@ Adaptec AHA-154xCF
 .It
 Adaptec AHA-154xCP
 .It
-Adaptec AHA-1640
-.It
-Adaptec AHA-174x in 154x emulation mode
-.It
 DTC 3290 SCSI controller in 1542 emulation mode
 .It
 Tekram SCSI controllers in 154x emulation mode
 .El
 .Sh SEE ALSO
-.Xr ahb 4 ,
 .Xr ahc 4 ,
 .Xr aic 4 ,
 .Xr cd 4 ,

Modified: head/sys/dev/aha/aha.c
==
--- head/sys/dev/aha/aha.c  Fri Feb 17 06:49:46 2017(r313860)
+++ head/sys/dev/aha/aha.c  Fri Feb 17 06:49:54 2017(r313861)
@@ -338,9 +338,6 @@ aha_fetch_adapter_info(struct aha_softc 
case BOARD_1542:
snprintf(aha->model, sizeof(aha->model), "1540/1542 64 head 
BIOS");
break;
-   case BOARD_1740:
-   snprintf(aha->model, sizeof(aha->model), "1740A/1742A/1744");
-   break;
case BOARD_1542C:
snprintf(aha->model, sizeof(aha->model), "1542C");
break;

Modified: head/sys/dev/aha/ahareg.h
==
--- head/sys/dev/aha/ahareg.h   Fri Feb 17 06:49:46 2017(r313860)
+++ head/sys/dev/aha/ahareg.h   Fri Feb 17 06:49:54 2017(r313861)
@@ -157,7 +157,6 @@ typedef struct {
 #defineBOARD_1540_16HEAD_BIOS  0x00
 #defineBOARD_1540_64HEAD_BIOS  0x30
 #defineBOARD_1542  0x41/* aha-1540/1542 w/64-h 
bios */
-#defineBOARD_1740  0x43/* aha-1740A/1742A/1744 
*/
 #defineBOARD_1542C 0x44/* aha-1542C */
 #defineBOARD_1542CF0x45/* aha-1542CF */
 #defineBOARD_1542CP0x46/* aha-1542CP, plug and 
play */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313859 - in head/sys: kern sys

2017-02-16 Thread Mateusz Guzik
Author: mjg
Date: Fri Feb 17 06:45:04 2017
New Revision: 313859
URL: https://svnweb.freebsd.org/changeset/base/313859

Log:
  Introduce SCHEDULER_STOPPED_TD for use when the thread pointer was already 
read
  
  Sprinkle in few places.

Modified:
  head/sys/kern/kern_condvar.c
  head/sys/kern/kern_synch.c
  head/sys/sys/systm.h

Modified: head/sys/kern/kern_condvar.c
==
--- head/sys/kern/kern_condvar.cFri Feb 17 06:22:05 2017
(r313858)
+++ head/sys/kern/kern_condvar.cFri Feb 17 06:45:04 2017
(r313859)
@@ -122,7 +122,7 @@ _cv_wait(struct cv *cvp, struct lock_obj
"Waiting on \"%s\"", cvp->cv_description);
class = LOCK_CLASS(lock);
 
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return;
 
sleepq_lock(cvp);
@@ -176,7 +176,7 @@ _cv_wait_unlock(struct cv *cvp, struct l
("cv_wait_unlock cannot be used with Giant"));
class = LOCK_CLASS(lock);
 
-   if (SCHEDULER_STOPPED()) {
+   if (SCHEDULER_STOPPED_TD(td)) {
class->lc_unlock(lock);
return;
}
@@ -227,7 +227,7 @@ _cv_wait_sig(struct cv *cvp, struct lock
"Waiting on \"%s\"", cvp->cv_description);
class = LOCK_CLASS(lock);
 
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return (0);
 
sleepq_lock(cvp);
@@ -287,7 +287,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct
"Waiting on \"%s\"", cvp->cv_description);
class = LOCK_CLASS(lock);
 
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return (0);
 
sleepq_lock(cvp);
@@ -349,7 +349,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st
"Waiting on \"%s\"", cvp->cv_description);
class = LOCK_CLASS(lock);
 
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return (0);
 
sleepq_lock(cvp);

Modified: head/sys/kern/kern_synch.c
==
--- head/sys/kern/kern_synch.c  Fri Feb 17 06:22:05 2017(r313858)
+++ head/sys/kern/kern_synch.c  Fri Feb 17 06:45:04 2017(r313859)
@@ -162,7 +162,7 @@ _sleep(void *ident, struct lock_object *
else
class = NULL;
 
-   if (SCHEDULER_STOPPED()) {
+   if (SCHEDULER_STOPPED_TD(td)) {
if (lock != NULL && priority & PDROP)
class->lc_unlock(lock);
return (0);
@@ -250,7 +250,7 @@ msleep_spin_sbt(void *ident, struct mtx 
KASSERT(ident != NULL, ("msleep_spin_sbt: NULL ident"));
KASSERT(TD_IS_RUNNING(td), ("msleep_spin_sbt: curthread not running"));
 
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return (0);
 
sleepq_lock(ident);
@@ -411,7 +411,7 @@ mi_switch(int flags, struct thread *newt
 */
if (kdb_active)
kdb_switch();
-   if (SCHEDULER_STOPPED())
+   if (SCHEDULER_STOPPED_TD(td))
return;
if (flags & SW_VOL) {
td->td_ru.ru_nvcsw++;

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hFri Feb 17 06:22:05 2017(r313858)
+++ head/sys/sys/systm.hFri Feb 17 06:45:04 2017(r313859)
@@ -128,7 +128,11 @@ void   kassert_panic(const char *fmt, ...)
  * Otherwise, the kernel will deadlock since the scheduler isn't
  * going to run the thread that holds any lock we need.
  */
-#defineSCHEDULER_STOPPED() __predict_false(curthread->td_stopsched)
+#defineSCHEDULER_STOPPED_TD(td)  ({
\
+   MPASS((td) == curthread);   \
+   __predict_false((td)->td_stopsched);\
+})
+#defineSCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread)
 
 /*
  * Align variables.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313850 - in head/sys/cddl/dev/dtrace: amd64 i386

2017-02-16 Thread Bruce Evans

On Fri, 17 Feb 2017, Mark Johnston wrote:


Log:
 Directly include needed headers rather than relying on pollution.

 We get machine/cpu.h via kmem.h -> proc.h -> _vm_domain.h -> seq.h.


machine/cpu.h is not added here.  Do you mean machine/cpufnc.h?


Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Feb 17 00:50:00 
2017(r313849)
+++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Feb 17 03:27:20 
2017(r313850)
@@ -41,7 +41,9 @@
#include 
#include 
#include 
+#include 


This was correct.   is standard pollution in ,
and it is a style bug to include it directly, and a bug to not include
 after  and before all other headers in kernel
.c files.

It is pollution to include  in any header except
.  kmem.h has grosser pollution (param, proc, malloc, vmem,
vm/uma, vm/vm, vm/vm_extern, but not systm which is a prerequisite for
most of the other headers that kmem.h includes).  Most of the other headers
also have gross pollution, ending with seq.h which includes systm.h and
its standard pollution.

seq.h also includes machine/cpu.h.  Apparently kmem.h does depend on this,
and this commit doesn't fix it.

seq.h also has a nonsense include of sys/types.h after sys/systm.h.
sys/types.h is a prerequisite for sys/systm.h, and is apparently usually
suppied for seq.h in the usual way by including sys/param.h before all
other headers in kernel files.

seq.h is also polluted with sys/lock.h.  It apparently only does this
to get MPASS() defined.  MPASS() has nothing to do with the locking
in lock.h, and isn't even used there.  It is just a trivial wrapper
for KASSERT and probably belongs next to the definition of KASSERT()
in systm.h.  This wrapper mostly subtracts value by adding "Assertion...
failed" and __FILE__ and __LINE__ to KASSERT().  That is, it makes the
output format more like user assert().  But KASSERT() intentionally
doesn't use this format, since is too generic.  MPASS() is easier to
use, and I suspect most uses of it are because of this and not because
it is any good.  In kern, there are 1214 KASSERT()s and 346 MPASS(),
with MPASS().


#include 
+#include 


This include is not mentioned in the log message.

machine/psl.h is stamdard pollution in machine/cpu.h (on at least amd64 and
i386), so would not be needed here if machine/cpu.h had been spelled
correctly.


#include 

extern void dtrace_getnanotime(struct timespec *tsp);


The timestamping seems over-engineered, but it has a chance of working,
unlike KTR timestamps which just used unscaled get_cyclecount() whatever
that is (it is raw TSC on most x86, and KTR doesn't even record its
current frequency to give the user a chance of scaling).

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


svn commit: r313858 - head/sys/sys

2017-02-16 Thread Warner Losh
Author: imp
Date: Fri Feb 17 06:22:05 2017
New Revision: 313858
URL: https://svnweb.freebsd.org/changeset/base/313858

Log:
  Bump FreeBSD_version to 1200021 for removal of EISA and MCA.

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hFri Feb 17 06:22:00 2017(r313857)
+++ head/sys/sys/param.hFri Feb 17 06:22:05 2017(r313858)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1200020  /* Master, propagated to newvers */
+#define __FreeBSD_version 1200021  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313857 - head

2017-02-16 Thread Warner Losh
Author: imp
Date: Fri Feb 17 06:22:00 2017
New Revision: 313857
URL: https://svnweb.freebsd.org/changeset/base/313857

Log:
  Note EISA and MCA bus removal

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Fri Feb 17 06:13:49 2017(r313856)
+++ head/UPDATING   Fri Feb 17 06:22:00 2017(r313857)
@@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12
 
 ** SPECIAL WARNING: **
 
+20170216:
+   EISA bus support has been removed. The WITH_EISA option is no longer
+   valid.
+
+20170215:
+   MCA bus support has been removed.
+
 20170127:
The WITH_LLD_AS_LD / WITHOUT_LLD_AS_LD build knobs have been renamed
WITH_LLD_IS_LD / WITHOUT_LLD_IS_LD, for consistency with CLANG_IS_CC.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313856 - head/sys/conf

2017-02-16 Thread Warner Losh
Author: imp
Date: Fri Feb 17 06:13:49 2017
New Revision: 313856
URL: https://svnweb.freebsd.org/changeset/base/313856

Log:
  Remove EISA build option

Modified:
  head/sys/conf/kern.opts.mk

Modified: head/sys/conf/kern.opts.mk
==
--- head/sys/conf/kern.opts.mk  Fri Feb 17 05:39:40 2017(r313855)
+++ head/sys/conf/kern.opts.mk  Fri Feb 17 06:13:49 2017(r313856)
@@ -45,7 +45,6 @@ __DEFAULT_YES_OPTIONS = \
 ZFS
 
 __DEFAULT_NO_OPTIONS = \
-EISA \
 EXTRA_TCP_STACKS \
 NAND \
 OFED \
@@ -77,10 +76,6 @@ BROKEN_OPTIONS+= ZFS
 
 # Things that don't work because the kernel doesn't have the support
 # for them.
-.if ${MACHINE} != "i386"
-BROKEN_OPTIONS+= EISA
-.endif
-
 .if ${MACHINE} != "i386" && ${MACHINE} != "amd64"
 BROKEN_OPTIONS+= OFED
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313855 - head/sys/kern

2017-02-16 Thread Mateusz Guzik
Author: mjg
Date: Fri Feb 17 05:39:40 2017
New Revision: 313855
URL: https://svnweb.freebsd.org/changeset/base/313855

Log:
  locks: let primitives for modules unlock without always goging to the slsow 
path
  
  It is only needed if the LOCK_PROFILING is enabled. It has to always check if
  the lock is about to be released which requires an avoidable read if the 
option
  is not specified..

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

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Fri Feb 17 05:22:58 2017(r313854)
+++ head/sys/kern/kern_mutex.c  Fri Feb 17 05:39:40 2017(r313855)
@@ -275,7 +275,11 @@ __mtx_unlock_flags(volatile uintptr_t *c
line);
mtx_assert(m, MA_OWNED);
 
+#ifdef LOCK_PROFILING
__mtx_unlock_sleep(c, opts, file, line);
+#else
+   __mtx_unlock(m, curthread, opts, file, line);
+#endif
TD_LOCKS_DEC(curthread);
 }
 

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Fri Feb 17 05:22:58 2017(r313854)
+++ head/sys/kern/kern_rwlock.c Fri Feb 17 05:39:40 2017(r313855)
@@ -341,7 +341,11 @@ _rw_wunlock_cookie(volatile uintptr_t *c
LOCK_LOG_LOCK("WUNLOCK", >lock_object, 0, rw->rw_recurse, file,
line);
 
+#ifdef LOCK_PROFILING
_rw_wunlock_hard(rw, (uintptr_t)curthread, file, line);
+#else
+   __rw_wunlock(rw, curthread, file, line);
+#endif
 
TD_LOCKS_DEC(curthread);
 }

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Fri Feb 17 05:22:58 2017(r313854)
+++ head/sys/kern/kern_sx.c Fri Feb 17 05:39:40 2017(r313855)
@@ -364,7 +364,11 @@ _sx_xunlock(struct sx *sx, const char *f
WITNESS_UNLOCK(>lock_object, LOP_EXCLUSIVE, file, line);
LOCK_LOG_LOCK("XUNLOCK", >lock_object, 0, sx->sx_recurse, file,
line);
+#ifdef LOCK_PROFILING
_sx_xunlock_hard(sx, (uintptr_t)curthread, file, line);
+#else
+   __sx_xunlock(sx, curthread, file, line);
+#endif
TD_LOCKS_DEC(curthread);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313854 - head/sys/cam/ctl

2017-02-16 Thread Alexander Motin
Author: mav
Date: Fri Feb 17 05:22:58 2017
New Revision: 313854
URL: https://svnweb.freebsd.org/changeset/base/313854

Log:
  Change the way MaxCmdSN is used.
  
  Before this change MaxCmdSN was reported as CmdSN + delta, that made it
  limit number of requests in transmission from the initiator to target,
  that was pretty useless.  After this change MaxCmdSN limits number of
  requests queued to CTL, i.e. maximal queue depth for the initiator.
  The default limit is 256 outstanding requests per initiator at a time.
  
  This code uses existing cs_outstanding_ctl_pdus counter to track queue
  depth.  It's semantics doen't perfectly match, but close enough to not
  add another counter.  Just don't set the maxtags below 2.
  
  MFC after:2 weeks

Modified:
  head/sys/cam/ctl/ctl_frontend_iscsi.c

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==
--- head/sys/cam/ctl/ctl_frontend_iscsi.c   Fri Feb 17 05:09:51 2017
(r313853)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c   Fri Feb 17 05:22:58 2017
(r313854)
@@ -95,10 +95,9 @@ SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO
 static int login_timeout = 60;
 SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, login_timeout, CTLFLAG_RWTUN,
 _timeout, 60, "Time to wait for ctld(8) to finish Login Phase, in 
seconds");
-static int maxcmdsn_delta = 256;
-SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxcmdsn_delta, CTLFLAG_RWTUN,
-_delta, 256, "Number of commands the initiator can send "
-"without confirmation");
+static int maxtags = 256;
+SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxtags, CTLFLAG_RWTUN,
+, 0, "Max number of requests queued by initiator");
 
 #defineCFISCSI_DEBUG(X, ...)   
\
do {\
@@ -244,7 +243,7 @@ cfiscsi_pdu_update_cmdsn(const struct ic
 * outside of this range.
 */
if (ISCSI_SNLT(cmdsn, cs->cs_cmdsn) ||
-   ISCSI_SNGT(cmdsn, cs->cs_cmdsn + maxcmdsn_delta)) {
+   ISCSI_SNGT(cmdsn, cs->cs_cmdsn - 1 + maxtags)) {
CFISCSI_SESSION_UNLOCK(cs);
CFISCSI_SESSION_WARN(cs, "received PDU with CmdSN %u, "
"while expected %u", cmdsn, cs->cs_cmdsn);
@@ -399,7 +398,8 @@ cfiscsi_pdu_prepare(struct icl_pdu *resp
(bhssr->bhssr_flags & BHSDI_FLAGS_S))
bhssr->bhssr_statsn = htonl(cs->cs_statsn);
bhssr->bhssr_expcmdsn = htonl(cs->cs_cmdsn);
-   bhssr->bhssr_maxcmdsn = htonl(cs->cs_cmdsn + maxcmdsn_delta);
+   bhssr->bhssr_maxcmdsn = htonl(cs->cs_cmdsn - 1 +
+   imax(0, maxtags - cs->cs_outstanding_ctl_pdus));
 
if (advance_statsn)
cs->cs_statsn++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313853 - head/sys/kern

2017-02-16 Thread Mateusz Guzik
Author: mjg
Date: Fri Feb 17 05:09:51 2017
New Revision: 313853
URL: https://svnweb.freebsd.org/changeset/base/313853

Log:
  locks: remove SCHEDULER_STOPPED checks from primitives for modules
  
  They all fallback to the slow path if necessary and the check is there.
  
  This means a panicked kernel executing code from modules will be able to
  succeed doing actual lock/unlock, but this was already the case for core code
  which has said primitives inlined.

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

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Fri Feb 17 04:34:17 2017(r313852)
+++ head/sys/kern/kern_mutex.c  Fri Feb 17 05:09:51 2017(r313853)
@@ -231,9 +231,6 @@ __mtx_lock_flags(volatile uintptr_t *c, 
struct mtx *m;
uintptr_t tid, v;
 
-   if (SCHEDULER_STOPPED())
-   return;
-
m = mtxlock2mtx(c);
 
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
@@ -266,9 +263,6 @@ __mtx_unlock_flags(volatile uintptr_t *c
 {
struct mtx *m;
 
-   if (SCHEDULER_STOPPED())
-   return;
-
m = mtxlock2mtx(c);
 
KASSERT(m->mtx_lock != MTX_DESTROYED,

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Fri Feb 17 04:34:17 2017(r313852)
+++ head/sys/kern/kern_rwlock.c Fri Feb 17 05:09:51 2017(r313853)
@@ -267,9 +267,6 @@ _rw_wlock_cookie(volatile uintptr_t *c, 
struct rwlock *rw;
uintptr_t tid, v;
 
-   if (SCHEDULER_STOPPED())
-   return;
-
rw = rwlock2rw(c);
 
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
@@ -335,9 +332,6 @@ _rw_wunlock_cookie(volatile uintptr_t *c
 {
struct rwlock *rw;
 
-   if (SCHEDULER_STOPPED())
-   return;
-
rw = rwlock2rw(c);
 
KASSERT(rw->rw_lock != RW_DESTROYED,

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Fri Feb 17 04:34:17 2017(r313852)
+++ head/sys/kern/kern_sx.c Fri Feb 17 05:09:51 2017(r313853)
@@ -295,8 +295,6 @@ _sx_xlock(struct sx *sx, int opts, const
uintptr_t tid, x;
int error = 0;
 
-   if (SCHEDULER_STOPPED())
-   return (0);
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -360,8 +358,6 @@ void
 _sx_xunlock(struct sx *sx, const char *file, int line)
 {
 
-   if (SCHEDULER_STOPPED())
-   return;
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_xunlock() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_XLOCKED, file, line);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313852 - head/sys/dev/iscsi

2017-02-16 Thread Alexander Motin
Author: mav
Date: Fri Feb 17 04:34:17 2017
New Revision: 313852
URL: https://svnweb.freebsd.org/changeset/base/313852

Log:
  Freeze CAM SIM when request is postponed due to MaxCmdSN.
  
  This allows to avoid resource allocation (especially offload) for requests
  that can not be executed at this time any way.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==
--- head/sys/dev/iscsi/iscsi.c  Fri Feb 17 04:29:23 2017(r313851)
+++ head/sys/dev/iscsi/iscsi.c  Fri Feb 17 04:34:17 2017(r313852)
@@ -231,14 +231,16 @@ iscsi_session_send_postponed(struct iscs
 
ISCSI_SESSION_LOCK_ASSERT(is);
 
-   while (!STAILQ_EMPTY(>is_postponed)) {
-   request = STAILQ_FIRST(>is_postponed);
+   if (STAILQ_EMPTY(>is_postponed))
+   return;
+   while ((request = STAILQ_FIRST(>is_postponed)) != NULL) {
postpone = iscsi_pdu_prepare(request);
if (postpone)
-   break;
+   return;
STAILQ_REMOVE_HEAD(>is_postponed, ip_next);
icl_pdu_queue(request);
}
+   xpt_release_simq(is->is_sim, 1);
 }
 
 static void
@@ -252,6 +254,8 @@ iscsi_pdu_queue_locked(struct icl_pdu *r
iscsi_session_send_postponed(is);
postpone = iscsi_pdu_prepare(request);
if (postpone) {
+   if (STAILQ_EMPTY(>is_postponed))
+   xpt_freeze_simq(is->is_sim, 1);
STAILQ_INSERT_TAIL(>is_postponed, request, ip_next);
return;
}
@@ -339,8 +343,9 @@ iscsi_session_cleanup(struct iscsi_sessi
/*
 * Remove postponed PDUs.
 */
-   while (!STAILQ_EMPTY(>is_postponed)) {
-   pdu = STAILQ_FIRST(>is_postponed);
+   if (!STAILQ_EMPTY(>is_postponed))
+   xpt_release_simq(is->is_sim, 1);
+   while ((pdu = STAILQ_FIRST(>is_postponed)) != NULL) {
STAILQ_REMOVE_HEAD(>is_postponed, ip_next);
icl_pdu_free(pdu);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313851 - head/sys/dev/iscsi

2017-02-16 Thread Alexander Motin
Author: mav
Date: Fri Feb 17 04:29:23 2017
New Revision: 313851
URL: https://svnweb.freebsd.org/changeset/base/313851

Log:
  Fix tight loop spinning on postponed requests.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==
--- head/sys/dev/iscsi/iscsi.c  Fri Feb 17 03:27:20 2017(r313850)
+++ head/sys/dev/iscsi/iscsi.c  Fri Feb 17 04:29:23 2017(r313851)
@@ -475,15 +475,14 @@ iscsi_maintenance_thread_terminate(struc
 static void
 iscsi_maintenance_thread(void *arg)
 {
-   struct iscsi_session *is;
-
-   is = arg;
+   struct iscsi_session *is = arg;
 
+   ISCSI_SESSION_LOCK(is);
for (;;) {
-   ISCSI_SESSION_LOCK(is);
if (is->is_reconnecting == false &&
is->is_terminating == false &&
-   STAILQ_EMPTY(>is_postponed))
+   (STAILQ_EMPTY(>is_postponed) ||
+ISCSI_SNGT(is->is_cmdsn, is->is_maxcmdsn)))
cv_wait(>is_maintenance_cv, >is_lock);
 
/* Terminate supersedes reconnect. */
@@ -497,12 +496,13 @@ iscsi_maintenance_thread(void *arg)
if (is->is_reconnecting) {
ISCSI_SESSION_UNLOCK(is);
iscsi_maintenance_thread_reconnect(is);
+   ISCSI_SESSION_LOCK(is);
continue;
}
 
iscsi_session_send_postponed(is);
-   ISCSI_SESSION_UNLOCK(is);
}
+   ISCSI_SESSION_UNLOCK(is);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313821 - in head/sys: dev/cxgb/ulp/iw_cxgb fs/nfsserver kern netinet netinet/libalias netpfil/ipfw

2017-02-16 Thread Gleb Smirnoff
  Eric,

  heh, things are worse. Multiple places you changes are CTR()
macros. Neither inet_ntoa() nor inet_ntoa_r() will work with
them. :(

Basicly non-constant strings can not be logged with KTR. All
the lines you touched should log actual binary value of the
IPv4 address.

I am not asking you to do this work! :) But I couldn't leave
that without a comment.

On Thu, Feb 16, 2017 at 08:47:41PM +, Eric van Gyzen wrote:
E> Author: vangyzen
E> Date: Thu Feb 16 20:47:41 2017
E> New Revision: 313821
E> URL: https://svnweb.freebsd.org/changeset/base/313821
E> 
E> Log:
E>   Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel
E>   
E>   inet_ntoa() cannot be used safely in a multithreaded environment
E>   because it uses a static local buffer. Instead, use inet_ntoa_r()
E>   with a buffer on the caller's stack.
E>   
E>   Suggested by:  glebius, emaste
E>   Reviewed by:   gnn
E>   MFC after: 2 weeks
E>   Sponsored by:  Dell EMC
E>   Differential Revision: https://reviews.freebsd.org/D9625
E> 
E> Modified:
E>   head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
E>   head/sys/fs/nfsserver/nfs_nfsdkrpc.c
E>   head/sys/kern/kern_jail.c
E>   head/sys/netinet/if_ether.c
E>   head/sys/netinet/igmp.c
E>   head/sys/netinet/in.c
E>   head/sys/netinet/in_mcast.c
E>   head/sys/netinet/ip_icmp.c
E>   head/sys/netinet/ip_mroute.c
E>   head/sys/netinet/ip_options.c
E>   head/sys/netinet/libalias/alias_local.h
E>   head/sys/netinet/libalias/alias_nbt.c
E>   head/sys/netinet/libalias/alias_proxy.c
E>   head/sys/netinet/libalias/alias_sctp.c
E>   head/sys/netinet/tcp_hostcache.c
E>   head/sys/netpfil/ipfw/ip_fw_log.c
E> 
E> Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
E> 
==
E> --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c   Thu Feb 16 20:44:44 
2017(r313820)
E> +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c   Thu Feb 16 20:47:41 
2017(r313821)
E> @@ -1461,6 +1461,9 @@ static void
E>  process_data(struct iwch_ep *ep)
E>  {
E>  struct sockaddr_in *local, *remote;
E> +#ifdef KTR
E> +char local_str[INET_ADDRSTRLEN], remote_str[INET_ADDRSTRLEN];
E> +#endif
E>  
E>  CTR4(KTR_IW_CXGB, "%s ep %p so %p state %s", __FUNCTION__, ep, 
ep->com.so, states[ep->com.state]);
E>  
E> @@ -1479,8 +1482,8 @@ process_data(struct iwch_ep *ep)
E>  in_getsockaddr(ep->com.so, (struct sockaddr **));
E>  in_getpeeraddr(ep->com.so, (struct sockaddr **));
E>  CTR3(KTR_IW_CXGB, "%s local %s remote %s", __FUNCTION__, 
E> -inet_ntoa(local->sin_addr),
E> -inet_ntoa(remote->sin_addr));
E> +inet_ntoa_r(local->sin_addr, local_str),
E> +inet_ntoa_r(remote->sin_addr, remote_str));
E>  ep->com.local_addr = *local;
E>  ep->com.remote_addr = *remote;
E>  free(local, M_SONAME);
E> @@ -1519,6 +1522,9 @@ process_newconn(struct iw_cm_id *parent_
E>  struct sockaddr_in *local;
E>  struct sockaddr_in *remote;
E>  struct iwch_ep *parent_ep = parent_cm_id->provider_data;
E> +#ifdef KTR
E> +char buf[INET_ADDRSTRLEN];
E> +#endif
E>  
E>  CTR3(KTR_IW_CXGB, "%s parent ep %p so %p", __FUNCTION__, parent_ep, 
parent_ep->com.so);
E>  if (!child_so) {
E> @@ -1539,7 +1545,7 @@ process_newconn(struct iw_cm_id *parent_
E>  in_getpeeraddr(child_so, (struct sockaddr **));
E>  
E>  CTR3(KTR_IW_CXGB, "%s remote addr %s port %d", __FUNCTION__, 
E> -inet_ntoa(remote->sin_addr), ntohs(remote->sin_port));
E> +inet_ntoa_r(remote->sin_addr, buf), ntohs(remote->sin_port));
E>  child_ep->com.tdev = parent_ep->com.tdev;
E>  child_ep->com.local_addr.sin_family = 
parent_ep->com.local_addr.sin_family;
E>  child_ep->com.local_addr.sin_port = parent_ep->com.local_addr.sin_port;
E> 
E> Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c
E> 
==
E> --- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 16 20:44:44 2017
(r313820)
E> +++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Feb 16 20:47:41 2017
(r313821)
E> @@ -174,7 +174,11 @@ nfssvc_program(struct svc_req *rqst, SVC
E>  if (port >= IPPORT_RESERVED &&
E>  nd.nd_procnum != NFSPROC_NULL) {
E>  #ifdef INET6
E> -char b6[INET6_ADDRSTRLEN];
E> +char buf[INET6_ADDRSTRLEN];
E> +#else
E> +char buf[INET_ADDRSTRLEN];
E> +#endif
E> +#ifdef INET6
E>  #if defined(KLD_MODULE)
E>  /* Do not use ip6_sprintf: the nfs module should work 
without INET6. */
E>  #define ip6_sprintf(buf, a) 
\
E> @@ -189,12 +193,12 @@ nfssvc_program(struct svc_req *rqst, SVC
E>  printf("NFS request from unprivileged port (%s:%d)\n",
E>  #ifdef INET6
E> 

Re: svn commit: r313821 - in head/sys: dev/cxgb/ulp/iw_cxgb fs/nfsserver kern netinet netinet/libalias netpfil/ipfw

2017-02-16 Thread Gleb Smirnoff
On Thu, Feb 16, 2017 at 08:47:41PM +, Eric van Gyzen wrote:
E> Author: vangyzen
E> Date: Thu Feb 16 20:47:41 2017
E> New Revision: 313821
E> URL: https://svnweb.freebsd.org/changeset/base/313821
E> 
E> Log:
E>   Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel
E>   
E>   inet_ntoa() cannot be used safely in a multithreaded environment
E>   because it uses a static local buffer. Instead, use inet_ntoa_r()
E>   with a buffer on the caller's stack.

Thanks a lot, Eric!

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


svn commit: r313850 - in head/sys/cddl/dev/dtrace: amd64 i386

2017-02-16 Thread Mark Johnston
Author: markj
Date: Fri Feb 17 03:27:20 2017
New Revision: 313850
URL: https://svnweb.freebsd.org/changeset/base/313850

Log:
  Directly include needed headers rather than relying on pollution.
  
  We get machine/cpu.h via kmem.h -> proc.h -> _vm_domain.h -> seq.h.
  
  Reported by:  Ryan Libby
  Sponsored by: Dell EMC Isilon
  X-MFC with:   r313841

Modified:
  head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  head/sys/cddl/dev/dtrace/i386/dtrace_subr.c

Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Feb 17 00:50:00 
2017(r313849)
+++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Feb 17 03:27:20 
2017(r313850)
@@ -41,7 +41,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 extern void dtrace_getnanotime(struct timespec *tsp);

Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Feb 17 00:50:00 2017
(r313849)
+++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Feb 17 03:27:20 2017
(r313850)
@@ -42,7 +42,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 extern uintptr_t   kernelbase;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313849 - stable/11/sys/cddl/dev/dtrace/x86

2017-02-16 Thread Mark Johnston
Author: markj
Date: Fri Feb 17 00:50:00 2017
New Revision: 313849
URL: https://svnweb.freebsd.org/changeset/base/313849

Log:
  MFC r313133:
  Sync the x86 dis_tables.c with upstream.

Modified:
  stable/11/sys/cddl/dev/dtrace/x86/dis_tables.c
  stable/11/sys/cddl/dev/dtrace/x86/dis_tables.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/dev/dtrace/x86/dis_tables.c
==
--- stable/11/sys/cddl/dev/dtrace/x86/dis_tables.c  Fri Feb 17 00:49:01 
2017(r313848)
+++ stable/11/sys/cddl/dev/dtrace/x86/dis_tables.c  Fri Feb 17 00:50:00 
2017(r313849)
@@ -21,7 +21,7 @@
  */
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright 2016 Joyent, Inc.
  */
 
 /*
@@ -87,6 +87,8 @@ typedef structinstable {
uint_t  it_always64:1;  /* 64 bit when in 64 bit mode */
uint_t  it_invalid32:1; /* invalid in IA32 */
uint_t  it_stackop:1;   /* push/pop stack operation */
+   uint_t  it_vexwoxmm:1;  /* VEX instructions that don't 
use XMM/YMM */
+   uint_t  it_avxsuf:1;/* AVX suffix required */
 } instable_t;
 
 /*
@@ -219,6 +221,7 @@ enum {
VEX_NONE,   /* VEX  no operand */
VEX_MO, /* VEX  mod_rm -> implicit reg 
*/
VEX_RMrX,   /* VEX  VEX., mod_rm   -> mod_reg */
+   VEX_VRMrX,  /* VEX  mod_rm, VEX.   -> mod_rm */
VEX_RRX,/* VEX  VEX., mod_reg  -> mod_rm */
VEX_RMRX,   /* VEX  VEX., mod_rm, imm8[7:4]-> mod_reg */
VEX_MX, /* VEX  mod_rm -> mod_reg */
@@ -230,11 +233,16 @@ enum {
VEX_RR, /* VEX  mod_rm -> mod_reg */
VEX_RRi,/* VEX  mod_rm, imm8   -> mod_reg */
VEX_RM, /* VEX  mod_reg-> mod_rm */
+   VEX_RIM,/* VEX  mod_reg, imm8  -> mod_rm */
VEX_RRM,/* VEX  VEX., mod_reg  -> mod_rm */
VEX_RMX,/* VEX  VEX., mod_rm   -> mod_reg */
+   VEX_SbVM,   /* VEX  SIB, VEX.  -> mod_rm */
VMx,/* vmcall/vmlaunch/vmresume/vmxoff */
VMxo,   /* VMx instruction with optional prefix */
-   SVM /* AMD SVM instructions */
+   SVM,/* AMD SVM instructions */
+   BLS,/* BLSR, BLSMSK, BLSI */
+   FMA,/* FMA instructions, all VEX_RMrX */
+   ADX /* ADX instructions, support REX.w, mod_rm->mod_reg */
 };
 
 /*
@@ -272,12 +280,14 @@ enum {
  *   IND - indirect to another to another table
  *   "T" - means to Terminate indirections (this is the final opcode)
  *   "S" - means "operand length suffix required"
+ *   "Sa" - means AVX2 suffix (d/q) required
  *   "NS" - means "no suffix" which is the operand length suffix of the opcode
  *   "Z" - means instruction size arg required
  *   "u" - means the opcode is invalid in IA32 but valid in amd64
  *   "x" - means the opcode is invalid in amd64, but not IA32
  *   "y" - means the operand size is always 64 bits in 64 bit mode
  *   "p" - means push/pop stack operation
+ *   "vr" - means VEX instruction that operates on normal registers, not fpu
  */
 
 #if defined(DIS_TEXT) && defined(DIS_MEM)
@@ -290,11 +300,13 @@ enum {
 #defineTNSyp(name, amode)  {TERM, amode, name, 0, 0, 0, 1, 0, 1}
 #defineTNSZ(name, amode, sz)   {TERM, amode, name, 0, sz, 0, 0, 0, 0}
 #defineTNSZy(name, amode, sz)  {TERM, amode, name, 0, sz, 0, 1, 0, 0}
+#defineTNSZvr(name, amode, sz) {TERM, amode, name, 0, sz, 0, 0, 0, 0, 
1}
 #defineTS(name, amode) {TERM, amode, name, 1, 0, 0, 0, 0, 0}
 #defineTSx(name, amode){TERM, amode, name, 1, 0, 1, 0, 0, 0}
 #defineTSy(name, amode){TERM, amode, name, 1, 0, 0, 1, 0, 0}
 #defineTSp(name, amode){TERM, amode, name, 1, 0, 0, 0, 0, 1}
 #defineTSZ(name, amode, sz){TERM, amode, name, 1, sz, 0, 0, 0, 0}
+#defineTSaZ(name, amode, sz)   {TERM, amode, name, 1, sz, 0, 0, 0, 0, 
0, 1}
 #defineTSZx(name, amode, sz)   {TERM, amode, name, 1, sz, 1, 0, 0, 0}
 #defineTSZy(name, amode, sz)   {TERM, amode, name, 1, sz, 0, 1, 0, 0}
 #defineINVALID {TERM, UNKNOWN, "", 0, 0, 0, 0, 0}
@@ -308,11 +320,13 @@ enum {
 #defineTNSyp(name, amode)  {TERM, amode, name, 0, 0, 1, 0, 1}
 #defineTNSZ(name, amode, sz)   {TERM, amode, name, 0, 0, 0, 0, 0}
 #defineTNSZy(name, amode, sz)  {TERM, amode, name, 0, 0, 1, 0, 0}
+#defineTNSZvr(name, amode, sz) {TERM, 

svn commit: r313848 - stable/10/usr.sbin/kldxref

2017-02-16 Thread Ed Maste
Author: emaste
Date: Fri Feb 17 00:49:01 2017
New Revision: 313848
URL: https://svnweb.freebsd.org/changeset/base/313848

Log:
  MFC r313563: kldxref: bump MAXSEGS to 3
  
  ld.bfd generates two PT_LOAD segments, but certain linkers or linker
  configurations generate three PT_LOAD segments (one additional for
  RELRO).
  
  PR:   216975

Modified:
  stable/10/usr.sbin/kldxref/ef.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/kldxref/ef.c
==
--- stable/10/usr.sbin/kldxref/ef.c Fri Feb 17 00:47:43 2017
(r313847)
+++ stable/10/usr.sbin/kldxref/ef.c Fri Feb 17 00:49:01 2017
(r313848)
@@ -47,7 +47,7 @@
 
 #include "ef.h"
 
-#defineMAXSEGS 2
+#defineMAXSEGS 3
 struct ef_file {
char*   ef_name;
struct elf_file *ef_efile;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313847 - stable/10/usr.sbin/kldxref

2017-02-16 Thread Ed Maste
Author: emaste
Date: Fri Feb 17 00:47:43 2017
New Revision: 313847
URL: https://svnweb.freebsd.org/changeset/base/313847

Log:
  MFC r313562: kldxref: s/sections/segments/ in warning message
  
  The message refers to program header segments, not sections.
  
  PR:   216975

Modified:
  stable/10/usr.sbin/kldxref/ef.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/kldxref/ef.c
==
--- stable/10/usr.sbin/kldxref/ef.c Fri Feb 17 00:46:16 2017
(r313846)
+++ stable/10/usr.sbin/kldxref/ef.c Fri Feb 17 00:47:43 2017
(r313847)
@@ -600,7 +600,7 @@ ef_open(const char *filename, struct elf
filename);
break;
} else if (nsegs > MAXSEGS) {
-   warnx("%s: too many sections", filename);
+   warnx("%s: too many segments", filename);
break;
}
ef->ef_nsegs = nsegs;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313846 - stable/11/usr.sbin/kldxref

2017-02-16 Thread Ed Maste
Author: emaste
Date: Fri Feb 17 00:46:16 2017
New Revision: 313846
URL: https://svnweb.freebsd.org/changeset/base/313846

Log:
  MFC r313563: kldxref: bump MAXSEGS to 3
  
  ld.bfd generates two PT_LOAD segments, but certain linkers or linker
  configurations generate three PT_LOAD segments (one additional for
  RELRO).
  
  PR:   216975

Modified:
  stable/11/usr.sbin/kldxref/ef.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/kldxref/ef.c
==
--- stable/11/usr.sbin/kldxref/ef.c Fri Feb 17 00:44:48 2017
(r313845)
+++ stable/11/usr.sbin/kldxref/ef.c Fri Feb 17 00:46:16 2017
(r313846)
@@ -47,7 +47,7 @@
 
 #include "ef.h"
 
-#defineMAXSEGS 2
+#defineMAXSEGS 3
 struct ef_file {
char*   ef_name;
struct elf_file *ef_efile;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313845 - stable/11/usr.sbin/kldxref

2017-02-16 Thread Ed Maste
Author: emaste
Date: Fri Feb 17 00:44:48 2017
New Revision: 313845
URL: https://svnweb.freebsd.org/changeset/base/313845

Log:
  MFC r313562: kldxref: s/sections/segments/ in warning message
  
  The message refers to program header segments, not sections.
  
  PR:   216975

Modified:
  stable/11/usr.sbin/kldxref/ef.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/kldxref/ef.c
==
--- stable/11/usr.sbin/kldxref/ef.c Fri Feb 17 00:38:32 2017
(r313844)
+++ stable/11/usr.sbin/kldxref/ef.c Fri Feb 17 00:44:48 2017
(r313845)
@@ -600,7 +600,7 @@ ef_open(const char *filename, struct elf
filename);
break;
} else if (nsegs > MAXSEGS) {
-   warnx("%s: too many sections", filename);
+   warnx("%s: too many segments", filename);
break;
}
ef->ef_nsegs = nsegs;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313844 - stable/10/sys/sys

2017-02-16 Thread Konstantin Belousov
Author: kib
Date: Fri Feb 17 00:38:32 2017
New Revision: 313844
URL: https://svnweb.freebsd.org/changeset/base/313844

Log:
  MFC r313715:
  Order alphabetically.

Modified:
  stable/10/sys/sys/syscallsubr.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/syscallsubr.h
==
--- stable/10/sys/sys/syscallsubr.h Fri Feb 17 00:36:12 2017
(r313843)
+++ stable/10/sys/sys/syscallsubr.h Fri Feb 17 00:38:32 2017
(r313844)
@@ -158,8 +158,8 @@ int kern_mknod(struct thread *td, char *
 intkern_mknodat(struct thread *td, int fd, char *path,
enum uio_seg pathseg, int mode, int dev);
 intkern_msgctl(struct thread *, int, int, struct msqid_ds *);
-intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 intkern_msgrcv(struct thread *, int, void *, size_t, long, int, long *);
+intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 int kern_nanosleep(struct thread *td, struct timespec *rqt,
struct timespec *rmt);
 intkern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313843 - stable/11/sys/sys

2017-02-16 Thread Konstantin Belousov
Author: kib
Date: Fri Feb 17 00:36:12 2017
New Revision: 313843
URL: https://svnweb.freebsd.org/changeset/base/313843

Log:
  MFC r313715:
  Order alphabetically.

Modified:
  stable/11/sys/sys/syscallsubr.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/sys/syscallsubr.h
==
--- stable/11/sys/sys/syscallsubr.h Thu Feb 16 23:38:30 2017
(r313842)
+++ stable/11/sys/sys/syscallsubr.h Fri Feb 17 00:36:12 2017
(r313843)
@@ -145,8 +145,8 @@ int kern_mkfifoat(struct thread *td, int
 intkern_mknodat(struct thread *td, int fd, char *path,
enum uio_seg pathseg, int mode, int dev);
 intkern_msgctl(struct thread *, int, int, struct msqid_ds *);
-intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 intkern_msgrcv(struct thread *, int, void *, size_t, long, int, long *);
+intkern_msgsnd(struct thread *, int, const void *, size_t, int, long);
 int kern_nanosleep(struct thread *td, struct timespec *rqt,
struct timespec *rmt);
 intkern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313822 - in head/sys: libkern netinet

2017-02-16 Thread Ngie Cooper
On Thu, Feb 16, 2017 at 4:16 PM, Ngie Cooper  wrote:
> On Thu, Feb 16, 2017 at 12:50 PM, Eric van Gyzen  wrote:
>> Author: vangyzen
>> Date: Thu Feb 16 20:50:01 2017
>> New Revision: 313822
>> URL: https://svnweb.freebsd.org/changeset/base/313822
>>
>> Log:
>>   Remove inet_ntoa() from the kernel
>>
>>   inet_ntoa() cannot be used safely in a multithreaded environment
>>   because it uses a static local buffer.  Remove it from the kernel.
>
> Uh did you mean to remove it from netinet/in.h ? This gets
> used in userspace too...

Oh good grief -- there were 3 definitions??? Ok, I see you deleted the
libkern one. Nevermind... carry on!
-Ngie

$ grep -r inet_ntoa /usr/include/
/usr/include/netinet/in.h:char  *inet_ntoa(struct in_addr); /* in libkern */
/usr/include/netinet/in.h:char  *inet_ntoa_r(struct in_addr ina, char
*buf); /* in libkern */
/usr/include/arpa/inet.h:#defineinet_ntoa   __inet_ntoa
/usr/include/arpa/inet.h:#defineinet_ntoa_r __inet_ntoa_r
/usr/include/arpa/inet.h:/*const*/ char *inet_ntoa(struct in_addr);
/usr/include/arpa/inet.h:char   *inet_ntoa_r(struct in_addr,
char *buf, socklen_t size);
$
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313822 - in head/sys: libkern netinet

2017-02-16 Thread Ngie Cooper
On Thu, Feb 16, 2017 at 12:50 PM, Eric van Gyzen  wrote:
> Author: vangyzen
> Date: Thu Feb 16 20:50:01 2017
> New Revision: 313822
> URL: https://svnweb.freebsd.org/changeset/base/313822
>
> Log:
>   Remove inet_ntoa() from the kernel
>
>   inet_ntoa() cannot be used safely in a multithreaded environment
>   because it uses a static local buffer.  Remove it from the kernel.

Uh did you mean to remove it from netinet/in.h ? This gets
used in userspace too...
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313842 - head/share/examples/drivers

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 23:38:30 2017
New Revision: 313842
URL: https://svnweb.freebsd.org/changeset/base/313842

Log:
  Remove EISA reference here

Modified:
  head/share/examples/drivers/README

Modified: head/share/examples/drivers/README
==
--- head/share/examples/drivers/README  Thu Feb 16 23:05:20 2017
(r313841)
+++ head/share/examples/drivers/README  Thu Feb 16 23:38:30 2017
(r313842)
@@ -25,7 +25,7 @@ There are presently two scripts.
 One for making a real device driver for ISA devices, and 
 one for making a device driver for pseudo devices (e.g. /dev/null).
 Hopefully they will be joined by similar scripts for creating
-skeletons for PCI and EISA devices as well.
+skeletons for PCI devices as well.
 
 Give them a single argument: the name of the driver.
 They will use this given name in many places within the driver,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313841 - in head/sys/cddl/dev/dtrace: amd64 i386

2017-02-16 Thread Mark Johnston
Author: markj
Date: Thu Feb 16 23:05:20 2017
New Revision: 313841
URL: https://svnweb.freebsd.org/changeset/base/313841

Log:
  Prevent CPU migration when checking the DTrace nofault flag on x86.
  
  dtrace_trap() consumes page and protection faults triggered by code running
  in DTrace probe context. Such faults occur with interrupts disabled and are
  detected using a per-CPU flag. Regular faults cause dtrace_trap() to be
  called with interrupts enabled, and nothing was ensuring that the flag was
  read from the correct CPU. This may result in dtrace_trap() consuming
  unrelated page and protection faults when DTrace is enabled, causing the
  fault handler to return without actually having handled the fault.
  
  Diagnosed by: Ryan Libby 
  MFC after:3 days
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  head/sys/cddl/dev/dtrace/i386/dtrace_subr.c

Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cThu Feb 16 22:29:37 
2017(r313840)
+++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.cThu Feb 16 23:05:20 
2017(r313841)
@@ -384,6 +384,8 @@ dtrace_gethrestime(void)
 int
 dtrace_trap(struct trapframe *frame, u_int type)
 {
+   uint16_t nofault;
+
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
@@ -393,7 +395,12 @@ dtrace_trap(struct trapframe *frame, u_i
 *
 * Check if DTrace has enabled 'no-fault' mode:
 */
-   if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) {
+   sched_pin();
+   nofault = cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT;
+   sched_unpin();
+   if (nofault) {
+   KASSERT((read_rflags() & PSL_I) == 0, ("interrupts enabled"));
+
/*
 * There are only a couple of trap types that are expected.
 * All the rest will be handled in the usual way.

Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Thu Feb 16 22:29:37 2017
(r313840)
+++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Thu Feb 16 23:05:20 2017
(r313841)
@@ -386,6 +386,8 @@ dtrace_gethrestime(void)
 int
 dtrace_trap(struct trapframe *frame, u_int type)
 {
+   uint16_t nofault;
+
/*
 * A trap can occur while DTrace executes a probe. Before
 * executing the probe, DTrace blocks re-scheduling and sets
@@ -395,7 +397,12 @@ dtrace_trap(struct trapframe *frame, u_i
 *
 * Check if DTrace has enabled 'no-fault' mode:
 */
-   if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) {
+   sched_pin();
+   nofault = cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT;
+   sched_unpin();
+   if (nofault) {
+   KASSERT((read_eflags() & PSL_I) == 0, ("interrupts enabled"));
+
/*
 * There are only a couple of trap types that are expected.
 * All the rest will be handled in the usual way.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313840 - head/release/doc/en_US.ISO8859-1/hardware

2017-02-16 Thread Glen Barber
Author: gjb
Date: Thu Feb 16 22:29:37 2017
New Revision: 313840
URL: https://svnweb.freebsd.org/changeset/base/313840

Log:
  Fix the hardware.html build.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.xml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.xml   Thu Feb 16 
21:57:35 2017(r313839)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.xml   Thu Feb 16 
22:29:37 2017(r313840)
@@ -618,8 +618,6 @@
 
   
 
-  
-
   
 
   
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313837 - in head: share/man/man4 sys/conf sys/dev/buslogic

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:25 2017
New Revision: 313837
URL: https://svnweb.freebsd.org/changeset/base/313837

Log:
  Remove EISA support from Buslogic (bt) cards. Remove known models form
  man page. Tweak comments to not refer to EISA scenarios now that it is
  no longer supported. Remove unused enum.

Deleted:
  head/sys/dev/buslogic/bt_eisa.c
Modified:
  head/share/man/man4/bt.4
  head/sys/conf/files
  head/sys/dev/buslogic/bt.c
  head/sys/dev/buslogic/bt_isa.c
  head/sys/dev/buslogic/btreg.h

Modified: head/share/man/man4/bt.4
==
--- head/share/man/man4/bt.4Thu Feb 16 21:57:19 2017(r313836)
+++ head/share/man/man4/bt.4Thu Feb 16 21:57:25 2017(r313837)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 18, 2006
+.Dd February 15, 2017
 .Dt BT 4
 .Os
 .Sh NAME
@@ -66,9 +66,6 @@ BT-946C   PCI 100 Fast SCSI-2
 BT-956CPCI 100 Wide Fast SCSI-2
 BT-956CD   PCI 100 Wide Differential Fast SCSI-2
 BT-445CVLB 100 Fast SCSI-2
-BT-747CEISA100 Fast SCSI-2
-BT-757CEISA100 Wide Fast SCSI-2
-BT-757CD   EISA100 Wide Differential Fast SCSI-2
 BT-545CISA 50  Fast SCSI-2
 BT-540CF   ISA 50  Fast SCSI-2
 .El
@@ -77,20 +74,14 @@ MultiMaster "S" Series Host Adapters:
 .Bl -column "BT-956CD " "ISA " "Commands " "Description"
 .Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
 BT-445SVLB 30  Fast SCSI-2
-BT-747SEISA30  Fast SCSI-2
-BT-747DEISA30  Differential Fast SCSI-2
-BT-757SEISA30  Wide Fast SCSI-2
-BT-757DEISA30  Wide Differential Fast SCSI-2
 BT-545SISA 30  Fast SCSI-2
 BT-542DISA 30  Differential Fast SCSI-2
-BT-742AEISA30  SCSI-2 (742A revision H)
 BT-542BISA 30  SCSI-2 (542B revision H)
 .El
 .Pp
 MultiMaster "A" Series Host Adapters:
 .Bl -column "BT-956CD " "ISA " "Commands " "Description"
 .Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
-BT-742AEISA30  SCSI-2 (742A revisions A - G)
 BT-542BISA 30  SCSI-2 (542B revisions A - G)
 .El
 .Ed
@@ -135,24 +126,6 @@ BusLogic BT-545S
 .It
 BusLogic/BusTek BT-640
 .It
-BusLogic BT-742A
-.It
-BusLogic BT-742A
-.It
-BusLogic BT-747C
-.It
-BusLogic BT-747D
-.It
-BusLogic BT-747S
-.It
-BusLogic BT-757C
-.It
-BusLogic BT-757CD
-.It
-BusLogic BT-757D
-.It
-BusLogic BT-757S
-.It
 BusLogic BT-946C
 .It
 BusLogic BT-948
@@ -167,11 +140,6 @@ BusLogic BT-958D
 .It
 Storage Dimensions SDC3211B / SDC3211F
 .El
-.Pp
-AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones
-are also supported by the
-.Nm
-driver.
 .Sh SEE ALSO
 .Xr cd 4 ,
 .Xr da 4 ,

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:57:19 2017(r313836)
+++ head/sys/conf/files Thu Feb 16 21:57:25 2017(r313837)
@@ -1259,7 +1259,6 @@ dev/bnxt/bnxt_sysctl.coptional bnxt if
 dev/bnxt/bnxt_txrx.c   optional bnxt iflib pci
 dev/bnxt/if_bnxt.c optional bnxt iflib pci
 dev/buslogic/bt.c  optional bt
-dev/buslogic/bt_eisa.c optional bt eisa
 dev/buslogic/bt_isa.c  optional bt isa
 dev/buslogic/bt_pci.c  optional bt pci
 dev/bwi/bwimac.c   optional bwi

Modified: head/sys/dev/buslogic/bt.c
==
--- head/sys/dev/buslogic/bt.c  Thu Feb 16 21:57:19 2017(r313836)
+++ head/sys/dev/buslogic/bt.c  Thu Feb 16 21:57:25 2017(r313837)
@@ -3,7 +3,6 @@
  * Product specific probe and attach routines can be found in:
  * sys/dev/buslogic/bt_isa.c   BT-54X, BT-445 cards
  * sys/dev/buslogic/bt_mca.c   BT-64X, SDC3211B, SDC3211F
- * sys/dev/buslogic/bt_eisa.c  BT-74X, BT-75x cards, SDC3222F
  * sys/dev/buslogic/bt_pci.c   BT-946, BT-948, BT-956, BT-958 cards
  *
  * Copyright (c) 1998, 1999 Justin T. Gibbs.
@@ -169,7 +168,7 @@ static void bttimeout(void *arg);
  * XXX
  * Do our own re-probe protection until a configuration
  * manager can do it for us.  This ensures that we don't
- * reprobe a card already found by the EISA or PCI probes.
+ * reprobe a card already found by the PCI probes.
  */
 struct bt_isa_port bt_isa_ports[] =
 {
@@ -313,7 +312,6 @@ bt_port_probe(device_t dev, struct bt_pr
return (1);
}
} else {
-   /* VL/EISA/PCI DMA */
info->drq = -1;
}
switch (config_data.irq) {
@@ -482,7 +480,6 @@ bt_fetch_adapter_info(device_t dev)
 *  BT-542B/742A (revision H)
 *  2.xxBusLogic "A" Series Host Adapters:
 *  BT-542B/742A (revision G and below)
-*  0.xxAMI 

svn commit: r313839 - in head: share/man/man5 share/man/man9 share/mk sys/conf sys/dev/eisa sys/i386/conf sys/x86/x86 tools/build/options tools/kerneldoc/subsys

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:35 2017
New Revision: 313839
URL: https://svnweb.freebsd.org/changeset/base/313839

Log:
  Remove EISA bus support for add-in cards. Remove related kernel and
  compile options. Remove doxygen pointers to now deleted files. Remove
  EISA and VME as examples in bus_space.9.
  
  Retained EISA mode code for IO PIC and MPTABLES because that's not
  EISA bus, per se, and some people have abused EISA to mean "EISA-like
  behavior as opposed to ISA" rather than using it for EISA add-in
  cards.
  
  Relnotes: yes

Deleted:
  head/sys/dev/eisa/eisa_if.m
  head/sys/dev/eisa/eisaconf.c
  head/sys/dev/eisa/eisaconf.h
  head/tools/build/options/WITH_EISA
  head/tools/kerneldoc/subsys/Doxyfile-dev_eisa
Modified:
  head/share/man/man5/src.conf.5
  head/share/man/man9/bus_space.9
  head/share/mk/src.opts.mk
  head/sys/conf/NOTES
  head/sys/conf/config.mk
  head/sys/conf/files
  head/sys/conf/options
  head/sys/i386/conf/NOTES
  head/sys/x86/x86/legacy.c

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Thu Feb 16 21:57:30 2017
(r313838)
+++ head/share/man/man5/src.conf.5  Thu Feb 16 21:57:35 2017
(r313839)
@@ -653,9 +653,6 @@ and
 .Pp
 It is a default setting on
 amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386.
-.It Va WITH_EISA
-.\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 
16:53:06Z imp
-Set to build EISA kernel modules.
 .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP
 .\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 
295491 2016-02-11 00:14:00Z emaste
 Set to not build ELF Tool Chain tools

Modified: head/share/man/man9/bus_space.9
==
--- head/share/man/man9/bus_space.9 Thu Feb 16 21:57:30 2017
(r313838)
+++ head/share/man/man9/bus_space.9 Thu Feb 16 21:57:35 2017
(r313839)
@@ -853,8 +853,8 @@ Some implementations may keep track of u
 bus spaces and refuse to allow duplicate allocations.
 This is encouraged
 for bus spaces which have no notion of slot-specific space addressing,
-such as ISA and VME, and for spaces which coexist with those spaces
-(e.g.\& EISA and PCI memory and I/O spaces co-existing with ISA memory and
+such as ISA, and for spaces which coexist with those spaces
+(e.g.\& PCI memory and I/O spaces co-existing with ISA memory and
 I/O spaces).
 .Pp
 Mapped regions may contain areas for which there is no device on the

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Thu Feb 16 21:57:30 2017(r313838)
+++ head/share/mk/src.opts.mk   Thu Feb 16 21:57:35 2017(r313839)
@@ -183,7 +183,6 @@ __DEFAULT_NO_OPTIONS = \
 BSD_GREP \
 CLANG_EXTRAS \
 DTRACE_TESTS \
-EISA \
 HESIOD \
 LIBSOFT \
 NAND \

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Feb 16 21:57:30 2017(r313838)
+++ head/sys/conf/NOTES Thu Feb 16 21:57:35 2017(r313839)
@@ -1429,7 +1429,7 @@ options   PCI_IOV # PCI SR-IOV support
 # HARDWARE DEVICE CONFIGURATION
 
 # For ISA the required hints are listed.
-# EISA, PCI, CardBus, SD/MMC and pccard are self identifying buses, so
+# PCI, CardBus, SD/MMC and pccard are self identifying buses, so
 # no hints are needed.
 
 #
@@ -1556,7 +1556,7 @@ options   TERMINAL_KERN_ATTR=(FG_LIGHTRED
 # trm: Tekram DC395U/UW/F DC315U adapters.
 
 #
-# Note that the order is important in order for Buslogic ISA/EISA cards to be
+# Note that the order is important in order for Buslogic ISA cards to be
 # probed correctly.
 #
 device bt
@@ -2074,7 +2074,7 @@ devicexmphy   # XaQti XMAC II
 #   in Dell Latitude laptop docking stations.
 #   Also supported: 3Com 3c980(C)-TX, 3Com 3cSOHO100-TX, 3Com 3c450-TX
 
-# Order for ISA/EISA devices is important here
+# Order for ISA devices is important here
 
 device cm
 hint.cm.0.at="isa"

Modified: head/sys/conf/config.mk
==
--- head/sys/conf/config.mk Thu Feb 16 21:57:30 2017(r313838)
+++ head/sys/conf/config.mk Thu Feb 16 21:57:35 2017(r313839)
@@ -23,10 +23,6 @@ opt_inet6.h:
 opt_ratelimit.h:
@echo "#define RATELIMIT 1" > ${.TARGET}
 .endif
-.if ${MK_EISA} != "no"
-opt_eisa.h:
-   @echo "#define DEV_EISA 1" > ${.TARGET}
-.endif
 opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
 opt_natm.h:
@@ -49,9 +45,6 @@ KERN_OPTS+= INET TCP_OFFLOAD
 .if ${MK_INET6_SUPPORT} != "no"
 KERN_OPTS+= INET6
 .endif
-.if ${MK_EISA} != "no"
-KERN_OPTS+= DEV_EISA
-.endif
 .elif !defined(KERN_OPTS)
 KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk 

svn commit: r313835 - in head: share/man/man4 sys/conf sys/dev/dpt sys/modules/dpt

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:13 2017
New Revision: 313835
URL: https://svnweb.freebsd.org/changeset/base/313835

Log:
  Remove EISA support from dpt. Remove known EISA models from
  dpt.4. Remove EISA-only bits from dpt_scsi.c.

Deleted:
  head/sys/dev/dpt/dpt_eisa.c
Modified:
  head/share/man/man4/dpt.4
  head/sys/conf/files
  head/sys/dev/dpt/dpt.h
  head/sys/dev/dpt/dpt_scsi.c
  head/sys/modules/dpt/Makefile

Modified: head/share/man/man4/dpt.4
==
--- head/share/man/man4/dpt.4   Thu Feb 16 21:57:08 2017(r313834)
+++ head/share/man/man4/dpt.4   Thu Feb 16 21:57:13 2017(r313835)
@@ -37,9 +37,6 @@ kernel configuration file:
 .Cd "device scbus"
 .Cd "device dpt"
 .Pp
-For one or more EISA cards:
-.Cd "device eisa"
-.Pp
 For one or more PCI cards:
 .Cd "device pci"
 .Pp
@@ -78,15 +75,15 @@ driver provides support for the followin
 .It
 DPT Smart Cache Plus
 .It
-Smart Cache II (PM2?2?, PM2022 [EISA], PM2024/PM2124 [PCI]) (Gen2)
+Smart Cache II (PM2?2?, PM2024/PM2124 [PCI]) (Gen2)
 .It
 Smart RAID II (PM3?2?, PM3021, PM3222)
 .It
 Smart Cache III (PM2?3?)
 .It
-Smart RAID III (PM3?3?, PM3332 [EISA], PM3334UW [PCI]) (Gen3)
+Smart RAID III (PM3?3?, PM3334UW [PCI]) (Gen3)
 .It
-Smart Cache IV (PM2?4?, PM2042 [EISA], PM2044/PM2144 [PCI]) (Gen4)
+Smart Cache IV (PM2?4?, PM2044/PM2144 [PCI]) (Gen4)
 .It
 Smart RAID IV
 .El

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:57:08 2017(r313834)
+++ head/sys/conf/files Thu Feb 16 21:57:13 2017(r313835)
@@ -1439,7 +1439,6 @@ dev/dcons/dcons_crom.coptional dcons_c
 dev/dcons/dcons_os.c   optional dcons
 dev/de/if_de.c optional de pci
 dev/dme/if_dme.c   optional dme
-dev/dpt/dpt_eisa.c optional dpt eisa
 dev/dpt/dpt_pci.c  optional dpt pci
 dev/dpt/dpt_scsi.c optional dpt
 dev/drm/ati_pcigart.c  optional drm

Modified: head/sys/dev/dpt/dpt.h
==
--- head/sys/dev/dpt/dpt.h  Thu Feb 16 21:57:08 2017(r313834)
+++ head/sys/dev/dpt/dpt.h  Thu Feb 16 21:57:13 2017(r313835)
@@ -147,17 +147,13 @@ typedef void *physaddr;
 #define min(a,b) ((a

svn commit: r313836 - in head: share/man/man4 sys/conf sys/dev/aic7xxx sys/modules/aic7xxx/ahc sys/modules/aic7xxx/ahc/ahc_eisa

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:19 2017
New Revision: 313836
URL: https://svnweb.freebsd.org/changeset/base/313836

Log:
  Remove EISA support from ahc driver. The AIC-7770 chip can be on ISA,
  VesaLocalBus or EISA. Internally, EISA and ISA are handled the same,
  with VL being handled slightly differently. To avoid too much code
  churn, retain the EISA name, despite it being used only for ISA
  bus. When it is on the ISA bus, weird gymnastics are required with
  EISA-space address accesses as well. Remove known models from the ahc
  man page. Remove ahc_eisa module.

Deleted:
  head/sys/dev/aic7xxx/ahc_eisa.c
  head/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile
Modified:
  head/share/man/man4/ahc.4
  head/sys/conf/files
  head/sys/dev/aic7xxx/aic7770.c
  head/sys/dev/aic7xxx/aic7xxx.h
  head/sys/dev/aic7xxx/aic7xxx_osm.h
  head/sys/modules/aic7xxx/ahc/Makefile

Modified: head/share/man/man4/ahc.4
==
--- head/share/man/man4/ahc.4   Thu Feb 16 21:57:13 2017(r313835)
+++ head/share/man/man4/ahc.4   Thu Feb 16 21:57:19 2017(r313836)
@@ -26,12 +26,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 13, 2008
+.Dd February 15, 2017
 .Dt AHC 4
 .Os
 .Sh NAME
 .Nm ahc
-.Nd Adaptec VL/EISA/PCI SCSI host adapter driver
+.Nd Adaptec VL/ISA/PCI SCSI host adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -40,9 +40,6 @@ kernel configuration file:
 .Cd "device scbus"
 .Cd "device ahc"
 .Pp
-For one or more VL/EISA cards:
-.Cd "device eisa"
-.Pp
 For one or more PCI cards:
 .Cd "device pci"
 .Pp
@@ -58,7 +55,6 @@ module at boot time, place the following
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 ahc_load="YES"
-ahc_eisa_load="YES"
 ahc_isa_load="YES"
 ahc_pci_load="YES"
 .Ed
@@ -98,45 +94,19 @@ A value of 0x8a enables it for units 1, 
 Per target configuration performed in the
 .Tn SCSI-Select
 menu, accessible at boot
-in
-.No non- Ns Tn EISA
-models,
-or through an
-.Tn EISA
-configuration utility for
-.Tn EISA
-models,
 is honored by this driver.
 This includes synchronous/asynchronous transfers,
 maximum synchronous negotiation rate,
 wide transfers,
 disconnection,
-the host adapter's SCSI ID,
-and,
-in the case of
-.Tn EISA
-Twin Channel controllers,
-the primary channel selection.
+the host adapter's SCSI ID.
 For systems that store non-volatile settings in a system specific manner
 rather than a serial eeprom directly connected to the aic7xxx controller,
 the
 .Tn BIOS
 must be enabled for the driver to access this information.
-This restriction applies to all
-.Tn EISA
-and many motherboard configurations.
-.Pp
-Note that I/O addresses are determined automatically by the probe routines,
-but care should be taken when using a 284x
-.Pq Tn VESA No local bus controller
-in an
-.Tn EISA
-system.
-The jumpers setting the I/O area for the 284x should match the
-.Tn EISA
-slot into which the card is inserted to prevent conflicts with other
-.Tn EISA
-cards.
+This restriction applies to
+many chip-down motherboard configurations.
 .Pp
 Performance and feature sets vary throughout the aic7xxx product line.
 The following table provides a comparison of the different chips supported
@@ -147,9 +117,9 @@ Note that wide and twin channel features
 by a particular chip, may be disabled in a particular motherboard or card
 design.
 .Bd -ragged -offset indent
-.Bl -column "aic7895CX" "MIPSX" "EISA/VLX" "MaxSyncX" "MaxWidthX" "SCBsX" "2 3 
4 5 6 7 8X"
+.Bl -column "aic7895CX" "MIPSX" "PCI/64X" "MaxSyncX" "MaxWidthX" "SCBsX" "2 3 
4 5 6 7 8X"
 .It Em "Chip" Ta "MIPS" Ta "Bus" Ta "MaxSync" Ta "MaxWidth" Ta "SCBs" Ta 
"Features"
-.It "aic7770" Ta "10" Ta "EISA/VL" Ta "10MHz" Ta "16Bit" Ta "4" Ta "1"
+.It "aic7770" Ta "10" Ta "VL" Ta "10MHz" Ta "16Bit" Ta "4" Ta "1"
 .It "aic7850" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "8Bit" Ta "3" Ta ""
 .It "aic7860" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "8Bit" Ta "3" Ta ""
 .It "aic7870" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "16Bit" Ta "16" Ta ""
@@ -254,9 +224,6 @@ Adaptec
 .Tn 274X(T)
 .It
 Adaptec
-.Tn 284X
-.It
-Adaptec
 .Tn 2910
 .It
 Adaptec

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:57:13 2017(r313835)
+++ head/sys/conf/files Thu Feb 16 21:57:19 2017(r313836)
@@ -698,7 +698,6 @@ dev/ahci/ahciem.c   optional ahci
 dev/ahci/ahci_pci.coptional ahci pci
 dev/aic/aic.c  optional aic
 dev/aic/aic_pccard.c   optional aic pccard
-dev/aic7xxx/ahc_eisa.c optional ahc eisa
 dev/aic7xxx/ahc_isa.c  optional ahc isa
 dev/aic7xxx/ahc_pci.c  optional ahc pci \
compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"

Modified: head/sys/dev/aic7xxx/aic7770.c
==
--- head/sys/dev/aic7xxx/aic7770.c  Thu Feb 

svn commit: r313838 - in head/sys: conf dev/pci

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:30 2017
New Revision: 313838
URL: https://svnweb.freebsd.org/changeset/base/313838

Log:
  Remove PCI/EISA bridge support. But keep knowing that a chip is this
  kind of bridge since we know for other types of unsupported bridges as
  well.

Deleted:
  head/sys/dev/pci/eisa_pci.c
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:57:25 2017(r313837)
+++ head/sys/conf/files Thu Feb 16 21:57:30 2017(r313838)
@@ -2389,7 +2389,6 @@ dev/pccbb/pccbb.c optional cbb
 dev/pccbb/pccbb_isa.c  optional cbb isa
 dev/pccbb/pccbb_pci.c  optional cbb pci
 dev/pcf/pcf.c  optional pcf
-dev/pci/eisa_pci.c optional pci eisa
 dev/pci/fixup_pci.coptional pci
 dev/pci/hostb_pci.coptional pci
 dev/pci/ignore_pci.c   optional pci
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313832 - in head: share/man/man4 sys/conf sys/dev/ida

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:57 2017
New Revision: 313832
URL: https://svnweb.freebsd.org/changeset/base/313832

Log:
  Remove support for EISA in the ida driver. Remove references to
  EISA-only registers. Remove known EISA cards from man page.

Deleted:
  head/sys/dev/ida/ida_eisa.c
Modified:
  head/share/man/man4/ida.4
  head/sys/conf/files
  head/sys/dev/ida/idareg.h

Modified: head/share/man/man4/ida.4
==
--- head/share/man/man4/ida.4   Thu Feb 16 21:56:51 2017(r313831)
+++ head/share/man/man4/ida.4   Thu Feb 16 21:56:57 2017(r313832)
@@ -2,7 +2,7 @@
 .\" Written by Tom Rhodes
 .\" This file is public domain
 .\"
-.Dd August 8, 2004
+.Dd February 15, 2017
 .Dt IDA 4
 .Os
 .Sh NAME
@@ -57,10 +57,6 @@ Compaq SMART-2/DH Controller
 Compaq SMART-2/SL Controller
 .It
 Compaq SMART-2/P Controller
-.It
-Compaq SMART-2/E Controller
-.It
-Compaq SMART Controller
 .El
 .Sh IMPLEMENTATION NOTES
 Extreme caution should be exercised when using the pass-through interface.

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:56:51 2017(r313831)
+++ head/sys/conf/files Thu Feb 16 21:56:57 2017(r313832)
@@ -1727,7 +1727,6 @@ dev/ichsmb/ichsmb.c   optional ichsmb
 dev/ichsmb/ichsmb_pci.coptional ichsmb pci
 dev/ida/ida.c  optional ida
 dev/ida/ida_disk.c optional ida
-dev/ida/ida_eisa.c optional ida eisa
 dev/ida/ida_pci.c  optional ida pci
 dev/iicbus/ad7418.coptional ad7418
 dev/iicbus/ds1307.coptional ds1307

Modified: head/sys/dev/ida/idareg.h
==
--- head/sys/dev/ida/idareg.h   Thu Feb 16 21:56:51 2017(r313831)
+++ head/sys/dev/ida/idareg.h   Thu Feb 16 21:56:57 2017(r313832)
@@ -31,23 +31,6 @@
  */
 
 /*
- * defines for older EISA controllers (IDA, IDA-2, IAES, SMART)
- */
-#defineR_EISA_INT_MASK 0x01
-#defineR_EISA_LOCAL_MASK   0x04
-#defineR_EISA_LOCAL_DOORBELL   0x05
-#defineR_EISA_SYSTEM_MASK  0x06
-#defineR_EISA_SYSTEM_DOORBELL  0x07
-#defineR_EISA_LIST_ADDR0x08
-#defineR_EISA_LIST_LEN 0x0c
-#defineR_EISA_TAG  0x0f
-#defineR_EISA_COMPLETE_ADDR0x10
-#defineR_EISA_LIST_STATUS  0x16
-
-#defineEISA_CHANNEL_BUSY   0x01
-#defineEISA_CHANNEL_CLEAR  0x02
-
-/*
  * board register offsets for SMART-2 controllers
  */
 #defineR_CMD_FIFO  0x04
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313831 - in head: share/man/man4/man4.i386 sys/conf sys/dev/ep sys/modules/ep

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:51 2017
New Revision: 313831
URL: https://svnweb.freebsd.org/changeset/base/313831

Log:
  Remove EISA support for ep driver. Left in place EISA strings that are
  still relevant (ISA cards can still be in EISA mode, and we're still
  ignoring those in the identify routine). Notes about cards in EISA
  mode have been left in the manual since they aren't relevant to EISA
  support, but instruct how to properly configure an ISA card in a mode
  when it is in a ISA bus slot.

Deleted:
  head/sys/dev/ep/if_ep_eisa.c
Modified:
  head/share/man/man4/man4.i386/ep.4
  head/sys/conf/files
  head/sys/dev/ep/if_ep.c
  head/sys/dev/ep/if_ep_isa.c
  head/sys/dev/ep/if_epvar.h
  head/sys/modules/ep/Makefile

Modified: head/share/man/man4/man4.i386/ep.4
==
--- head/share/man/man4/man4.i386/ep.4  Thu Feb 16 21:56:46 2017
(r313830)
+++ head/share/man/man4/man4.i386/ep.4  Thu Feb 16 21:56:51 2017
(r313831)
@@ -99,8 +99,6 @@ driver supports Ethernet adapters based 
 .It
 3Com 3C574, 3C574TX, 3C574-TX, 3CCFE574BT, 3CXFE574BT, 3C3FE574BT PCMCIA
 .It
-3Com 3C579-TP, 3C579-BNC EISA
-.It
 3Com 3C589, 3C589B, 3C589C, 3C589D, 3CXE589DT PCMCIA
 .It
 3Com 3CCFEM556B, 3CCFEM556BI PCMCIA
@@ -121,10 +119,7 @@ scan operation at IO address 0x110.
 Beware!
 Avoid placing other cards at that address!
 .Pp
-Furthermore, the 3c509 should only be configured in EISA mode
-when installed in a computer that has actual EISA slots
-(and an EISA-aware BIOS).
-The normal driver auto-detection support is sufficient for non-EISA systems.
+Furthermore, the 3c509 should not be configured in EISA mode.
 .Pp
 Cards in PnP mode may conflict with other resources in the system.
 Ensure your BIOS is configured correctly to exclude resources used by
@@ -180,9 +175,9 @@ has about connectors, so it is assuming 
 .It "ep0: unknown ID 0x"
 The driver has found an ID that it believes it supports, but does not
 have a specific identification string to present to the user.
-.It "ep0: <%s> at port 0x%03x in EISA mode"
+.It "ep0: <%s> at port 0x%03x in EISA mode, ignored."
 The 3C509 ISA card is in EISA mode.
-This message appears to be purely informational.
+The card will be ignored until it is taken out of EISA mode.
 .It "ep0: <%s> at x0%03x in PnP mode"
 This card appears to be in Plug and Play mode.
 It should be probed as part of the plug and play phase of the ISA

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:56:46 2017(r313830)
+++ head/sys/conf/files Thu Feb 16 21:56:51 2017(r313831)
@@ -1604,7 +1604,6 @@ dev/et/if_et.coptional et
 dev/en/if_en_pci.c optional en pci
 dev/en/midway.coptional en
 dev/ep/if_ep.c optional ep
-dev/ep/if_ep_eisa.coptional ep eisa
 dev/ep/if_ep_isa.c optional ep isa
 dev/ep/if_ep_pccard.c  optional ep pccard
 dev/esp/esp_pci.c  optional esp pci

Modified: head/sys/dev/ep/if_ep.c
==
--- head/sys/dev/ep/if_ep.c Thu Feb 16 21:56:46 2017(r313830)
+++ head/sys/dev/ep/if_ep.c Thu Feb 16 21:56:51 2017(r313831)
@@ -530,31 +530,17 @@ startagain:
CSR_WRITE_2(sc, EP_COMMAND,
SET_TX_AVAIL_THRESH | EP_THRESH_DISABLE);
 
-   /* XXX 4.x and earlier would splhigh here */
-
CSR_WRITE_2(sc, EP_W1_TX_PIO_WR_1, len);
/* Second dword meaningless */
CSR_WRITE_2(sc, EP_W1_TX_PIO_WR_1, 0x0);
 
-   if (EP_FTST(sc, F_ACCESS_32_BITS)) {
-   for (m = m0; m != NULL; m = m->m_next) {
-   if (m->m_len > 3)
-   CSR_WRITE_MULTI_4(sc, EP_W1_TX_PIO_WR_1,
-   mtod(m, uint32_t *), m->m_len / 4);
-   if (m->m_len & 3)
-   CSR_WRITE_MULTI_1(sc, EP_W1_TX_PIO_WR_1,
-   mtod(m, uint8_t *)+(m->m_len & (~3)),
-   m->m_len & 3);
-   }
-   } else {
-   for (m = m0; m != NULL; m = m->m_next) {
-   if (m->m_len > 1)
-   CSR_WRITE_MULTI_2(sc, EP_W1_TX_PIO_WR_1,
-   mtod(m, uint16_t *), m->m_len / 2);
-   if (m->m_len & 1)
-   CSR_WRITE_1(sc, EP_W1_TX_PIO_WR_1,
-   *(mtod(m, uint8_t *)+m->m_len - 1));
-   }
+   for (m = m0; m != NULL; m = m->m_next) {
+   if (m->m_len > 1)
+   CSR_WRITE_MULTI_2(sc, EP_W1_TX_PIO_WR_1,
+   mtod(m, uint16_t *), m->m_len / 2);
+   if (m->m_len & 1)
+

svn commit: r313834 - in head: share/man/man4 sys/conf sys/dev/pdq

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:08 2017
New Revision: 313834
URL: https://svnweb.freebsd.org/changeset/base/313834

Log:
  Remove EISA attachment (fea) from pdq driver. Remove vestiges of
  TurboChannel and Q-Bus support while I'm here. Remove obsolete
  diagnostics from man page.

Deleted:
  head/sys/dev/pdq/if_fea.c
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/fpa.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/dev/pdq/pdq.c
  head/sys/dev/pdq/pdq_freebsd.h
  head/sys/dev/pdq/pdq_ifsubr.c
  head/sys/dev/pdq/pdqreg.h
  head/sys/dev/pdq/pdqvar.h

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileThu Feb 16 21:57:02 2017
(r313833)
+++ head/share/man/man4/MakefileThu Feb 16 21:57:08 2017
(r313834)
@@ -634,7 +634,6 @@ MLINKS+=fd.4 stderr.4 \
fd.4 stdout.4
 MLINKS+=fdt.4 FDT.4
 MLINKS+=firewire.4 ieee1394.4
-MLINKS+=fpa.4 fea.4
 MLINKS+=fwe.4 if_fwe.4
 MLINKS+=fwip.4 if_fwip.4
 MLINKS+=fxp.4 if_fxp.4

Modified: head/share/man/man4/fpa.4
==
--- head/share/man/man4/fpa.4   Thu Feb 16 21:57:02 2017(r313833)
+++ head/share/man/man4/fpa.4   Thu Feb 16 21:57:08 2017(r313834)
@@ -4,16 +4,14 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 13, 1995
+.Dd February 15, 2017
 .Dt FPA 4
 .Os
 .Sh NAME
-.Nm fpa ,
-.Nm fea
+.Nm fpa
 .Nd device drivers for DEC FDDI controllers
 .Sh SYNOPSIS
 .Cd "device fpa"
-.Cd "device fea"
 .Pp
 .Fx
 only:
@@ -21,25 +19,9 @@ only:
 .Sh DESCRIPTION
 The
 .Nm
-and
-.Nm fea
-device drivers provide support for the DEC DEFPA PCI FDDI Controller and
-the DEC DEFEA EISA FDDI Controller, respectively.
-All variants of either
+device driver provide support for the DEC DEFPA PCI FDDI Controller.
+All variants of the
 controller are supported including the DAS and SAS configurations.
-.Sh DIAGNOSTICS
-.Bl -diag
-.It "fea%d: error: desired IRQ of %d does not match device's actual IRQ (%d)"
-The device probe detected that the DEFEA board is configured for a different
-interrupt than the one specified in the kernel configuration file.
-.It "fea%d: error: memory not enabled! ECU reconfiguration required"
-The device probe found that no device memory had been configured on the
-DEFEA.
-Although the DEFEA can be configured with no device memory, this driver
-requires a minimum of 1K device memory to be set up.
-The ECU (EISA Configuration
-Utility) will need to be run to change the settings.
-.El
 .Sh SEE ALSO
 .Xr arp 4 ,
 .Xr netintro 4 ,
@@ -47,9 +29,7 @@ Utility) will need to be run to change t
 .Sh AUTHORS
 The
 .Nm
-and
-.Nm fea
-device drivers and this manual page were written by
+device driver and this manual page were written by
 .An Matt Thomas .
 .Sh CAVEATS
 Normally, the device driver will not enable the reception of SMT frames.

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Feb 16 21:57:02 2017(r313833)
+++ head/sys/conf/NOTES Thu Feb 16 21:57:08 2017(r313834)
@@ -1974,7 +1974,6 @@ devicexmphy   # XaQti XMAC II
 # ex:   Intel EtherExpress Pro/10 and other i82595-based adapters,
 #   Olicom Ethernet PC Card devices.
 # fe:   Fujitsu MB86960A/MB86965A Ethernet
-# fea:  DEC DEFEA EISA FDDI adapter
 # fpa:  Support for the Digital DEFPA PCI FDDI. `device fddi' is also needed.
 # fxp:  Intel EtherExpress Pro/100B
 #  (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping)
@@ -2087,7 +2086,6 @@ deviceex
 device fe
 hint.fe.0.at="isa"
 hint.fe.0.port="0x300"
-device fea
 device sn
 hint.sn.0.at="isa"
 hint.sn.0.port="0x300"

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:57:02 2017(r313833)
+++ head/sys/conf/files Thu Feb 16 21:57:08 2017(r313834)
@@ -2409,10 +2409,9 @@ dev/pci/pcib_if.mstandard
 dev/pci/pcib_support.c standard
 dev/pci/vga_pci.c  optional pci
 dev/pcn/if_pcn.c   optional pcn pci
-dev/pdq/if_fea.c   optional fea eisa
 dev/pdq/if_fpa.c   optional fpa pci
-dev/pdq/pdq.c  optional nowerror fea eisa | fpa pci
-dev/pdq/pdq_ifsubr.c   optional nowerror fea eisa | fpa pci
+dev/pdq/pdq.c  optional nowerror fpa pci
+dev/pdq/pdq_ifsubr.c   optional nowerror fpa pci
 dev/pms/freebsd/driver/ini/src/agtiapi.c   optional pmspcv \
compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w"
 dev/pms/RefTisa/sallsdk/spc/sadisc.c   optional pmspcv \

Modified: head/sys/dev/pdq/pdq.c
==
--- head/sys/dev/pdq/pdq.c

svn commit: r313830 - in head: share/man/man4/man4.i386 sys/conf sys/dev/ep sys/dev/vx sys/modules/vx

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:46 2017
New Revision: 313830
URL: https://svnweb.freebsd.org/changeset/base/313830

Log:
  Remove references to EISA support from the vx driver, along with EISA
  support. Fix a comment block that's shared with both vx and ep. Remove
  obsolete refernce to statically compiling a kernel with a fixed number
  of vx devices. Have not removed EISA from the title of the document
  the register definitions were originally derived from (though no doubt
  more recent docments were also consulted).

Deleted:
  head/sys/dev/vx/if_vx_eisa.c
Modified:
  head/share/man/man4/man4.i386/vx.4
  head/sys/conf/files
  head/sys/dev/ep/if_epreg.h
  head/sys/dev/vx/if_vxreg.h
  head/sys/modules/vx/Makefile

Modified: head/share/man/man4/man4.i386/vx.4
==
--- head/share/man/man4/man4.i386/vx.4  Thu Feb 16 21:56:41 2017
(r313829)
+++ head/share/man/man4/man4.i386/vx.4  Thu Feb 16 21:56:46 2017
(r313830)
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 16, 2005
+.Dd February 15, 2017
 .Dt VX 4 i386
 .Os
 .Sh NAME
@@ -79,21 +79,9 @@ driver supports the following cards:
 .It
 3Com 3c590 EtherLink III PCI
 .It
-3Com 3c592 EtherLink III EISA
-.It
 3Com 3c595 Fast EtherLink III PCI in 10 Mbps mode
-.It
-3Com 3c597 Fast EtherLink III EISA in 10 Mbps mode
 .El
 .Sh DIAGNOSTICS
-.Bl -diag
-.It "vx%d: not configured; kernel is built for only %d devices."
-There are not enough devices in the kernel configuration file for the number
-of adapters present in the system.
-Add devices to the configuration file,
-rebuild the kernel, and reboot.
-.El
-.Pp
 All other diagnostics indicate either a hardware problem or a bug in the
 driver.
 .Sh SEE ALSO

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:56:41 2017(r313829)
+++ head/sys/conf/files Thu Feb 16 21:56:46 2017(r313830)
@@ -3243,7 +3243,6 @@ dev/vt/vt_font.c  optional vt
 dev/vt/vt_sysmouse.c   optional vt
 dev/vte/if_vte.c   optional vte pci
 dev/vx/if_vx.c optional vx
-dev/vx/if_vx_eisa.coptional vx eisa
 dev/vx/if_vx_pci.c optional vx pci
 dev/vxge/vxge.coptional vxge
 dev/vxge/vxgehal/vxgehal-ifmsg.c   optional vxge

Modified: head/sys/dev/ep/if_epreg.h
==
--- head/sys/dev/ep/if_epreg.h  Thu Feb 16 21:56:41 2017(r313829)
+++ head/sys/dev/ep/if_epreg.h  Thu Feb 16 21:56:46 2017(r313830)
@@ -113,7 +113,7 @@
 /**
  *   *
  * These are the registers for the 3Com 3c509 and their bit patterns when *
- * applicable.  They have been taken out the "EtherLink III Parallel  *
+ * applicable.  They have been taken out the "EtherLink III Parallel  *
  * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual *
  * from 3com.*
  *   *

Modified: head/sys/dev/vx/if_vxreg.h
==
--- head/sys/dev/vx/if_vxreg.h  Thu Feb 16 21:56:41 2017(r313829)
+++ head/sys/dev/vx/if_vxreg.h  Thu Feb 16 21:56:46 2017(r313830)
@@ -77,8 +77,6 @@
 #define EEPROM_MFG_PRODUCT  0x6/* Product code */
 #define EEPROM_MFG_ID  0x7 /* 0x6d50 */
 #define EEPROM_ADDR_CFG0x8 /* Base addr */
-#define ADDR_CFG_EISA  0x1f
-#define ADDR_CFG_MASK  0x1f
 #define EEPROM_RESOURCE_CFG0x9 /* IRQ. Bits 12-15 */
 #define EEPROM_OEM_ADDR00xa
 #define EEPROM_OEM_ADDR10xb
@@ -87,8 +85,6 @@
 #define EEPROM_COMPAT   0xe
 #define EEPROM_SOFTINFO20xf
 #define EEPROM_CAP  0x10
-#define CAP_ISA0x2083
-#define CAP_PCMCIA 0x2082
 #define EEPROM_INT_CONFIG_00x12
 #define EEPROM_INT_CONFIG_10x13
 /* RAM Partition TX FIFO/RX FIFO */
@@ -112,7 +108,7 @@
 
 /**
  * These are the registers for the 3Com 3c509 and their bit patterns when *
- * applicable.  They have been taken out the "EtherLink III Parallel  *
+ * applicable.  They have been taken out the "EtherLink III Parallel  *
  * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual *
  * from 3com.*
  **/

Modified: head/sys/modules/vx/Makefile
==
--- 

svn commit: r313833 - in head: share/man/man4 sys/conf sys/dev/advansys

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:57:02 2017
New Revision: 313833
URL: https://svnweb.freebsd.org/changeset/base/313833

Log:
  Remove EISA support from adv driver. Remove references to it from man
  page. Remove comment about EISA dual channel card. Remove trivial
  references in advlib to avoid false positives with grep. Remove stray
  MCA reference not worth a seperate commit.

Deleted:
  head/sys/dev/advansys/adv_eisa.c
Modified:
  head/share/man/man4/adv.4
  head/sys/conf/files
  head/sys/dev/advansys/advansys.c
  head/sys/dev/advansys/advlib.c
  head/sys/dev/advansys/advlib.h

Modified: head/share/man/man4/adv.4
==
--- head/share/man/man4/adv.4   Thu Feb 16 21:56:57 2017(r313832)
+++ head/share/man/man4/adv.4   Thu Feb 16 21:57:02 2017(r313833)
@@ -28,7 +28,7 @@
 .Os
 .Sh NAME
 .Nm adv
-.Nd Advansys ISA/VL/EISA/PCI 8bit SCSI Host adapter driver
+.Nd Advansys ISA/VL/PCI Narrow 8bit SCSI Host adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -37,9 +37,6 @@ kernel configuration file:
 .Cd "device scbus"
 .Cd "device adv"
 .Pp
-For one or more EISA cards:
-.Cd "device eisa"
-.Pp
 For one or more VL/ISA cards:
 .Cd "device isa"
 .Pp
@@ -51,7 +48,7 @@ For one or more PCI cards:
 .Cd "device pci"
 .Ed
 .Sh DESCRIPTION
-This driver provides access to the 8bit
+This driver provides access to the narrow 8bit
 .Tn SCSI
 bus connected to the Advanced Systems Products, Inc.
 .Tn ASC900 ,
@@ -82,8 +79,8 @@ Connectivity Products:
 .It "ABP930" Ta "PCI" Ta "\" Ta "10MHz" Ta "16" Ta "5"
 .It "ABP930U" Ta "PCI" Ta "\" Ta "20MHz" Ta "16" Ta ""
 .It "ABP930UA" Ta "PCI" Ta "\" Ta "20MHz" Ta "16" Ta ""
-.It "ABP960" Ta "PCI" Ta "\" Ta "10MHz" Ta "16" Ta ""
-.It "ABP960U" Ta "PCI" Ta "\" Ta "20MHz" Ta "16" Ta ""
+.It "ABP960" Ta "PCI" Ta "\" Ta "10MHz" Ta "16" Ta "2"
+.It "ABP960U" Ta "PCI" Ta "\" Ta "20MHz" Ta "16" Ta "2"
 .El
 .Pp
 Footnotes:
@@ -104,10 +101,9 @@ This board has been sold by SIIG as the 
 .Ed
 .Bd -ragged -offset indent
 Single Channel Products:
-.Bl -column "ABPX3X940UA " "EISA " "Floppy " "MaxSync " "Commands"
+.Bl -column "ABPX3X940UA " "PCI " "Floppy " "MaxSync " "Commands"
 .Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands"
 .It "ABP542" Ta "ISA" Ta "Yes" Ta "10MHz" Ta "240"
-.It "ABP742" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240"
 .It "ABP842" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240"
 .It "ABP940" Ta "PCI" Ta "\" Ta "10MHz" Ta "240"
 .It "ABP[3]940UA" Ta "PCI" Ta "\" Ta "20MHz" Ta "240"
@@ -119,9 +115,8 @@ Single Channel Products:
 .Ed
 .Bd -ragged -offset indent
 Multi Channel Products (Commands are per-channel):
-.Bl -column "ABPX3X980UA " "EISA " "Floppy " "MaxSync " "Commands " "Channels"
+.Bl -column "ABPX3X980UA " "PCI " "Floppy " "MaxSync " "Commands " "Channels"
 .Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta 
Em "Channels"
-.It "ABP752" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240" Ta "2"
 .It "ABP852" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" Ta "2"
 .It "ABP950" Ta "PCI" Ta "\" Ta "10MHz" Ta "240" Ta "2"
 .It "ABP980" Ta "PCI" Ta "\" Ta "10MHz" Ta "240" Ta "4"
@@ -130,15 +125,17 @@ Multi Channel Products (Commands are per
 .El
 .Ed
 .Pp
-.\" For ISA or Vesa Local Bus adapters, one kernel config entry is required
-.\" for every card to be attached by the system.  Specific values for the port
-.\" address, irq, and drq may be specified.  If wildcard values are used, the
-.\" driver will query the device for its current settings and use those.  If
-.\" the port address is a wildcard, the driver consults an internal table of
-.\" possible port address locations and attaches to the first unattached card
-.\" it finds.  The possible port addresses for these card are 0x110, 0x130,
-.\" 0x150, 0x190, 0x210, 0x230, 0x250, and 0x330.
-.\" .Pp
+For ISA or Vesa Local Bus adapters, one kernel hints entry is required
+for every card to be attached by the system.
+Specific values for the port address, irq and drq may be specified.
+If unspecified, the driver will query the device for its current
+settings and use those.
+If the port address is unspecified, the driver will search for it at
+one of the possible addresses.
+Cards configured for ISA PNP addresses are found automatically.
+The possible port addresses for these card are 0x110, 0x130,
+0x150, 0x190, 0x210, 0x230, 0x250, and 0x330.
+.Pp
 Per target configuration performed in the
 .Tn AdvanceWare
 menu, which is accessible at boot,
@@ -181,8 +178,6 @@ AdvanSys ABP960, ABP960U
 .It
 AdvanSys ABP542
 .It
-AdvanSys ABP742
-.It
 AdvanSys ABP842
 .It
 AdvanSys ABP940
@@ -195,8 +190,6 @@ AdvanSys ABP3960UA
 .It
 AdvanSys ABP970, ABP970U
 .It
-AdvanSys ABP752
-.It
 AdvanSys ABP852
 .It
 AdvanSys ABP950

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:56:57 2017

svn commit: r313828 - head/share/man/man4

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:36 2017
New Revision: 313828
URL: https://svnweb.freebsd.org/changeset/base/313828

Log:
  Remove stray reference to EISA bus support that was never in FreeBSD.

Modified:
  head/share/man/man4/le.4

Modified: head/share/man/man4/le.4
==
--- head/share/man/man4/le.4Thu Feb 16 21:56:32 2017(r313827)
+++ head/share/man/man4/le.4Thu Feb 16 21:56:36 2017(r313828)
@@ -193,17 +193,6 @@ with
 and
 .Tn ISA
 bus Ethernet adapters.
-.\" .Ss EISA
-.\" The
-.\" .Tn EISA
-.\" bus Ethernet cards supported by the
-.\" .Nm
-.\" driver are:
-.\" .Pp
-.\" .Bl -bullet -compact
-.\" .It
-.\" .Tn DEC DE422
-.\" .El
 .Ss PCI
 The
 .Tn PCI
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313829 - head/share/man/man4

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:41 2017
New Revision: 313829
URL: https://svnweb.freebsd.org/changeset/base/313829

Log:
  Remove references to C-Bus support in the le(4) driver. Support for
  these devices were removed when pc98 was removed.

Modified:
  head/share/man/man4/le.4

Modified: head/share/man/man4/le.4
==
--- head/share/man/man4/le.4Thu Feb 16 21:56:36 2017(r313828)
+++ head/share/man/man4/le.4Thu Feb 16 21:56:41 2017(r313829)
@@ -36,7 +36,7 @@
 .\"from: @(#)le.4  8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd January 20, 2007
+.Dd February 15, 2017
 .Dt LE 4
 .Os
 .Sh NAME
@@ -119,12 +119,10 @@ Selective reception of multicast Etherne
 multicast destination addresses are hashed to a bit entry using the Ethernet
 CRC function.
 .Sh HARDWARE
-.Ss C-Bus and ISA
+.Ss ISA
 The
 .Nm
 driver supports
-.Tn C-Bus
-and
 .Tn ISA
 bus Ethernet adapters which are based on the following chips:
 .Pp
@@ -141,13 +139,6 @@ bus Ethernet adapters which are based on
 .Pp
 This includes support for the following Ethernet adapters:
 .Pp
-C-Bus non-PnP:
-.Pp
-.Bl -bullet -compact
-.It
-.Tn Contec C-NET(98)S
-.El
-.Pp
 ISA non-PnP:
 .Pp
 .Bl -bullet -compact
@@ -189,8 +180,6 @@ The
 driver does not support the selection of media types and options via
 .Xr ifconfig 8
 with
-.Tn C-Bus
-and
 .Tn ISA
 bus Ethernet adapters.
 .Ss PCI
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313827 - in head: share/man/man4 sys/dev/mlx

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:32 2017
New Revision: 313827
URL: https://svnweb.freebsd.org/changeset/base/313827

Log:
  Remove references to EISA support in mlx. The driver never supported
  the EISA cards and EISA bus support is being removed.

Modified:
  head/share/man/man4/mlx.4
  head/sys/dev/mlx/mlx.c

Modified: head/share/man/man4/mlx.4
==
--- head/share/man/man4/mlx.4   Thu Feb 16 21:56:27 2017(r313826)
+++ head/share/man/man4/mlx.4   Thu Feb 16 21:56:32 2017(r313827)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2004
+.Dd February 15, 2017
 .Dt MLX 4
 .Os
 .Sh NAME
@@ -245,7 +245,6 @@ This manual page was written by
 and
 .An Michael Smith Aq Mt msm...@freebsd.org .
 .Sh BUGS
-The driver does not yet support EISA adapters.
 The DEC KZPSC has insufficient flash ROM to hold any reasonably recent 
firmware.
 This has caused problems for this driver.
 .Pp

Modified: head/sys/dev/mlx/mlx.c
==
--- head/sys/dev/mlx/mlx.c  Thu Feb 16 21:56:27 2017(r313826)
+++ head/sys/dev/mlx/mlx.c  Thu Feb 16 21:56:32 2017(r313827)
@@ -450,7 +450,7 @@ mlx_attach(struct mlx_softc *sc)
}
sc->mlx_enq2->me_firmware_id = ('0' << 24) | (0 << 16) | 
(meo->me_fwminor << 8) | meo->me_fwmajor;

-   /* XXX require 2.42 or better (PCI) or 2.14 or better (EISA) */
+   /* XXX require 2.42 or better (PCI) */
if (meo->me_fwminor < 42) {
device_printf(sc->mlx_dev, " *** WARNING *** This firmware revision 
is not recommended\n");
device_printf(sc->mlx_dev, " *** WARNING *** Use revision 2.42 or 
later\n");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313826 - in head: share/man/man4 sys/conf sys/dev/ahb sys/modules sys/modules/ahb

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:27 2017
New Revision: 313826
URL: https://svnweb.freebsd.org/changeset/base/313826

Log:
  Remove the ahb driver for the EISA Adaptec 174x.

Deleted:
  head/share/man/man4/ahb.4
  head/sys/dev/ahb/ahb.c
  head/sys/dev/ahb/ahbreg.h
  head/sys/modules/ahb/Makefile
Modified:
  head/share/man/man4/Makefile
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/modules/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileThu Feb 16 21:56:21 2017
(r313825)
+++ head/share/man/man4/MakefileThu Feb 16 21:56:27 2017
(r313826)
@@ -29,7 +29,6 @@ MAN=  aac.4 \
age.4 \
agp.4 \
aha.4 \
-   ahb.4 \
ahc.4 \
ahci.4 \
ahd.4 \

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Feb 16 21:56:21 2017(r313825)
+++ head/sys/conf/NOTES Thu Feb 16 21:56:27 2017(r313826)
@@ -1530,7 +1530,6 @@ options   TERMINAL_KERN_ATTR=(FG_LIGHTRED
 # adv: All Narrow SCSI bus AdvanSys controllers.
 # adw: Second Generation AdvanSys controllers including the ADV940UW.
 # aha: Adaptec 154x/1535/1640
-# ahb: Adaptec 174x EISA controllers
 # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/
 #  19160x/29160x, aic7770/aic78xx
 # ahd: Adaptec 29320/39320 Controllers.
@@ -1570,7 +1569,6 @@ deviceaha
 hint.aha.0.at="isa"
 device aic
 hint.aic.0.at="isa"
-device ahb
 device ahc
 device ahd
 device esp

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb 16 21:56:21 2017(r313825)
+++ head/sys/conf/files Thu Feb 16 21:56:27 2017(r313826)
@@ -694,7 +694,6 @@ dev/agp/agp.c   optional agp pci
 dev/agp/agp_if.m   optional agp pci
 dev/aha/aha.c  optional aha
 dev/aha/aha_isa.c  optional aha isa
-dev/ahb/ahb.c  optional ahb eisa
 dev/ahci/ahci.coptional ahci
 dev/ahci/ahciem.c  optional ahci
 dev/ahci/ahci_pci.coptional ahci pci

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Thu Feb 16 21:56:21 2017(r313825)
+++ head/sys/modules/Makefile   Thu Feb 16 21:56:27 2017(r313826)
@@ -27,7 +27,6 @@ SUBDIR=   \
age \
${_agp} \
aha \
-   ${_ahb} \
ahci \
${_aic} \
aic7xxx \
@@ -736,9 +735,6 @@ _sbni=  sbni
 _streams=  streams
 _stg=  stg
 _svr4= svr4
-.if ${MK_EISA} != "no"
-_ahb=  ahb
-.endif
 _cm=   cm
 .if ${MK_SOURCELESS_UCODE} != "no"
 _ctau= ctau
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313825 - head/sys/conf

2017-02-16 Thread Warner Losh
Author: imp
Date: Thu Feb 16 21:56:21 2017
New Revision: 313825
URL: https://svnweb.freebsd.org/changeset/base/313825

Log:
  Remove stale MCA comment now that the MCA bus support is gone.
  
  Relnotes: yes

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Feb 16 21:18:31 2017(r313824)
+++ head/sys/conf/NOTES Thu Feb 16 21:56:21 2017(r313825)
@@ -1429,7 +1429,7 @@ options   PCI_IOV # PCI SR-IOV support
 # HARDWARE DEVICE CONFIGURATION
 
 # For ISA the required hints are listed.
-# EISA, MCA, PCI, CardBus, SD/MMC and pccard are self identifying buses, so
+# EISA, PCI, CardBus, SD/MMC and pccard are self identifying buses, so
 # no hints are needed.
 
 #
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313824 - head/sys/kern

2017-02-16 Thread Ryan Stone
Author: rstone
Date: Thu Feb 16 21:18:31 2017
New Revision: 313824
URL: https://svnweb.freebsd.org/changeset/base/313824

Log:
  Revert r313814 and r313816
  
  Something evidently got mangled in my git tree in between testing and
  review, as an old and broken version of the patch was apparently submitted
  to svn.  Revert this while I work out what went wrong.
  
  Reported by:  tuexen
  Pointy hat to:rstone

Modified:
  head/sys/kern/sched_4bsd.c
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_4bsd.c
==
--- head/sys/kern/sched_4bsd.c  Thu Feb 16 21:03:43 2017(r313823)
+++ head/sys/kern/sched_4bsd.c  Thu Feb 16 21:18:31 2017(r313824)
@@ -816,12 +816,7 @@ sched_class(struct thread *td, int class
 static void
 sched_priority(struct thread *td, u_char prio)
 {
-   struct thread *newtd;
-   struct runq *rq;
-   u_char orig_pri;
-#ifdef SMP
-   struct thread *cputd;
-#endif
+
 
KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change",
"prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED,
@@ -837,43 +832,10 @@ sched_priority(struct thread *td, u_char
THREAD_LOCK_ASSERT(td, MA_OWNED);
if (td->td_priority == prio)
return;
-   orig_pri = td->td_priority;
td->td_priority = prio;
if (TD_ON_RUNQ(td) && td->td_rqindex != (prio / RQ_PPQ)) {
sched_rem(td);
sched_add(td, SRQ_BORING);
-   } else if (orig_pri < prio && TD_IS_RUNNING(td)) {
-   /*
-* If we have decreased the priority of a running thread, we
-* have to check if it should be preempted.
-*/
-   rq = 
-   newtd = runq_choose();
-#ifdef SMP
-   cputd = runq_choose(_pcpu[td->td_oncpu]);
-   if (newtd == NULL ||
-   (cputd != NULL && cputd->td_priority < td->td_priority))
-   newtd = cputd;
-#endif
-
-   if (newtd != NULL && newtd->td_priority < prio
-#ifndef FULL_PREEMPTION
-   && (newtd->td_priority <= PRI_MAX_ITHD ||
-   prio >= PRI_MIN_IDLE))
-#endif
-   ) {
-   if (td == curthread)
-   /*
-* Don't reschedule the thread here as it may
-* be losing priority because it has released a
-* mutex, and in that case we need it to finish
-* releasing the lock before it gets preempted.
-*/
-   td->td_owepreempt = 1;
-   else
-   kick_other_cpu(newtd->td_priority,
-   td->td_oncpu);
-   }
}
 }
 

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Thu Feb 16 21:03:43 2017(r313823)
+++ head/sys/kern/sched_ule.c   Thu Feb 16 21:18:31 2017(r313824)
@@ -319,7 +319,7 @@ static void tdq_add(struct tdq *, struct
 #ifdef SMP
 static int tdq_move(struct tdq *, struct tdq *);
 static int tdq_idled(struct tdq *);
-static void tdq_notify(struct tdq *, int);
+static void tdq_notify(struct tdq *, struct thread *);
 static struct thread *tdq_steal(struct tdq *, int);
 static struct thread *runq_steal(struct runq *, int);
 static int sched_pickcpu(struct thread *, int);
@@ -1040,14 +1040,16 @@ tdq_idled(struct tdq *tdq)
  * Notify a remote cpu of new work.  Sends an IPI if criteria are met.
  */
 static void
-tdq_notify(struct tdq *tdq, int pri)
+tdq_notify(struct tdq *tdq, struct thread *td)
 {
struct thread *ctd;
+   int pri;
int cpu;
 
if (tdq->tdq_ipipending)
return;
-   cpu = TDQ_ID(tdq);
+   cpu = td_get_sched(td)->ts_cpu;
+   pri = td->td_priority;
ctd = pcpu_find(cpu)->pc_curthread;
if (!sched_shouldpreempt(pri, ctd->td_priority, 1))
return;
@@ -1673,22 +1675,6 @@ sched_pctcpu_update(struct td_sched *ts,
ts->ts_ltick = t;
 }
 
-static void
-sched_check_preempt(struct tdq *tdq, struct thread *td)
-{
-
-   KASSERT(TD_IS_RUNNING(td), ("thread is not running"));
-   TDQ_LOCK_ASSERT(tdq, MA_OWNED);
-   KASSERT(tdq == TDQ_CPU(td->td_sched->ts_cpu),
-   ("tdq does not contain td"));
-
-   if (tdq == TDQ_SELF()) {
-   if (sched_shouldpreempt(tdq->tdq_lowpri, td->td_priority, 0))
-   td->td_owepreempt = 1;
-   } else
-   tdq_notify(tdq, tdq->tdq_lowpri);
-}
-
 /*
  * Adjust the priority of a thread.  Move it to the appropriate run-queue
  * if necessary.  This is the back-end for several priority related
@@ -1740,9 +1726,6 @@ 

svn commit: r313823 - head/contrib/compiler-rt/lib/builtins

2017-02-16 Thread Dimitry Andric
Author: dim
Date: Thu Feb 16 21:03:43 2017
New Revision: 313823
URL: https://svnweb.freebsd.org/changeset/base/313823

Log:
  Pull in r285478 from upstream compiler-rt trunk (by Saleem Abdulrasool):
  
build: give aliases the same visibility
  
ARM EABI also uses function aliases.  Ensure that those aliased
functions are given proper visibility annotations.
  
  Reported by:  mmel
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D9633

Modified:
  head/contrib/compiler-rt/lib/builtins/assembly.h

Modified: head/contrib/compiler-rt/lib/builtins/assembly.h
==
--- head/contrib/compiler-rt/lib/builtins/assembly.hThu Feb 16 20:50:01 
2017(r313822)
+++ head/contrib/compiler-rt/lib/builtins/assembly.hThu Feb 16 21:03:43 
2017(r313823)
@@ -149,6 +149,7 @@
 #define DEFINE_COMPILERRT_FUNCTION_ALIAS(name, target) 
\
   .globl SYMBOL_NAME(name) SEPARATOR   
\
   SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR  
\
+  DECLARE_SYMBOL_VISIBILITY(SYMBOL_NAME(name)) SEPARATOR   
\
   .set SYMBOL_NAME(name), SYMBOL_NAME(target) SEPARATOR
 
 #if defined(__ARM_EABI__)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313822 - in head/sys: libkern netinet

2017-02-16 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Feb 16 20:50:01 2017
New Revision: 313822
URL: https://svnweb.freebsd.org/changeset/base/313822

Log:
  Remove inet_ntoa() from the kernel
  
  inet_ntoa() cannot be used safely in a multithreaded environment
  because it uses a static local buffer.  Remove it from the kernel.
  
  Suggested by: glebius, emaste
  Reviewed by:  gnn
  MFC after:never
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D9625

Modified:
  head/sys/libkern/inet_ntoa.c
  head/sys/netinet/in.h

Modified: head/sys/libkern/inet_ntoa.c
==
--- head/sys/libkern/inet_ntoa.cThu Feb 16 20:47:41 2017
(r313821)
+++ head/sys/libkern/inet_ntoa.cThu Feb 16 20:50:01 2017
(r313822)
@@ -36,20 +36,6 @@ __FBSDID("$FreeBSD$");
 #include 
 
 char *
-inet_ntoa(struct in_addr ina)
-{
-   static char buf[4*sizeof "123"];
-   unsigned char *ucp = (unsigned char *)
-
-   sprintf(buf, "%d.%d.%d.%d",
-   ucp[0] & 0xff,
-   ucp[1] & 0xff,
-   ucp[2] & 0xff,
-   ucp[3] & 0xff);
-   return buf;
-}
-
-char *
 inet_ntoa_r(struct in_addr ina, char *buf)
 {
unsigned char *ucp = (unsigned char *)

Modified: head/sys/netinet/in.h
==
--- head/sys/netinet/in.h   Thu Feb 16 20:47:41 2017(r313821)
+++ head/sys/netinet/in.h   Thu Feb 16 20:50:01 2017(r313822)
@@ -646,7 +646,6 @@ int  in_localaddr(struct in_addr);
 int in_localip(struct in_addr);
 int in_ifhasaddr(struct ifnet *, struct in_addr);
 int inet_aton(const char *, struct in_addr *); /* in libkern */
-char   *inet_ntoa(struct in_addr); /* in libkern */
 char   *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
 char   *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */
 int inet_pton(int af, const char *, void *); /* in libkern */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313821 - in head/sys: dev/cxgb/ulp/iw_cxgb fs/nfsserver kern netinet netinet/libalias netpfil/ipfw

2017-02-16 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Feb 16 20:47:41 2017
New Revision: 313821
URL: https://svnweb.freebsd.org/changeset/base/313821

Log:
  Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel
  
  inet_ntoa() cannot be used safely in a multithreaded environment
  because it uses a static local buffer. Instead, use inet_ntoa_r()
  with a buffer on the caller's stack.
  
  Suggested by: glebius, emaste
  Reviewed by:  gnn
  MFC after:2 weeks
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D9625

Modified:
  head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
  head/sys/fs/nfsserver/nfs_nfsdkrpc.c
  head/sys/kern/kern_jail.c
  head/sys/netinet/if_ether.c
  head/sys/netinet/igmp.c
  head/sys/netinet/in.c
  head/sys/netinet/in_mcast.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet/ip_mroute.c
  head/sys/netinet/ip_options.c
  head/sys/netinet/libalias/alias_local.h
  head/sys/netinet/libalias/alias_nbt.c
  head/sys/netinet/libalias/alias_proxy.c
  head/sys/netinet/libalias/alias_sctp.c
  head/sys/netinet/tcp_hostcache.c
  head/sys/netpfil/ipfw/ip_fw_log.c

Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
==
--- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c  Thu Feb 16 20:44:44 2017
(r313820)
+++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c  Thu Feb 16 20:47:41 2017
(r313821)
@@ -1461,6 +1461,9 @@ static void
 process_data(struct iwch_ep *ep)
 {
struct sockaddr_in *local, *remote;
+#ifdef KTR
+   char local_str[INET_ADDRSTRLEN], remote_str[INET_ADDRSTRLEN];
+#endif
 
CTR4(KTR_IW_CXGB, "%s ep %p so %p state %s", __FUNCTION__, ep, 
ep->com.so, states[ep->com.state]);
 
@@ -1479,8 +1482,8 @@ process_data(struct iwch_ep *ep)
in_getsockaddr(ep->com.so, (struct sockaddr **));
in_getpeeraddr(ep->com.so, (struct sockaddr **));
CTR3(KTR_IW_CXGB, "%s local %s remote %s", __FUNCTION__, 
-   inet_ntoa(local->sin_addr),
-   inet_ntoa(remote->sin_addr));
+   inet_ntoa_r(local->sin_addr, local_str),
+   inet_ntoa_r(remote->sin_addr, remote_str));
ep->com.local_addr = *local;
ep->com.remote_addr = *remote;
free(local, M_SONAME);
@@ -1519,6 +1522,9 @@ process_newconn(struct iw_cm_id *parent_
struct sockaddr_in *local;
struct sockaddr_in *remote;
struct iwch_ep *parent_ep = parent_cm_id->provider_data;
+#ifdef KTR
+   char buf[INET_ADDRSTRLEN];
+#endif
 
CTR3(KTR_IW_CXGB, "%s parent ep %p so %p", __FUNCTION__, parent_ep, 
parent_ep->com.so);
if (!child_so) {
@@ -1539,7 +1545,7 @@ process_newconn(struct iw_cm_id *parent_
in_getpeeraddr(child_so, (struct sockaddr **));
 
CTR3(KTR_IW_CXGB, "%s remote addr %s port %d", __FUNCTION__, 
-   inet_ntoa(remote->sin_addr), ntohs(remote->sin_port));
+   inet_ntoa_r(remote->sin_addr, buf), ntohs(remote->sin_port));
child_ep->com.tdev = parent_ep->com.tdev;
child_ep->com.local_addr.sin_family = 
parent_ep->com.local_addr.sin_family;
child_ep->com.local_addr.sin_port = parent_ep->com.local_addr.sin_port;

Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c
==
--- head/sys/fs/nfsserver/nfs_nfsdkrpc.cThu Feb 16 20:44:44 2017
(r313820)
+++ head/sys/fs/nfsserver/nfs_nfsdkrpc.cThu Feb 16 20:47:41 2017
(r313821)
@@ -174,7 +174,11 @@ nfssvc_program(struct svc_req *rqst, SVC
if (port >= IPPORT_RESERVED &&
nd.nd_procnum != NFSPROC_NULL) {
 #ifdef INET6
-   char b6[INET6_ADDRSTRLEN];
+   char buf[INET6_ADDRSTRLEN];
+#else
+   char buf[INET_ADDRSTRLEN];
+#endif
+#ifdef INET6
 #if defined(KLD_MODULE)
/* Do not use ip6_sprintf: the nfs module should work 
without INET6. */
 #defineip6_sprintf(buf, a) 
\
@@ -189,12 +193,12 @@ nfssvc_program(struct svc_req *rqst, SVC
printf("NFS request from unprivileged port (%s:%d)\n",
 #ifdef INET6
sin->sin_family == AF_INET6 ?
-   ip6_sprintf(b6, (sin)->sin6_addr) :
+   ip6_sprintf(buf, (sin)->sin6_addr) :
 #if defined(KLD_MODULE)
 #undef ip6_sprintf
 #endif
 #endif
-   inet_ntoa(sin->sin_addr), port);
+   inet_ntoa_r(sin->sin_addr, buf), port);
svcerr_weakauth(rqst);
svc_freereq(rqst);
m_freem(nd.nd_mrep);

Modified: head/sys/kern/kern_jail.c
==
--- head/sys/kern/kern_jail.c   Thu Feb 16 

Re: svn commit: r313814 - head/sys/kern

2017-02-16 Thread Cy Schubert
No prob. Thanks.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


In message 

svn commit: r313820 - head/sys/netpfil/pf

2017-02-16 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Feb 16 20:44:44 2017
New Revision: 313820
URL: https://svnweb.freebsd.org/changeset/base/313820

Log:
  pf: use inet_ntoa_r() instead of inet_ntoa(); maybe fix IPv6 OS fingerprinting
  
  inet_ntoa() cannot be used safely in a multithreaded environment
  because it uses a static local buffer. Instead, use inet_ntoa_r()
  with a buffer on the caller's stack.
  
  This code had an INET6 conditional before this commit, but opt_inet6.h
  was not included, so INET6 was never defined.  Apparently, pf's OS
  fingerprinting hasn't worked with IPv6 for quite some time.
  This commit might fix it, but I didn't test that.
  
  Reviewed by:  gnn, kp
  MFC after:2 weeks
  Relnotes: yes (if I/someone can test pf OS fingerprinting with IPv6)
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D9625

Modified:
  head/sys/netpfil/pf/pf_osfp.c

Modified: head/sys/netpfil/pf/pf_osfp.c
==
--- head/sys/netpfil/pf/pf_osfp.c   Thu Feb 16 20:30:55 2017
(r313819)
+++ head/sys/netpfil/pf/pf_osfp.c   Thu Feb 16 20:44:44 2017
(r313820)
@@ -19,6 +19,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_inet6.h"
+
 #include 
 #include 
 #include 
@@ -34,7 +36,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef INET6
 #include 
+#endif
 
 static MALLOC_DEFINE(M_PFOSFP, "pf_osfp", "pf(4) operating system 
fingerprints");
 #defineDPFPRINTF(format, x...) \
@@ -94,7 +98,11 @@ pf_osfp_fingerprint_hdr(const struct ip 
struct pf_os_fingerprint fp, *fpresult;
int cnt, optlen = 0;
const u_int8_t *optp;
-   char srcname[128];
+#ifdef INET6
+   char srcname[INET6_ADDRSTRLEN];
+#else
+   char srcname[INET_ADDRSTRLEN];
+#endif
 
if ((tcp->th_flags & (TH_SYN|TH_ACK)) != TH_SYN)
return (NULL);
@@ -110,7 +118,7 @@ pf_osfp_fingerprint_hdr(const struct ip 
fp.fp_ttl = ip->ip_ttl;
if (ip->ip_off & htons(IP_DF))
fp.fp_flags |= PF_OSFP_DF;
-   strlcpy(srcname, inet_ntoa(ip->ip_src), sizeof(srcname));
+   inet_ntoa_r(ip->ip_src, srcname);
}
 #ifdef INET6
else if (ip6) {
@@ -119,8 +127,7 @@ pf_osfp_fingerprint_hdr(const struct ip 
fp.fp_ttl = ip6->ip6_hlim;
fp.fp_flags |= PF_OSFP_DF;
fp.fp_flags |= PF_OSFP_INET6;
-   strlcpy(srcname, ip6_sprintf((struct in6_addr *)>ip6_src),
-   sizeof(srcname));
+   ip6_sprintf(srcname, (const struct in6_addr *)>ip6_src);
}
 #endif
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313814 - head/sys/kern

2017-02-16 Thread Ryan Stone
Sorry about that.  It's fixed in r313816.

On Thu, Feb 16, 2017 at 3:31 PM, Cy Schubert 
wrote:

> In message <201702161941.v1gjfdop087...@repo.freebsd.org>, Ryan Stone
> writes:
> > Author: rstone
> > Date: Thu Feb 16 19:41:13 2017
> > New Revision: 313814
> > URL: https://svnweb.freebsd.org/changeset/base/313814
> >
> > Log:
> >   Check for preemption after lowering a thread's priority
> >
> >   When a high-priority thread is waiting for a mutex held by a
> >   low-priority thread, it temporarily lends its priority to the
> >   low-priority thread to prevent priority inversion.  When the mutex
> >   is released, the lent priority is revoked and the low-priority
> >   thread goes back to its original priority.
> >
> >   When the priority of that thread is lowered (through a call to
> >   sched_priority()), the schedule was not checking whether
> >   there is now a high-priority thread in the run queue.  This can
> >   cause threads with real-time priority to be starved in the run
> >   queue while the low-priority thread finishes its quantum.
> >
> >   Fix this by explicitly checking whether preemption is necessary
> >   when a thread's priority is lowered.
> >
> >   Sponsored by: Dell EMC Isilon
> >   Obtained from: Sandvine Inc
> >   Differential Revision:  https://reviews.freebsd.org/D9518
> >   Reviewed by: Jeff Roberson (ule)
> >   MFC after: 1 month
> >
> > Modified:
> >   head/sys/kern/sched_4bsd.c
> >   head/sys/kern/sched_ule.c
> >
> > Modified: head/sys/kern/sched_4bsd.c
> > 
> =
> > =
> > --- head/sys/kern/sched_4bsd.cThu Feb 16 19:00:09 2017
> (r31381
> > 3)
> > +++ head/sys/kern/sched_4bsd.cThu Feb 16 19:41:13 2017
> (r31381
> > 4)
> > @@ -816,7 +816,12 @@ sched_class(struct thread *td, int class
> >  static void
> >  sched_priority(struct thread *td, u_char prio)
> >  {
> > -
> > + struct thread *newtd;
> > + struct runq *rq;
> > + u_char orig_pri;
> > +#ifdef SMP
> > + struct thread *cputd;
> > +#endif
> >
> >   KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority
> change",
> >   "prio:%d", td->td_priority, "new prio:%d", prio,
> KTR_ATTR_LINKED,
> > @@ -832,10 +837,43 @@ sched_priority(struct thread *td, u_char
> >   THREAD_LOCK_ASSERT(td, MA_OWNED);
> >   if (td->td_priority == prio)
> >   return;
> > + orig_pri = td->td_priority;
> >   td->td_priority = prio;
> >   if (TD_ON_RUNQ(td) && td->td_rqindex != (prio / RQ_PPQ)) {
> >   sched_rem(td);
> >   sched_add(td, SRQ_BORING);
> > + } else if (orig_pri < prio && TD_IS_RUNNING(td)) {
> > + /*
> > +  * If we have decreased the priority of a running thread,
> we
> > +  * have to check if it should be preempted.
> > +  */
> > + rq = 
> > + newtd = runq_choose();
> > +#ifdef SMP
> > + cputd = runq_choose(_pcpu[td->td_oncpu]);
> > + if (newtd == NULL ||
> > + (cputd != NULL && cputd->td_priority <
> td->td_priority))
> > + newtd = cputd;
> > +#endif
> > +
> > + if (newtd != NULL && newtd->td_priority < prio
> > +#ifndef FULL_PREEMPTION
> > + && (newtd->td_priority <= PRI_MAX_ITHD ||
> > + prio >= PRI_MIN_IDLE))
> > +#endif
> > + ) {
> > + if (td == curthread)
> > + /*
> > +  * Don't reschedule the thread here as it
> may
> > +  * be losing priority because it has
> released a
> > +  * mutex, and in that case we need it to
> finish
> > +  * releasing the lock before it gets
> preempted.
> > +  */
> > + td->td_owepreempt = 1;
> > + else
> > + kick_other_cpu(newtd->td_priority,
> > + td->td_oncpu);
> > + }
> >   }
> >  }
> >
> >
> > Modified: head/sys/kern/sched_ule.c
> > 
> =
> > =
> > --- head/sys/kern/sched_ule.c Thu Feb 16 19:00:09 2017(r313813)
> > +++ head/sys/kern/sched_ule.c Thu Feb 16 19:41:13 2017(r313814)
> > @@ -319,7 +319,7 @@ static void tdq_add(struct tdq *, struct
> >  #ifdef SMP
> >  static int tdq_move(struct tdq *, struct tdq *);
> >  static int tdq_idled(struct tdq *);
> > -static void tdq_notify(struct tdq *, struct thread *);
> > +static void tdq_notify(struct tdq *, int);
> >  static struct thread *tdq_steal(struct tdq *, int);
> >  static struct thread *runq_steal(struct runq *, int);
> >  static int sched_pickcpu(struct thread *, int);
> > @@ -1040,16 +1040,14 @@ tdq_idled(struct tdq *tdq)
> >   * Notify a remote cpu of new 

Re: svn commit: r313814 - head/sys/kern

2017-02-16 Thread Cy Schubert
In message <201702161941.v1gjfdop087...@repo.freebsd.org>, Ryan Stone 
writes:
> Author: rstone
> Date: Thu Feb 16 19:41:13 2017
> New Revision: 313814
> URL: https://svnweb.freebsd.org/changeset/base/313814
> 
> Log:
>   Check for preemption after lowering a thread's priority
>   
>   When a high-priority thread is waiting for a mutex held by a
>   low-priority thread, it temporarily lends its priority to the
>   low-priority thread to prevent priority inversion.  When the mutex
>   is released, the lent priority is revoked and the low-priority
>   thread goes back to its original priority.
>   
>   When the priority of that thread is lowered (through a call to
>   sched_priority()), the schedule was not checking whether
>   there is now a high-priority thread in the run queue.  This can
>   cause threads with real-time priority to be starved in the run
>   queue while the low-priority thread finishes its quantum.
>   
>   Fix this by explicitly checking whether preemption is necessary
>   when a thread's priority is lowered.
>   
>   Sponsored by: Dell EMC Isilon
>   Obtained from: Sandvine Inc
>   Differential Revision:  https://reviews.freebsd.org/D9518
>   Reviewed by: Jeff Roberson (ule)
>   MFC after: 1 month
> 
> Modified:
>   head/sys/kern/sched_4bsd.c
>   head/sys/kern/sched_ule.c
> 
> Modified: head/sys/kern/sched_4bsd.c
> =
> =
> --- head/sys/kern/sched_4bsd.cThu Feb 16 19:00:09 2017(r31381
> 3)
> +++ head/sys/kern/sched_4bsd.cThu Feb 16 19:41:13 2017(r31381
> 4)
> @@ -816,7 +816,12 @@ sched_class(struct thread *td, int class
>  static void
>  sched_priority(struct thread *td, u_char prio)
>  {
> -
> + struct thread *newtd;
> + struct runq *rq;
> + u_char orig_pri;
> +#ifdef SMP
> + struct thread *cputd;
> +#endif
>  
>   KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change",
>   "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED,
> @@ -832,10 +837,43 @@ sched_priority(struct thread *td, u_char
>   THREAD_LOCK_ASSERT(td, MA_OWNED);
>   if (td->td_priority == prio)
>   return;
> + orig_pri = td->td_priority;
>   td->td_priority = prio;
>   if (TD_ON_RUNQ(td) && td->td_rqindex != (prio / RQ_PPQ)) {
>   sched_rem(td);
>   sched_add(td, SRQ_BORING);
> + } else if (orig_pri < prio && TD_IS_RUNNING(td)) {
> + /*
> +  * If we have decreased the priority of a running thread, we
> +  * have to check if it should be preempted.
> +  */
> + rq = 
> + newtd = runq_choose();
> +#ifdef SMP
> + cputd = runq_choose(_pcpu[td->td_oncpu]);
> + if (newtd == NULL ||
> + (cputd != NULL && cputd->td_priority < td->td_priority))
> + newtd = cputd;
> +#endif
> +
> + if (newtd != NULL && newtd->td_priority < prio
> +#ifndef FULL_PREEMPTION
> + && (newtd->td_priority <= PRI_MAX_ITHD ||
> + prio >= PRI_MIN_IDLE))
> +#endif
> + ) {
> + if (td == curthread)
> + /*
> +  * Don't reschedule the thread here as it may
> +  * be losing priority because it has released a
> +  * mutex, and in that case we need it to finish
> +  * releasing the lock before it gets preempted.
> +  */
> + td->td_owepreempt = 1;
> + else
> + kick_other_cpu(newtd->td_priority,
> + td->td_oncpu);
> + }
>   }
>  }
>  
> 
> Modified: head/sys/kern/sched_ule.c
> =
> =
> --- head/sys/kern/sched_ule.c Thu Feb 16 19:00:09 2017(r313813)
> +++ head/sys/kern/sched_ule.c Thu Feb 16 19:41:13 2017(r313814)
> @@ -319,7 +319,7 @@ static void tdq_add(struct tdq *, struct
>  #ifdef SMP
>  static int tdq_move(struct tdq *, struct tdq *);
>  static int tdq_idled(struct tdq *);
> -static void tdq_notify(struct tdq *, struct thread *);
> +static void tdq_notify(struct tdq *, int);
>  static struct thread *tdq_steal(struct tdq *, int);
>  static struct thread *runq_steal(struct runq *, int);
>  static int sched_pickcpu(struct thread *, int);
> @@ -1040,16 +1040,14 @@ tdq_idled(struct tdq *tdq)
>   * Notify a remote cpu of new work.  Sends an IPI if criteria are met.
>   */
>  static void
> -tdq_notify(struct tdq *tdq, struct thread *td)
> +tdq_notify(struct tdq *tdq, int pri)
>  {
>   struct thread *ctd;
> - int pri;
>   int cpu;
>  
>   if (tdq->tdq_ipipending)
>   return;
> - cpu = td_get_sched(td)->ts_cpu;
> - pri = 

svn commit: r313819 - head/include

2017-02-16 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Feb 16 20:30:55 2017
New Revision: 313819
URL: https://svnweb.freebsd.org/changeset/base/313819

Log:
  Remove outdated claim.
  
  Despite wishful thinking the removal of these old function hasn't
  happened yet.
  
  MFC after:3 days

Modified:
  head/include/stdlib.h

Modified: head/include/stdlib.h
==
--- head/include/stdlib.h   Thu Feb 16 20:28:30 2017(r313818)
+++ head/include/stdlib.h   Thu Feb 16 20:30:55 2017(r313819)
@@ -315,7 +315,7 @@ void srandomdev(void);
 long long
strtonum(const char *, long long, long long, const char **);
 
-/* Deprecated interfaces, to be removed in FreeBSD 6.0. */
+/* Deprecated interfaces, to be removed. */
 __int64_t
 strtoq(const char *, char **, int);
 __uint64_t
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313818 - head/include

2017-02-16 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Feb 16 20:28:30 2017
New Revision: 313818
URL: https://svnweb.freebsd.org/changeset/base/313818

Log:
  Small inclusion guard comment fix.

Modified:
  head/include/pthread.h

Modified: head/include/pthread.h
==
--- head/include/pthread.h  Thu Feb 16 20:27:22 2017(r313817)
+++ head/include/pthread.h  Thu Feb 16 20:28:30 2017(r313818)
@@ -347,4 +347,4 @@ void__pthread_cleanup_pop_imp(int);
 __END_DECLS
 __NULLABILITY_PRAGMA_POP
 
-#endif /* _PTHREAD_H_ */
+#endif /* !_PTHREAD_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313817 - head/sys/dev/acpica

2017-02-16 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Feb 16 20:27:22 2017
New Revision: 313817
URL: https://svnweb.freebsd.org/changeset/base/313817

Log:
  acpica: remove a superfluous NULL check
  
  The address-of operator can't produce NULL (in practice).
  Remove an unnecessary NULL check.
  
  MFC after:3 days
  Sponsored by: Dell EMC

Modified:
  head/sys/dev/acpica/acpi_package.c

Modified: head/sys/dev/acpica/acpi_package.c
==
--- head/sys/dev/acpica/acpi_package.c  Thu Feb 16 20:06:21 2017
(r313816)
+++ head/sys/dev/acpica/acpi_package.c  Thu Feb 16 20:27:22 2017
(r313817)
@@ -50,7 +50,7 @@ acpi_PkgInt(ACPI_OBJECT *res, int idx, U
 ACPI_OBJECT*obj;
 
 obj = >Package.Elements[idx];
-if (obj == NULL || obj->Type != ACPI_TYPE_INTEGER)
+if (obj->Type != ACPI_TYPE_INTEGER)
return (EINVAL);
 *dst = obj->Integer.Value;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313816 - head/sys/kern

2017-02-16 Thread Ryan Stone
Author: rstone
Date: Thu Feb 16 20:06:21 2017
New Revision: 313816
URL: https://svnweb.freebsd.org/changeset/base/313816

Log:
  Fix a typo in my previous commit
  
  Somehow in the late stages of testing my sched_ule patch, a character was
  accidentally deleted from the file.  Correct this.
  
  While I'm committing anyway, the previous commit message requires some
  clarification: in the normal case of unlending priority after releasing
  a mutex, the thread that was doing the lending will be woken up and
  immediately become the highest-priority thread, and in that case no
  priority inversion would take place.  However, if that thread is pinned
  to a different CPU, then the currently running thread that just had its
  priority lowered will not be preempted and then priority inversion can
  occur.
  
  Reported by:  O. Hartmann (typo), jhb (scheduler clarification)
  MFC after:1 month
  Pointy hat to:rstone

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Thu Feb 16 19:58:02 2017(r313815)
+++ head/sys/kern/sched_ule.c   Thu Feb 16 20:06:21 2017(r313816)
@@ -1047,7 +1047,7 @@ tdq_notify(struct tdq *tdq, int pri)
 
if (tdq->tdq_ipipending)
return;
-   cpu = TD_ID(tdq);
+   cpu = TDQ_ID(tdq);
ctd = pcpu_find(cpu)->pc_curthread;
if (!sched_shouldpreempt(pri, ctd->td_priority, 1))
return;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313815 - head/usr.sbin/bsdinstall/scripts

2017-02-16 Thread Bartek Rutkowski
Author: robak (ports committer)
Date: Thu Feb 16 19:58:02 2017
New Revision: 313815
URL: https://svnweb.freebsd.org/changeset/base/313815

Log:
  Add 0-8 as shortcuts for jumping to menu items in the hardening menu.
  
  Submitted by: skreuzer
  Reviewed by:  allanjude, robak
  Approved by:  allanjude
  Differential Revision:https://reviews.freebsd.org/D6826

Modified:
  head/usr.sbin/bsdinstall/scripts/hardening

Modified: head/usr.sbin/bsdinstall/scripts/hardening
==
--- head/usr.sbin/bsdinstall/scripts/hardening  Thu Feb 16 19:41:13 2017
(r313814)
+++ head/usr.sbin/bsdinstall/scripts/hardening  Thu Feb 16 19:58:02 2017
(r313815)
@@ -33,18 +33,18 @@ echo -n > $BSDINSTALL_TMPETC/sysctl.conf
 
 exec 3>&1
 FEATURES=$( dialog --backtitle "FreeBSD Installer" \
---title "System Hardening" --nocancel --notags --separate-output \
+--title "System Hardening" --nocancel --separate-output \
 --checklist "Choose system security hardening options:" \
 0 0 0 \
-   "hide_uids" "Hide processes running as other users" ${hide_uids:-off} \
-   "hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \
-   "read_msgbuf" "Disable reading kernel message buffer for unprivileged 
users" ${read_msgbuf:-off} \
-   "proc_debug" "Disable process debugging facilities for unprivileged 
users" ${proc_debug:-off} \
-   "random_pid" "Randomize the PID of newly created processes" 
${random_pid:-off} \
-   "stack_guard" "Insert stack guard page ahead of the growable segments" 
${stack_guard:-off} \
-   "clear_tmp" "Clean the /tmp filesystem on system startup" 
${clear_tmp:-off} \
-   "disable_syslogd" "Disable opening Syslogd network socket (disables 
remote logging)" ${disable_syslogd:-off} \
-   "disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \
+   "0 hide_uids" "Hide processes running as other users" ${hide_uids:-off} 
\
+   "1 hide_gids" "Hide processes running as other groups" 
${hide_gids:-off} \
+   "2 read_msgbuf" "Disable reading kernel message buffer for unprivileged 
users" ${read_msgbuf:-off} \
+   "3 proc_debug" "Disable process debugging facilities for unprivileged 
users" ${proc_debug:-off} \
+   "4 random_pid" "Randomize the PID of newly created processes" 
${random_pid:-off} \
+   "5 stack_guard" "Insert stack guard page ahead of the growable 
segments" ${stack_guard:-off} \
+   "6 clear_tmp" "Clean the /tmp filesystem on system startup" 
${clear_tmp:-off} \
+   "7 disable_syslogd" "Disable opening Syslogd network socket (disables 
remote logging)" ${disable_syslogd:-off} \
+   "8 disable_sendmail" "Disable Sendmail service" 
${disable_sendmail:-off} \
 2>&1 1>&3 )
 exec 3>&-
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r313814 - head/sys/kern

2017-02-16 Thread O. Hartmann
Am Thu, 16 Feb 2017 19:41:13 + (UTC)
Ryan Stone  schrieb:

> Author: rstone
> Date: Thu Feb 16 19:41:13 2017
> New Revision: 313814
> URL: https://svnweb.freebsd.org/changeset/base/313814
> 
> Log:
>   Check for preemption after lowering a thread's priority
>   
>   When a high-priority thread is waiting for a mutex held by a
>   low-priority thread, it temporarily lends its priority to the
>   low-priority thread to prevent priority inversion.  When the mutex
>   is released, the lent priority is revoked and the low-priority
>   thread goes back to its original priority.
>   
>   When the priority of that thread is lowered (through a call to
>   sched_priority()), the schedule was not checking whether
>   there is now a high-priority thread in the run queue.  This can
>   cause threads with real-time priority to be starved in the run
>   queue while the low-priority thread finishes its quantum.
>   
>   Fix this by explicitly checking whether preemption is necessary
>   when a thread's priority is lowered.
>   
>   Sponsored by: Dell EMC Isilon
>   Obtained from: Sandvine Inc
>   Differential Revision:  https://reviews.freebsd.org/D9518
>   Reviewed by: Jeff Roberson (ule)
>   MFC after: 1 month
> 
> Modified:
>   head/sys/kern/sched_4bsd.c
>   head/sys/kern/sched_ule.c
> 
> Modified: head/sys/kern/sched_4bsd.c
> ==
> --- head/sys/kern/sched_4bsd.cThu Feb 16 19:00:09 2017
> (r313813)
> +++ head/sys/kern/sched_4bsd.cThu Feb 16 19:41:13 2017
> (r313814)
> @@ -816,7 +816,12 @@ sched_class(struct thread *td, int class
>  static void
>  sched_priority(struct thread *td, u_char prio)
>  {
> -
> + struct thread *newtd;
> + struct runq *rq;
> + u_char orig_pri;
> +#ifdef SMP
> + struct thread *cputd;
> +#endif
>  
>   KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change",
>   "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED,
> @@ -832,10 +837,43 @@ sched_priority(struct thread *td, u_char
>   THREAD_LOCK_ASSERT(td, MA_OWNED);
>   if (td->td_priority == prio)
>   return;
> + orig_pri = td->td_priority;
>   td->td_priority = prio;
>   if (TD_ON_RUNQ(td) && td->td_rqindex != (prio / RQ_PPQ)) {
>   sched_rem(td);
>   sched_add(td, SRQ_BORING);
> + } else if (orig_pri < prio && TD_IS_RUNNING(td)) {
> + /*
> +  * If we have decreased the priority of a running thread, we
> +  * have to check if it should be preempted.
> +  */
> + rq = 
> + newtd = runq_choose();
> +#ifdef SMP
> + cputd = runq_choose(_pcpu[td->td_oncpu]);
> + if (newtd == NULL ||
> + (cputd != NULL && cputd->td_priority < td->td_priority))
> + newtd = cputd;
> +#endif
> +
> + if (newtd != NULL && newtd->td_priority < prio
> +#ifndef FULL_PREEMPTION
> + && (newtd->td_priority <= PRI_MAX_ITHD ||
> + prio >= PRI_MIN_IDLE))
> +#endif
> + ) {
> + if (td == curthread)
> + /*
> +  * Don't reschedule the thread here as it may
> +  * be losing priority because it has released a
> +  * mutex, and in that case we need it to finish
> +  * releasing the lock before it gets preempted.
> +  */
> + td->td_owepreempt = 1;
> + else
> + kick_other_cpu(newtd->td_priority,
> + td->td_oncpu);
> + }
>   }
>  }
>  
> 
> Modified: head/sys/kern/sched_ule.c
> ==
> --- head/sys/kern/sched_ule.c Thu Feb 16 19:00:09 2017(r313813)
> +++ head/sys/kern/sched_ule.c Thu Feb 16 19:41:13 2017(r313814)
> @@ -319,7 +319,7 @@ static void tdq_add(struct tdq *, struct
>  #ifdef SMP
>  static int tdq_move(struct tdq *, struct tdq *);
>  static int tdq_idled(struct tdq *);
> -static void tdq_notify(struct tdq *, struct thread *);
> +static void tdq_notify(struct tdq *, int);
>  static struct thread *tdq_steal(struct tdq *, int);
>  static struct thread *runq_steal(struct runq *, int);
>  static int sched_pickcpu(struct thread *, int);
> @@ -1040,16 +1040,14 @@ tdq_idled(struct tdq *tdq)
>   * Notify a remote cpu of new work.  Sends an IPI if criteria are met.
>   */
>  static void
> -tdq_notify(struct tdq *tdq, struct thread *td)
> +tdq_notify(struct tdq *tdq, int pri)
>  {
>   struct thread *ctd;
> - int pri;
>   int cpu;
>  
>   if (tdq->tdq_ipipending)
>   return;
> - cpu = td_get_sched(td)->ts_cpu;
> - pri = 

svn commit: r313814 - head/sys/kern

2017-02-16 Thread Ryan Stone
Author: rstone
Date: Thu Feb 16 19:41:13 2017
New Revision: 313814
URL: https://svnweb.freebsd.org/changeset/base/313814

Log:
  Check for preemption after lowering a thread's priority
  
  When a high-priority thread is waiting for a mutex held by a
  low-priority thread, it temporarily lends its priority to the
  low-priority thread to prevent priority inversion.  When the mutex
  is released, the lent priority is revoked and the low-priority
  thread goes back to its original priority.
  
  When the priority of that thread is lowered (through a call to
  sched_priority()), the schedule was not checking whether
  there is now a high-priority thread in the run queue.  This can
  cause threads with real-time priority to be starved in the run
  queue while the low-priority thread finishes its quantum.
  
  Fix this by explicitly checking whether preemption is necessary
  when a thread's priority is lowered.
  
  Sponsored by: Dell EMC Isilon
  Obtained from: Sandvine Inc
  Differential Revision:https://reviews.freebsd.org/D9518
  Reviewed by: Jeff Roberson (ule)
  MFC after: 1 month

Modified:
  head/sys/kern/sched_4bsd.c
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_4bsd.c
==
--- head/sys/kern/sched_4bsd.c  Thu Feb 16 19:00:09 2017(r313813)
+++ head/sys/kern/sched_4bsd.c  Thu Feb 16 19:41:13 2017(r313814)
@@ -816,7 +816,12 @@ sched_class(struct thread *td, int class
 static void
 sched_priority(struct thread *td, u_char prio)
 {
-
+   struct thread *newtd;
+   struct runq *rq;
+   u_char orig_pri;
+#ifdef SMP
+   struct thread *cputd;
+#endif
 
KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change",
"prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED,
@@ -832,10 +837,43 @@ sched_priority(struct thread *td, u_char
THREAD_LOCK_ASSERT(td, MA_OWNED);
if (td->td_priority == prio)
return;
+   orig_pri = td->td_priority;
td->td_priority = prio;
if (TD_ON_RUNQ(td) && td->td_rqindex != (prio / RQ_PPQ)) {
sched_rem(td);
sched_add(td, SRQ_BORING);
+   } else if (orig_pri < prio && TD_IS_RUNNING(td)) {
+   /*
+* If we have decreased the priority of a running thread, we
+* have to check if it should be preempted.
+*/
+   rq = 
+   newtd = runq_choose();
+#ifdef SMP
+   cputd = runq_choose(_pcpu[td->td_oncpu]);
+   if (newtd == NULL ||
+   (cputd != NULL && cputd->td_priority < td->td_priority))
+   newtd = cputd;
+#endif
+
+   if (newtd != NULL && newtd->td_priority < prio
+#ifndef FULL_PREEMPTION
+   && (newtd->td_priority <= PRI_MAX_ITHD ||
+   prio >= PRI_MIN_IDLE))
+#endif
+   ) {
+   if (td == curthread)
+   /*
+* Don't reschedule the thread here as it may
+* be losing priority because it has released a
+* mutex, and in that case we need it to finish
+* releasing the lock before it gets preempted.
+*/
+   td->td_owepreempt = 1;
+   else
+   kick_other_cpu(newtd->td_priority,
+   td->td_oncpu);
+   }
}
 }
 

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Thu Feb 16 19:00:09 2017(r313813)
+++ head/sys/kern/sched_ule.c   Thu Feb 16 19:41:13 2017(r313814)
@@ -319,7 +319,7 @@ static void tdq_add(struct tdq *, struct
 #ifdef SMP
 static int tdq_move(struct tdq *, struct tdq *);
 static int tdq_idled(struct tdq *);
-static void tdq_notify(struct tdq *, struct thread *);
+static void tdq_notify(struct tdq *, int);
 static struct thread *tdq_steal(struct tdq *, int);
 static struct thread *runq_steal(struct runq *, int);
 static int sched_pickcpu(struct thread *, int);
@@ -1040,16 +1040,14 @@ tdq_idled(struct tdq *tdq)
  * Notify a remote cpu of new work.  Sends an IPI if criteria are met.
  */
 static void
-tdq_notify(struct tdq *tdq, struct thread *td)
+tdq_notify(struct tdq *tdq, int pri)
 {
struct thread *ctd;
-   int pri;
int cpu;
 
if (tdq->tdq_ipipending)
return;
-   cpu = td_get_sched(td)->ts_cpu;
-   pri = td->td_priority;
+   cpu = TD_ID(tdq);
ctd = pcpu_find(cpu)->pc_curthread;
if (!sched_shouldpreempt(pri, ctd->td_priority, 1))
return;
@@ -1675,6 +1673,22 @@ sched_pctcpu_update(struct td_sched *ts,
ts->ts_ltick = 

svn commit: r313813 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2017-02-16 Thread Josh Paetzel
Author: jpaetzel
Date: Thu Feb 16 19:00:09 2017
New Revision: 313813
URL: https://svnweb.freebsd.org/changeset/base/313813

Log:
  MFV 313786
  
  7500 Simplify dbuf_free_range by removing dn_unlisted_l0_blkid
  
  illumos/illumos-gate@653af1b809998570c7e89fe7a0d3f90992bf0216
  
https://github.com/illumos/illumos-gate/commit/653af1b809998570c7e89fe7a0d3f90992bf0216
  
  https://www.illumos.org/issues/7500
With the integration of:
  
  commit 0f6d88aded0d165f5954688a9b13bac76c38da84
  Author: Alex Reece 
  Date:   Sat Jul 26 13:40:04 2014 -0800
  4873 zvol unmap calls can take a very long time for larger datasets
  
the dnode's dn_bufs field was changed from a list to a tree. As a result,
the dn_unlisted_l0_blkid field is no longer necessary.
  
  Author: Stephen Blinick 
  Reviewed by: Matthew Ahrens 
  Reviewed by: Dan Kimmel 
  Approved by: Gordon Ross 

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Thu Feb 16 
17:08:43 2017(r313812)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Thu Feb 16 
19:00:09 2017(r313813)
@@ -49,12 +49,6 @@
 
 uint_t zfs_dbuf_evict_key;
 
-/*
- * Number of times that zfs_free_range() took the slow path while doing
- * a zfs receive.  A nonzero value indicates a potential performance problem.
- */
-uint64_t zfs_free_range_recv_miss;
-
 static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
 static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx);
 
@@ -1220,9 +1214,6 @@ dbuf_unoverride(dbuf_dirty_record_t *dr)
  * Evict (if its unreferenced) or clear (if its referenced) any level-0
  * data blocks in the free range, so that any future readers will find
  * empty blocks.
- *
- * This is a no-op if the dataset is in the middle of an incremental
- * receive; see comment below for details.
  */
 void
 dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
@@ -1232,10 +1223,9 @@ dbuf_free_range(dnode_t *dn, uint64_t st
dmu_buf_impl_t *db, *db_next;
uint64_t txg = tx->tx_txg;
avl_index_t where;
-   boolean_t freespill =
-   (start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID);
 
-   if (end_blkid > dn->dn_maxblkid && !freespill)
+   if (end_blkid > dn->dn_maxblkid &&
+   !(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID))
end_blkid = dn->dn_maxblkid;
dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid);
 
@@ -1244,29 +1234,9 @@ dbuf_free_range(dnode_t *dn, uint64_t st
db_search.db_state = DB_SEARCH;
 
mutex_enter(>dn_dbufs_mtx);
-   if (start_blkid >= dn->dn_unlisted_l0_blkid && !freespill) {
-   /* There can't be any dbufs in this range; no need to search. */
-#ifdef DEBUG
-   db = avl_find(>dn_dbufs, _search, );
-   ASSERT3P(db, ==, NULL);
-   db = avl_nearest(>dn_dbufs, where, AVL_AFTER);
-   ASSERT(db == NULL || db->db_level > 0);
-#endif
-   mutex_exit(>dn_dbufs_mtx);
-   return;
-   } else if (dmu_objset_is_receiving(dn->dn_objset)) {
-   /*
-* If we are receiving, we expect there to be no dbufs in
-* the range to be freed, because receive modifies each
-* block at most once, and in offset order.  If this is
-* not the case, it can lead to performance problems,
-* so note that we unexpectedly took the slow path.
-*/
-   atomic_inc_64(_free_range_recv_miss);
-   }
-
db = avl_find(>dn_dbufs, _search, );
ASSERT3P(db, ==, NULL);
+
db = avl_nearest(>dn_dbufs, where, AVL_AFTER);
 
for (; db != NULL; db = db_next) {
@@ -2283,9 +2253,7 @@ dbuf_create(dnode_t *dn, uint8_t level, 
return (odb);
}
avl_add(>dn_dbufs, db);
-   if (db->db_level == 0 && db->db_blkid >=
-   dn->dn_unlisted_l0_blkid)
-   dn->dn_unlisted_l0_blkid = db->db_blkid + 1;
+
db->db_state = DB_UNCACHED;
mutex_exit(>dn_dbufs_mtx);
arc_space_consume(sizeof (dmu_buf_impl_t), ARC_SPACE_OTHER);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Feb 16 

svn commit: r313812 - stable/10/usr.sbin/bhyve

2017-02-16 Thread Peter Grehan
Author: grehan
Date: Thu Feb 16 17:08:43 2017
New Revision: 313812
URL: https://svnweb.freebsd.org/changeset/base/313812

Log:
  MFC r311702
Use correct PCI device id for virtio-rng.
This prevented the device from attaching with a
Windows guest (most other guests use the device type
for matching)
  
PR:   212711

Modified:
  stable/10/usr.sbin/bhyve/virtio.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bhyve/virtio.h
==
--- stable/10/usr.sbin/bhyve/virtio.h   Thu Feb 16 17:07:20 2017
(r313811)
+++ stable/10/usr.sbin/bhyve/virtio.h   Thu Feb 16 17:08:43 2017
(r313812)
@@ -209,7 +209,7 @@ struct vring_used {
 #defineVIRTIO_VENDOR   0x1AF4
 #defineVIRTIO_DEV_NET  0x1000
 #defineVIRTIO_DEV_BLOCK0x1001
-#defineVIRTIO_DEV_RANDOM   0x1002
+#defineVIRTIO_DEV_RANDOM   0x1005
 
 /*
  * PCI config space constants.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313811 - stable/11/usr.sbin/bhyve

2017-02-16 Thread Peter Grehan
Author: grehan
Date: Thu Feb 16 17:07:20 2017
New Revision: 313811
URL: https://svnweb.freebsd.org/changeset/base/313811

Log:
  MFC r311702
Use correct PCI device id for virtio-rng.
This prevented the device from attaching with a
Windows guest (most other guests use the device type
for matching)
  
PR:   212711

Modified:
  stable/11/usr.sbin/bhyve/virtio.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bhyve/virtio.h
==
--- stable/11/usr.sbin/bhyve/virtio.h   Thu Feb 16 14:13:36 2017
(r313810)
+++ stable/11/usr.sbin/bhyve/virtio.h   Thu Feb 16 17:07:20 2017
(r313811)
@@ -209,7 +209,7 @@ struct vring_used {
 #defineVIRTIO_VENDOR   0x1AF4
 #defineVIRTIO_DEV_NET  0x1000
 #defineVIRTIO_DEV_BLOCK0x1001
-#defineVIRTIO_DEV_RANDOM   0x1002
+#defineVIRTIO_DEV_RANDOM   0x1005
 
 /*
  * PCI config space constants.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2017-02-16 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb 16 14:13:36 2017
New Revision: 313810
URL: https://svnweb.freebsd.org/changeset/base/313810

Log:
  Allow container_of() to be used with constant data pointers.
  
  Obtained from:kmacy @
  MFC after:1 week
  Sponsored by: Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h
==
--- head/sys/compat/linuxkpi/common/include/linux/kernel.h  Thu Feb 16 
13:32:15 2017(r313809)
+++ head/sys/compat/linuxkpi/common/include/linux/kernel.h  Thu Feb 16 
14:13:36 2017(r313810)
@@ -245,8 +245,8 @@ scnprintf(char *buf, size_t size, const 
 
 #define container_of(ptr, type, member)\
 ({ \
-   __typeof(((type *)0)->member) *_p = (ptr);  \
-   (type *)((char *)_p - offsetof(type, member));  \
+   const __typeof(((type *)0)->member) *__p = (ptr);   \
+   (type *)((uintptr_t)__p - offsetof(type, member));  \
 })
   
 #defineARRAY_SIZE(x)   (sizeof(x) / sizeof((x)[0]))
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313809 - in head/sys: amd64/linux modules/linux64

2017-02-16 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Feb 16 13:32:15 2017
New Revision: 313809
URL: https://svnweb.freebsd.org/changeset/base/313809

Log:
  Implement linux version of ptrace(2).  It's nowhere near complete,
  but it allows to use 64 bit linux strace(1) on 64 bit linux binaries.
  
  Reviewed by:  dchagin (earlier version)
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D9406

Added:
  head/sys/amd64/linux/linux_ptrace.c   (contents, props changed)
Modified:
  head/sys/amd64/linux/linux_dummy.c
  head/sys/modules/linux64/Makefile

Modified: head/sys/amd64/linux/linux_dummy.c
==
--- head/sys/amd64/linux/linux_dummy.c  Thu Feb 16 12:56:10 2017
(r313808)
+++ head/sys/amd64/linux/linux_dummy.c  Thu Feb 16 13:32:15 2017
(r313809)
@@ -45,7 +45,6 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
 
 DUMMY(mincore);
 DUMMY(sendfile);
-DUMMY(ptrace);
 DUMMY(syslog);
 DUMMY(setfsuid);
 DUMMY(setfsgid);

Added: head/sys/amd64/linux/linux_ptrace.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/amd64/linux/linux_ptrace.c Thu Feb 16 13:32:15 2017
(r313809)
@@ -0,0 +1,414 @@
+/*-
+ * Copyright (c) 2017 Edward Tomasz Napierala 
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#defineLINUX_PTRACE_TRACEME0
+#defineLINUX_PTRACE_PEEKTEXT   1
+#defineLINUX_PTRACE_PEEKDATA   2
+#defineLINUX_PTRACE_PEEKUSER   3
+#defineLINUX_PTRACE_POKETEXT   4
+#defineLINUX_PTRACE_POKEDATA   5
+#defineLINUX_PTRACE_POKEUSER   6
+#defineLINUX_PTRACE_CONT   7
+#defineLINUX_PTRACE_KILL   8
+#defineLINUX_PTRACE_SINGLESTEP 9
+#defineLINUX_PTRACE_GETREGS12
+#defineLINUX_PTRACE_SETREGS13
+#defineLINUX_PTRACE_GETFPREGS  14
+#defineLINUX_PTRACE_SETFPREGS  15
+#defineLINUX_PTRACE_ATTACH 16
+#defineLINUX_PTRACE_DETACH 17
+#defineLINUX_PTRACE_SYSCALL24
+#defineLINUX_PTRACE_SETOPTIONS 0x4200
+#defineLINUX_PTRACE_GETREGSET  0x4204
+#defineLINUX_PTRACE_SEIZE  0x4206
+
+#defineLINUX_PTRACE_O_TRACESYSGOOD 1
+#defineLINUX_PTRACE_O_TRACEFORK2
+#defineLINUX_PTRACE_O_TRACEVFORK   4
+#defineLINUX_PTRACE_O_TRACECLONE   8
+#defineLINUX_PTRACE_O_TRACEEXEC16
+#defineLINUX_PTRACE_O_TRACEVFORKDONE   32
+#defineLINUX_PTRACE_O_TRACEEXIT64
+#defineLINUX_PTRACE_O_TRACESECCOMP 128
+#defineLINUX_PTRACE_O_EXITKILL 1048576 
+#defineLINUX_PTRACE_O_SUSPEND_SECCOMP  2097152
+
+#defineLINUX_NT_PRSTATUS   1
+
+#defineLINUX_PTRACE_O_MASK (LINUX_PTRACE_O_TRACESYSGOOD |  \
+LINUX_PTRACE_O_TRACEFORK | LINUX_PTRACE_O_TRACEVFORK | \
+LINUX_PTRACE_O_TRACECLONE | LINUX_PTRACE_O_TRACEEXEC | \
+LINUX_PTRACE_O_TRACEVFORKDONE | LINUX_PTRACE_O_TRACEEXIT | \
+

svn commit: r313808 - head/sys/compat/linuxkpi/common/include/asm

2017-02-16 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb 16 12:56:10 2017
New Revision: 313808
URL: https://svnweb.freebsd.org/changeset/base/313808

Log:
  Implement more LinuxKPI atomic functions and macros.
  
  Obtained from:kmacy @
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
  head/sys/compat/linuxkpi/common/include/asm/atomic.h
  head/sys/compat/linuxkpi/common/include/asm/atomic64.h

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h
==
--- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h   Thu Feb 16 
12:20:57 2017(r313807)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h   Thu Feb 16 
12:56:10 2017(r313808)
@@ -75,6 +75,12 @@ atomic_long_dec(atomic_long_t *v)
return atomic_fetchadd_long(>counter, -1) - 1;
 }
 
+static inline long
+atomic_long_xchg(atomic_long_t *v, long val)
+{
+   return atomic_swap_long(>counter, val);
+}
+
 static inline int
 atomic_long_add_unless(atomic_long_t *v, long a, long u)
 {

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h
==
--- head/sys/compat/linuxkpi/common/include/asm/atomic.hThu Feb 16 
12:20:57 2017(r313807)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic.hThu Feb 16 
12:56:10 2017(r313808)
@@ -75,6 +75,12 @@ atomic_set(atomic_t *v, int i)
 }
 
 static inline void
+atomic_set_release(atomic_t *v, int i)
+{
+   atomic_store_rel_int(>counter, i);
+}
+
+static inline void
 atomic_set_mask(unsigned int mask, atomic_t *v)
 {
atomic_set_int(>counter, mask);
@@ -187,8 +193,26 @@ static inline void atomic_##op(int i, at
c = old;\
 }
 
+#defineLINUX_ATOMIC_FETCH_OP(op, c_op) \
+static inline int atomic_fetch_##op(int i, atomic_t *v)\
+{  \
+   int c, old; \
+   \
+   c = v->counter; \
+   while ((old = atomic_cmpxchg(v, c, c c_op i)) != c) \
+   c = old;\
+   \
+   return (c); \
+}
+
 LINUX_ATOMIC_OP(or, |)
 LINUX_ATOMIC_OP(and, &)
+LINUX_ATOMIC_OP(andnot, &~)
 LINUX_ATOMIC_OP(xor, ^)
 
+LINUX_ATOMIC_FETCH_OP(or, |)
+LINUX_ATOMIC_FETCH_OP(and, &)
+LINUX_ATOMIC_FETCH_OP(andnot, &~)
+LINUX_ATOMIC_FETCH_OP(xor, ^)
+
 #endif /* _ASM_ATOMIC_H_ */

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic64.h
==
--- head/sys/compat/linuxkpi/common/include/asm/atomic64.h  Thu Feb 16 
12:20:57 2017(r313807)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic64.h  Thu Feb 16 
12:56:10 2017(r313808)
@@ -36,6 +36,8 @@ typedef struct {
volatile int64_t counter;
 } atomic64_t;
 
+#defineATOMIC64_INIT(x){ .counter = (x) }
+
 /**
  * 64-bit atomic operations
  **/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313807 - head/sys/compat/linuxkpi/common/include/asm

2017-02-16 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb 16 12:20:57 2017
New Revision: 313807
URL: https://svnweb.freebsd.org/changeset/base/313807

Log:
  Allow passing a constant atomic_t to atomic_read().
  
  Obtained from:kmacy @
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/asm/atomic.h

Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h
==
--- head/sys/compat/linuxkpi/common/include/asm/atomic.hThu Feb 16 
12:08:52 2017(r313806)
+++ head/sys/compat/linuxkpi/common/include/asm/atomic.hThu Feb 16 
12:20:57 2017(r313807)
@@ -81,9 +81,9 @@ atomic_set_mask(unsigned int mask, atomi
 }
 
 static inline int
-atomic_read(atomic_t *v)
+atomic_read(const atomic_t *v)
 {
-   return atomic_load_acq_int(>counter);
+   return atomic_load_acq_int(&__DECONST(atomic_t *, v)->counter);
 }
 
 static inline int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2017-02-16 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb 16 12:08:52 2017
New Revision: 313806
URL: https://svnweb.freebsd.org/changeset/base/313806

Log:
  Whitespace fix.
  
  Obtained from:kmacy @
  MFC after:1 week
  Sponsored by: Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
==
--- head/sys/compat/linuxkpi/common/include/linux/device.h  Thu Feb 16 
11:38:50 2017(r313805)
+++ head/sys/compat/linuxkpi/common/include/linux/device.h  Thu Feb 16 
12:08:52 2017(r313806)
@@ -413,7 +413,7 @@ class_create(struct module *owner, const
 
class = kzalloc(sizeof(*class), M_WAITOK);
class->owner = owner;
-   class->name= name;
+   class->name = name;
class->class_release = linux_class_kfree;
error = class_register(class);
if (error) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313805 - head/sys/netipsec

2017-02-16 Thread Andrey V. Elsukov
Author: ae
Date: Thu Feb 16 11:38:50 2017
New Revision: 313805
URL: https://svnweb.freebsd.org/changeset/base/313805

Log:
  Fix LINT build for powerpc.
  
  Build kernel modules support only when both IPSEC and TCP_SIGNATURE
  are not defined.
  
  Reported by:  emaste

Modified:
  head/sys/netipsec/subr_ipsec.c

Modified: head/sys/netipsec/subr_ipsec.c
==
--- head/sys/netipsec/subr_ipsec.c  Thu Feb 16 10:36:00 2017
(r313804)
+++ head/sys/netipsec/subr_ipsec.c  Thu Feb 16 11:38:50 2017
(r313805)
@@ -126,9 +126,12 @@ ipsec6_setsockaddrs(const struct mbuf *m
 
 #ifdef IPSEC_SUPPORT
 /*
- * Declare IPSEC_SUPPORT as module even if IPSEC is defined.
- * tcpmd5.ko module depends from IPSEC_SUPPORT.
+ * IPSEC_SUPPORT - loading of ipsec.ko and tcpmd5.ko is supported.
+ * IPSEC + IPSEC_SUPPORT - loading tcpmd5.ko is supported.
+ * IPSEC + TCP_SIGNATURE - all is build in the kernel, do not build
+ *   IPSEC_SUPPORT.
  */
+#if !defined(IPSEC) || !defined(TCP_SIGNATURE)
 #defineIPSEC_MODULE_INCR   2
 static int
 ipsec_kmod_enter(volatile u_int *cntr)
@@ -181,6 +184,30 @@ type name (decl)   
\
return (ret);   \
 }
 
+static int
+ipsec_support_modevent(module_t mod, int type, void *data)
+{
+
+   switch (type) {
+   case MOD_LOAD:
+   return (0);
+   case MOD_UNLOAD:
+   return (EBUSY);
+   default:
+   return (EOPNOTSUPP);
+   }
+}
+
+static moduledata_t ipsec_support_mod = {
+   "ipsec_support",
+   ipsec_support_modevent,
+   0
+};
+DECLARE_MODULE(ipsec_support, ipsec_support_mod, SI_SUB_PROTO_DOMAIN,
+SI_ORDER_ANY);
+MODULE_VERSION(ipsec_support, 1);
+#endif /* !IPSEC || !TCP_SIGNATURE */
+
 #ifndef TCP_SIGNATURE
 /* Declare TCP-MD5 support as kernel module. */
 static struct tcpmd5_support tcpmd5_ipsec = {
@@ -222,30 +249,7 @@ tcpmd5_support_disable(void)
tcp_ipsec_support->methods = NULL;
}
 }
-#endif
-
-static int
-ipsec_support_modevent(module_t mod, int type, void *data)
-{
-
-   switch (type) {
-   case MOD_LOAD:
-   return (0);
-   case MOD_UNLOAD:
-   return (EBUSY);
-   default:
-   return (EOPNOTSUPP);
-   }
-}
-
-static moduledata_t ipsec_support_mod = {
-   "ipsec_support",
-   ipsec_support_modevent,
-   0
-};
-DECLARE_MODULE(ipsec_support, ipsec_support_mod, SI_SUB_PROTO_DOMAIN,
-SI_ORDER_ANY);
-MODULE_VERSION(ipsec_support, 1);
+#endif /* !TCP_SIGNATURE */
 
 #ifndef IPSEC
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313804 - head/sys/compat/linux

2017-02-16 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Feb 16 10:36:00 2017
New Revision: 313804
URL: https://svnweb.freebsd.org/changeset/base/313804

Log:
  Improve debugging output.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/compat/linux/linux.c

Modified: head/sys/compat/linux/linux.c
==
--- head/sys/compat/linux/linux.c   Thu Feb 16 09:19:29 2017
(r313803)
+++ head/sys/compat/linux/linux.c   Thu Feb 16 10:36:00 2017
(r313804)
@@ -128,7 +128,7 @@ int
 linux_to_bsd_signal(int sig)
 {
 
-   KASSERT(sig > 0 && sig <= LINUX_SIGRTMAX, ("Invalid Linux signal\n"));
+   KASSERT(sig > 0 && sig <= LINUX_SIGRTMAX, ("invalid Linux signal %d\n", 
sig));
 
if (sig < LINUX_SIGRTMIN)
return (linux_to_bsd_sigtbl[_SIG_IDX(sig)]);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r313803 - stable/10/usr.sbin/arp

2017-02-16 Thread Renato Botelho
Author: garga (ports committer)
Date: Thu Feb 16 09:19:29 2017
New Revision: 313803
URL: https://svnweb.freebsd.org/changeset/base/313803

Log:
  MFC r313477:
  
  Cleanup on usr.sbin/arp/arp.c
  
  * 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx()
when both are selected.
  * 'trail' option is no longer supported since first import of arp from 4.4BSD.
XXX message was added 13 years ago in r128192. I believe it's time to remove
it.
  * Use warnx() to print some informative messages instead of printf()
  * Replace strncmp() by strcmp() when validating parameters and exit when 
invalid
parameter is found
  
  Reviewed by:  allanjude, vangyzen, cem
  Approved by:  allanjude
  MFC after:1 week
  Sponsored by: Rubicon Communications (Netgate)
  Differential Revision:https://reviews.freebsd.org/D9504

Modified:
  stable/10/usr.sbin/arp/arp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/arp/arp.c
==
--- stable/10/usr.sbin/arp/arp.cThu Feb 16 09:12:36 2017
(r313802)
+++ stable/10/usr.sbin/arp/arp.cThu Feb 16 09:19:29 2017
(r313803)
@@ -319,7 +319,7 @@ set(int argc, char **argv)
return (1);
doing_proxy = flags = expire_time = 0;
while (argc-- > 0) {
-   if (strncmp(argv[0], "temp", 4) == 0) {
+   if (strcmp(argv[0], "temp") == 0) {
struct timespec tp;
int max_age;
size_t len = sizeof(max_age);
@@ -329,10 +329,10 @@ set(int argc, char **argv)
_age, , NULL, 0) != 0)
err(1, "sysctlbyname");
expire_time = tp.tv_sec + max_age;
-   } else if (strncmp(argv[0], "pub", 3) == 0) {
+   } else if (strcmp(argv[0], "pub") == 0) {
flags |= RTF_ANNOUNCE;
doing_proxy = 1;
-   if (argc && strncmp(argv[1], "only", 3) == 0) {
+   if (argc && strcmp(argv[1], "only") == 0) {
/*
 * Compatibility: in pre FreeBSD 8 times
 * the "only" keyword used to mean that
@@ -341,29 +341,28 @@ set(int argc, char **argv)
 */
argc--; argv++;
}
-   } else if (strncmp(argv[0], "blackhole", 9) == 0) {
+   } else if (strcmp(argv[0], "blackhole") == 0) {
if (flags & RTF_REJECT) {
-   printf("Choose one of blackhole or reject, "
+   errx(1, "Choose one of blackhole or reject, "
"not both.");
}
flags |= RTF_BLACKHOLE;
-   } else if (strncmp(argv[0], "reject", 6) == 0) {
+   } else if (strcmp(argv[0], "reject") == 0) {
if (flags & RTF_BLACKHOLE) {
-   printf("Choose one of blackhole or reject, "
+   errx(1, "Choose one of blackhole or reject, "
"not both.");
}
flags |= RTF_REJECT;
-   } else if (strncmp(argv[0], "trail", 5) == 0) {
-   /* XXX deprecated and undocumented feature */
-   printf("%s: Sending trailers is no longer supported\n",
-   host);
+   } else {
+   warnx("Invalid parameter '%s'", argv[0]);
+   usage();
}
argv++;
}
ea = (struct ether_addr *)LLADDR(_m);
if (doing_proxy && !strcmp(eaddr, "auto")) {
if (!get_ether_addr(dst->sin_addr.s_addr, ea)) {
-   printf("no interface found for %s\n",
+   warnx("no interface found for %s",
   inet_ntoa(dst->sin_addr));
return (1);
}
@@ -399,7 +398,7 @@ set(int argc, char **argv)
if ((sdl->sdl_family != AF_LINK) ||
(rtm->rtm_flags & RTF_GATEWAY) ||
!valid_type(sdl->sdl_type)) {
-   printf("cannot intuit interface index and type for %s\n", host);
+   warnx("cannot intuit interface index and type for %s", host);
return (1);
}
sdl_m.sdl_type = sdl->sdl_type;
@@ -487,7 +486,7 @@ delete(char *host)
 * is a proxy-arp entry to remove.
 */
if (flags & RTF_ANNOUNCE) {
-   fprintf(stderr, "delete: cannot locate %s\n", host);
+   warnx("delete: cannot locate %s", host);

svn commit: r313802 - stable/11/usr.sbin/arp

2017-02-16 Thread Renato Botelho
Author: garga (ports committer)
Date: Thu Feb 16 09:12:36 2017
New Revision: 313802
URL: https://svnweb.freebsd.org/changeset/base/313802

Log:
  MFC r313477:
  
  Cleanup on usr.sbin/arp/arp.c
  
  * 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx()
when both are selected.
  * 'trail' option is no longer supported since first import of arp from 4.4BSD.
XXX message was added 13 years ago in r128192. I believe it's time to remove
it.
  * Use warnx() to print some informative messages instead of printf()
  * Replace strncmp() by strcmp() when validating parameters and exit when 
invalid
parameter is found
  
  Reviewed by:  allanjude, vangyzen, cem
  Approved by:  allanjude
  MFC after:1 week
  Sponsored by: Rubicon Communications (Netgate)
  Differential Revision:https://reviews.freebsd.org/D9504

Modified:
  stable/11/usr.sbin/arp/arp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/arp/arp.c
==
--- stable/11/usr.sbin/arp/arp.cThu Feb 16 06:52:53 2017
(r313801)
+++ stable/11/usr.sbin/arp/arp.cThu Feb 16 09:12:36 2017
(r313802)
@@ -319,7 +319,7 @@ set(int argc, char **argv)
return (1);
doing_proxy = flags = expire_time = 0;
while (argc-- > 0) {
-   if (strncmp(argv[0], "temp", 4) == 0) {
+   if (strcmp(argv[0], "temp") == 0) {
struct timespec tp;
int max_age;
size_t len = sizeof(max_age);
@@ -329,10 +329,10 @@ set(int argc, char **argv)
_age, , NULL, 0) != 0)
err(1, "sysctlbyname");
expire_time = tp.tv_sec + max_age;
-   } else if (strncmp(argv[0], "pub", 3) == 0) {
+   } else if (strcmp(argv[0], "pub") == 0) {
flags |= RTF_ANNOUNCE;
doing_proxy = 1;
-   if (argc && strncmp(argv[1], "only", 3) == 0) {
+   if (argc && strcmp(argv[1], "only") == 0) {
/*
 * Compatibility: in pre FreeBSD 8 times
 * the "only" keyword used to mean that
@@ -341,29 +341,28 @@ set(int argc, char **argv)
 */
argc--; argv++;
}
-   } else if (strncmp(argv[0], "blackhole", 9) == 0) {
+   } else if (strcmp(argv[0], "blackhole") == 0) {
if (flags & RTF_REJECT) {
-   printf("Choose one of blackhole or reject, "
+   errx(1, "Choose one of blackhole or reject, "
"not both.");
}
flags |= RTF_BLACKHOLE;
-   } else if (strncmp(argv[0], "reject", 6) == 0) {
+   } else if (strcmp(argv[0], "reject") == 0) {
if (flags & RTF_BLACKHOLE) {
-   printf("Choose one of blackhole or reject, "
+   errx(1, "Choose one of blackhole or reject, "
"not both.");
}
flags |= RTF_REJECT;
-   } else if (strncmp(argv[0], "trail", 5) == 0) {
-   /* XXX deprecated and undocumented feature */
-   printf("%s: Sending trailers is no longer supported\n",
-   host);
+   } else {
+   warnx("Invalid parameter '%s'", argv[0]);
+   usage();
}
argv++;
}
ea = (struct ether_addr *)LLADDR(_m);
if (doing_proxy && !strcmp(eaddr, "auto")) {
if (!get_ether_addr(dst->sin_addr.s_addr, ea)) {
-   printf("no interface found for %s\n",
+   warnx("no interface found for %s",
   inet_ntoa(dst->sin_addr));
return (1);
}
@@ -399,7 +398,7 @@ set(int argc, char **argv)
if ((sdl->sdl_family != AF_LINK) ||
(rtm->rtm_flags & RTF_GATEWAY) ||
!valid_type(sdl->sdl_type)) {
-   printf("cannot intuit interface index and type for %s\n", host);
+   warnx("cannot intuit interface index and type for %s", host);
return (1);
}
sdl_m.sdl_type = sdl->sdl_type;
@@ -487,7 +486,7 @@ delete(char *host)
 * is a proxy-arp entry to remove.
 */
if (flags & RTF_ANNOUNCE) {
-   fprintf(stderr, "delete: cannot locate %s\n", host);
+   warnx("delete: cannot locate %s", host);

Re: svn commit: r313761 - in head/lib/msun: . src

2017-02-16 Thread Andreas Tobler

On 15.02.17 17:08, Ed Maste wrote:

On 15 February 2017 at 02:59, Mahdi Mokhtari  wrote:

Author: mmokhi (ports committer)
Date: Wed Feb 15 07:59:54 2017
New Revision: 313761
URL: https://svnweb.freebsd.org/changeset/base/313761

Log:
  Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun
  to improve C11 conformance.


This breaks the build on at least mips:

/scratch/tmp/emaste/freebsd/lib/msun/src/catrigl.c:48:21: error:
invtrig.h: No such file or directory
/scratch/tmp/emaste/freebsd/lib/msun/src/catrigl.c:85:2: error: #error
"Unsupported long double format"
...


+2 on powerpc and powerpc64.

Andreas

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