Re: svn commit: r320240 - head/include

2017-06-26 Thread Jan Beich
Ed Schouten <e...@freebsd.org> writes:

> Author: ed
> Date: Thu Jun 22 18:39:52 2017
> New Revision: 320240
> URL: https://svnweb.freebsd.org/changeset/base/320240
>
> Log:
>   Use __ISO_C_VISIBLE, as opposed to testing __STDC_VERSION__.
>   
>   FreeBSD's C library uses __STDC_VERSION__ to determine whether the
>   compiler provides language features specific to a certain version of the
>   C standard. __ISO_C_VISIBLE is used to specify which library features
>   need to be exposed.
>   
>   max_align_t currently uses __STDC_VERSION__, even though it should be
>   using __ISO_C_VISIBLE to remain consistent with the rest of the headers
>   in include/.
>   
>   Reviewed by:dim
>   MFC after:  1 month
>   Differential Revision:  https://reviews.freebsd.org/D11303
>
> Modified:
>   head/include/stddef.h
>
> Modified: head/include/stddef.h
> ==
> --- head/include/stddef.h Thu Jun 22 17:10:34 2017(r320239)
> +++ head/include/stddef.h Thu Jun 22 18:39:52 2017(r320240)
> @@ -62,7 +62,7 @@ typedef ___wchar_t  wchar_t;
>  #endif
>  #endif
>  
> -#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
> +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
>  #ifndef __CLANG_MAX_ALIGN_T_DEFINED
>  typedef  __max_align_t   max_align_t;
>  #define __CLANG_MAX_ALIGN_T_DEFINED

max_align_t is now exposed even without -std=c11.

#+begin_src c
  $ cat a.c
  #include 

  /*
   *a type with the most strict alignment requirements
   */
  union max_align
  {
  char   c;
  short  s;
  long   l;
  inti;
  float  f;
  double d;
  void * v;
  void (*q)(void);
  };

  typedef union max_align max_align_t;

  int main(int argc, char *argv[])
  {
return 0;
  }

  $ cc -std=gnu89 a.c
  a.c:18:14: error: typedef redefinition with different types ('void' vs 
'__max_align_t')
  typedef void max_align_t;
   ^
  /usr/include/stddef.h:67:23: note: previous definition is here
  typedef __max_align_t   max_align_t;
  ^
  1 error generated.
#+end_src c

thus regressing some ports e.g.,

#+begin_src c
  cc -o Unified_c_media_libnestegg_src0.o -c ... -std=gnu99 ... 
Unified_c_media_libnestegg_src0.c
  In file included from 
obj-i386-unknown-freebsd12.0/media/libnestegg/src/Unified_c_media_libnestegg_src0.c:2:
  In file included from media/libnestegg/src/halloc.c:19:
  media/libnestegg/src/align.h:42:25: error: typedef redefinition with 
different types ('union max_align' vs '__max_align_t')
  typedef union max_align max_align_t;
  ^
  /usr/include/stddef.h:67:23: note: previous definition is here
  typedef __max_align_t   max_align_t;
  ^
  1 error generated.
#+end_src c

https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320395 - head/contrib/ipfilter/tools

2017-06-26 Thread Cy Schubert
Author: cy
Date: Tue Jun 27 04:54:58 2017
New Revision: 320395
URL: https://svnweb.freebsd.org/changeset/base/320395

Log:
  Replace AF_INET6 ifdefs with USE_INET6 to be consistent with the rest
  of the ipfilter souce tree.

Modified:
  head/contrib/ipfilter/tools/ippool_y.y

Modified: head/contrib/ipfilter/tools/ippool_y.y
==
--- head/contrib/ipfilter/tools/ippool_y.y  Tue Jun 27 03:57:31 2017
(r320394)
+++ head/contrib/ipfilter/tools/ippool_y.y  Tue Jun 27 04:54:58 2017
(r320395)
@@ -273,7 +273,7 @@ grouplist:
| addrmask next { $$ = calloc(1, sizeof(iphtent_t));
  $$->ipe_addr = $1[0].adf_addr;
  $$->ipe_mask = $1[1].adf_addr;
-#ifdef AF_INET6
+#ifdef USE_INET6
  if (use_inet6)
$$->ipe_family = AF_INET6;
  else
@@ -297,7 +297,7 @@ groupentry:
  $$->ipe_mask = $1[1].adf_addr;
  strncpy($$->ipe_group, $3,
  FR_GROUPLEN);
-#ifdef AF_INET6
+#ifdef USE_INET6
  if (use_inet6)
$$->ipe_family = AF_INET6;
  else
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r307326 - head/sys/boot/efi/loader

2017-06-26 Thread Alexey Dokuchaev
On Fri, Oct 14, 2016 at 05:10:53PM +, Doug Ambrisko wrote:
> New Revision: 307326
> URL: https://svnweb.freebsd.org/changeset/base/307326
> 
> Log:
>   In UEFI mode expose the SMBIOS anchor base address via kenv so the kernel
>   etc. can find out where the SMBIOS entry point is located.  In pure
>   UEFI mode the BIOS is not mapped into the standard address space so the
>   SMBIOS table might not appear between 0xf and 0xf.  The
>   UEFI environment can report this the location of the anchor.  If it is
>   reported then expose it as hint.smbios.0.mem. [...]
>   
>   Linux exposes this information via the /sys/firmware/efi/systab file
>   which dmidecode looks at.  We should update dmidecode to do this the
>   FreeBSD way when we determine what that is!

We just did: https://svnweb.freebsd.org/changeset/ports/12 (sorry it
took us eight months).

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


svn commit: r320394 - head/sys/dev/bktr

2017-06-26 Thread Josh Paetzel
Author: jpaetzel
Date: Tue Jun 27 03:57:31 2017
New Revision: 320394
URL: https://svnweb.freebsd.org/changeset/base/320394

Log:
  ioctl METEORGBRIG in bktr_core.c forgets to add 128 to value
  
  PR:   59289
  Submitted by: danovit...@vitsch.net

Modified:
  head/sys/dev/bktr/bktr_core.c

Modified: head/sys/dev/bktr/bktr_core.c
==
--- head/sys/dev/bktr/bktr_core.c   Tue Jun 27 03:45:09 2017
(r320393)
+++ head/sys/dev/bktr/bktr_core.c   Tue Jun 27 03:57:31 2017
(r320394)
@@ -1545,7 +1545,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cm
break;
 
case METEORGBRIG:   /* get brightness */
-   *(u_char *)arg = INB(bktr, BKTR_BRIGHT);
+   *(u_char *)arg = INB(bktr, BKTR_BRIGHT) + 128;
break;
 
case METEORSCSAT:   /* set chroma saturation */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320362 - head/share/zoneinfo

2017-06-26 Thread Cy Schubert
(since we're top posting )

Hi Sean,

Do you want to give this a spin?

Index: share/zoneinfo/Makefile
===
--- share/zoneinfo/Makefile (revision 320389)
+++ share/zoneinfo/Makefile (working copy)
@@ -94,7 +94,7 @@
 .for f in ${TZS}
${INSTALL} ${TAG_ARGS} \
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
-   ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} 
${DESTDIR}/usr/share/zoneinfo/${f}
+   ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
 .endfor
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/

~cy


