Re: svn commit: r338374 - in head: bin/csh bin/sh etc etc/root

2018-08-30 Thread O. Hartmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am Wed, 29 Aug 2018 16:59:19 + (UTC)
Brad Davis  schrieb:

> Author: brd
> Date: Wed Aug 29 16:59:19 2018
> New Revision: 338374
> URL: https://svnweb.freebsd.org/changeset/base/338374
> 
> Log:
>   Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/.
>   
>   Approved by:re (gjb), will (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D16770
> 
> Added:
>   head/bin/csh/dot.cshrc
>  - copied unchanged from r338373, head/etc/root/dot.cshrc
>   head/bin/sh/dot.profile
>  - copied unchanged from r338373, head/etc/root/dot.profile
> Deleted:
>   head/etc/root/dot.cshrc
>   head/etc/root/dot.profile
> Modified:
>   head/bin/csh/Makefile
>   head/bin/sh/Makefile
>   head/etc/Makefile
> 
> Modified: head/bin/csh/Makefile
> ==
> --- head/bin/csh/Makefile Wed Aug 29 16:21:34 2018(r338373)
> +++ head/bin/csh/Makefile Wed Aug 29 16:59:19 2018(r338374)
> @@ -10,8 +10,9 @@
>  
>  CONFGROUPS=  ETC ROOT
>  ETC= csh.cshrc csh.login csh.logout
> -ROOT=dot.login
> +ROOT=dot.cshrc dot.login
>  ROOTDIR= /root
> +ROOTNAME_dot.cshrc=  .cshrc
>  ROOTNAME_dot.login=  .login
>  PACKAGE=runtime
>  TCSHDIR= ${SRCTOP}/contrib/tcsh
> @@ -152,5 +153,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h s
>   sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
>   sort >> ${.TARGET}
>   @echo '#endif /* _h_tc_const */' >> ${.TARGET}
> +
> +beforeinstallconfig:
> + rm -f ${DESTDIR}/.cshrc
> +
> +afterinstallconfig:
> + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
>  
>  .include 
> 
> Copied: head/bin/csh/dot.cshrc (from r338373, head/etc/root/dot.cshrc)
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/dot.cshrcWed Aug 29 16:59:19 2018(r338374, copy 
> of
> r338373, head/etc/root/dot.cshrc) @@ -0,0 +1,43 @@
> +# $FreeBSD$
> +#
> +# .cshrc - csh resource script, read at beginning of execution by each shell
> +#
> +# see also csh(1), environ(7).
> +# more examples available at /usr/share/examples/csh/
> +#
> +
> +alias h  history 25
> +alias j  jobs -l
> +alias la ls -aF
> +alias lf ls -FA
> +alias ll ls -lAF
> +
> +# A righteous umask
> +umask 22
> +
> +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin 
> $HOME/bin)
> +
> +setenv   EDITOR  vi
> +setenv   PAGER   less
> +setenv   BLOCKSIZE   K
> +
> +if ($?prompt) then
> + # An interactive shell -- set some stuff up
> + set prompt = "%N@%m:%~ %# "
> + set promptchars = "%#"
> +
> + set filec
> + set history = 1000
> + set savehist = (1000 merge)
> + set autolist = ambiguous
> + # Use history to aid expansion
> + set autoexpand
> + set autorehash
> + set mail = (/var/mail/$USER)
> + if ( $?tcsh ) then
> + bindkey "^W" backward-delete-word
> + bindkey -k up history-search-backward
> + bindkey -k down history-search-forward
> + endif
> +
> +endif
> 
> Modified: head/bin/sh/Makefile
> ==
> --- head/bin/sh/Makefile  Wed Aug 29 16:21:34 2018(r338373)
> +++ head/bin/sh/Makefile  Wed Aug 29 16:59:19 2018(r338374)
> @@ -3,7 +3,9 @@
>  
>  .include 
>  
> -CONFS=   profile
> +CONFS=   dot.profile profile
> +CONFSDIR_dot.profile=/root
> +CONFSNAME_dot.profile=   .profile
>  PACKAGE=runtime
>  PROG=sh
>  INSTALLFLAGS= -S
> @@ -60,5 +62,11 @@ token.h: mktokens
>  
>  HAS_TESTS=
>  SUBDIR.${MK_TESTS}+= tests
> +
> +beforeinstallconfig:
> + rm -f ${DESTDIR}/.profile
> +
> +afterinstallconfig:
> + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
>  
>  .include 
> 
> Copied: head/bin/sh/dot.profile (from r338373, head/etc/root/dot.profile)
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/sh/dot.profile   Wed Aug 29 16:59:19 2018(r338374, copy 
> of
> r338373, head/etc/root/dot.profile) @@ -0,0 +1,16 @@
> +# $FreeBSD$
> +#
> +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
> +export PATH
> +HOME=/root
> +export HOME
> +TERM=${TERM:-xterm}
> +export TERM
> +PAGER=less
> +export PAGER
> +
> +# Query terminal size; useful for serial lines.
> +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
> +
> +# Uncomment to display a random cookie on each login.
> +# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi
> 
> Modified: head/etc/Makefile
> ==

Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv

2018-08-30 Thread Kyle Evans
On Fri, Aug 17, 2018 at 11:20 AM Brooks Davis  wrote:
>
> Author: brooks
> Date: Fri Aug 17 16:19:47 2018
> New Revision: 337978
> URL: https://svnweb.freebsd.org/changeset/base/337978
>
> Log:
>   Rework rtld's TLS Variant I implementation to match r326794
>
>   The above commit fixed handling overaligned TLS segments in libc's
>   TLS Variant I implementation, but rtld provides its own implementation
>   for dynamically-linked executables which lacks these fixes.  Thus,
>   port these changes to rtld.
>

Hello!

Any plan on re-introducing this during the freeze, now that mmel@ has
fixed the armv7 bits as of r338317?

Thanks,

Kyle Evans
___
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: r338394 - head/stand/lua

2018-08-30 Thread Kyle Evans
Author: kevans
Date: Thu Aug 30 13:29:32 2018
New Revision: 338394
URL: https://svnweb.freebsd.org/changeset/base/338394