In message , Sean Bruno 
write
s:
> This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> Content-Type: multipart/mixed; boundary="VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ";
>  protected-headers="v1"
> From: Sean Bruno 
> To: Edward Tomasz Napierala , src-committ...@freebsd.org,
>  svn-src-...@freebsd.org, svn-src-head@freebsd.org
> Message-ID: 
> Subject: Re: svn commit: r320362 - head/share/zoneinfo
> References: <201706261540.v5qfeotj072...@repo.freebsd.org>
> In-Reply-To: <201706261540.v5qfeotj072...@repo.freebsd.org>
> 
> --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ
> Content-Type: text/plain; charset=utf-8
> Content-Language: en-US
> Content-Transfer-Encoding: quoted-printable
> 
> Hmmm ... This seems to break 'poudriere jail -c jailname -m src=3D/usr/sr=
> c
> -v head"
> 
> --- realinstall_subdir_share/zoneinfo ---
> install: builddir/Africa/Abidjan: No such file or directory
> 
> 
> On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> > Author: trasz
> > Date: Mon Jun 26 15:40:24 2017
> > New Revision: 320362
> > URL: https://svnweb.freebsd.org/changeset/base/320362
> >=20
> > Log:
> >   Provide visual feedback when timezone files are installed.
> >   After r320003 it wasn't being shown in any way.
> >  =20
> >   Submitted by: bdrewery
> >   MFC after:1 month
> >   Differential Revision:https://reviews.freebsd.org/D11154
> >=20
> > Modified:
> >   head/share/zoneinfo/Makefile
> >=20
> > Modified: head/share/zoneinfo/Makefile
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D
> > --- head/share/zoneinfo/MakefileMon Jun 26 15:23:12 2017(r32036
> 1)
> > +++ head/share/zoneinfo/MakefileMon Jun 26 15:40:24 2017(r32036
> 2)
> > @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
> > zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
> > ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
> > =20
> > +.if make(*install*)
> > +TZS!=3D cd ${TZBUILDDIR} && find -s * -type f
> > +.endif
> > +
> >  beforeinstall: install-zoneinfo
> >  install-zoneinfo:
> > mkdir -p ${DESTDIR}/usr/share/zoneinfo
> > cd ${DESTDIR}/usr/share/zoneinfo;  mkdir -p ${TZBUILDSUBDIRS}
> > -   cd ${TZBUILDDIR} && \
> > -   find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \
> > +.for f in ${TZS}
> > +   ${INSTALL} ${TAG_ARGS} \
> > -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
> > -   \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
> > +   ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo=
> /${f}
> > +.endfor
> > ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
> > ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
> > =20
> >=20
> >=20
> 
> 
> --VFqTarnRbgKj5gwWULxfLoTjWIwLn2loQ--
> 
> --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f
> Content-Type: application/pgp-signature; name="signature.asc"
> Content-Description: OpenPGP digital signature
> Content-Disposition: attachment; filename="signature.asc"
> 
> -BEGIN PGP SIGNATURE-
> 
> iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAllRUJtfFIAALgAo
> aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4
> QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1
> /LaIFggAlEX4pLTfDUaRsGoxWbGI0DiirmhR1nW74ESXjGXd4u9WSYKfvxK+oGPJ
> LRwxcimGw/v+h8piM102ijsmquE0+NlyyMAYjFNLb9tsZuR+kfzRbDwqiu3FNg8R
> zDnsvo69JHiyoi7r9BJB30Q6P9fZDGBtCrSQ9Up2IUiPHjz+pLUK6jxy29wflPSr
> qVDHitG2A7l7Sdn3Jsj8MWNw/4ehRNlhxudgg+F8v7tEJH9eNBpP6K6jR6B+aU/P
> VCPrKO1rRmmJTPxxPwskLLX4/xXrf8hmUFTm0uBbLtKbvzsaO5IZ9HKXJdYFlaRo
> dCw6yY1xFlMv/OrUWgSxj02fsd7GHg==
> =9Mia
> -END PGP SIGNATURE-
> 
> --WTKxh8RiNpWJJ66LumpxWUq5KMtbGfm2f--
> 
> 

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

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


___
svn-src-head@freebsd.org mailing list

svn commit: r320393 - head/sys/dev/bktr

2017-06-26 Thread Josh Paetzel
Author: jpaetzel
Date: Tue Jun 27 03:45:09 2017
New Revision: 320393
URL: https://svnweb.freebsd.org/changeset/base/320393

Log:
  driver incorrectly handles the setting of frame rates
  
  PR:   36415
  Submitted by: bra...@fokus.gmd.de

Modified:
  head/sys/dev/bktr/bktr_core.c

Modified: head/sys/dev/bktr/bktr_core.c
==
--- head/sys/dev/bktr/bktr_core.c   Tue Jun 27 01:57:22 2017
(r320392)
+++ head/sys/dev/bktr/bktr_core.c   Tue Jun 27 03:45:09 2017
(r320393)
@@ -972,7 +972,7 @@ video_open( bktr_ptr_t bktr )
bktr->flags |= METEOR_OPEN;
 
 #ifdef BT848_DUMP
-   dump_bt848( bt848 );
+   dump_bt848(bktr);
 #endif
 
 bktr->clr_on_start = FALSE;
@@ -1688,7 +1688,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cm
BT848_INT_VSYNC  |
BT848_INT_FMTCHG);
 #ifdef BT848_DUMP
-   dump_bt848( bt848 );
+   dump_bt848(bktr);
 #endif
break;

@@ -2522,7 +2522,7 @@ common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_
 /*
  * 
  */
-#ifdef BT848_DEBUG 
+#if defined(BT848_DEBUG) || defined(BT848_DUMP)
 static int
 dump_bt848( bktr_ptr_t bktr )
 {
@@ -2542,7 +2542,7 @@ dump_bt848( bktr_ptr_t bktr )
   r[i], INL(bktr, r[i]),
   r[i+1], INL(bktr, r[i+1]),
   r[i+2], INL(bktr, r[i+2]),
-  r[i+3], INL(bktr, r[i+3]]));
+  r[i+3], INL(bktr, r[i+3]));
}
 
printf("%s: INT STAT %x \n", bktr_name(bktr),
@@ -3705,28 +3705,26 @@ start_capture( bktr_ptr_t bktr, unsigned type )
 
 
 /*
- * 
+ * Set the temporal decimation register to get the desired frame rate.
+ * We use the 'skip frame' modus always and always start dropping on an
+ * odd field.
  */
 static void
 set_fps( bktr_ptr_t bktr, u_short fps )
 {
struct format_params*fp;
-   int i_flag;
 
fp = _params[bktr->format_params];
 
switch(bktr->flags & METEOR_ONLY_FIELDS_MASK) {
case METEOR_ONLY_EVEN_FIELDS:
bktr->flags |= METEOR_WANT_EVEN;
-   i_flag = 1;
break;
case METEOR_ONLY_ODD_FIELDS:
bktr->flags |= METEOR_WANT_ODD;
-   i_flag = 1;
break;
default:
bktr->flags |= METEOR_WANT_MASK;
-   i_flag = 2;
break;
}
 
@@ -3737,7 +3735,7 @@ set_fps( bktr_ptr_t bktr, u_short fps )
OUTB(bktr, BKTR_TDEC, 0);
 
if (fps < fp->frame_rate)
-   OUTB(bktr, BKTR_TDEC, i_flag*(fp->frame_rate - fps) & 0x3f);
+   OUTB(bktr, BKTR_TDEC, (fp->frame_rate - fps) & 0x3f);
else
OUTB(bktr, BKTR_TDEC, 0);
return;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320392 - head/sys/powerpc/booke

2017-06-26 Thread Justin Hibbits
Author: jhibbits
Date: Tue Jun 27 01:57:22 2017
New Revision: 320392
URL: https://svnweb.freebsd.org/changeset/base/320392

Log:
  Disable interrupts when updating the TLB
  
  Without disabling interrupts it's possible for another thread to preempt
  and update the registers post-read (tlb1_read_entry) or pre-write
  (tlb1_write_entry), and confuse the kernel with mixed register states.
  
  MFC after:2 weeks

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Tue Jun 27 01:29:10 2017
(r320391)
+++ head/sys/powerpc/booke/pmap.c   Tue Jun 27 01:57:22 2017
(r320392)
@@ -3812,10 +3812,14 @@ tlb0_print_tlbentries(void)
 void
 tlb1_read_entry(tlb_entry_t *entry, unsigned int slot)
 {
+   register_t msr;
uint32_t mas0;
 
KASSERT((entry != NULL), ("%s(): Entry is NULL!", __func__));
 
+   msr = mfmsr();
+   mtmsr(msr & ~PSL_EE);
+
mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(slot);
mtspr(SPR_MAS0, mas0);
__asm __volatile("isync; tlbre");
@@ -3835,6 +3839,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot)
entry->mas7 = 0;
break;
}
+   mtmsr(msr);
 
entry->virt = entry->mas2 & MAS2_EPN_MASK;
entry->phys = ((vm_paddr_t)(entry->mas7 & MAS7_RPN) << 32) |
@@ -3850,6 +3855,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot)
 static void
 tlb1_write_entry(tlb_entry_t *e, unsigned int idx)
 {
+   register_t msr;
uint32_t mas0;
 
//debugf("tlb1_write_entry: s\n");
@@ -3858,6 +3864,9 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx)
mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(idx);
//debugf("tlb1_write_entry: mas0 = 0x%08x\n", mas0);
 