Log:
  lualoader: fix color usage
  
  Resetting to the default color scheme was done prior to reading the config.
  This is bogus; colors may only be declined by the user with the
  loader.conf(5) variable "loader_color", so such a request for no color will
  not be completely honored as we reset to the default color scheme
  unconditionally.
  
  Approved by:  re (rgrimes)

Modified:
  head/stand/lua/loader.lua

Modified: head/stand/lua/loader.lua
==
--- head/stand/lua/loader.lua   Thu Aug 30 01:38:32 2018(r338393)
+++ head/stand/lua/loader.lua   Thu Aug 30 13:29:32 2018(r338394)
@@ -42,15 +42,14 @@ local password = require("password")
 -- need it.
 local menu
 
+try_include("local")
+
+config.load()
 -- Our console may have been setup for a different color scheme before we get
 -- here, so make sure we set the default.
 if color.isEnabled() then
printc(color.default())
 end
-
-try_include("local")
-
-config.load()
 if not core.isMenuSkipped() then
menu = require("menu")
 end
___
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: r338395 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-30 Thread Mark Johnston
Author: markj
Date: Thu Aug 30 13:42:01 2018
New Revision: 338395
URL: https://svnweb.freebsd.org/changeset/base/338395

Log:
  Re-add kstat.zfs.misc.arcstats.other_size under COMPAT_FREEBSD11.
  
  It is used by a number of applications, notably top(1).
  
  Reported by:  netchild
  Reviewed by:  allanjude
  Approved by:  re (delphij)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D16943

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Thu Aug 30 
13:29:32 2018(r338394)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Thu Aug 30 
13:42:01 2018(r338395)
@@ -661,7 +661,13 @@ typedef struct arc_stats {
 * Number of bytes consumed by bonus buffers.
 */
kstat_named_t arcstat_bonus_size;
+#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11)
/*
+* Sum of the previous three counters, provided for compatibility.
+*/
+   kstat_named_t arcstat_other_size;
+#endif
+   /*
 * Total number of bytes consumed by ARC buffers residing in the
 * arc_anon state. This includes *all* buffers in the arc_anon
 * state; e.g. data, metadata, evictable, and unevictable buffers
@@ -875,6 +881,9 @@ static arc_stats_t arc_stats = {
{ "dbuf_size",  KSTAT_DATA_UINT64 },
{ "dnode_size", KSTAT_DATA_UINT64 },
{ "bonus_size", KSTAT_DATA_UINT64 },
+#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11)
+   { "other_size", KSTAT_DATA_UINT64 },
+#endif
{ "anon_size",  KSTAT_DATA_UINT64 },
{ "anon_evictable_data",KSTAT_DATA_UINT64 },
{ "anon_evictable_metadata",KSTAT_DATA_UINT64 },
@@ -6825,6 +6834,11 @@ arc_kstat_update(kstat_t *ksp, int rw)
ARCSTAT(arcstat_bonus_size) = aggsum_value(&astat_bonus_size);
ARCSTAT(arcstat_dnode_size) = aggsum_value(&astat_dnode_size);
ARCSTAT(arcstat_dbuf_size) = aggsum_value(&astat_dbuf_size);
+#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11)
+   ARCSTAT(arcstat_other_size) = aggsum_value(&astat_bonus_size) +
+   aggsum_value(&astat_dnode_size) +
+   aggsum_value(&astat_dbuf_size);
+#endif
ARCSTAT(arcstat_l2_hdr_size) = aggsum_value(&astat_l2_hdr_size);
}
 
___
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: r338397 - head/sys/modules/dtb/omap4

2018-08-30 Thread Emmanuel Vadot
Author: manu
Date: Thu Aug 30 14:32:10 2018
New Revision: 338397
URL: https://svnweb.freebsd.org/changeset/base/338397

Log:
  dtb: Add LINKS for omap4 DTBs
  
  We do not use the upstream name so add links so u-boot can load the dtb
  for us.
  
  Approved by:  re (rgrimes)

Modified:
  head/sys/modules/dtb/omap4/Makefile

Modified: head/sys/modules/dtb/omap4/Makefile
==
--- head/sys/modules/dtb/omap4/Makefile Thu Aug 30 13:45:14 2018
(r338396)
+++ head/sys/modules/dtb/omap4/Makefile Thu Aug 30 14:32:10 2018
(r338397)
@@ -5,4 +5,8 @@ DTS=\
 pandaboard.dts \
pandaboard-es.dts
 
+LINKS= \
+   ${DTBDIR}/pandaboard.dtb ${DTBDIR}/omap4-panda.dtb \
+   ${DTBDIR}/pandaboard-es.dtb ${DTBDIR}/omap4-panda-es.dtb
+
 .include 
___
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: r338398 - head/sys/arm/ti/omap4

2018-08-30 Thread Emmanuel Vadot
Author: manu
Date: Thu Aug 30 14:32:47 2018
New Revision: 338398
URL: https://svnweb.freebsd.org/changeset/base/338398

Log:
  omap4_prcm: Delay the frequencies read check
  
  Same as r05, with Linux 4.17 dts the compatible for the prcm added
  'simplebus', it mean that the simplebus driver will attach to it
  at the BUS_PASS_BUS pass.
  Change the pass for the prcm driver to be at BUS_PASS_BUS so we will win
  the attach.
  This introduce a problem as this driver needs the omap_scm one to be already
  attached. omap_scm also attach at BUS_PASS_BUS but after the prcm one as it is
  after in the dtb and the simplebus driver simpy walk the tree to attach it's
  children.
  Use the bus_new_pass method to defer the frequencies read at BUS_PASS_TIMER.
  This fixes booting on pandaboard
  
  Approved by:  re (rgrimes)

Modified:
  head/sys/arm/ti/omap4/omap4_prcm_clks.c

Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c
==
--- head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Aug 30 14:32:10 2018
(r338397)
+++ head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Aug 30 14:32:47 2018
(r338398)
@@ -176,6 +176,7 @@ struct omap4_prcm_softc {
struct resource *sc_res;
int sc_rid;
int sc_instance;
+   int attach_done;
 };
 
 static int omap4_clk_generic_activate(struct ti_clock_dev *clkdev);
@@ -1446,10 +1447,8 @@ static int
 omap4_prcm_attach(device_t dev)
 {
struct omap4_prcm_softc *sc;
-   unsigned int freq;
const struct ofw_compat_data *ocd;
 
-
sc = device_get_softc(dev);
ocd = ofw_bus_search_compatible(dev, compat_data);
sc->sc_instance = (int)ocd->ocd_data;
@@ -1463,6 +1462,22 @@ omap4_prcm_attach(device_t dev)
 
ti_cpu_reset = omap4_prcm_reset;
 
+   return (0);
+}
+
+static void
+omap4_prcm_new_pass(device_t dev)
+{
+   struct omap4_prcm_softc *sc = device_get_softc(dev);
+   unsigned int freq;
+
+   if (sc->attach_done ||
+ bus_current_pass < (BUS_PASS_TIMER + BUS_PASS_ORDER_EARLY)) {
+   bus_generic_new_pass(dev);
+   return;
+   }
+   sc->attach_done = 1;
+
/*
 * In order to determine ARM frequency we need both RPM and CM1 
 * instances up and running. So wait until all CRM devices are
@@ -1473,12 +1488,16 @@ omap4_prcm_attach(device_t dev)
arm_tmr_change_frequency(freq / 2);
}
 
-   return (0);
+   return;
 }
 
 static device_method_t omap4_prcm_methods[] = {
DEVMETHOD(device_probe, omap4_prcm_probe),
DEVMETHOD(device_attach, omap4_prcm_attach),
+
+   /* Bus interface */
+   DEVMETHOD(bus_new_pass, omap4_prcm_new_pass),
+
{0, 0},
 };
 
@@ -1491,5 +1510,5 @@ static driver_t omap4_prcm_driver = {
 static devclass_t omap4_prcm_devclass;
 
 EARLY_DRIVER_MODULE(omap4_prcm, simplebus, omap4_prcm_driver,
-omap4_prcm_devclass, 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_EARLY);
+omap4_prcm_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
 MODULE_VERSION(omap4_prcm, 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"


Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv

2018-08-30 Thread Brooks Davis
On Thu, Aug 30, 2018 at 07:40:59AM -0500, Kyle Evans wrote:
> On Fri, Aug 17, 2018 at 11:20 AM Brooks Davis  wrote:
> >
> > Author: brooks
> > Date: Fri Aug 17 16:19:47 2018
> > New Revision: 337978
> > URL: https://svnweb.freebsd.org/changeset/base/337978
> >
> > Log:
> >   Rework rtld's TLS Variant I implementation to match r326794
> >
> >   The above commit fixed handling overaligned TLS segments in libc's
> >   TLS Variant I implementation, but rtld provides its own implementation
> >   for dynamically-linked executables which lacks these fixes.  Thus,
> >   port these changes to rtld.
> >
> 
> Hello!
> 
> Any plan on re-introducing this during the freeze, now that mmel@ has
> fixed the armv7 bits as of r338317?

It's on my list.  I'll craft a commit request.

-- Brooks


signature.asc
Description: PGP signature


Re: svn commit: r338374 - in head: bin/csh bin/sh etc etc/root

2018-08-30 Thread Brad Davis
On Thu, Aug 30, 2018, at 5:39 AM, O. Hartmann wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Am Wed, 29 Aug 2018 16:59:19 + (UTC)
> Brad Davis  schrieb:
> 
> > Author: brd
> > Date: Wed Aug 29 16:59:19 2018
> > New Revision: 338374
> > URL: https://svnweb.freebsd.org/changeset/base/338374
> > 
> > Log:
> >   Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/.
> >   
> >   Approved by:  re (gjb), will (mentor)
> >   Differential Revision:https://reviews.freebsd.org/D16770
> > 
> > Added:
> >   head/bin/csh/dot.cshrc
> >  - copied unchanged from r338373, head/etc/root/dot.cshrc
> >   head/bin/sh/dot.profile
> >  - copied unchanged from r338373, head/etc/root/dot.profile
> > Deleted:
> >   head/etc/root/dot.cshrc
> >   head/etc/root/dot.profile
> > Modified:
> >   head/bin/csh/Makefile
> >   head/bin/sh/Makefile
> >   head/etc/Makefile
> > 
> > Modified: head/bin/csh/Makefile
> > ==
> > --- head/bin/csh/Makefile   Wed Aug 29 16:21:34 2018(r338373)
> > +++ head/bin/csh/Makefile   Wed Aug 29 16:59:19 2018(r338374)
> > @@ -10,8 +10,9 @@
> >  
> >  CONFGROUPS=ETC ROOT
> >  ETC=   csh.cshrc csh.login csh.logout
> > -ROOT=  dot.login
> > +ROOT=  dot.cshrc dot.login
> >  ROOTDIR=   /root
> > +ROOTNAME_dot.cshrc=.cshrc
> >  ROOTNAME_dot.login=.login
> >  PACKAGE=runtime
> >  TCSHDIR= ${SRCTOP}/contrib/tcsh
> > @@ -152,5 +153,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h s
> > sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
> > sort >> ${.TARGET}
> > @echo '#endif /* _h_tc_const */' >> ${.TARGET}
> > +
> > +beforeinstallconfig:
> > +   rm -f ${DESTDIR}/.cshrc
> > +
> > +afterinstallconfig:
> > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
> >  
> >  .include 
> > 
> > Copied: head/bin/csh/dot.cshrc (from r338373, head/etc/root/dot.cshrc)
> > ==
> > --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> > +++ head/bin/csh/dot.cshrc  Wed Aug 29 16:59:19 2018(r338374, copy 
> > of
> > r338373, head/etc/root/dot.cshrc) @@ -0,0 +1,43 @@
> > +# $FreeBSD$
> > +#
> > +# .cshrc - csh resource script, read at beginning of execution by each 
> > shell
> > +#
> > +# see also csh(1), environ(7).
> > +# more examples available at /usr/share/examples/csh/
> > +#
> > +
> > +alias hhistory 25
> > +alias jjobs -l
> > +alias la   ls -aF
> > +alias lf   ls -FA
> > +alias ll   ls -lAF
> > +
> > +# A righteous umask
> > +umask 22
> > +
> > +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin 
> > $HOME/bin)
> > +
> > +setenv EDITOR  vi
> > +setenv PAGER   less
> > +setenv BLOCKSIZE   K
> > +
> > +if ($?prompt) then
> > +   # An interactive shell -- set some stuff up
> > +   set prompt = "%N@%m:%~ %# "
> > +   set promptchars = "%#"
> > +
> > +   set filec
> > +   set history = 1000
> > +   set savehist = (1000 merge)
> > +   set autolist = ambiguous
> > +   # Use history to aid expansion
> > +   set autoexpand
> > +   set autorehash
> > +   set mail = (/var/mail/$USER)
> > +   if ( $?tcsh ) then
> > +   bindkey "^W" backward-delete-word
> > +   bindkey -k up history-search-backward
> > +   bindkey -k down history-search-forward
> > +   endif
> > +
> > +endif
> > 
> > Modified: head/bin/sh/Makefile
> > ==
> > --- head/bin/sh/MakefileWed Aug 29 16:21:34 2018(r338373)
> > +++ head/bin/sh/MakefileWed Aug 29 16:59:19 2018(r338374)
> > @@ -3,7 +3,9 @@
> >  
> >  .include 
> >  
> > -CONFS= profile
> > +CONFS= dot.profile profile
> > +CONFSDIR_dot.profile=  /root
> > +CONFSNAME_dot.profile= .profile
> >  PACKAGE=runtime
> >  PROG=  sh
> >  INSTALLFLAGS= -S
> > @@ -60,5 +62,11 @@ token.h: mktokens
> >  
> >  HAS_TESTS=
> >  SUBDIR.${MK_TESTS}+= tests
> > +
> > +beforeinstallconfig:
> > +   rm -f ${DESTDIR}/.profile
> > +
> > +afterinstallconfig:
> > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
> >  
> >  .include 
> > 
> > Copied: head/bin/sh/dot.profile (from r338373, head/etc/root/dot.profile)
> > ==
> > --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> > +++ head/bin/sh/dot.profile Wed Aug 29 16:59:19 2018(r338374, copy 
> > of
> > r338373, head/etc/root/dot.profile) @@ -0,0 +1,16 @@
> > +# $FreeBSD$
> > +#
> > +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
> > +export PATH
> > +HOME=/root
> > +export HOME
> > +TERM=${TERM:-xterm}
> > +export TERM
> > +PAGER=less
> > +export PAGER
> > +
> > +# Query terminal size; useful for seri

svn commit: r338399 - in head: etc usr.bin/login

2018-08-30 Thread Brad Davis
Author: brd
Date: Thu Aug 30 15:52:03 2018
New Revision: 338399
URL: https://svnweb.freebsd.org/changeset/base/338399

Log:
  Move fbtab, login.conf, and motd to usr.bin/login/
  
  Approved by:  Approved by: re (gjb), bapt (mentor), will (mentor)
  Differential Revision:https://reviews.freebsd.org/D16947

Added:
  head/usr.bin/login/fbtab
 - copied unchanged from r338398, head/etc/fbtab
  head/usr.bin/login/login.conf
 - copied unchanged from r338398, head/etc/login.conf
  head/usr.bin/login/motd
 - copied unchanged from r338398, head/etc/motd
Deleted:
  head/etc/fbtab
  head/etc/login.conf
  head/etc/motd
Modified:
  head/etc/Makefile
  head/usr.bin/login/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Thu Aug 30 14:32:47 2018(r338398)
+++ head/etc/Makefile   Thu Aug 30 15:52:03 2018(r338399)
@@ -15,7 +15,6 @@ SUBDIR+=sendmail
 BIN1=  crontab \
dhclient.conf \
disktab \
-   fbtab \
gettytab \
group \
hosts \
@@ -24,9 +23,7 @@ BIN1= crontab \
libalias.conf \
libmap.conf \
login.access \
-   login.conf \
mac.conf \
-   motd \
netconfig \
networks \
nsswitch.conf \
@@ -117,7 +114,6 @@ distribution:
cd ${.CURDIR}; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${BIN1} ${DESTDIR}/etc; \
-   cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
 
@@ -127,7 +123,6 @@ distribution:
pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
 .if defined(NO_ROOT)
( \
-   echo "./etc/login.conf.db type=file mode=0644 uname=root 
gname=wheel"; \
echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; 
\
echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; 
\
echo "./etc/spwd.db type=file mode=0600 uname=root 
gname=wheel"; \

Modified: head/usr.bin/login/Makefile
==
--- head/usr.bin/login/Makefile Thu Aug 30 14:32:47 2018(r338398)
+++ head/usr.bin/login/Makefile Thu Aug 30 15:52:03 2018(r338399)
@@ -3,6 +3,7 @@
 
 .include 
 
+CONFS= fbtab login.conf motd
 PROG=  login
 SRCS=  login.c login_fbtab.c
 CFLAGS+=-DLOGALL
@@ -20,6 +21,14 @@ LIBADD+= bsm
 BINOWN=root
 BINMODE=4555
 PRECIOUSPROG=
+.endif
+
+.include 
+afterinstallconfig:
+   cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf
+.if defined(NO_ROOT) && defined(METALOG)
+   echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel" | 
\
+   cat -l >> ${METALOG}
 .endif
 
 .include 

Copied: head/usr.bin/login/fbtab (from r338398, head/etc/fbtab)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/login/fbtabThu Aug 30 15:52:03 2018(r338399, copy 
of r338398, head/etc/fbtab)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+#
+#/dev/ttyv00600/dev/console
+#/dev/ttyv00600/dev/pcaudio:/dev/pcaudioctl

Copied: head/usr.bin/login/login.conf (from r338398, head/etc/login.conf)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/login/login.conf   Thu Aug 30 15:52:03 2018
(r338399, copy of r338398, head/etc/login.conf)
@@ -0,0 +1,322 @@
+# login.conf - login class capabilities database.
+#
+# Remember to rebuild the database after each change to this file:
+#
+#  cap_mkdb /etc/login.conf
+#
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+#
+# $FreeBSD$
+#
+
+# Default settings effectively disable resource limits, see the
+# examples below for a starting point to enable them.
+
+# defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+#
+# Note that since a colon ':' is used to separate capability entries,
+# a \c escape sequence must be used to embed a literal colon in the
+# value or name of a capability (see the ``CGETNUM AND CGETSTR SYNTAX
+# AND SEMANTICS'' section of getcap(3) for more escape sequences).
+
+default:\
+   :passwd_format=sha512:\
+   :copyright=/etc/COPYRIGHT:\
+   :welcome=/etc/motd:\
+   :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
+   :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin 
~/bin:\
+   :nologin=/var/run/nologin:\
+   :cputime=unlimited:\
+   :datasize=unlimited:\
+   :stacksize=unlimited:\
+   :memorylocked=64K:\
+   :memoryuse=unlimited:\
+   :fi

svn commit: r338400 - head/release/tools

2018-08-30 Thread Kyle Evans
Author: kevans
Date: Thu Aug 30 18:00:28 2018
New Revision: 338400
URL: https://svnweb.freebsd.org/changeset/base/338400

Log:
  release.sh: disable colors and the beastie menu for ARM/ARM64 targets
  
  lualoader has moved to a model where the user is expected to disable color
  as desired, rather than disabling it automatically for serial boots, due to
  more wide-spread support for color sequences.
  
  In a similar vain, though also to reduce special cases, lualoader no
  longer disables the beastie menu automatically for !x86. This was done in
  Forth land with a different loader.rc that simply didn't invoke the menu
  routines, thus wasn't necessary.
  
  This set of changes puts release images back to how they would've been
  experienced prior to the switch to Lua.
  
  Approved by:  re (rgrimes)

Modified:
  head/release/tools/arm.subr

Modified: head/release/tools/arm.subr
==
--- head/release/tools/arm.subr Thu Aug 30 15:52:03 2018(r338399)
+++ head/release/tools/arm.subr Thu Aug 30 18:00:28 2018(r338400)
@@ -151,6 +151,15 @@ arm_setup_fdt_overlays() {
 >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
 }
 
+arm_setup_minimal_loader() {
+   echo '# Disable the beastie menu and color' \
+   >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   echo 'beastie_disable="YES"' \
+   >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+   echo 'loader_color="NO"' \
+   >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+}
+
 arm_install_base() {
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR}
eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \
@@ -164,6 +173,7 @@ arm_install_base() {
arm_setup_usb_otg
arm64_setup_multicons
arm_setup_fdt_overlays
+   arm_setup_minimal_loader
 
echo '# Custom /etc/fstab for FreeBSD embedded images' \
> ${CHROOTDIR}/${DESTDIR}/etc/fstab
___
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: r338098 - in head: . tools/build

2018-08-30 Thread Alexander Richardson
On Wed, 29 Aug 2018 at 20:21 Cy Schubert  wrote:

> In message <201808201039.w7kadrmm079...@repo.freebsd.org>, Alex
> Richardson writ
> es:
> > Author: arichardson
> > Date: Mon Aug 20 10:39:53 2018
> > New Revision: 338098
> > URL: https://svnweb.freebsd.org/changeset/base/338098
> >
> > Log:
> >   Don't create directories in ${WORLDTMP}/legacy with mtree
> >
> >   This has two advantages:
> >   1) We no longer create lots of empty directories that are not needed
> >   2) This is a requirement for building on non-FreeBSD hosts since mtree
> will
> >   only exist after the bootstrap-tools phase there.
> >
> >   Aproved By: jhb (mentor)
> >   Differential Revision: https://reviews.freebsd.org/D16773
> >
> > Modified:
> >   head/Makefile.inc1
> >   head/tools/build/Makefile
> >
> > Modified: head/Makefile.inc1
> >
> =
> > =
> > --- head/Makefile.inc1Mon Aug 20 10:39:48 2018(r338097)
> > +++ head/Makefile.inc1Mon Aug 20 10:39:53 2018(r338098)
> > @@ -968,29 +968,10 @@ _worldtmp: .PHONY
> >  .endif   # !defined(NO_CLEAN)
> >   @mkdir -p ${WORLDTMP}
> >   @touch ${WORLDTMP}/${.TARGET}
> > -
> > -.for _dir in \
> > -lib lib/casper lib/geom usr legacy/bin legacy/usr
> > - mkdir -p ${WORLDTMP}/${_dir}
> > -.endfor
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
> > - -p ${WORLDTMP}/legacy/usr >/dev/null
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
> > - -p ${WORLDTMP}/legacy/usr/include >/dev/null
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
> > - -p ${WORLDTMP}/usr >/dev/null
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
> > - -p ${WORLDTMP}/usr/include >/dev/null
> > - ln -sf ${.CURDIR}/sys ${WORLDTMP}
> > -.if ${MK_DEBUG_FILES} != "no"
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
> > - -p ${WORLDTMP}/legacy/usr/lib >/dev/null
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
> > - -p ${WORLDTMP}/usr/lib >/dev/null
> > -.endif
> > -.for _mtree in ${LOCAL_MTREE}
> > - ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} >
> /dev/null
> > -.endfor
> > +# We can't use mtree to create the worldtmp directories since it may
> not be
> > +# available on the target system (this happens e.g. when building on
> non-Fre
> > eBSD)
> > + cd ${.CURDIR}/tools/build; \
> > + ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy
> installdirs
> >  _legacy:
> >   @echo
> >   @echo
> "--"
> > @@ -1003,6 +984,19 @@ _bootstrap-tools:
> >   @echo ">>> stage 1.2: bootstrap tools"
> >   @echo
> "--"
> >   ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
> > + mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper
> ${WORLDTMP}/lib/geom
> > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
> > + -p ${WORLDTMP}/usr >/dev/null
> > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
> > + -p ${WORLDTMP}/usr/include >/dev/null
> > + ln -sf ${.CURDIR}/sys ${WORLDTMP}
> > +.if ${MK_DEBUG_FILES} != "no"
> > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
> > + -p ${WORLDTMP}/usr/lib >/dev/null
> > +.endif
> > +.for _mtree in ${LOCAL_MTREE}
> > + ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} >
> /dev/null
> > +.endfor
> >  _cleanobj:
> >  .if !defined(NO_CLEAN)
> >   @echo
> >
> > Modified: head/tools/build/Makefile
> >
> =
> > =
> > --- head/tools/build/Makefile Mon Aug 20 10:39:48 2018(r338097)
> > +++ head/tools/build/Makefile Mon Aug 20 10:39:53 2018(r338098)
> > @@ -59,4 +59,17 @@ SUBDIR=cross-build
> >  # Needed to build config (since it uses libnv)
> >  SYSINCS+=${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h
> >
> > +
> > +# Create all the directories that are needed during the legacy,
> bootstrap-to
> > ols
> > +# and cross-tools stages. We do this here using mkdir since mtree may
> not ex
> > ist
> > +# yet (this happens if we are crossbuilding from Linux/Mac).
> > +installdirs:
> > +.for _dir in bin sbin usr/bin usr/sbin usr/lib usr/include lib/geom
> lib/casp
> > er
> > + mkdir -p "${DESTDIR}/${_dir}"
> > +.endfor
> > +
> > +.for _group in ${INCSGROUPS:NINCS}
> > + mkdir -p "${DESTDIR}/${${_group}DIR}"
> > +.endfor
> > +
> >  .include 
> >
>
> This broke my krb5 project branch. The fix for me is easy but rather
> inelegant, adding yet another for loop. Would it not be better to
> guarantee that mtree is in $WORLDTEMP for platforms that don't have it
> naturally or unconditionally? And, before we use it? With this change
> it requires, depending on what any future patc

Re: svn commit: r337776 - head/sys/netinet6

2018-08-30 Thread Kristof Provost

On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote:

Author: jtl
Date: Tue Aug 14 17:17:37 2018
New Revision: 337776
URL: https://svnweb.freebsd.org/changeset/base/337776

Log:
  Improve IPv6 reassembly performance by hashing fragments into 
buckets.


  Currently, all IPv6 fragment reassembly queues are kept in a flat
  linked list. This has a number of implications. Two significant
  implications are: all reassembly operations share a common lock,
  and it is possible for the linked list to grow quite large.

  Improve IPv6 reassembly performance by hashing fragments into 
buckets,
  each of which has its own lock. Calculate the hash key using a 
Jenkins

  hash with a random seed.

  Reviewed by:  jhb
  Security: FreeBSD-SA-18:10.ip
  Security: CVE-2018-6923

Modified:
  head/sys/netinet6/frag6.c

Modified: head/sys/netinet6/frag6.c
==
--- head/sys/netinet6/frag6.c   Tue Aug 14 17:15:47 2018(r337775)
+++ head/sys/netinet6/frag6.c   Tue Aug 14 17:17:37 2018(r337776)
@@ -157,12 +176,13 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

struct mbuf *m = *mp, *t;
struct ip6_hdr *ip6;
struct ip6_frag *ip6f;
-   struct ip6q *q6;
+   struct ip6q *head, *q6;
struct ip6asfrag *af6, *ip6af, *af6dwn;
struct in6_ifaddr *ia;
int offset = *offp, nxt, i, next;
int first_frag = 0;
int fragoff, frgpartlen;/* must be larger than u_int16_t */
+   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp;


I’m pretty sure you didn’t mean for the hashkey to be 1028 bytes 
long.



struct ifnet *dstifp;
u_int8_t ecn, ecn0;
 #ifdef RSS
@@ -231,7 +251,16 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

return (ip6f->ip6f_nxt);
}