+   msr = mfmsr();
+   mtmsr(msr & ~PSL_EE);
+
mtspr(SPR_MAS0, mas0);
__asm __volatile("isync");
mtspr(SPR_MAS1, e->mas1);
@@ -3882,6 +3891,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx)
}
 
__asm __volatile("tlbwe; isync; msync");
+   mtmsr(msr);
 
//debugf("tlb1_write_entry: e\n");
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320391 - in head/sys: compat/freebsd32 net

2017-06-26 Thread Justin Hibbits
Author: jhibbits
Date: Tue Jun 27 01:29:10 2017
New Revision: 320391
URL: https://svnweb.freebsd.org/changeset/base/320391

Log:
  Update comments and simplify conditionals for compat32
  
  Only amd64 (because of i386) needs 32-bit time_t compat now, everything else 
is
  64-bit time_t.  Rather than checking on all 64-bit time_t archs, only check 
the
  oddball amd64/i386.
  
  Reviewed By: emaste, kib, andrew
  Differential Revision: https://reviews.freebsd.org/D11364

Modified:
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/net/bpf.c

Modified: head/sys/compat/freebsd32/freebsd32.h
==
--- head/sys/compat/freebsd32/freebsd32.h   Tue Jun 27 01:22:27 2017
(r320390)
+++ head/sys/compat/freebsd32/freebsd32.h   Tue Jun 27 01:29:10 2017
(r320391)
@@ -43,12 +43,12 @@
do { (dst).fld = PTROUT((src).fld); } while (0)
 
 /*
- * Being a newer port, 32-bit FreeBSD/MIPS uses 64-bit time_t.
+ * i386 is the only arch with a 32-bit time_t
  */
-#if defined (__mips__) || defined(__powerpc__)
-typedefint64_t time32_t;
-#else
+#ifdef __amd64__
 typedefint32_t time32_t;