-   IP6Q_LOCK();
+   hashkeyp = hashkey;
+   memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr));
+   hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp);
+   memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr));
+   hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp);
+   *hashkeyp = ip6f->ip6f_ident;
+   hash = jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed);


Especially combined with this, because it means we hash a lot more than 
the src/dst dress and ident.
We end up hashing random stack garbage, so the hash isn’t guaranteed 
to be the same every time.

So we end up not always being able to reassemble the packet.

It’s especially fun when you consider that a Dtrace fbt:::entry probe 
will leave a consistent stack state, so when you try to probe 
frag6_input() the problem magically goes away.


This broke the sys.netpfil.pf.fragmentation.v6 test.

I’ve done this, which fixes the problem:

diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 0f30801540a..e1f2b3f5842 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
int offset = *offp, nxt, i, next;
int first_frag = 0;
	int fragoff, frgpartlen;/* must be larger than 
u_int16_t */
	-   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], 
*hashkeyp;
	+   uint32_t hashkey[(sizeof(struct in6_addr) * 2 + 
sizeof(u_int32_t)) /

+   sizeof(uint32_t)];
+   uint32_t hash, *hashkeyp;
struct ifnet *dstifp;
u_int8_t ecn, ecn0;
 #ifdef RSS

Regards,
Kristof
___
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: r337776 - head/sys/netinet6