+#else
+typedefint64_t time32_t;
 #endif
 
 struct timeval32 {

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Tue Jun 27 01:22:27 2017
(r320390)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Tue Jun 27 01:29:10 2017
(r320391)
@@ -109,13 +109,13 @@ __FBSDID("$FreeBSD$");
 
 FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD");
 
-#if !defined(__mips__) && !defined(__powerpc__)
+#ifdef __amd64__
 CTASSERT(sizeof(struct timeval32) == 8);
 CTASSERT(sizeof(struct timespec32) == 8);
 CTASSERT(sizeof(struct itimerval32) == 16);
 #endif
 CTASSERT(sizeof(struct statfs32) == 256);
-#if !defined(__mips__) && !defined(__powerpc__)
+#ifdef __amd64__
 CTASSERT(sizeof(struct rusage32) == 72);
 #endif
 CTASSERT(sizeof(struct sigaltstack32) == 12);
@@ -124,8 +124,6 @@ CTASSERT(sizeof(struct iovec32) == 8);
 CTASSERT(sizeof(struct msghdr32) == 28);
 #ifdef __amd64__
 CTASSERT(sizeof(struct stat32) == 208);
-#endif
-#if !defined(__mips__) && !defined(__powerpc__)
 CTASSERT(sizeof(struct freebsd11_stat32) == 96);
 #endif
 CTASSERT(sizeof(struct sigaction32) == 24);

Modified: head/sys/net/bpf.c
==
--- head/sys/net/bpf.c  Tue Jun 27 01:22:27 2017(r320390)
+++ head/sys/net/bpf.c  Tue Jun 27 01:29:10 2017(r320391)
@@ -1283,7 +1283,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 #endif
case BIOCGETIF:
case BIOCGRTIMEOUT:
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
case BIOCGRTIMEOUT32:
 #endif
case BIOCGSTATS:
@@ -1295,7 +1295,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
case FIONREAD:
case BIOCLOCK:
case BIOCSRTIMEOUT:
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
case BIOCSRTIMEOUT32:
 #endif
case BIOCIMMEDIATE:
@@ -1519,7 +1519,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 * Set read timeout.
 */
case BIOCSRTIMEOUT:
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
case BIOCSRTIMEOUT32:
 #endif
{
@@ -1550,12 +1550,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 * Get read timeout.
 */
case BIOCGRTIMEOUT:
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
case BIOCGRTIMEOUT32:
 #endif
{
struct timeval *tv;
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
struct timeval32 *tv32;
struct timeval tv64;
 
@@ -1567,7 +1567,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, i
 
tv->tv_sec = d->bd_rtout / hz;
tv->tv_usec = (d->bd_rtout % hz) * tick;
-#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
+#if defined(COMPAT_FREEBSD32) && defined(__amd64__)
if (cmd == BIOCGRTIMEOUT32) {
tv32 = (struct timeval32 *)addr;
tv32->tv_sec = tv->tv_sec;
___
svn-src-head@freebsd.org mailing list

svn commit: r320390 - head/sys/geom/part

2017-06-26 Thread Marcelo Araujo
Author: araujo
Date: Tue Jun 27 01:22:27 2017
New Revision: 320390
URL: https://svnweb.freebsd.org/changeset/base/320390

Log:
  With r318394 seems it breaks gpart(8) in some embedded systems such like 
PCEngines,
  RPI1-B, Alix and APU2 boards as well as NanoBSD with the following message:
  
  vnode_pager_generic_getpages_done: I/O read error 5
  
  Seems the breakage was because it was missed to include acr in glabel update.
  
  Reported by:  Peter Blok ,
madpilot, imp and trasz.
  Reviewed by:  trasz
  Tested by:Peter Blok and madpilot.
  MFC after:3 days.
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D11365

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Mon Jun 26 22:48:04 2017(r320389)
+++ head/sys/geom/part/g_part.c Tue Jun 27 01:22:27 2017(r320390)
@@ -890,7 +890,8 @@ g_part_ctl_commit(struct gctl_req *req, struct g_part_
if (!entry->gpe_deleted) {
/* Notify consumers that provider might be changed. */
if (entry->gpe_modified && (
-   entry->gpe_pp->acw + entry->gpe_pp->ace) == 0)
+   entry->gpe_pp->acw + entry->gpe_pp->ace +
+   entry->gpe_pp->acr) == 0)
g_media_changed(entry->gpe_pp, M_NOWAIT);
entry->gpe_created = 0;
entry->gpe_modified = 0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320389 - head/usr.bin/truss

2017-06-26 Thread Warner Losh
Author: imp
Date: Mon Jun 26 22:48:04 2017
New Revision: 320389
URL: https://svnweb.freebsd.org/changeset/base/320389

Log:
  Sort the compat11.* syscalls I added. Remove duplicate compat11.stat.
  
  Submitted by: jhb@

Modified:
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscalls.c
==
--- head/usr.bin/truss/syscalls.c   Mon Jun 26 22:32:52 2017
(r320388)
+++ head/usr.bin/truss/syscalls.c   Mon Jun 26 22:48:04 2017
(r320389)
@@ -146,6 +146,12 @@ static struct syscall decoded_syscalls[] = {
  .args = { { Int, 0 }, { Timespec | OUT, 1 } } },
{ .name = "close", .ret_type = 1, .nargs = 1,
  .args = { { Int, 0 } } },
+   { .name = "compat11.fstat", .ret_type = 1, .nargs = 2,
+ .args = { { Int, 0 }, { Stat11 | OUT, 1 } } },
+   { .name = "compat11.lstat", .ret_type = 1, .nargs = 2,
+ .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
+   { .name = "compat11.stat", .ret_type = 1, .nargs = 2,
+ .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
{ .name = "connect", .ret_type = 1, .nargs = 3,
  .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Socklent, 2 } } },
{ .name = "connectat", .ret_type = 1, .nargs = 4,
@@ -216,14 +222,6 @@ static struct syscall decoded_syscalls[] = {
  .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } },
{ .name = "flock", .ret_type = 1, .nargs = 2,
  .args = { { Int, 0 }, { Flockop, 1 } } },
-   { .name = "compat11.fstat", .ret_type = 1, .nargs = 2,
- .args = { { Int, 0 }, { Stat11 | OUT, 1 } } },
-   { .name = "compat11.lstat", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
-   { .name = "compat11.stat", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
-   { .name = "compat11.stat", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
{ .name = "fstat", .ret_type = 1, .nargs = 2,
  .args = { { Int, 0 }, { Stat | OUT, 1 } } },
{ .name = "fstatat", .ret_type = 1, .nargs = 4,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320284 - head

2017-06-26 Thread Ngie Cooper
On Mon, Jun 26, 2017 at 12:37 PM, Kyle Evans  wrote:
> Hi,
>
> This broke my setup that builds my 7 different kernels due to duplicate
> target errors. This seems to do what I want:
> https://files.kyle-evans.net/freebsd/fix-packages.diff =)

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


svn commit: r320388 - head/sys/arm64/include

2017-06-26 Thread Andrew Turner
Author: andrew
Date: Mon Jun 26 22:32:52 2017
New Revision: 320388
URL: https://svnweb.freebsd.org/changeset/base/320388

Log:
  In _bswap16 and _bswap32 cast constant values to the appropriate type. This is
  similar to what is done in the x86 code.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm64/include/endian.h

Modified: head/sys/arm64/include/endian.h
==
--- head/sys/arm64/include/endian.h Mon Jun 26 21:45:33 2017
(r320387)
+++ head/sys/arm64/include/endian.h Mon Jun 26 22:32:52 2017
(r320388)
@@ -106,12 +106,12 @@ __bswap16_var(__uint16_t v)
 
 #define__bswap16(x)\
 ((__uint16_t)(__builtin_constant_p(x) ?\
- __bswap16_constant(x) :   \
+ __bswap16_constant((__uint16_t)x) :   \
  __bswap16_var(x)))
 
 #define__bswap32(x)\
 ((__uint32_t)(__builtin_constant_p(x) ?\
- __bswap32_constant(x) :   \
+ __bswap32_constant((__uint32_t)x) :   \
  __bswap32_var(x)))
 
 #else
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320387 - head/sys/arm/arm

2017-06-26 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Jun 26 21:45:33 2017
New Revision: 320387
URL: https://svnweb.freebsd.org/changeset/base/320387

Log:
  [arm] Use correct index value when checking range validity
  
  Reviewed by:  andrew
  MFC after:3 weeks
  Differential Revision:https://reviews.freebsd.org/D9145

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==
--- head/sys/arm/arm/gic.c  Mon Jun 26 21:14:33 2017(r320386)
+++ head/sys/arm/arm/gic.c  Mon Jun 26 21:45:33 2017(r320387)
@@ -1445,11 +1445,11 @@ arm_gicv2m_alloc_msi(device_t dev, device_t child, int
break;
}
 
-   KASSERT((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI)!= 0,
+   KASSERT((psc->gic_irqs[end_irq].gi_flags & 
GI_FLAG_MSI)!= 0,
("%s: Non-MSI interrupt found", __func__));
 
/* This is already used */
-   if ((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI_USED) ==
+   if ((psc->gic_irqs[end_irq].gi_flags & 
GI_FLAG_MSI_USED) ==
GI_FLAG_MSI_USED) {
found = false;
break;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320386 - head/sys/modules/linuxkpi

2017-06-26 Thread Mark Johnston
Author: markj
Date: Mon Jun 26 21:14:33 2017
New Revision: 320386
URL: https://svnweb.freebsd.org/changeset/base/320386

Log:
  Sort SRCS.
  
  MFC after:1 week

Modified:
  head/sys/modules/linuxkpi/Makefile

Modified: head/sys/modules/linuxkpi/Makefile
==
--- head/sys/modules/linuxkpi/Makefile  Mon Jun 26 20:34:02 2017
(r320385)
+++ head/sys/modules/linuxkpi/Makefile  Mon Jun 26 21:14:33 2017
(r320386)
@@ -2,10 +2,11 @@
 .PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src
 
 KMOD=  linuxkpi
-SRCS=  linux_kmod.c \
-   linux_compat.c \
+SRCS=  linux_compat.c \
linux_current.c \
linux_hrtimer.c \
+   linux_idr.c \
+   linux_kmod.c \
linux_kthread.c \
linux_lock.c \
linux_page.c \
@@ -15,7 +16,6 @@ SRCS= linux_kmod.c \
linux_schedule.c \
linux_slab.c \
linux_tasklet.c \
-   linux_idr.c \
linux_usb.c \
linux_work.c
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320373 - head/release/arm

2017-06-26 Thread Glen Barber
Author: gjb
Date: Mon Jun 26 20:17:48 2017
New Revision: 320373
URL: https://svnweb.freebsd.org/changeset/base/320373

Log:
  Revert r319603, r319608, and r319609.  Creating a hard link to the
  dtb file for the cubieboard2 is no longer needed in 12-CURRENT.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm/CUBIEBOARD2.conf

Modified: head/release/arm/CUBIEBOARD2.conf
==
--- head/release/arm/CUBIEBOARD2.conf   Mon Jun 26 19:41:14 2017
(r320372)
+++ head/release/arm/CUBIEBOARD2.conf   Mon Jun 26 20:17:48 2017
(r320373)
@@ -30,8 +30,6 @@ arm_install_uboot() {
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
${FATMOUNT}/ubldr.bin
-   chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/cubieboard2.dtb \
-   ${UFSMOUNT}/boot/dtb/sun7i-a20-cubieboard2.dtb
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
sync
umount_loop ${CHROOTDIR}/${FATMOUNT}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320279 - head/usr.bin/truss

2017-06-26 Thread John Baldwin
On 6/23/17 2:06 PM, Warner Losh wrote:
> Author: imp
> Date: Fri Jun 23 18:06:46 2017
> New Revision: 320279
> URL: https://svnweb.freebsd.org/changeset/base/320279
> 
> Log:
>   Decode FreeBSD 11 compat stat, fstat and lstat calls.
> 
> Modified:
>   head/usr.bin/truss/syscall.h
>   head/usr.bin/truss/syscalls.c
> 
> Modified: head/usr.bin/truss/syscall.h
> ==
> --- head/usr.bin/truss/syscall.h  Fri Jun 23 18:06:20 2017
> (r320278)
> +++ head/usr.bin/truss/syscall.h  Fri Jun 23 18:06:46 2017
> (r320279)
> @@ -10,6 +10,7 @@
>   * BinString -- pointer to an array of chars, printed via strvisx().
>   * Ptr -- pointer to some unspecified structure.  Just print as hex for now.
>   * Stat -- a pointer to a stat buffer.  Prints a couple fields.
> + * Stat11 -- a pointer to a freebsd 11 stat buffer.  Prints a couple fields.
>   * StatFs -- a pointer to a statfs buffer.  Prints a few fields.
>   * Ioctl -- an ioctl command.  Woefully limited.
>   * Quad -- a double-word value.  e.g., lseek(int, offset_t, int)
> @@ -38,7 +39,7 @@
>   * $FreeBSD$
>   */
>  
> -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, 
> Ioctl,
> +enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, 
> Stat11, Ioctl,
>   Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval,
>   Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres,
>   Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open,
> 
> Modified: head/usr.bin/truss/syscalls.c
> ==
> --- head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:20 2017
> (r320278)
> +++ head/usr.bin/truss/syscalls.c Fri Jun 23 18:06:46 2017
> (r320279)
> @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +#define _WANT_FREEBSD11_STAT
>  #include 
>  #include 
>  #include 
> @@ -215,6 +216,14 @@ static struct syscall decoded_syscalls[] = {
> .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } },
>   { .name = "flock", .ret_type = 1, .nargs = 2,
> .args = { { Int, 0 }, { Flockop, 1 } } },
> + { .name = "compat11.fstat", .ret_type = 1, .nargs = 2,
> +   .args = { { Int, 0 }, { Stat11 | OUT, 1 } } },
> + { .name = "compat11.lstat", .ret_type = 1, .nargs = 2,
> +   .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
> + { .name = "compat11.stat", .ret_type = 1, .nargs = 2,
> +   .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
> + { .name = "compat11.stat", .ret_type = 1, .nargs = 2,
> +   .args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },

This list is sorted alphabetically by system call name, and compat11.stat is
listed twice.

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


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

2017-06-26 Thread Mark Johnston
Author: markj
Date: Mon Jun 26 19:41:14 2017
New Revision: 320372
URL: https://svnweb.freebsd.org/changeset/base/320372

Log:
  Fix a memory leak in ses_get_elm_devnames().
  
  After r307132 the sbuf buffer is malloc()ed, but corresponding
  sbuf_delete() call was missing.
  
  Fix a nearby whitespace bug.
  
  MFC after:3 days
  Sponsored by: Dell EMC Isilon

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

Modified: head/sys/cam/scsi/scsi_enc_ses.c
==
--- head/sys/cam/scsi/scsi_enc_ses.cMon Jun 26 19:40:10 2017
(r320371)
+++ head/sys/cam/scsi/scsi_enc_ses.cMon Jun 26 19:41:14 2017
(r320372)
@@ -2684,10 +2684,11 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devn
cam_periph_unlock(enc->periph);
sbuf_new(, NULL, len, SBUF_FIXEDLEN);
ses_paths_iter(enc, >enc_cache.elm_map[elmdn->elm_idx],
-  ses_elmdevname_callback, );
+   ses_elmdevname_callback, );
sbuf_finish();
elmdn->elm_names_len = sbuf_len();
copyout(sbuf_data(), elmdn->elm_devnames, elmdn->elm_names_len + 1);
+   sbuf_delete();
cam_periph_lock(enc->periph);
return (elmdn->elm_names_len > 0 ? 0 : ENODEV);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320284 - head

2017-06-26 Thread Kyle Evans
Hi,

This broke my setup that builds my 7 different kernels due to duplicate
target errors. This seems to do what I want: https://files.kyle-
evans.net/freebsd/fix-packages.diff =)

Thanks,

Kyle Evans

On Fri, Jun 23, 2017 at 1:26 PM, Bryan Drewery  wrote:

> Author: bdrewery
> Date: Fri Jun 23 18:26:57 2017
> New Revision: 320284
> URL: https://svnweb.freebsd.org/changeset/base/320284
>
> Log:
>   packages: Parallelize individual kernel packaging.
>
>   MFC after:2 weeks
>   Sponsored by: Dell EMC Isilon
>
> Modified:
>   head/Makefile.inc1
>
> Modified: head/Makefile.inc1
> 
> ==
> --- head/Makefile.inc1  Fri Jun 23 18:26:54 2017(r320283)
> +++ head/Makefile.inc1  Fri Jun 23 18:26:57 2017(r320284)
> @@ -1599,9 +1599,12 @@ create-world-package-${pkgname}: .PHONY
> -o ${REPODIR}/$$(${PKG_CMD} -o
> ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}
>  .endfor
>
> -create-kernel-packages:_pkgbootstrap .PHONY
> +create-kernel-packages:.PHONY
> +_default_flavor=   -default
>  .if exists(${KSTAGEDIR}/kernel.meta)
>  .for flavor in "" -debug
> +create-kernel-packages: create-kernel-packages-flavor$
> {flavor:C,^""$,${_default_flavor},}
> +create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}:
> _pkgbootstrap .PHONY
> @cd ${KSTAGEDIR}/${DISTDIR} ; \
> awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
> -v kernel=yes -v _kernconf=${INSTALLKERNEL} \
> @@ -1631,6 +1634,8 @@ create-kernel-packages:   _pkgbootstrap .PHONY
>  .for _kernel in ${BUILDKERNELS:[2..-1]}
>  .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta)
>  .for flavor in "" -debug
> +create-kernel-packages: create-kernel-packages-extra-f
> lavor${flavor:C,^""$,${_default_flavor},}
> +create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}:
> _pkgbootstrap .PHONY
> @cd ${KSTAGEDIR}/kernel.${_kernel} ; \
> awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
> -v kernel=yes -v _kernconf=${_kernel} \
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320369 - head/sys/mips/conf

2017-06-26 Thread Kurt Lidl
Author: lidl
Date: Mon Jun 26 18:28:00 2017
New Revision: 320369
URL: https://svnweb.freebsd.org/changeset/base/320369

Log:
  Add IPSEC support to mips ERL kernel config file

Modified:
  head/sys/mips/conf/ERL

Modified: head/sys/mips/conf/ERL
==
--- head/sys/mips/conf/ERL  Mon Jun 26 18:23:40 2017(r320368)
+++ head/sys/mips/conf/ERL  Mon Jun 26 18:28:00 2017(r320369)
@@ -53,6 +53,7 @@ options   SCHED_ULE   # ULE scheduler
 optionsPREEMPTION  # Enable kernel thread preemption
 optionsINET# InterNETworking
 optionsINET6   # IPv6 communications protocols
+optionsIPSEC   # IP (v4/v6) security
 optionsTCP_HHOOK   # hhook(9) framework for TCP
 optionsSCTP# Stream Control Transmission Protocol
 optionsFFS # Berkeley Fast Filesystem
@@ -201,7 +202,7 @@ device  ural# Ralink Technology 
RT2500USB wireless N
 device zyd # ZyDAS zd1211/zd1211b wireless NICs
 
 # crypto subsystem
-device crypto  # core crypto support
+device crypto  # core crypto support (required for IPSEC)
 device cryptodev   # /dev/crypto for access to h/w
 device cryptocteon # Octeon coprocessor 2 crypto offload
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320362 - head/share/zoneinfo

2017-06-26 Thread Sean Bruno
Hmmm ... This seems to break 'poudriere jail -c jailname -m src=/usr/src
-v head"

--- realinstall_subdir_share/zoneinfo ---
install: builddir/Africa/Abidjan: No such file or directory


On 06/26/17 09:40, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Mon Jun 26 15:40:24 2017
> New Revision: 320362
> URL: https://svnweb.freebsd.org/changeset/base/320362
> 
> Log:
>   Provide visual feedback when timezone files are installed.
>   After r320003 it wasn't being shown in any way.
>   
>   Submitted by:   bdrewery
>   MFC after:  1 month
>   Differential Revision:  https://reviews.freebsd.org/D11154
> 
> Modified:
>   head/share/zoneinfo/Makefile
> 
> Modified: head/share/zoneinfo/Makefile
> ==
> --- head/share/zoneinfo/Makefile  Mon Jun 26 15:23:12 2017
> (r320361)
> +++ head/share/zoneinfo/Makefile  Mon Jun 26 15:40:24 2017
> (r320362)
> @@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
>   zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
>   ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
>  
> +.if make(*install*)
> +TZS!= cd ${TZBUILDDIR} && find -s * -type f
> +.endif
> +
>  beforeinstall: install-zoneinfo
>  install-zoneinfo:
>   mkdir -p ${DESTDIR}/usr/share/zoneinfo
>   cd ${DESTDIR}/usr/share/zoneinfo;  mkdir -p ${TZBUILDSUBDIRS}
> - cd ${TZBUILDDIR} && \
> - find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \
> +.for f in ${TZS}
> + ${INSTALL} ${TAG_ARGS} \
>   -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
> - \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
> + ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} 
> ${DESTDIR}/usr/share/zoneinfo/${f}
> +.endfor
>   ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
>   ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
>  
> 
> 



signature.asc
Description: OpenPGP digital signature


svn commit: r320367 - head/share/vt/fonts

2017-06-26 Thread Ed Maste
Author: emaste
Date: Mon Jun 26 18:11:48 2017
New Revision: 320367
URL: https://svnweb.freebsd.org/changeset/base/320367

Log:
  Add "Terminus BSD Console" size 32
  
  Dimitar Toshkov, Terminus' creator, has made size 32 available under the
  2-clause BSD license for use by *BSD consoles.

Added:
  head/share/vt/fonts/terminus-b32.hex   (contents, props changed)
Modified:
  head/share/vt/fonts/Makefile

Modified: head/share/vt/fonts/Makefile
==
--- head/share/vt/fonts/MakefileMon Jun 26 17:33:33 2017
(r320366)
+++ head/share/vt/fonts/MakefileMon Jun 26 18:11:48 2017
(r320367)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 FILES= gallant.fnt \
+   terminus-b32.fnt \
vgarom-8x8.fnt \
vgarom-8x14.fnt \
vgarom-8x16.fnt \

Added: head/share/vt/fonts/terminus-b32.hex
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/vt/fonts/terminus-b32.hexMon Jun 26 18:11:48 2017
(r320367)
@@ -0,0 +1,1294 @@
+# $FreeBSD$
+# Height: 32
+# Width: 16
+:3C3C3C3C300C300C300C300C300C300C300C300C300C300C3C3C3C3C
+0020:
+0021:01800180018001800180018001800180018001800180018001800180018001800180
+0022:0C300C300C300C300C300C30
+0023:0C300C300C300C300C303FFC3FFC0C300C300C300C300C300C303FFC3FFC0C300C300C300C300C30
+0024:0180018001800FF01FF8399C318C31803180318039801FF00FF8019C018C018C018C318C399C1FF80FF0018001800180
+0025:1E183F18333033303F601E6000C000C00180018003000300060006000CF00DF81998199831F830F0
+0026:0F801FC038E030603060306038E01DC00F800F001F8C39DC70F8607060306030607070F83FDC1F8C
+0027:018001800180018001800180
+0028:006000E001C00380030007000600060006000600060006000600060007000300038001C000E00060
+0029:06000700038001C000C000E00060006000600060006000600060006000E000C001C0038007000600
+002A:38381C700EE007C003807FFC7FFC038007C00EE01C703838
+002B:018001800180018001803FFC3FFC01800180018001800180
+002C:018001800180038003000600
+002D:3FFC3FFC
+002E:0180018001800180
+002F:00180018003000300060006000C000C00180018003000300060006000C000C001800180030003000
+0030:0FF01FF8381C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C381C1FF80FF0
+0031:0180038007800F800D8001800180018001800180018001800180018001800180018001800FF00FF0
+0032:0FF01FF8381C300C300C300C300C000C001C0038007000E001C0038007000E001C0038003FFC3FFC
+0033:0FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0
+0034:000C001C003C007C00EC01CC038C070C0E0C1C0C380C300C300C3FFC3FFC000C000C000C000C000C
+0035:3FFC3FFC3000300030003000300030003FF03FF8001C000C000C000C000C000C300C380C1FF80FF0
+0036:0FF81FF83800300030003000300030003FF03FF8301C300C300C300C300C300C300C381C1FF80FF0
+0037:3FFC3FFC300C300C300C30180018003000300060006000C000C00180018001800180018001800180
+0038:0FF01FF8381C300C300C300C300C300C381C1FF81FF8381C300C300C300C300C300C381C1FF80FF0
+0039:0FF01FF8381C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0
+003A:01800180018001800180018001800180

svn commit: r320364 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi

2017-06-26 Thread Mark Johnston
Author: markj
Date: Mon Jun 26 16:28:46 2017
New Revision: 320364
URL: https://svnweb.freebsd.org/changeset/base/320364

Log:
  Implement parts of the hrtimer API in the LinuxKPI.
  
  Reviewed by:  hselasky
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D11359

Added:
  head/sys/compat/linuxkpi/common/include/linux/hrtimer.h   (contents, props 
changed)
  head/sys/compat/linuxkpi/common/src/linux_hrtimer.c   (contents, props 
changed)
Modified:
  head/sys/conf/files
  head/sys/modules/linuxkpi/Makefile

Added: head/sys/compat/linuxkpi/common/include/linux/hrtimer.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/compat/linuxkpi/common/include/linux/hrtimer.h Mon Jun 26 
16:28:46 2017(r320364)
@@ -0,0 +1,79 @@
+/*-
+ * Copyright (c) 2017 Mark Johnston 
+ * All rights reserved.
+ *
+ * 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 unmodified, 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 ``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 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LINUX_HRTIMER_H_
+#define_LINUX_HRTIMER_H_
+
+#include 
+#include 
+
+#include 
+#include 
+
+enum hrtimer_mode {
+   HRTIMER_MODE_REL,
+};
+
+enum hrtimer_restart {
+   HRTIMER_RESTART,
+   HRTIMER_NORESTART,
+};
+
+struct hrtimer {
+   enum hrtimer_restart (*function)(struct hrtimer *);
+   struct mtx mtx;
+   struct callout callout;
+   uint32_t flags;
+};
+
+#definehrtimer_active(hrtimer) linux_hrtimer_active(hrtimer)
+#definehrtimer_cancel(hrtimer) linux_hrtimer_cancel(hrtimer)
+#definehrtimer_init(hrtimer, clock, mode) do { \
+   CTASSERT((clock) == CLOCK_MONOTONIC);   \
+   CTASSERT((mode) == HRTIMER_MODE_REL);   \
+   linux_hrtimer_init(hrtimer);\
+} while (0)
+#definehrtimer_set_expires(hrtimer, time)  \
+   linux_hrtimer_set_expires(hrtimer, time)
+#definehrtimer_start(hrtimer, time, mode) do { \
+   CTASSERT((mode) == HRTIMER_MODE_REL);   \
+   linux_hrtimer_start(hrtimer, time); \
+} while (0)
+#definehrtimer_start_range_ns(hrtimer, time, prec, mode) do {  \
+   CTASSERT((mode) == HRTIMER_MODE_REL);   \
+   linux_hrtimer_start_range_ns(hrtimer, time, prec);  \
+} while (0)
+
+bool   linux_hrtimer_active(struct hrtimer *);
+intlinux_hrtimer_cancel(struct hrtimer *);
+void   linux_hrtimer_init(struct hrtimer *);
+void   linux_hrtimer_set_expires(struct hrtimer *, ktime_t);
+void   linux_hrtimer_start(struct hrtimer *, ktime_t);
+void   linux_hrtimer_start_range_ns(struct hrtimer *, ktime_t, int64_t);
+
+#endif /* _LINUX_HRTIMER_H_ */

Added: head/sys/compat/linuxkpi/common/src/linux_hrtimer.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/compat/linuxkpi/common/src/linux_hrtimer.c Mon Jun 26 16:28:46 
2017(r320364)
@@ -0,0 +1,108 @@
+/*-
+ * Copyright (c) 2017 Mark Johnston 
+ * All rights reserved.
+ *
+ * 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 unmodified, 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 

svn commit: r320363 - head/usr.bin/resizewin

2017-06-26 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun 26 16:08:28 2017
New Revision: 320363
URL: https://svnweb.freebsd.org/changeset/base/320363

Log:
  Improve terminology in a comment.
  
  Suggested by: ian
  MFC after:2 weeks

Modified:
  head/usr.bin/resizewin/resizewin.c

Modified: head/usr.bin/resizewin/resizewin.c
==
--- head/usr.bin/resizewin/resizewin.c  Mon Jun 26 15:40:24 2017
(r320362)
+++ head/usr.bin/resizewin/resizewin.c  Mon Jun 26 16:08:28 2017
(r320363)
@@ -91,7 +91,7 @@ main(int argc, char **argv)
exit(0);
}
 
-   /* Disable echo, drain the input, and flush the output */
+   /* Disable echo, flush the input, and drain the output */
if (tcgetattr(fd, ) == -1)
exit(1);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320362 - head/share/zoneinfo

2017-06-26 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun 26 15:40:24 2017
New Revision: 320362
URL: https://svnweb.freebsd.org/changeset/base/320362

Log:
  Provide visual feedback when timezone files are installed.
  After r320003 it wasn't being shown in any way.
  
  Submitted by: bdrewery
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D11154

Modified:
  head/share/zoneinfo/Makefile

Modified: head/share/zoneinfo/Makefile
==
--- head/share/zoneinfo/MakefileMon Jun 26 15:23:12 2017
(r320361)
+++ head/share/zoneinfo/MakefileMon Jun 26 15:40:24 2017
(r320362)
@@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
 
+.if make(*install*)
+TZS!= cd ${TZBUILDDIR} && find -s * -type f
+.endif
+
 beforeinstall: install-zoneinfo
 install-zoneinfo:
mkdir -p ${DESTDIR}/usr/share/zoneinfo
cd ${DESTDIR}/usr/share/zoneinfo;  mkdir -p ${TZBUILDSUBDIRS}
-   cd ${TZBUILDDIR} && \
-   find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \
+.for f in ${TZS}
+   ${INSTALL} ${TAG_ARGS} \
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
-   \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
+   ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} 
${DESTDIR}/usr/share/zoneinfo/${f}
+.endfor
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320360 - head/usr.bin/resizewin

2017-06-26 Thread Ian Lepore
On Mon, 2017-06-26 at 13:14 +, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Mon Jun 26 13:14:41 2017
> New Revision: 320360
> URL: https://svnweb.freebsd.org/changeset/base/320360
> 
> Log:
>   Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW
>   followed by tcflush(3).  This works just as well and is more
> elegant.
>   
>   Suggested by:   bde
>   MFC after:  2 weeks
>   Sponsored by:   DARPA, AFRL
> 
> Modified:
>   head/usr.bin/resizewin/resizewin.c
> 
> Modified: head/usr.bin/resizewin/resizewin.c
> =
> =
> --- head/usr.bin/resizewin/resizewin.cMon Jun 26 13:11:21
> 2017  (r320359)
> +++ head/usr.bin/resizewin/resizewin.cMon Jun 26 13:14:41
> 2017  (r320360)
> @@ -91,20 +91,15 @@ main(int argc, char **argv)
>   exit(0);
>   }
>  
> - /* Disable echo */
> + /* Disable echo, drain the input, and flush the output */

This comment is backwards.  Draining happens to output, and flushing
happens to input.

-- Ian

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


Re: svn commit: r320360 - head/usr.bin/resizewin

2017-06-26 Thread Ed Schouten
2017-06-26 15:14 GMT+02:00 Edward Tomasz Napierala :
> +   /* Disable echo, drain the input, and flush the output */
> if (tcgetattr(fd, ) == -1)
> exit(1);

> +   if (tcsetattr(fd, TCSAFLUSH, ) == -1)
> exit(1);

Would it make sense to print diagnostics here?

-- 
Ed Schouten 
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320360 - head/usr.bin/resizewin

2017-06-26 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun 26 13:14:41 2017
New Revision: 320360
URL: https://svnweb.freebsd.org/changeset/base/320360

Log:
  Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW
  followed by tcflush(3).  This works just as well and is more elegant.
  
  Suggested by: bde
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/usr.bin/resizewin/resizewin.c

Modified: head/usr.bin/resizewin/resizewin.c
==
--- head/usr.bin/resizewin/resizewin.c  Mon Jun 26 13:11:21 2017
(r320359)
+++ head/usr.bin/resizewin/resizewin.c  Mon Jun 26 13:14:41 2017
(r320360)
@@ -91,20 +91,15 @@ main(int argc, char **argv)
exit(0);
}
 
-   /* Disable echo */
+   /* Disable echo, drain the input, and flush the output */
if (tcgetattr(fd, ) == -1)
exit(1);
 
new = old;
new.c_cflag |= (CLOCAL | CREAD);
new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
-   if (tcsetattr(fd, TCSANOW, ) == -1)
+   if (tcsetattr(fd, TCSAFLUSH, ) == -1)
exit(1);
-
-   /* Discard input received so far */
-   error = tcflush(fd, TCIOFLUSH);
-   if (error != 0)
-   warn("tcflush");
 
if (write(fd, query, sizeof(query)) != sizeof(query)) {
error = 1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r320359 - in head/sys/fs: nfs nfsserver

2017-06-26 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun 26 13:11:21 2017
New Revision: 320359
URL: https://svnweb.freebsd.org/changeset/base/320359

Log:
  Add vfs.nfsd.nfsd_enable_uidtostring, which works just like
  vfs.nfsd.nfsd_enable_stringtouid, but in reverse - when set to 1,
  it forces the NFSv4 server to return numeric UIDs and GIDs instead
  of "user@domain" strings. This helps with clients that can't
  translate returned identifiers, eg when rerooting.
  
  The same can be achieved by just never running nfsuserd(8),
  but the sysctl is useful to toggle the behaviour back and forth
  without rebooting.
  
  Reviewed by:  rmacklem (earlier version)
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D11326

Modified:
  head/sys/fs/nfs/nfs_commonsubs.c
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==
--- head/sys/fs/nfs/nfs_commonsubs.cMon Jun 26 12:37:11 2017
(r320358)
+++ head/sys/fs/nfs/nfs_commonsubs.cMon Jun 26 13:11:21 2017
(r320359)
@@ -68,6 +68,7 @@ gid_t nfsrv_defaultgid = GID_NOGROUP;
 int nfsrv_lease = NFSRV_LEASE;
 int ncl_mbuf_mlen = MLEN;
 int nfsd_enable_stringtouid = 0;
+int nfsd_enable_uidtostring = 0;
 NFSNAMEIDMUTEX;
 NFSSOCKMUTEX;
 extern int nfsrv_lughashsize;
@@ -2561,7 +2562,7 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, 
 
cnt = 0;
 tryagain:
-   if (nfsrv_dnsnamelen > 0) {
+   if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) {
/*
 * Always map nfsrv_defaultuid to "nobody".
 */
@@ -2671,7 +2672,7 @@ nfsrv_getgrpscred(struct ucred *oldcred)
cnt = 0;
uid = oldcred->cr_uid;
 tryagain:
-   if (nfsrv_dnsnamelen > 0) {
+   if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) {
hp = NFSUSERHASH(uid);
mtx_lock(>mtx);
TAILQ_FOREACH(usrp, >lughead, lug_numhash) {
@@ -2823,7 +2824,7 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, 
 
cnt = 0;
 tryagain:
-   if (nfsrv_dnsnamelen > 0) {
+   if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) {
/*
 * Always map nfsrv_defaultgid to "nogroup".
 */

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cMon Jun 26 12:37:11 2017
(r320358)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cMon Jun 26 13:11:21 2017
(r320359)
@@ -87,6 +87,7 @@ static int nfs_commit_miss;
 extern int nfsrv_issuedelegs;
 extern int nfsrv_dolocallocks;
 extern int nfsd_enable_stringtouid;
+extern int nfsd_enable_uidtostring;
 
 SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "NFS server");
 SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW,
@@ -103,6 +104,8 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, debuglevel, CTLFLAG_RW
 0, "Debug level for NFS server");
 SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW,
 _enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names");
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_uidtostring, CTLFLAG_RW,
+_enable_uidtostring, 0, "Make nfsd always send numeric owner_names");
 
 #defineMAX_REORDERED_RPC   16
 #defineNUM_HEURISTIC   1031
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r320353 - head/sys/compat/linux

2017-06-26 Thread Chagin Dmitry
On Mon, Jun 26, 2017 at 09:13:25AM +, Andriy Gapon wrote:
> Author: avg
> Date: Mon Jun 26 09:13:25 2017
> New Revision: 320353
> URL: https://svnweb.freebsd.org/changeset/base/320353
> 
> Log:
>   linux_getdents, linux_readdir: fix mismatch between malloc and free tags
>   
>   MFC after:  3 days
>
whoops, thanks 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-06-26 Thread Andriy Gapon
Author: avg
Date: Mon Jun 26 09:13:25 2017
New Revision: 320353
URL: https://svnweb.freebsd.org/changeset/base/320353

Log:
  linux_getdents, linux_readdir: fix mismatch between malloc and free tags
  
  MFC after:3 days

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

Modified: head/sys/compat/linux/linux_file.c
==
--- head/sys/compat/linux/linux_file.c  Mon Jun 26 09:10:09 2017
(r320352)
+++ head/sys/compat/linux/linux_file.c  Mon Jun 26 09:13:25 2017
(r320353)
@@ -381,9 +381,9 @@ linux_getdents(struct thread *td, struct linux_getdent
td->td_retval[0] = retval;
 
 out:
-   free(lbuf, M_LINUX);
+   free(lbuf, M_TEMP);
 out1:
-   free(buf, M_LINUX);
+   free(buf, M_TEMP);
return (error);
 }
 
@@ -507,9 +507,9 @@ linux_readdir(struct thread *td, struct linux_readdir_
if (error == 0)
td->td_retval[0] = linuxreclen;
 
-   free(lbuf, M_LINUX);
+   free(lbuf, M_TEMP);
 out:
-   free(buf, M_LINUX);
+   free(buf, M_TEMP);
return (error);
 }
 #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-06-26 Thread Andriy Gapon
Author: avg
Date: Mon Jun 26 09:10:09 2017
New Revision: 320352
URL: https://svnweb.freebsd.org/changeset/base/320352

Log:
  zfs: port vdev_file part of illumos change 3306
  
  3306 zdb should be able to issue reads in parallel
  illumos/illumos-gate/31d7e8fa33fae995f558673adb22641b5aa8b6e1
  https://www.illumos.org/issues/3306
  
  The upstream change was made before we started to import upstream commits
  individually.  It was imported into the illumos vendor area as r242733.
  That commit was MFV-ed in r260138, but as the commit message says
  vdev_file.c was left intact.
  
  This commit actually implements the parallel I/O for vdev_file using a
  taskqueue with multiple thread.  This implementation does not depend on
  the illumos or FreeBSD bio interface at all, but uses zio_t to pass
  around all the relevent data.  So, the code looks a bit different from
  the upstream.
  
  This commit also incorporates ZoL commit
  zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed
  https://github.com/zfsonlinux/zfs/issues/2270
  We need to use a dedicated taskqueue for exactly the same reason as ZoL
  as we do not implement TASKQ_DYNAMIC.
  
  Obtained from:illumos, ZFS on Linux
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Mon Jun 
26 05:56:49 2017(r320351)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Mon Jun 
26 09:10:09 2017(r320352)
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2020,6 +2021,7 @@ spa_init(int mode)
dmu_init();
zil_init();
vdev_cache_stat_init();
+   vdev_file_init();
zfs_prop_init();
zpool_prop_init();
zpool_feature_init();
@@ -2039,6 +2041,7 @@ spa_fini(void)
 
spa_evict_all();
 
+   vdev_file_fini();
vdev_cache_stat_fini();
zil_fini();
dmu_fini();

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Mon Jun 
26 05:56:49 2017(r320351)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h Mon Jun 
26 09:10:09 2017(r320352)
@@ -39,6 +39,9 @@ typedef struct vdev_file {
vnode_t *vf_vnode;
 } vdev_file_t;
 
+extern void vdev_file_init(void);
+extern void vdev_file_fini(void);
+
 #ifdef __cplusplus
 }
 #endif

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Jun 
26 05:56:49 2017(r320351)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Jun 
26 09:10:09 2017(r320352)
@@ -36,6 +36,21 @@
  * Virtual device vector for files.
  */
 
+static taskq_t *vdev_file_taskq;
+
+void
+vdev_file_init(void)
+{
+   vdev_file_taskq = taskq_create("z_vdev_file", MAX(max_ncpus, 16),
+   minclsyspri, max_ncpus, INT_MAX, 0);
+}
+
+void
+vdev_file_fini(void)
+{
+   taskq_destroy(vdev_file_taskq);
+}
+
 static void
 vdev_file_hold(vdev_t *vd)
 {
@@ -157,41 +172,32 @@ vdev_file_close(vdev_t *vd)
vd->vdev_tsd = NULL;
 }
 
+/*
+ * Implements the interrupt side for file vdev types. This routine will be
+ * called when the I/O completes allowing us to transfer the I/O to the
+ * interrupt taskqs. For consistency, the code structure mimics disk vdev
+ * types.
+ */
 static void
-vdev_file_io_start(zio_t *zio)
+vdev_file_io_intr(zio_t *zio)
 {
+   zio_delay_interrupt(zio);
+}
+
+static void
+vdev_file_io_strategy(void *arg)
+{
+   zio_t *zio = arg;
vdev_t *vd = zio->io_vd;
vdev_file_t *vf;
vnode_t *vp;
void *addr;
ssize_t resid;
 
-   if (!vdev_readable(vd)) {
-   zio->io_error = SET_ERROR(ENXIO);
-   zio_interrupt(zio);
-   return;
-   }
-
vf = vd->vdev_tsd;
vp = vf->vf_vnode;
 
-   if (zio->io_type == ZIO_TYPE_IOCTL) {
-   switch (zio->io_cmd) {
-   case DKIOCFLUSHWRITECACHE:
-   zio->io_error = VOP_FSYNC(vp, FSYNC | FDSYNC,
-   kcred, NULL);
-   break;
-   default:
-   zio->io_error = SET_ERROR(ENOTSUP);
-   }
-
-   zio_execute(zio);
-   return;
-   }
-