2018-08-30 Thread Bjoern A. Zeeb

On 30 Aug 2018, at 22:00, Kristof Provost wrote:


On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote:

Author: jtl
Date: Tue Aug 14 17:17:37 2018
New Revision: 337776
URL: https://svnweb.freebsd.org/changeset/base/337776

Log:
  Improve IPv6 reassembly performance by hashing fragments into 
buckets.


  Currently, all IPv6 fragment reassembly queues are kept in a flat
  linked list. This has a number of implications. Two significant
  implications are: all reassembly operations share a common lock,
  and it is possible for the linked list to grow quite large.

  Improve IPv6 reassembly performance by hashing fragments into 
buckets,
  each of which has its own lock. Calculate the hash key using a 
Jenkins

  hash with a random seed.

  Reviewed by:  jhb
  Security: FreeBSD-SA-18:10.ip
  Security: CVE-2018-6923

Modified:
  head/sys/netinet6/frag6.c

Modified: head/sys/netinet6/frag6.c
==
--- head/sys/netinet6/frag6.c   Tue Aug 14 17:15:47 2018(r337775)
+++ head/sys/netinet6/frag6.c   Tue Aug 14 17:17:37 2018(r337776)
@@ -157,12 +176,13 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

struct mbuf *m = *mp, *t;
struct ip6_hdr *ip6;
struct ip6_frag *ip6f;
-   struct ip6q *q6;
+   struct ip6q *head, *q6;
struct ip6asfrag *af6, *ip6af, *af6dwn;
struct in6_ifaddr *ia;
int offset = *offp, nxt, i, next;
int first_frag = 0;
int fragoff, frgpartlen;/* must be larger than u_int16_t */
+   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp;


I’m pretty sure you didn’t mean for the hashkey to be 1028 bytes 
long.



struct ifnet *dstifp;
u_int8_t ecn, ecn0;
 #ifdef RSS
@@ -231,7 +251,16 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

return (ip6f->ip6f_nxt);
}

-   IP6Q_LOCK();
+   hashkeyp = hashkey;
+   memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr));
+   hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp);
+   memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr));
+   hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp);
+   *hashkeyp = ip6f->ip6f_ident;
+   hash = jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed);


Especially combined with this, because it means we hash a lot more 
than the src/dst dress and ident.
We end up hashing random stack garbage, so the hash isn’t guaranteed 
to be the same every time.

So we end up not always being able to reassemble the packet.

It’s especially fun when you consider that a Dtrace fbt:::entry 
probe will leave a consistent stack state, so when you try to probe 
frag6_input() the problem magically goes away.


This broke the sys.netpfil.pf.fragmentation.v6 test.

I’ve done this, which fixes the problem:

diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 0f30801540a..e1f2b3f5842 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
	@@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

int offset = *offp, nxt, i, next;
int first_frag = 0;
	int fragoff, frgpartlen;/* must be larger than 
u_int16_t */
	-   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], 
*hashkeyp;
	+   uint32_t hashkey[(sizeof(struct in6_addr) * 2 + 
sizeof(u_int32_t)) /


Can we actually make it the size of the field rather than uint32_t (not 
u_int32_t)?  I guess not easily but at least change the type spelling 
and leave a comment what it is?




+   sizeof(uint32_t)];
+   uint32_t hash, *hashkeyp;
struct ifnet *dstifp;
u_int8_t ecn, ecn0;
 #ifdef RSS

Regards,
Kristof

___
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: r337776 - head/sys/netinet6

2018-08-30 Thread Kristof Provost

On 31 Aug 2018, at 0:07, Bjoern A. Zeeb wrote:

On 30 Aug 2018, at 22:00, Kristof Provost wrote:

I’ve done this, which fixes the problem:

diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 0f30801540a..e1f2b3f5842 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
	@@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int 
proto)

int offset = *offp, nxt, i, next;
int first_frag = 0;
	int fragoff, frgpartlen;/* must be larger than 
u_int16_t */
	-   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], 
*hashkeyp;
	+   uint32_t hashkey[(sizeof(struct in6_addr) * 2 + 
sizeof(u_int32_t)) /


Can we actually make it the size of the field rather than uint32_t 
(not u_int32_t)?  I guess not easily but at least change the type 
spelling and leave a comment what it is?



I think we can spell that `sizeof(ip6f->ip6f_ident))`, yes.

Kristof
___
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: r337776 - head/sys/netinet6

2018-08-30 Thread Rick Macklem
Sorry for the top post, but I'm on a web based email.
p...@freebsd.org reported a problem w.r.t. IPv6 fragmentation when
using NFS. (He switched from UDP --> TCP and the problem went
away.)
It's over here on freebsd-stable:
http://docs.FreeBSD.org/cgi/mid.cgi?20180827155651.GW2118

I don't know if this is related, given that it is a recent commit.
(There have been a bunch of other IPv6 fragmentation commits.)

rick


From: owner-src-committ...@freebsd.org  on 
behalf of Kristof Provost 
Sent: Thursday, August 30, 2018 6:12:40 PM
To: Bjoern A. Zeeb
Cc: Jonathan T. Looney; src-committ...@freebsd.org; svn-src-...@freebsd.org; 
svn-src-head@freebsd.org
Subject: Re: svn commit: r337776 - head/sys/netinet6

On 31 Aug 2018, at 0:07, Bjoern A. Zeeb wrote:

On 30 Aug 2018, at 22:00, Kristof Provost wrote:

I’ve done this, which fixes the problem:

diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 0f30801540a..e1f2b3f5842 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
int offset = *offp, nxt, i, next;
int first_frag = 0;
int fragoff, frgpartlen; /* must be larger than u_int16_t */
- uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp;
+ uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(u_int32_t)) /

Can we actually make it the size of the field rather than uint32_t (not 
u_int32_t)? I guess not easily but at least change the type spelling and leave 
a comment what it is?

I think we can spell that sizeof(ip6f->ip6f_ident)), yes.

Kristof
___
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: r338401 - head/sys/conf

2018-08-30 Thread Glen Barber
Author: gjb
Date: Fri Aug 31 00:05:38 2018
New Revision: 338401
URL: https://svnweb.freebsd.org/changeset/base/338401

Log:
  Update head from ALPHA3 to ALPHA4 as part of the 12.0-RELEASE
  cycle.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==
--- head/sys/conf/newvers.shThu Aug 30 18:00:28 2018(r338400)
+++ head/sys/conf/newvers.shFri Aug 31 00:05:38 2018(r338401)
@@ -46,7 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.0"
-BRANCH="ALPHA3"
+BRANCH="ALPHA4"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r338402 - head/sys/crypto/ccp

2018-08-30 Thread Warner Losh
Author: imp
Date: Fri Aug 31 01:01:16 2018
New Revision: 338402
URL: https://svnweb.freebsd.org/changeset/base/338402

Log:
  Don't load ccp automatically with devmatch
  
  Remove the PNP info for the moment from the driver. It's an
  experimental driver (as noted in r328150). It's performance is about
  1/10th that of aesni. It will often panic when used with GELI (PR
  2279820).  It's not in our best interest to have such a driver be
  autoloaded by default.
  
  Approved by: re@ (rgrimes)
  Reviewed By: cem@
  Differential Review: https://reviews.freebsd.org/D16959

Modified:
  head/sys/crypto/ccp/ccp.c

Modified: head/sys/crypto/ccp/ccp.c
==
--- head/sys/crypto/ccp/ccp.c   Fri Aug 31 00:05:38 2018(r338401)
+++ head/sys/crypto/ccp/ccp.c   Fri Aug 31 01:01:16 2018(r338402)
@@ -734,8 +734,10 @@ DRIVER_MODULE(ccp, pci, ccp_driver, ccp_devclass, NULL
 MODULE_VERSION(ccp, 1);
 MODULE_DEPEND(ccp, crypto, 1, 1, 1);
 MODULE_DEPEND(ccp, random_device, 1, 1, 1);
+#if 0  /* There are enough known issues that we shouldn't load automatically */
 MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, sizeof(ccp_ids[0]),
 nitems(ccp_ids));
+#endif
 
 static int
 ccp_queue_reserve_space(struct ccp_queue *qp, unsigned n, int mflags)
___
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: r337776 - head/sys/netinet6

2018-08-30 Thread Jonathan T. Looney
On Thu, Aug 30, 2018 at 6:00 PM Kristof Provost  wrote:

> On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote:
>
> + uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp;
>
> I’m pretty sure you didn’t mean for the hashkey to be 1028 bytes long.
>
Yikes. Yep, that's a bug.

I originally spelled this as 9; however, decided to rewrite it to avoid
"magic numbers". It made it through all my manual testing; but, that makes
sense since all my positive functional tests were on an unloaded machine,
so the extra stack garbage would be more likely to be consistent.


> I’ve done this, which fixes the problem:
>
> diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
> index 0f30801540a..e1f2b3f5842 100644
> --- a/sys/netinet6/frag6.c
> +++ b/sys/netinet6/frag6.c
> @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
> int offset = *offp, nxt, i, next;
> int first_frag = 0;
> int fragoff, frgpartlen;/* must be larger than u_int16_t */
> -   uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp;
> +   uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(u_int32_t)) /
> +   sizeof(uint32_t)];
> +   uint32_t hash, *hashkeyp;
> struct ifnet *dstifp;
> u_int8_t ecn, ecn0;
>  #ifdef RSS
>
>
That looks fine to me, either with or without the followup suggestion of
using sizeof(ip6f->ip6f_ident). Feel free to commit this change (after
appropriate re@ approval). Or, let me know if you prefer I do it. Either
way, I'll wear the pointy hat (sadly, I suspect it is neither the first nor
last I will earn).

Jonathan
___
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: r338404 - head/sys/conf

2018-08-30 Thread Glen Barber
Author: gjb
Date: Fri Aug 31 02:22:33 2018
New Revision: 338404
URL: https://svnweb.freebsd.org/changeset/base/338404

Log:
  Revert r338401, as the i386 build is broken.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==
--- head/sys/conf/newvers.shFri Aug 31 01:50:40 2018(r338403)
+++ head/sys/conf/newvers.shFri Aug 31 02:22:33 2018(r338404)
@@ -46,7 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.0"
-BRANCH="ALPHA4"
+BRANCH="ALPHA3"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r338404 - head/sys/conf

2018-08-30 Thread Glen Barber
On Fri, Aug 31, 2018 at 02:22:34AM +, Glen Barber wrote:
> Author: gjb
> Date: Fri Aug 31 02:22:33 2018
> New Revision: 338404
> URL: https://svnweb.freebsd.org/changeset/base/338404
> 
> Log:
>   Revert r338401, as the i386 build is broken.
>   
>   Approved by:re (implicit)
>   Sponsored by:   The FreeBSD Foundation
> 
> Modified:
>   head/sys/conf/newvers.sh
> 
> Modified: head/sys/conf/newvers.sh
> ==
> --- head/sys/conf/newvers.sh  Fri Aug 31 01:50:40 2018(r338403)
> +++ head/sys/conf/newvers.sh  Fri Aug 31 02:22:33 2018(r338404)
> @@ -46,7 +46,7 @@
>  
>  TYPE="FreeBSD"
>  REVISION="12.0"
> -BRANCH="ALPHA4"
> +BRANCH="ALPHA3"
>  if [ -n "${BRANCH_OVERRIDE}" ]; then
>   BRANCH=${BRANCH_OVERRIDE}
>  fi
> 

As I look closer at the log, I have a sneaking suspicion this may have
been a transient.  I'm redoing the i386 build against the original
r338401 for i386 alone as a test, if nothing else, to see if it fails in
the same place.

I see no obvious suspicious commit at fault here otherwise.

Glen



signature.asc
Description: PGP signature


Re: svn commit: r338404 - head/sys/conf

2018-08-30 Thread Glen Barber
On Fri, Aug 31, 2018 at 02:46:07AM +, Glen Barber wrote:
> On Fri, Aug 31, 2018 at 02:22:34AM +, Glen Barber wrote:
> > Author: gjb
> > Date: Fri Aug 31 02:22:33 2018
> > New Revision: 338404
> > URL: https://svnweb.freebsd.org/changeset/base/338404
> > 
> > Log:
> >   Revert r338401, as the i386 build is broken.
> >   
> >   Approved by:  re (implicit)
> >   Sponsored by: The FreeBSD Foundation
> > 
> > Modified:
> >   head/sys/conf/newvers.sh
> > 
> > Modified: head/sys/conf/newvers.sh
> > ==
> > --- head/sys/conf/newvers.shFri Aug 31 01:50:40 2018
> > (r338403)
> > +++ head/sys/conf/newvers.shFri Aug 31 02:22:33 2018
> > (r338404)
> > @@ -46,7 +46,7 @@
> >  
> >  TYPE="FreeBSD"
> >  REVISION="12.0"
> > -BRANCH="ALPHA4"
> > +BRANCH="ALPHA3"
> >  if [ -n "${BRANCH_OVERRIDE}" ]; then
> > BRANCH=${BRANCH_OVERRIDE}
> >  fi
> > 
> 
> As I look closer at the log, I have a sneaking suspicion this may have
> been a transient.  I'm redoing the i386 build against the original
> r338401 for i386 alone as a test, if nothing else, to see if it fails in
> the same place.
> 
> I see no obvious suspicious commit at fault here otherwise.
> 

Nope.  Seems like a legitimate failure, though where is still unclear to
me.

Better luck tomorrow, I guess.

Glen



signature.asc
Description: PGP signature