svn commit: r337885 - head/bin/ls

2018-08-15 Thread Kyle Evans
Author: kevans
Date: Thu Aug 16 01:27:16 2018
New Revision: 337885
URL: https://svnweb.freebsd.org/changeset/base/337885

Log:
  ls(1): Fix color env var checking
  
  CLICOLOR will behavior as always- if present at all in the environment,
  allow colors.
  
  COLORTERM, recently enforced, will have to be both present and not empty.
  
  Submitted by: imp

Modified:
  head/bin/ls/ls.c

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cThu Aug 16 01:18:20 2018(r337884)
+++ head/bin/ls/ls.cThu Aug 16 01:27:16 2018(r337885)
@@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -152,6 +153,29 @@ char *enter_bold;  /* ANSI sequence to set color 
to bo
 
 static int rval;
 
+static bool
+do_color_from_env(void)
+{
+   const char *p;
+   bool doit;
+
+   doit = false;
+   p = getenv("CLICOLOR");
+   if (p == NULL) {
+   /*
+* COLORTERM is the more standard name for this variable.  We'll
+* honor it as long as it's both set and not empty.
+*/
+   p = getenv("COLORTERM");
+   if (p != NULL && *p != '\0')
+   doit = true;
+   } else
+   doit = true;
+
+   return (doit &&
+   (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE")));
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -368,8 +392,7 @@ main(int argc, char *argv[])
f_listdot = 1;
 
/* Enabling of colours is conditional on the environment. */
-   if ((getenv("CLICOLOR") || getenv("COLORTERM")) &&
-   (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE")))
+   if (do_color_from_env())
 #ifdef COLORLS
if (tgetent(termcapbuf, getenv("TERM")) == 1) {
ansi_fgcol = tgetstr("AF", );
___
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: r337868 - head/stand

2018-08-15 Thread Warner Losh
I'll give that a shot. I wonder why things are different in my test jig...

Warner

On Wed, Aug 15, 2018 at 5:49 PM, Kyle Evans  wrote:

> https://ci.freebsd.org/job/FreeBSD-head-mips-build/3874/console at least;
> a local make -j8 TARGET_ARCH=mips buildworld also failed a while ago
>
>
> On Wed, Aug 15, 2018, 18:36 Warner Losh  wrote:
>
>> which mips builds? My automated mips and mips64 builds just work...
>>
>> Warner
>>
>> On Wed, Aug 15, 2018 at 3:22 PM, Kyle Evans  wrote:
>>
>>> On Wed, Aug 15, 2018 at 3:31 PM, Warner Losh  wrote:
>>> > Author: imp
>>> > Date: Wed Aug 15 20:31:11 2018
>>> > New Revision: 337868
>>> > URL: https://svnweb.freebsd.org/changeset/base/337868
>>> >
>>> > Log:
>>> >   stand: Use -Oz/-Os for all loader/stand builds.
>>> >
>>> >   While we're not super size constrained, the x86 BIOS /boot/loader has
>>> >   to be less than about 520k-530k to be reliable. The LUA loader is at
>>> >   this size today. -Oz saves 15-20% on the size, keeping us safely
>>> small
>>> >   enough (comparable to where we were with the 4th loader). This will
>>> >   also help with sjg's work on bringing in bearssl, though we may again
>>> >   be looking for space in the LUA loader.
>>> >
>>> >   Size table for clang 6.0.0:
>>> > default -O1 -Os -Oz
>>> >   4th   442368  417792  389120  376832
>>> >   lua   524288  479232  446464  430080
>>> >
>>> >   Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64)
>>> >   Differential Revision: https://reviews.freebsd.org/D16724
>>> >
>>>
>>> This seems to have frustrated the MIPS build:
>>>
>>> --- ubldr ---
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>>> `block_map':
>>> /usr/src/stand/libsa/ufs.c:277: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:277: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>>> `buf_read_file':
>>> /usr/src/stand/libsa/ufs.c:402: undefined reference to `__ashrdi3'
>>> /usr/src/stand/libsa/ufs.c:402: relocation truncated to fit: R_MIPS_26
>>> against `__ashrdi3'
>>> /usr/src/stand/libsa/ufs.c:403: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:403: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:418: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:418: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>>> `buf_write_file':
>>> /usr/src/stand/libsa/ufs.c:327: undefined reference to `__ashrdi3'
>>> /usr/src/stand/libsa/ufs.c:327: relocation truncated to fit: R_MIPS_26
>>> against `__ashrdi3'
>>> /usr/src/stand/libsa/ufs.c:328: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:328: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:358: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:358: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:377: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:377: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>>> `read_inode':
>>> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
>>> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
>>> against `__ashldi3'
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o):/
>>> usr/src/stand/libsa/ufs.c:638:
>>> more undefined references to `__ashldi3' follow
>>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>>> `ufs_open':
>>> /usr/src/stand/libsa/ufs.c:638: additional relocation overflows
>>> omitted from the output
>>>
>>
>>
___
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: r337883 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-15 Thread Alexander Motin
Author: mav
Date: Thu Aug 16 00:50:14 2018
New Revision: 337883
URL: https://svnweb.freebsd.org/changeset/base/337883

Log:
  Add couple tunables/sysctl, missed in r336949.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.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  Wed Aug 
15 23:18:34 2018(r337882)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Thu Aug 
16 00:50:14 2018(r337883)
@@ -437,6 +437,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, spa_min_slop, CTLFLAG
 
 int spa_allocators = 4;
 
+SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_allocators, CTLFLAG_RWTUN,
+_allocators, 0,
+"Number of allocators per metaslab group");
+
 /*PRINTFLIKE2*/
 void
 spa_load_failed(spa_t *spa, const char *fmt, ...)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cWed Aug 
15 23:18:34 2018(r337882)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cThu Aug 
16 00:50:14 2018(r337883)
@@ -267,6 +267,9 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, write_gap_limit, C
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, queue_depth_pct, CTLFLAG_RWTUN,
 _vdev_queue_depth_pct, 0,
 "Queue depth percentage for each top-level");
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, def_queue_depth, CTLFLAG_RWTUN,
+_vdev_def_queue_depth, 0,
+"Default queue depth for each allocator");
 
 static int
 sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS)
___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Samy Mahmoudi
 Two days ago, I changed my beadm-compatible layout to have /root on a
dedicated filesystem, separated from /. Then I upgraded to current and
noticed two ln output errors.

After some time cruising the FreeBSD source tree, I came to the conclusion
that .cshrc and .profile were installed to the /root filesystem and that
the two subsequent hardlinks failed because the respective targets .cshrc
and .profile were (in my case) on a different filesystem, namely /.

Is there any historical reason for hardlinking instead of softlinking ?
Anyway, I will definitely keep an eye on your better approach.

Le jeu. 16 août 2018 à 01:22, Brad Davis  a écrit :

> On Wed, Aug 15, 2018, at 11:34 AM, Rodney W. Grimes wrote:
> > > > > Author: brd
> > > > > Date: Wed Aug 15 16:22:12 2018
> > > > > New Revision: 337857
> > > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > >
> > > > > Log:
> > > > >   Fix build after r337849
> > > > >
> > > > >   This moves the symlink creation to after where the files are
> installed.
> > > > >
> > > > >   This also inverts the shell change so that it only happens if
> MK_TCSH is on.
> > > > >
> > > > >   Approved by:  will (mentor)
> > > > >   Differential Revision:https://reviews.freebsd.org/D16725
> > > > >
> > > > > Modified:
> > > > >   head/bin/csh/Makefile
> > > > >   head/bin/sh/Makefile
> > > > >   head/etc/master.passwd
> > > > >
> > > > > Modified: head/bin/csh/Makefile
> > > > >
> ==
> > > > > --- head/bin/csh/Makefile   Wed Aug 15 16:16:59 2018
> (r337856)
> > > > > +++ head/bin/csh/Makefile   Wed Aug 15 16:22:12 2018
> (r337857)
> > > > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > > > >
> > > > >  LIBADD=termcapw crypt
> > > > >
> > > > > -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
> > > > > -   /root/.cshrc /.cshrc
> > > > > +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
> > > > >
> > > > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > > > >
> > > > > @@ -158,7 +157,7 @@ beforeinstall:
> > > > > rm -f ${DESTDIR}/.cshrc
> > > > >
> > > > >  afterinstallconfig:
> > > > > -   sed -i "" -e 's;/bin/csh;/bin/sh;'
> ${DESTDIR}/etc/master.passwd
> > > > > +   sed -i "" -e 's;/bin/sh;/bin/csh;'
> ${DESTDIR}/etc/master.passwd
> > > > > pwd_mkdb -i -p -d ${DESTDIR}/etc
> ${DESTDIR}/etc/master.passwd
> > > > >
> > > > >  .include 
> > > > >
> > > > > Modified: head/bin/sh/Makefile
> > > > >
> ==
> > > > > --- head/bin/sh/MakefileWed Aug 15 16:16:59 2018
> (r337856)
> > > > > +++ head/bin/sh/MakefileWed Aug 15 16:22:12 2018
> (r337857)
> > > > > @@ -37,7 +37,6 @@ WFORMAT=0
> > > > >
> > > > >  CLEANFILES+= mknodes mksyntax
> > > > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > > > -LINKS= /root/.profile /.profile
> > > > >
> > > > >  build-tools: mknodes mksyntax
> > > > >
> > > > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > > > >
> > > > >  beforeinstall:
> > > > > rm -f ${DESTDIR}/.profile
> > > >
> > > > Still unconditionally removing /.profile, but only replacing it
> > > > when installconfig: is run.
> > >
> > > Yes, working on a separate review for this..
> > >
> > > > > +
> > > > > +afterinstallconfig:
> > > > > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile
> ${DESTDIR}/.profile
> > > > >
> > > > >  .include 
> > > > >
> > > > > Modified: head/etc/master.passwd
> > > > >
> ==
> > > > > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018
> (r337856)
> > > > > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018
> (r337857)
> > > > > @@ -1,6 +1,6 @@
> > > > >  # $FreeBSD$
> > > > >  #
> > > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > >
> > > > I strongly object to this change to master.passwd, and feel it should
> > > > be worked around if in anyway possible.  I have pointed out in the
> > > > review ways to not have to make this change.
> > >
> > > I opened up the following which addresses some of your feedback:
> > > https://reviews.freebsd.org/D16728
> >
> > Bleh, can we revert all of this, and take a second look with many more
> > eyes on this.  master.passwd coming from libc makes my head hurt!
> >
> > Also this is now a patch on a patch on a patch, time to end the dive
> > down the rabbit hole!
>
> Yes, I did a partial revert of the problematic spots in r337882.
>
> I will redo with a better approach tomorrow.
>
> Sorry for the trouble and your .cshrc getting clobbered.
>
>
> Regards,
> Brad Davis
> ___
> 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

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

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018, at 11:34 AM, Rodney W. Grimes wrote:
> > > > > Author: brd
> > > > > Date: Wed Aug 15 16:22:12 2018
> > > > > New Revision: 337857
> > > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > > 
> > > > > Log:
> > > > >   Fix build after r337849
> > > > >   
> > > > >   This moves the symlink creation to after where the files are 
> > > > > installed.
> > > > >   
> > > > >   This also inverts the shell change so that it only happens if 
> > > > > MK_TCSH is on.
> > > > >   
> > > > >   Approved by:will (mentor)
> > > > >   Differential Revision:  https://reviews.freebsd.org/D16725
> > > > > 
> > > > > Modified:
> > > > >   head/bin/csh/Makefile
> > > > >   head/bin/sh/Makefile
> > > > >   head/etc/master.passwd
> > > > > 
> > > > > Modified: head/bin/csh/Makefile
> > > > > ==
> > > > > --- head/bin/csh/Makefile Wed Aug 15 16:16:59 2018
> > > > > (r337856)
> > > > > +++ head/bin/csh/Makefile Wed Aug 15 16:22:12 2018
> > > > > (r337857)
> > > > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > > > >  
> > > > >  LIBADD=  termcapw crypt
> > > > >  
> > > > > -LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh \
> > > > > - /root/.cshrc /.cshrc
> > > > > +LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh
> > > > >  
> > > > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > > > >  
> > > > > @@ -158,7 +157,7 @@ beforeinstall:
> > > > >   rm -f ${DESTDIR}/.cshrc
> > > > >  
> > > > >  afterinstallconfig:
> > > > > - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > > > > + sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > > > >   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > > > >  
> > > > >  .include 
> > > > > 
> > > > > Modified: head/bin/sh/Makefile
> > > > > ==
> > > > > --- head/bin/sh/Makefile  Wed Aug 15 16:16:59 2018
> > > > > (r337856)
> > > > > +++ head/bin/sh/Makefile  Wed Aug 15 16:22:12 2018
> > > > > (r337857)
> > > > > @@ -37,7 +37,6 @@ WFORMAT=0
> > > > >  
> > > > >  CLEANFILES+= mknodes mksyntax
> > > > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > > > -LINKS=   /root/.profile /.profile
> > > > >  
> > > > >  build-tools: mknodes mksyntax
> > > > >  
> > > > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > > > >  
> > > > >  beforeinstall:
> > > > >   rm -f ${DESTDIR}/.profile
> > > > 
> > > > Still unconditionally removing /.profile, but only replacing it
> > > > when installconfig: is run.
> > > 
> > > Yes, working on a separate review for this..
> > > 
> > > > > +
> > > > > +afterinstallconfig:
> > > > > + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile 
> > > > > ${DESTDIR}/.profile
> > > > >  
> > > > >  .include 
> > > > > 
> > > > > Modified: head/etc/master.passwd
> > > > > ==
> > > > > --- head/etc/master.passwdWed Aug 15 16:16:59 2018
> > > > > (r337856)
> > > > > +++ head/etc/master.passwdWed Aug 15 16:22:12 2018
> > > > > (r337857)
> > > > > @@ -1,6 +1,6 @@
> > > > >  # $FreeBSD$
> > > > >  #
> > > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > > 
> > > > I strongly object to this change to master.passwd, and feel it should
> > > > be worked around if in anyway possible.  I have pointed out in the
> > > > review ways to not have to make this change.
> > > 
> > > I opened up the following which addresses some of your feedback:
> > > https://reviews.freebsd.org/D16728
> > 
> > Bleh, can we revert all of this, and take a second look with many more
> > eyes on this.  master.passwd coming from libc makes my head hurt!
> > 
> > Also this is now a patch on a patch on a patch, time to end the dive
> > down the rabbit hole!
> 
> Yes, I did a partial revert of the problematic spots in r337882.

:-(  Partial reverts are a really bad idea, as only you know what
parts of what commit got reverted, and when someone is reading
svn log stuff on a file that you did not revert there is no
revert to the change that went there.. and well.. its a messy can
of worms.

I would encorage you to rethink that as an approach for future work.

> 
> I will redo with a better approach tomorrow.

Please include those people that commented about all the different
little pointy edges in that review.

> 
> Sorry for the trouble and your .cshrc getting clobbered.

Thankfully I isolate build machines, so it only effected one system.

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


Re: svn commit: r337868 - head/stand

2018-08-15 Thread Kyle Evans
https://ci.freebsd.org/job/FreeBSD-head-mips-build/3874/console at least; a
local make -j8 TARGET_ARCH=mips buildworld also failed a while ago

On Wed, Aug 15, 2018, 18:36 Warner Losh  wrote:

> which mips builds? My automated mips and mips64 builds just work...
>
> Warner
>
> On Wed, Aug 15, 2018 at 3:22 PM, Kyle Evans  wrote:
>
>> On Wed, Aug 15, 2018 at 3:31 PM, Warner Losh  wrote:
>> > Author: imp
>> > Date: Wed Aug 15 20:31:11 2018
>> > New Revision: 337868
>> > URL: https://svnweb.freebsd.org/changeset/base/337868
>> >
>> > Log:
>> >   stand: Use -Oz/-Os for all loader/stand builds.
>> >
>> >   While we're not super size constrained, the x86 BIOS /boot/loader has
>> >   to be less than about 520k-530k to be reliable. The LUA loader is at
>> >   this size today. -Oz saves 15-20% on the size, keeping us safely small
>> >   enough (comparable to where we were with the 4th loader). This will
>> >   also help with sjg's work on bringing in bearssl, though we may again
>> >   be looking for space in the LUA loader.
>> >
>> >   Size table for clang 6.0.0:
>> > default -O1 -Os -Oz
>> >   4th   442368  417792  389120  376832
>> >   lua   524288  479232  446464  430080
>> >
>> >   Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64)
>> >   Differential Revision: https://reviews.freebsd.org/D16724
>> >
>>
>> This seems to have frustrated the MIPS build:
>>
>> --- ubldr ---
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>> `block_map':
>> /usr/src/stand/libsa/ufs.c:277: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:277: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>> `buf_read_file':
>> /usr/src/stand/libsa/ufs.c:402: undefined reference to `__ashrdi3'
>> /usr/src/stand/libsa/ufs.c:402: relocation truncated to fit: R_MIPS_26
>> against `__ashrdi3'
>> /usr/src/stand/libsa/ufs.c:403: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:403: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:418: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:418: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>> `buf_write_file':
>> /usr/src/stand/libsa/ufs.c:327: undefined reference to `__ashrdi3'
>> /usr/src/stand/libsa/ufs.c:327: relocation truncated to fit: R_MIPS_26
>> against `__ashrdi3'
>> /usr/src/stand/libsa/ufs.c:328: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:328: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:358: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:358: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:377: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:377: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>> `read_inode':
>> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
>> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
>> against `__ashldi3'
>>
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o):/usr/src/stand/libsa/ufs.c:638:
>> more undefined references to `__ashldi3' follow
>> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
>> `ufs_open':
>> /usr/src/stand/libsa/ufs.c:638: additional relocation overflows
>> omitted from the output
>>
>
>
___
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: r337868 - head/stand

2018-08-15 Thread Warner Losh
which mips builds? My automated mips and mips64 builds just work...

Warner

On Wed, Aug 15, 2018 at 3:22 PM, Kyle Evans  wrote:

> On Wed, Aug 15, 2018 at 3:31 PM, Warner Losh  wrote:
> > Author: imp
> > Date: Wed Aug 15 20:31:11 2018
> > New Revision: 337868
> > URL: https://svnweb.freebsd.org/changeset/base/337868
> >
> > Log:
> >   stand: Use -Oz/-Os for all loader/stand builds.
> >
> >   While we're not super size constrained, the x86 BIOS /boot/loader has
> >   to be less than about 520k-530k to be reliable. The LUA loader is at
> >   this size today. -Oz saves 15-20% on the size, keeping us safely small
> >   enough (comparable to where we were with the 4th loader). This will
> >   also help with sjg's work on bringing in bearssl, though we may again
> >   be looking for space in the LUA loader.
> >
> >   Size table for clang 6.0.0:
> > default -O1 -Os -Oz
> >   4th   442368  417792  389120  376832
> >   lua   524288  479232  446464  430080
> >
> >   Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64)
> >   Differential Revision: https://reviews.freebsd.org/D16724
> >
>
> This seems to have frustrated the MIPS build:
>
> --- ubldr ---
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
> `block_map':
> /usr/src/stand/libsa/ufs.c:277: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:277: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
> `buf_read_file':
> /usr/src/stand/libsa/ufs.c:402: undefined reference to `__ashrdi3'
> /usr/src/stand/libsa/ufs.c:402: relocation truncated to fit: R_MIPS_26
> against `__ashrdi3'
> /usr/src/stand/libsa/ufs.c:403: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:403: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/src/stand/libsa/ufs.c:418: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:418: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
> `buf_write_file':
> /usr/src/stand/libsa/ufs.c:327: undefined reference to `__ashrdi3'
> /usr/src/stand/libsa/ufs.c:327: relocation truncated to fit: R_MIPS_26
> against `__ashrdi3'
> /usr/src/stand/libsa/ufs.c:328: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:328: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/src/stand/libsa/ufs.c:358: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:358: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/src/stand/libsa/ufs.c:377: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:377: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
> `read_inode':
> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
> /usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
> against `__ashldi3'
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o):/
> usr/src/stand/libsa/ufs.c:638:
> more undefined references to `__ashldi3' follow
> /usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
> `ufs_open':
> /usr/src/stand/libsa/ufs.c:638: additional relocation overflows
> omitted from the output
>
___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Brad Davis
On Wed, Aug 15, 2018, at 11:34 AM, Rodney W. Grimes wrote:
> > > > Author: brd
> > > > Date: Wed Aug 15 16:22:12 2018
> > > > New Revision: 337857
> > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > 
> > > > Log:
> > > >   Fix build after r337849
> > > >   
> > > >   This moves the symlink creation to after where the files are 
> > > > installed.
> > > >   
> > > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > > is on.
> > > >   
> > > >   Approved by:  will (mentor)
> > > >   Differential Revision:https://reviews.freebsd.org/D16725
> > > > 
> > > > Modified:
> > > >   head/bin/csh/Makefile
> > > >   head/bin/sh/Makefile
> > > >   head/etc/master.passwd
> > > > 
> > > > Modified: head/bin/csh/Makefile
> > > > ==
> > > > --- head/bin/csh/Makefile   Wed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/bin/csh/Makefile   Wed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > > >  
> > > >  LIBADD=termcapw crypt
> > > >  
> > > > -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
> > > > -   /root/.cshrc /.cshrc
> > > > +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
> > > >  
> > > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > > >  
> > > > @@ -158,7 +157,7 @@ beforeinstall:
> > > > rm -f ${DESTDIR}/.cshrc
> > > >  
> > > >  afterinstallconfig:
> > > > -   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > > > +   sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > > > pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > > >  
> > > >  .include 
> > > > 
> > > > Modified: head/bin/sh/Makefile
> > > > ==
> > > > --- head/bin/sh/MakefileWed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/bin/sh/MakefileWed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -37,7 +37,6 @@ WFORMAT=0
> > > >  
> > > >  CLEANFILES+= mknodes mksyntax
> > > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > > -LINKS= /root/.profile /.profile
> > > >  
> > > >  build-tools: mknodes mksyntax
> > > >  
> > > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > > >  
> > > >  beforeinstall:
> > > > rm -f ${DESTDIR}/.profile
> > > 
> > > Still unconditionally removing /.profile, but only replacing it
> > > when installconfig: is run.
> > 
> > Yes, working on a separate review for this..
> > 
> > > > +
> > > > +afterinstallconfig:
> > > > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile 
> > > > ${DESTDIR}/.profile
> > > >  
> > > >  .include 
> > > > 
> > > > Modified: head/etc/master.passwd
> > > > ==
> > > > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -1,6 +1,6 @@
> > > >  # $FreeBSD$
> > > >  #
> > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > 
> > > I strongly object to this change to master.passwd, and feel it should
> > > be worked around if in anyway possible.  I have pointed out in the
> > > review ways to not have to make this change.
> > 
> > I opened up the following which addresses some of your feedback:
> > https://reviews.freebsd.org/D16728
> 
> Bleh, can we revert all of this, and take a second look with many more
> eyes on this.  master.passwd coming from libc makes my head hurt!
> 
> Also this is now a patch on a patch on a patch, time to end the dive
> down the rabbit hole!

Yes, I did a partial revert of the problematic spots in r337882.

I will redo with a better approach tomorrow.

Sorry for the trouble and your .cshrc getting clobbered.


Regards,
Brad Davis
___
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: r337882 - in head: bin/csh bin/sh etc etc/root

2018-08-15 Thread Brad Davis
Author: brd
Date: Wed Aug 15 23:18:34 2018
New Revision: 337882
URL: https://svnweb.freebsd.org/changeset/base/337882

Log:
  Revert parts of r337849 and r337857
  
  This fixes the build and I will redo these changes as part of a future review
  that organizes them differently.  The way I tried to do it here could be done
  better.  Sorry for the noise.
  
  Approved by:  will (mentor)
  Differential Revision:https://reviews.freebsd.org/D16737

Added:
  head/etc/root/dot.cshrc
 - copied unchanged from r337881, head/bin/csh/dot.cshrc
  head/etc/root/dot.profile
 - copied unchanged from r337881, head/bin/sh/dot.profile
Deleted:
  head/bin/csh/dot.cshrc
  head/bin/sh/dot.profile
Modified:
  head/bin/csh/Makefile
  head/bin/sh/Makefile
  head/etc/Makefile
  head/etc/master.passwd

Modified: head/bin/csh/Makefile
==
--- head/bin/csh/Makefile   Wed Aug 15 22:40:09 2018(r337881)
+++ head/bin/csh/Makefile   Wed Aug 15 23:18:34 2018(r337882)
@@ -8,11 +8,8 @@
 
 .include 
 
-CONFGROUPS=ETC ROOT
+CONFGROUPS=ETC
 ETC=   csh.cshrc csh.login csh.logout
-ROOT=  dot.cshrc
-ROOTDIR=   /root
-ROOTNAME=  .cshrc
 PACKAGE=runtime
 TCSHDIR= ${SRCTOP}/contrib/tcsh
 .PATH: ${TCSHDIR}
@@ -152,12 +149,5 @@ 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}
-
-beforeinstall:
-   rm -f ${DESTDIR}/.cshrc
-
-afterinstallconfig:
-   sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
-   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
 
 .include 

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Aug 15 22:40:09 2018(r337881)
+++ head/bin/sh/MakefileWed Aug 15 23:18:34 2018(r337882)
@@ -3,9 +3,7 @@
 
 .include 
 
-CONFS= dot.profile profile
-CONFSDIR_dot.profile=  /root
-CONFSNAME_dot.profile= .profile
+CONFS= profile
 PACKAGE=runtime
 PROG=  sh
 INSTALLFLAGS= -S
@@ -62,11 +60,5 @@ token.h: mktokens
 
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
-
-beforeinstall:
-   rm -f ${DESTDIR}/.profile
-
-afterinstallconfig:
-   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
 
 .include 

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed Aug 15 22:40:09 2018(r337881)
+++ head/etc/Makefile   Wed Aug 15 23:18:34 2018(r337882)
@@ -135,6 +135,10 @@ distribution:
${DESTDIR}/etc/services;
 .endif
 
+.if ${MK_TCSH} == "no"
+   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
+.endif
+   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"; \
@@ -171,6 +175,18 @@ distribution:
cd ${.CURDIR}/root; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.k5login ${DESTDIR}/root/.k5login;
+.endif
+   cd ${.CURDIR}/root; \
+   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+   dot.profile ${DESTDIR}/root/.profile; \
+   rm -f ${DESTDIR}/.profile; \
+   ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+.if ${MK_TCSH} != "no"
+   cd ${.CURDIR}/root; \
+   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+   dot.cshrc ${DESTDIR}/root/.cshrc; \
+   rm -f ${DESTDIR}/.cshrc; \
+   ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
 .endif
 
 .if ${MK_MAIL} != "no"

Modified: head/etc/master.passwd
==
--- head/etc/master.passwd  Wed Aug 15 22:40:09 2018(r337881)
+++ head/etc/master.passwd  Wed Aug 15 23:18:34 2018(r337882)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 #
-root::0:0::0:0:Charlie &:/root:/bin/sh
+root::0:0::0:0:Charlie &:/root:/bin/csh
 toor:*:0:0::0:0:Bourne-again Superuser:/root:
 daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
 operator:*:2:5::0:0:System &:/:/usr/sbin/nologin

Copied: head/etc/root/dot.cshrc (from r337881, head/bin/csh/dot.cshrc)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/root/dot.cshrc Wed Aug 15 23:18:34 2018(r337882, copy 
of r337881, head/bin/csh/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

Re: svn commit: r337878 - head/stand/i386/libi386

2018-08-15 Thread Warner Losh
On Wed, Aug 15, 2018 at 4:28 PM, Ian Lepore  wrote:

> On Wed, 2018-08-15 at 22:25 +, Toomas Soome wrote:
> > Author: tsoome
> > Date: Wed Aug 15 22:25:05 2018
> > New Revision: 337878
> > URL: https://svnweb.freebsd.org/changeset/base/337878
> >
> > Log:
> >   libi386: remove bd_read() and bd_write() wrappers
> >
> >   Those wroappers are nice, but do not really add much value.
> >
> > Modified:
> >   head/stand/i386/libi386/biosdisk.c
> >
> > Modified: head/stand/i386/libi386/biosdisk.c
> > =
> > =
> > --- head/stand/i386/libi386/biosdisk.cWed Aug 15 21:47:03
> > 2018  (r337877)
> > +++ head/stand/i386/libi386/biosdisk.cWed Aug 15 22:25:05
> > 2018  (r337878)
> > @@ -94,10 +94,7 @@ static int nbdinfo = 0;
> >
> >  static void bd_io_workaround(struct disk_devdesc *dev);
> >
> > -static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
> > -caddr_t dest);
> > -static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int
> > blks,
> > -caddr_t dest);
> > +static int bd_io(struct disk_devdesc *, daddr_t, int, caddr_t, int);
> >  static int bd_int13probe(struct bdinfo *bd);
> >
> >  static int bd_init(void);
> > @@ -506,7 +503,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t
> > dblk, s
> >   case F_READ:
> >   DEBUG("read %d from %lld to %p", blks, dblk, buf);
> >
> > - if (blks && (rc = bd_read(dev, dblk, blks, buf))) {
> > + if (blks && (rc = bd_io(dev, dblk, blks, buf, 0))) {
> >   /* Filter out floppy controller errors */
> >   if (BD(dev).bd_flags != BD_FLOPPY || rc !=
> > 0x20) {
> >   printf("read %d from %lld to %p,
> > error: 0x%x\n",
> > @@ -518,7 +515,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t
> > dblk, s
> >   case F_WRITE :
> >   DEBUG("write %d from %lld to %p", blks, dblk, buf);
> >
> > - if (blks && bd_write(dev, dblk, blks, buf)) {
> > + if (blks && bd_io(dev, dblk, blks, buf, 1)) {
> >   DEBUG("write error");
> >   return (EIO);
> >   }
> > @@ -713,20 +710,6 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk,
> > int blks
> >   }
> >
> >   return (0);
> > -}
> > -
> > -static int
> > -bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t
> > dest)
> > -{
> > -
> > - return (bd_io(dev, dblk, blks, dest, 0));
> > -}
> > -
> > -static int
> > -bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t
> > dest)
> > -{
> > -
> > - return (bd_io(dev, dblk, blks, dest, 1));
> >  }
> >
> >  /*
> >
>
> This would be a more satisfying change if there were something like
>
>  #define BD_RD 0
>  #define BD_WR 1
>
> so that it was clear at a glance what a bd_io() call is doing.
>

I think that's a good idea...

Warner
___
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: r337881 - head/stand/i386/libi386

2018-08-15 Thread Ian Lepore
On Wed, 2018-08-15 at 22:40 +, Toomas Soome wrote:
> Author: tsoome
> Date: Wed Aug 15 22:40:09 2018
> New Revision: 337881
> URL: https://svnweb.freebsd.org/changeset/base/337881
> 
> Log:
>   libi386: use BD_RD and BR_WR constants
>   
>   Use BD_RD and BD_WR instead of 0 and 1.
>   
>   Reported by:ian
> 

Thanks, that makes the code much clearer.

-- 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"


svn commit: r337881 - head/stand/i386/libi386

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 15 22:40:09 2018
New Revision: 337881
URL: https://svnweb.freebsd.org/changeset/base/337881

Log:
  libi386: use BD_RD and BR_WR constants
  
  Use BD_RD and BD_WR instead of 0 and 1.
  
  Reported by:  ian

Modified:
  head/stand/i386/libi386/biosdisk.c

Modified: head/stand/i386/libi386/biosdisk.c
==
--- head/stand/i386/libi386/biosdisk.c  Wed Aug 15 22:32:55 2018
(r337880)
+++ head/stand/i386/libi386/biosdisk.c  Wed Aug 15 22:40:09 2018
(r337881)
@@ -91,6 +91,8 @@ static struct bdinfo
 static int nbdinfo = 0;
 
 #defineBD(dev) (bdinfo[(dev)->dd.d_unit])
+#defineBD_RD   0
+#defineBD_WR   1
 
 static void bd_io_workaround(struct disk_devdesc *dev);
 
@@ -503,7 +505,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
case F_READ:
DEBUG("read %d from %lld to %p", blks, dblk, buf);
 
-   if (blks && (rc = bd_io(dev, dblk, blks, buf, 0))) {
+   if (blks && (rc = bd_io(dev, dblk, blks, buf, BD_RD))) {
/* Filter out floppy controller errors */
if (BD(dev).bd_flags != BD_FLOPPY || rc != 0x20) {
printf("read %d from %lld to %p, error: 0x%x\n",
@@ -515,7 +517,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
case F_WRITE :
DEBUG("write %d from %lld to %p", blks, dblk, buf);
 
-   if (blks && bd_io(dev, dblk, blks, buf, 1)) {
+   if (blks && bd_io(dev, dblk, blks, buf, BD_WR)) {
DEBUG("write error");
return (EIO);
}
@@ -544,7 +546,7 @@ bd_edd_io(struct disk_devdesc *dev, daddr_t dblk, int 
v86.ctl = V86_FLAGS;
v86.addr = 0x13;
/* Should we Write with verify ?? 0x4302 ? */
-   if (dowrite)
+   if (dowrite == BD_WR)
v86.eax = 0x4300;
else
v86.eax = 0x4200;
@@ -580,7 +582,7 @@ bd_chs_io(struct disk_devdesc *dev, daddr_t dblk, int 
 
v86.ctl = V86_FLAGS;
v86.addr = 0x13;
-   if (dowrite)
+   if (dowrite == BD_WR)
v86.eax = 0x300 | blks;
else
v86.eax = 0x200 | blks;
@@ -668,7 +670,7 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
 * Put your Data In, Put your Data out,
 * Put your Data In, and shake it all about 
 */
-   if (dowrite && bbuf != NULL)
+   if (dowrite == BD_WR && bbuf != NULL)
bcopy(p, bbuf, x * BD(dev).bd_sectorsize);
 
/*
@@ -693,7 +695,7 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
break;
}
 
-   if (dowrite)
+   if (dowrite == BD_WR)
DEBUG("Write %d sector(s) from %p (0x%x) to %lld %s", x,
p, VTOP(p), dblk, result ? "failed" : "ok");
else
@@ -702,7 +704,7 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
if (result) {
return (result);
}
-   if (!dowrite && bbuf != NULL)
+   if (dowrite == BD_RD && bbuf != NULL)
bcopy(bbuf, p, x * BD(dev).bd_sectorsize);
p += (x * BD(dev).bd_sectorsize);
dblk += x;
___
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: r337878 - head/stand/i386/libi386

2018-08-15 Thread Ian Lepore
On Wed, 2018-08-15 at 22:25 +, Toomas Soome wrote:
> Author: tsoome
> Date: Wed Aug 15 22:25:05 2018
> New Revision: 337878
> URL: https://svnweb.freebsd.org/changeset/base/337878
> 
> Log:
>   libi386: remove bd_read() and bd_write() wrappers
>   
>   Those wroappers are nice, but do not really add much value.
> 
> Modified:
>   head/stand/i386/libi386/biosdisk.c
> 
> Modified: head/stand/i386/libi386/biosdisk.c
> =
> =
> --- head/stand/i386/libi386/biosdisk.cWed Aug 15 21:47:03
> 2018  (r337877)
> +++ head/stand/i386/libi386/biosdisk.cWed Aug 15 22:25:05
> 2018  (r337878)
> @@ -94,10 +94,7 @@ static int nbdinfo = 0;
>  
>  static void bd_io_workaround(struct disk_devdesc *dev);
>  
> -static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
> -caddr_t dest);
> -static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int
> blks,
> -caddr_t dest);
> +static int bd_io(struct disk_devdesc *, daddr_t, int, caddr_t, int);
>  static int bd_int13probe(struct bdinfo *bd);
>  
>  static int bd_init(void);
> @@ -506,7 +503,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t
> dblk, s
>   case F_READ:
>   DEBUG("read %d from %lld to %p", blks, dblk, buf);
>  
> - if (blks && (rc = bd_read(dev, dblk, blks, buf))) {
> + if (blks && (rc = bd_io(dev, dblk, blks, buf, 0))) {
>   /* Filter out floppy controller errors */
>   if (BD(dev).bd_flags != BD_FLOPPY || rc !=
> 0x20) {
>   printf("read %d from %lld to %p,
> error: 0x%x\n",
> @@ -518,7 +515,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t
> dblk, s
>   case F_WRITE :
>   DEBUG("write %d from %lld to %p", blks, dblk, buf);
>  
> - if (blks && bd_write(dev, dblk, blks, buf)) {
> + if (blks && bd_io(dev, dblk, blks, buf, 1)) {
>   DEBUG("write error");
>   return (EIO);
>   }
> @@ -713,20 +710,6 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk,
> int blks
>   }
>  
>   return (0);
> -}
> -
> -static int
> -bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t
> dest)
> -{
> -
> - return (bd_io(dev, dblk, blks, dest, 0));
> -}
> -
> -static int
> -bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t
> dest)
> -{
> -
> - return (bd_io(dev, dblk, blks, dest, 1));
>  }
>  
>  /*
> 

This would be a more satisfying change if there were something like

 #define BD_RD 0
 #define BD_WR 1

so that it was clear at a glance what a bd_io() call is doing.

-- 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"


svn commit: r337878 - head/stand/i386/libi386

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 15 22:25:05 2018
New Revision: 337878
URL: https://svnweb.freebsd.org/changeset/base/337878

Log:
  libi386: remove bd_read() and bd_write() wrappers
  
  Those wroappers are nice, but do not really add much value.

Modified:
  head/stand/i386/libi386/biosdisk.c

Modified: head/stand/i386/libi386/biosdisk.c
==
--- head/stand/i386/libi386/biosdisk.c  Wed Aug 15 21:47:03 2018
(r337877)
+++ head/stand/i386/libi386/biosdisk.c  Wed Aug 15 22:25:05 2018
(r337878)
@@ -94,10 +94,7 @@ static int nbdinfo = 0;
 
 static void bd_io_workaround(struct disk_devdesc *dev);
 
-static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
-caddr_t dest);
-static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks,
-caddr_t dest);
+static int bd_io(struct disk_devdesc *, daddr_t, int, caddr_t, int);
 static int bd_int13probe(struct bdinfo *bd);
 
 static int bd_init(void);
@@ -506,7 +503,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
case F_READ:
DEBUG("read %d from %lld to %p", blks, dblk, buf);
 
-   if (blks && (rc = bd_read(dev, dblk, blks, buf))) {
+   if (blks && (rc = bd_io(dev, dblk, blks, buf, 0))) {
/* Filter out floppy controller errors */
if (BD(dev).bd_flags != BD_FLOPPY || rc != 0x20) {
printf("read %d from %lld to %p, error: 0x%x\n",
@@ -518,7 +515,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
case F_WRITE :
DEBUG("write %d from %lld to %p", blks, dblk, buf);
 
-   if (blks && bd_write(dev, dblk, blks, buf)) {
+   if (blks && bd_io(dev, dblk, blks, buf, 1)) {
DEBUG("write error");
return (EIO);
}
@@ -713,20 +710,6 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
}
 
return (0);
-}
-
-static int
-bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest)
-{
-
-   return (bd_io(dev, dblk, blks, dest, 0));
-}
-
-static int
-bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest)
-{
-
-   return (bd_io(dev, dblk, blks, dest, 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: r337877 - head/sys/modules/dtb/am335x

2018-08-15 Thread Emmanuel Vadot
Author: manu
Date: Wed Aug 15 21:47:03 2018
New Revision: 337877
URL: https://svnweb.freebsd.org/changeset/base/337877

Log:
  am335x: Add pocketbeagle DTS to the build
  
  U-Boot works for this board since 2018.07 and the DTS is now present
  in the tree.

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

Modified: head/sys/modules/dtb/am335x/Makefile
==
--- head/sys/modules/dtb/am335x/MakefileWed Aug 15 21:38:44 2018
(r337876)
+++ head/sys/modules/dtb/am335x/MakefileWed Aug 15 21:47:03 2018
(r337877)
@@ -7,6 +7,7 @@ DTS=\
am335x-bonegreen.dts \
am335x-bonegreen-wireless.dts \
am335x-boneblue.dts \
+   am335x-pocketbeagle.dts \
ufw.dts
 
 .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: r337874 - head/stand/libsa/zfs

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 15 21:38:06 2018
New Revision: 337874
URL: https://svnweb.freebsd.org/changeset/base/337874

Log:
  libsa: zfs_probe() needs to set spa to NULL
  
  Silence the warning about possibly uninitialized use of spa.

Modified:
  head/stand/libsa/zfs/zfs.c

Modified: head/stand/libsa/zfs/zfs.c
==
--- head/stand/libsa/zfs/zfs.c  Wed Aug 15 21:24:05 2018(r337873)
+++ head/stand/libsa/zfs/zfs.c  Wed Aug 15 21:38:06 2018(r337874)
@@ -467,6 +467,7 @@ zfs_probe(int fd, uint64_t *pool_guid)
spa_t *spa;
int ret;
 
+   spa = NULL;
ret = vdev_probe(vdev_read, (void *)(uintptr_t)fd, );
if (ret == 0 && pool_guid != NULL)
*pool_guid = spa->spa_guid;
___
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: r337873 - in head/sys/dev/cxgbe: . tom

2018-08-15 Thread Navdeep Parhar
Author: np
Date: Wed Aug 15 21:24:05 2018
New Revision: 337873
URL: https://svnweb.freebsd.org/changeset/base/337873

Log:
  cxgbe(4): Use VLAN_TRUNKDEV instead of private cookie to figure out the
  parent of a VLAN ifnet.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/tom/t4_connect.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hWed Aug 15 21:21:16 2018
(r337872)
+++ head/sys/dev/cxgbe/adapter.hWed Aug 15 21:24:05 2018
(r337873)
@@ -194,8 +194,6 @@ struct vi_info {
uint16_t rss_size;  /* size of VI's RSS table slice */
uint16_t rss_base;  /* start of VI's RSS table slice */
 
-   eventhandler_tag vlan_c;
-
int nintr;
int first_intr;
 

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cWed Aug 15 21:21:16 2018
(r337872)
+++ head/sys/dev/cxgbe/t4_main.cWed Aug 15 21:24:05 2018
(r337873)
@@ -544,7 +544,6 @@ static void get_regs(struct adapter *, struct t4_regdu
 static void vi_refresh_stats(struct adapter *, struct vi_info *);
 static void cxgbe_refresh_stats(struct adapter *, struct port_info *);
 static void cxgbe_tick(void *);
-static void cxgbe_vlan_config(void *, struct ifnet *, uint16_t);
 static void cxgbe_sysctls(struct port_info *);
 static int sysctl_int_array(SYSCTL_HANDLER_ARGS);
 static int sysctl_bitfield_8b(SYSCTL_HANDLER_ARGS);
@@ -1522,9 +1521,6 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS;
ifp->if_hw_tsomaxsegsize = 65536;
 
-   vi->vlan_c = EVENTHANDLER_REGISTER(vlan_config, cxgbe_vlan_config, ifp,
-   EVENTHANDLER_PRI_ANY);
-
ether_ifattach(ifp, vi->hw_addr);
 #ifdef DEV_NETMAP
if (ifp->if_capabilities & IFCAP_NETMAP)
@@ -1602,9 +1598,6 @@ cxgbe_vi_detach(struct vi_info *vi)
 
ether_ifdetach(ifp);
 
-   if (vi->vlan_c)
-   EVENTHANDLER_DEREGISTER(vlan_config, vi->vlan_c);
-
/* Let detach proceed even if these fail. */
 #ifdef DEV_NETMAP
if (ifp->if_capabilities & IFCAP_NETMAP)
@@ -5459,18 +5452,6 @@ vi_tick(void *arg)
vi_refresh_stats(sc, vi);
 
callout_schedule(>tick, hz);
-}
-
-static void
-cxgbe_vlan_config(void *arg, struct ifnet *ifp, uint16_t vid)
-{
-   struct ifnet *vlan;
-
-   if (arg != ifp || ifp->if_type != IFT_ETHER)
-   return;
-
-   vlan = VLAN_DEVAT(ifp, vid);
-   VLAN_SETCOOKIE(vlan, ifp);
 }
 
 /*

Modified: head/sys/dev/cxgbe/tom/t4_connect.c
==
--- head/sys/dev/cxgbe/tom/t4_connect.c Wed Aug 15 21:21:16 2018
(r337872)
+++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Aug 15 21:24:05 2018
(r337873)
@@ -335,7 +335,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru
if (rt_ifp->if_type == IFT_ETHER)
vi = rt_ifp->if_softc;
else if (rt_ifp->if_type == IFT_L2VLAN) {
-   struct ifnet *ifp = VLAN_COOKIE(rt_ifp);
+   struct ifnet *ifp = VLAN_TRUNKDEV(rt_ifp);
 
vi = ifp->if_softc;
VLAN_TAG(rt_ifp, );
___
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: r337868 - head/stand

2018-08-15 Thread Kyle Evans
On Wed, Aug 15, 2018 at 3:31 PM, Warner Losh  wrote:
> Author: imp
> Date: Wed Aug 15 20:31:11 2018
> New Revision: 337868
> URL: https://svnweb.freebsd.org/changeset/base/337868
>
> Log:
>   stand: Use -Oz/-Os for all loader/stand builds.
>
>   While we're not super size constrained, the x86 BIOS /boot/loader has
>   to be less than about 520k-530k to be reliable. The LUA loader is at
>   this size today. -Oz saves 15-20% on the size, keeping us safely small
>   enough (comparable to where we were with the 4th loader). This will
>   also help with sjg's work on bringing in bearssl, though we may again
>   be looking for space in the LUA loader.
>
>   Size table for clang 6.0.0:
> default -O1 -Os -Oz
>   4th   442368  417792  389120  376832
>   lua   524288  479232  446464  430080
>
>   Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64)
>   Differential Revision: https://reviews.freebsd.org/D16724
>

This seems to have frustrated the MIPS build:

--- ubldr ---
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function `block_map':
/usr/src/stand/libsa/ufs.c:277: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:277: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
`buf_read_file':
/usr/src/stand/libsa/ufs.c:402: undefined reference to `__ashrdi3'
/usr/src/stand/libsa/ufs.c:402: relocation truncated to fit: R_MIPS_26
against `__ashrdi3'
/usr/src/stand/libsa/ufs.c:403: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:403: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/src/stand/libsa/ufs.c:418: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:418: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function
`buf_write_file':
/usr/src/stand/libsa/ufs.c:327: undefined reference to `__ashrdi3'
/usr/src/stand/libsa/ufs.c:327: relocation truncated to fit: R_MIPS_26
against `__ashrdi3'
/usr/src/stand/libsa/ufs.c:328: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:328: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/src/stand/libsa/ufs.c:358: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:358: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/src/stand/libsa/ufs.c:377: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:377: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function `read_inode':
/usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/src/stand/libsa/ufs.c:166: undefined reference to `__ashldi3'
/usr/src/stand/libsa/ufs.c:166: relocation truncated to fit: R_MIPS_26
against `__ashldi3'
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o):/usr/src/stand/libsa/ufs.c:638:
more undefined references to `__ashldi3' follow
/usr/obj/usr/src/mips.mips/stand/libsa/libsa.a(ufs.o): In function `ufs_open':
/usr/src/stand/libsa/ufs.c:638: additional relocation overflows
omitted from the output
___
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: r337872 - head/stand/i386/libi386

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 15 21:21:16 2018
New Revision: 337872
URL: https://svnweb.freebsd.org/changeset/base/337872

Log:
  libi386: remove BD_SUPPORT_FRAGS
  
  BD_SUPPORT_FRAGS is preprocessor knob to allow partial reads in 
bioscd/biosdisk
  level. However, we already have support for partial reads in bcache, and there
  is no need to have duplication via preprocessor controls.
  
  Note that bioscd/biosdisk interface is assumed to perform IO in 512B blocks,
  so the only translation we have to do is 512 <-> native block size.
  
  Differential Revision:https://reviews.freebsd.org/D16600

Modified:
  head/stand/i386/libi386/bioscd.c
  head/stand/i386/libi386/biosdisk.c

Modified: head/stand/i386/libi386/bioscd.c
==
--- head/stand/i386/libi386/bioscd.cWed Aug 15 21:13:10 2018
(r337871)
+++ head/stand/i386/libi386/bioscd.cWed Aug 15 21:21:16 2018
(r337872)
@@ -258,15 +258,9 @@ bc_realstrategy(void *devdata, int rw, daddr_t dblk, s
struct i386_devdesc *dev;
int unit;
int blks;
-#ifdef BD_SUPPORT_FRAGS
-   char fragbuf[BIOSCD_SECSIZE];
-   size_t fragsize;
 
-   fragsize = size % BIOSCD_SECSIZE;
-#else
if (size % BIOSCD_SECSIZE)
return (EINVAL);
-#endif
 
if ((rw & F_MASK) != F_READ)
return(EROFS);
@@ -290,20 +284,6 @@ bc_realstrategy(void *devdata, int rw, daddr_t dblk, s
return (0);
}
}
-#ifdef BD_SUPPORT_FRAGS
-   DEBUG("frag read %d from %lld+%d to %p", 
-   fragsize, dblk, blks, buf + (blks * BIOSCD_SECSIZE));
-   if (fragsize && bc_read(unit, dblk + blks, 1, fragbuf) != 1) {
-   if (blks) {
-   if (rsize)
-   *rsize = blks * BIOSCD_SECSIZE;
-   return (0);
-   }
-   DEBUG("frag read error");
-   return(EIO);
-   }
-   bcopy(fragbuf, buf + (blks * BIOSCD_SECSIZE), fragsize);
-#endif 
if (rsize)
*rsize = size;
return (0);

Modified: head/stand/i386/libi386/biosdisk.c
==
--- head/stand/i386/libi386/biosdisk.c  Wed Aug 15 21:13:10 2018
(r337871)
+++ head/stand/i386/libi386/biosdisk.c  Wed Aug 15 21:21:16 2018
(r337872)
@@ -451,17 +451,11 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
struct disk_devdesc *dev = (struct disk_devdesc *)devdata;
uint64_tdisk_blocks;
int blks, rc;
-#ifdef BD_SUPPORT_FRAGS /* XXX: sector size */
-   charfragbuf[BIOSDISK_SECSIZE];
-   size_t  fragsize;
 
-   fragsize = size % BIOSDISK_SECSIZE;
-#else
if (size % BD(dev).bd_sectorsize) {
panic("bd_strategy: %d bytes I/O not multiple of block size",
size);
}
-#endif
 
DEBUG("open_disk %p", dev);
 
@@ -520,15 +514,6 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
}
return (EIO);
}
-#ifdef BD_SUPPORT_FRAGS /* XXX: sector size */
-   DEBUG("bd_strategy: frag read %d from %d+%d to %p",
-   fragsize, dblk, blks, buf + (blks * BIOSDISK_SECSIZE));
-   if (fragsize && bd_read(od, dblk + blks, 1, fragsize)) {
-   DEBUG("frag read error");
-   return (EIO);
-   }
-   bcopy(fragbuf, buf + (blks * BIOSDISK_SECSIZE), fragsize);
-#endif
break;
case F_WRITE :
DEBUG("write %d from %lld to %p", blks, dblk, buf);
@@ -537,12 +522,6 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s
DEBUG("write error");
return (EIO);
}
-#ifdef BD_SUPPORT_FRAGS
-   if (fragsize) {
-   DEBUG("Attempted to write a frag");
-   return (EIO);
-   }
-#endif
break;
default:
/* DO NOTHING */
___
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: r337871 - head/stand/libsa

2018-08-15 Thread Kyle Evans
Author: kevans
Date: Wed Aug 15 21:13:10 2018
New Revision: 337871
URL: https://svnweb.freebsd.org/changeset/base/337871

Log:
  pkgfs_init: Initialize pkg
  
  new_package may not set *pp if it errors out, leaving pkg uninitialized.
  
  Reported by:  GCC

Modified:
  head/stand/libsa/pkgfs.c

Modified: head/stand/libsa/pkgfs.c
==
--- head/stand/libsa/pkgfs.cWed Aug 15 21:01:57 2018(r337870)
+++ head/stand/libsa/pkgfs.cWed Aug 15 21:13:10 2018(r337871)
@@ -163,6 +163,7 @@ pkgfs_init(const char *pkgname, struct fs_ops *proto)
struct package *pkg;
int error, fd;
 
+   pkg = NULL;
if (proto != _fsops)
pkgfs_cleanup();
 
___
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: r337870 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-15 Thread Alexander Motin
Author: mav
Date: Wed Aug 15 21:01:57 2018
New Revision: 337870
URL: https://svnweb.freebsd.org/changeset/base/337870

Log:
  Fix mismerge in r337196.
  
  ZoL did the same mistake, and fixed it with separate commit 863522b1f9:
  
  dsl_scan_scrub_cb: don't double-account non-embedded blocks
  
  We were doing count_block() twice inside this function, once
  unconditionally at the beginning (intended to catch the embedded block
  case) and once near the end after processing the block.
  
  The double-accounting caused the "zpool scrub" progress statistics in
  "zpool status" to climb from 0% to 200% instead of 0% to 100%, and
  showed double the I/O rate it was actually seeing.
  
  This was apparently a regression introduced in commit 00c405b4b5e8,
  which was an incorrect port of this OpenZFS commit:
  
  https://github.com/openzfs/openzfs/commit/d8a447a7
  
  Reviewed by: Thomas Caputi 
  Reviewed by: Matt Ahrens 
  Reviewed-by: Brian Behlendorf 
  Reviewed-by: George Melikov 
  Signed-off-by: Steven Noonan 
  Closes #7720
  Closes #7738
  
  Reported by:  sef

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c  Wed Aug 
15 20:50:38 2018(r337869)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c  Wed Aug 
15 21:01:57 2018(r337870)
@@ -3555,12 +3555,12 @@ dsl_scan_scrub_cb(dsl_pool_t *dp,
boolean_t needs_io;
int zio_flags = ZIO_FLAG_SCAN_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL;
int d;
-   
-   count_block(scn, dp->dp_blkstats, bp);
 
if (phys_birth <= scn->scn_phys.scn_min_txg ||
-   phys_birth >= scn->scn_phys.scn_max_txg)
+   phys_birth >= scn->scn_phys.scn_max_txg) {
+   count_block(scn, dp->dp_blkstats, bp);
return (0);
+   }
 
/* Embedded BP's have phys_birth==0, so we reject them above. */
ASSERT(!BP_IS_EMBEDDED(bp));
___
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: r337869 - head/bin/dd

2018-08-15 Thread Kyle Evans
Author: kevans
Date: Wed Aug 15 20:50:38 2018
New Revision: 337869
URL: https://svnweb.freebsd.org/changeset/base/337869

Log:
  dd(1): Kill off duplicate progress definition following r337865
  
  Reported by:  mmacy

Modified:
  head/bin/dd/extern.h

Modified: head/bin/dd/extern.h
==
--- head/bin/dd/extern.hWed Aug 15 20:31:11 2018(r337868)
+++ head/bin/dd/extern.hWed Aug 15 20:50:38 2018(r337869)
@@ -47,7 +47,6 @@ void pos_out(void);
 double secs_elapsed(void);
 void progress(void);
 void summary(void);
-void progress(void);
 void sigalarm_handler(int);
 void siginfo_handler(int);
 void terminate(int);
___
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: r337868 - head/stand

2018-08-15 Thread Warner Losh
Author: imp
Date: Wed Aug 15 20:31:11 2018
New Revision: 337868
URL: https://svnweb.freebsd.org/changeset/base/337868

Log:
  stand: Use -Oz/-Os for all loader/stand builds.
  
  While we're not super size constrained, the x86 BIOS /boot/loader has
  to be less than about 520k-530k to be reliable. The LUA loader is at
  this size today. -Oz saves 15-20% on the size, keeping us safely small
  enough (comparable to where we were with the 4th loader). This will
  also help with sjg's work on bringing in bearssl, though we may again
  be looking for space in the LUA loader.
  
  Size table for clang 6.0.0:
default -O1 -Os -Oz
  4th   442368  417792  389120  376832
  lua   524288  479232  446464  430080
  
  Tested by: kevans91@ (ubldr on armv7), dhw@ (loader on amdy64)
  Differential Revision: https://reviews.freebsd.org/D16724

Modified:
  head/stand/defs.mk

Modified: head/stand/defs.mk
==
--- head/stand/defs.mk  Wed Aug 15 20:23:17 2018(r337867)
+++ head/stand/defs.mk  Wed Aug 15 20:31:11 2018(r337868)
@@ -53,7 +53,12 @@ CFLAGS+= -I${SASRC} -D_STANDALONE
 CFLAGS+=   -I${SYSDIR}
 # Spike the floating point interfaces
 CFLAGS+=   -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface
-
+# Slim down the image. This saves about 15% in size with clang 6 on x86
+# Our most constrained /boot/loader env is BIOS booting on x86, where
+# our text + data + BTX have to fit into 640k below the ISA hole.
+# Experience has shown that problems arise between ~520k to ~530k.
+CFLAGS.clang+= -Oz
+CFLAGS.gcc+=   -Os
 
 # GELI Support, with backward compat hooks (mostly)
 .if defined(LOADER_NO_GELI_SUPPORT)
___
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: r337867 - head/usr.sbin/jail

2018-08-15 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 15 20:23:17 2018
New Revision: 337867
URL: https://svnweb.freebsd.org/changeset/base/337867

Log:
  Don't let clobber jailparam values when checking for modification of
  init-only parameters.
  
  Compare string parameter values with strncmp, not memcmp.
  
  PR:   230487
  Reported by:  Jason Mader
  MFC after:3 days

Modified:
  head/usr.sbin/jail/jail.c

Modified: head/usr.sbin/jail/jail.c
==
--- head/usr.sbin/jail/jail.c   Wed Aug 15 20:23:08 2018(r337866)
+++ head/usr.sbin/jail/jail.c   Wed Aug 15 20:23:17 2018(r337867)
@@ -803,8 +803,10 @@ rdtun_params(struct cfjail *j, int dofail)
exit(1);
}
for (jp = j->jp; jp < j->jp + j->njp; jp++)
-   if (JP_RDTUN(jp) && strcmp(jp->jp_name, "jid"))
+   if (JP_RDTUN(jp) && strcmp(jp->jp_name, "jid")) {
*++rtjp = *jp;
+   rtjp->jp_value = NULL;
+   }
rval = 0;
if (jailparam_get(rtparams, nrt,
bool_param(j->intparams[IP_ALLOW_DYING]) ? JAIL_DYING : 0) > 0) {
@@ -815,8 +817,11 @@ rdtun_params(struct cfjail *j, int dofail)
jp->jp_valuelen == 0 &&
*(int *)jp->jp_value) &&
!(rtjp->jp_valuelen == jp->jp_valuelen &&
-   !memcmp(rtjp->jp_value, jp->jp_value,
-   jp->jp_valuelen))) {
+   !((jp->jp_ctltype & CTLTYPE) ==
+   CTLTYPE_STRING ? strncmp(rtjp->jp_value,
+   jp->jp_value, jp->jp_valuelen) :
+   memcmp(rtjp->jp_value, jp->jp_value,
+   jp->jp_valuelen {
if (dofail) {
jail_warnx(j, "%s cannot be "
"changed after creation",
___
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: r337866 - in head/sys: net netinet netinet6

2018-08-15 Thread Matt Macy
Author: mmacy
Date: Wed Aug 15 20:23:08 2018
New Revision: 337866
URL: https://svnweb.freebsd.org/changeset/base/337866

Log:
  Fix in6_multi double free
  
  This is actually several different bugs:
  - The code is not designed to handle inpcb deletion after interface deletion
- add reference for inpcb membership
  - The multicast address has to be removed from interface lists when the 
refcount
goes to zero OR when the interface goes away
- decouple list disconnect from refcount (v6 only for now)
  - ifmultiaddr can exist past being on interface lists
- add flag for tracking whether or not it's enqueued
  - deferring freeing moptions makes the incpb cleanup code simpler but opens 
the
door wider still to races
- call inp_gcmoptions synchronously after dropping the the inpcb lock
  
  Fundamentally multicast needs a rewrite - but keep applying band-aids for now.
  
  Tested by: kp
  Reported by: novel, kp, lwhsu

Modified:
  head/sys/net/if.c
  head/sys/net/if_var.h
  head/sys/netinet/in_mcast.c
  head/sys/netinet/in_pcb.c
  head/sys/netinet/ip_carp.c
  head/sys/netinet6/in6_ifattach.c
  head/sys/netinet6/in6_mcast.c
  head/sys/netinet6/in6_var.h
  head/sys/netinet6/mld6.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Wed Aug 15 19:46:13 2018(r337865)
+++ head/sys/net/if.c   Wed Aug 15 20:23:08 2018(r337866)
@@ -3545,6 +3545,7 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa,
error = ENOMEM;
goto free_llsa_out;
}
+   ll_ifma->ifma_flags |= IFMA_F_ENQUEUED;
CK_STAILQ_INSERT_HEAD(>if_multiaddrs, ll_ifma,
ifma_link);
} else
@@ -3557,6 +3558,7 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa,
 * referenced link layer address.  Add the primary address to the
 * ifnet address list.
 */
+   ifma->ifma_flags |= IFMA_F_ENQUEUED;
CK_STAILQ_INSERT_HEAD(>if_multiaddrs, ifma, ifma_link);
 
if (retifma != NULL)
@@ -3757,9 +3759,10 @@ if_delmulti_locked(struct ifnet *ifp, struct ifmultiad
if (--ifma->ifma_refcount > 0)
return 0;
 
-   if (ifp != NULL && detaching == 0)
+   if (ifp != NULL && detaching == 0 && (ifma->ifma_flags & 
IFMA_F_ENQUEUED)) {
CK_STAILQ_REMOVE(>if_multiaddrs, ifma, ifmultiaddr, 
ifma_link);
-
+   ifma->ifma_flags &= ~IFMA_F_ENQUEUED;
+   }
/*
 * If this ifma is a network-layer ifma, a link-layer ifma may
 * have been associated with it. Release it first if so.
@@ -3772,8 +3775,11 @@ if_delmulti_locked(struct ifnet *ifp, struct ifmultiad
ll_ifma->ifma_ifp = NULL;   /* XXX */
if (--ll_ifma->ifma_refcount == 0) {
if (ifp != NULL) {
-   CK_STAILQ_REMOVE(>if_multiaddrs, ll_ifma, 
ifmultiaddr,
-   ifma_link);
+   if (ll_ifma->ifma_flags & IFMA_F_ENQUEUED) {
+   CK_STAILQ_REMOVE(>if_multiaddrs, 
ll_ifma, ifmultiaddr,
+   ifma_link);
+   ifma->ifma_flags &= ~IFMA_F_ENQUEUED;
+   }
}
if_freemulti(ll_ifma);
}

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Wed Aug 15 19:46:13 2018(r337865)
+++ head/sys/net/if_var.h   Wed Aug 15 20:23:08 2018(r337866)
@@ -548,12 +548,14 @@ void  ifa_ref(struct ifaddr *ifa);
  * Multicast address structure.  This is analogous to the ifaddr
  * structure except that it keeps track of multicast addresses.
  */
+#define IFMA_F_ENQUEUED0x1
 struct ifmultiaddr {
CK_STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */
struct  sockaddr *ifma_addr;/* address this membership is for */
struct  sockaddr *ifma_lladdr;  /* link-layer translation, if any */
struct  ifnet *ifma_ifp;/* back-pointer to interface */
u_int   ifma_refcount;  /* reference count */
+   int ifma_flags;
void*ifma_protospec;/* protocol-specific state, if any */
struct  ifmultiaddr *ifma_llifma; /* pointer to ifma for ifma_lladdr */
struct  epoch_context   ifma_epoch_ctx;

Modified: head/sys/netinet/in_mcast.c
==
--- head/sys/netinet/in_mcast.c Wed Aug 15 19:46:13 2018(r337865)
+++ head/sys/netinet/in_mcast.c Wed Aug 15 20:23:08 2018(r337866)
@@ -263,7 +263,10 @@ inm_disconnect(struct 

svn commit: r337865 - head/bin/dd

2018-08-15 Thread Kyle Evans
Author: kevans
Date: Wed Aug 15 19:46:13 2018
New Revision: 337865
URL: https://svnweb.freebsd.org/changeset/base/337865

Log:
  dd: Incorporate some changes from imp for status=progress
  
  Notable changes from what landed in r337505:
  - sigalarm handler isn't setup unless we're actually using it
  - Humanized versions of the amount of data transferred in the progress
update
  
  Submitted by: imp
  Reviewed by:  kevans
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D16642

Modified:
  head/bin/dd/Makefile
  head/bin/dd/dd.c
  head/bin/dd/extern.h
  head/bin/dd/misc.c
  head/bin/dd/position.c

Modified: head/bin/dd/Makefile
==
--- head/bin/dd/MakefileWed Aug 15 19:28:48 2018(r337864)
+++ head/bin/dd/MakefileWed Aug 15 19:46:13 2018(r337865)
@@ -6,6 +6,7 @@
 PACKAGE=runtime
 PROG=  dd
 SRCS=  args.c conv.c conv_tab.c dd.c misc.c position.c
+LIBADD= util
 
 #
 # Test the character conversion functions.  We have to be explicit about

Modified: head/bin/dd/dd.c
==
--- head/bin/dd/dd.cWed Aug 15 19:28:48 2018(r337864)
+++ head/bin/dd/dd.cWed Aug 15 19:46:13 2018(r337865)
@@ -95,6 +95,8 @@ volatile sig_atomic_t need_progress;
 int
 main(int argc __unused, char *argv[])
 {
+   struct itimerval itv = { { 1, 0 }, { 1, 0 } }; /* SIGALARM every 
second, if needed */
+
(void)setlocale(LC_CTYPE, "");
jcl(argv);
setup();
@@ -104,7 +106,10 @@ main(int argc __unused, char *argv[])
err(1, "unable to enter capability mode");
 
(void)signal(SIGINFO, siginfo_handler);
-   (void)signal(SIGALRM, sigalrm_handler);
+   if (ddflags & C_PROGRESS) {
+   (void)signal(SIGALRM, sigalarm_handler);
+   setitimer(ITIMER_REAL, , NULL);
+   }
(void)signal(SIGINT, terminate);
 
atexit(summary);
@@ -284,14 +289,6 @@ setup(void)
ctab = casetab;
}
 
-   if ((ddflags & C_PROGRESS)) {
-   struct itimerval timer = {
-   .it_interval = { .tv_sec = 1, .tv_usec = 0 },
-   .it_value = { .tv_sec = 1, .tv_usec = 0 },
-   };
-   setitimer(ITIMER_REAL, , NULL);
-   }
-
if (clock_gettime(CLOCK_MONOTONIC, ))
err(1, "clock_gettime");
 }
@@ -469,12 +466,10 @@ dd_in(void)
 
in.dbp += in.dbrcnt;
(*cfunc)();
-   if (need_summary) {
+   if (need_summary)
summary();
-   }
-   if (need_progress) {
+   if (need_progress)
progress();
-   }
}
 }
 

Modified: head/bin/dd/extern.h
==
--- head/bin/dd/extern.hWed Aug 15 19:28:48 2018(r337864)
+++ head/bin/dd/extern.hWed Aug 15 19:46:13 2018(r337865)
@@ -45,10 +45,11 @@ void jcl(char **);
 void pos_in(void);
 void pos_out(void);
 double secs_elapsed(void);
+void progress(void);
 void summary(void);
 void progress(void);
+void sigalarm_handler(int);
 void siginfo_handler(int);
-void sigalrm_handler(int);
 void terminate(int);
 void unblock(void);
 void unblock_close(void);

Modified: head/bin/dd/misc.c
==
--- head/bin/dd/misc.c  Wed Aug 15 19:28:48 2018(r337864)
+++ head/bin/dd/misc.c  Wed Aug 15 19:46:13 2018(r337865)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -56,8 +57,6 @@ __FBSDID("$FreeBSD$");
 #include "dd.h"
 #include "extern.h"
 
-static int need_newline;
-
 double
 secs_elapsed(void)
 {
@@ -85,7 +84,7 @@ summary(void)
if (ddflags & C_NOINFO)
return;
 
-   if (need_newline && !need_summary)
+   if (ddflags & C_PROGRESS)
fprintf(stderr, "\n");
 
secs = secs_elapsed();
@@ -110,22 +109,25 @@ summary(void)
 void
 progress(void)
 {
+   static int outlen;
+   char si[4 + 1 + 2 + 1]; /* 123   NUL */
+   char iec[4 + 1 + 2 + 1];/* 123   NUL */
+   char persec[4 + 1 + 2 + 1]; /* 123   NUL */
+   char *buf;
double secs;
-   static int lastlen;
-   int len;
 
secs = secs_elapsed();
-   len = fprintf(stderr,
-   "\r%ju bytes transferred in %.0f secs (%.0f bytes/sec)",
-   st.bytes, secs, st.bytes / secs);
-
-   if (len > 0) {
-   if (len < lastlen)
-   (void)fprintf(stderr, "%*s", len - lastlen, "");
-   lastlen = len;
-   }
-
-   need_newline = 1;
+   humanize_number(si, sizeof(si), (int64_t)st.bytes, "B", HN_AUTOSCALE,
+  

Re: svn commit: r337624 - in head: etc sbin/sysctl

2018-08-15 Thread John Baldwin
On 8/11/18 2:28 PM, Brad Davis wrote:
> Author: brd
> Date: Sat Aug 11 13:28:03 2018
> New Revision: 337624
> URL: https://svnweb.freebsd.org/changeset/base/337624
> 
> Log:
>   Move sysctl.conf to sbin/sysctl/ and switch to CONFS.
>   
>   This helps with pkgbase to tag this config file as a config file.
>   
>   Approved by:allanjude (mentor), will (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D16559

This one is kind of odd because sysctl itself doesn't natively use it,
instead /etc/rc.d/sysctl does.

-- 
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"


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

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018 at 10:31:04AM -0700, Rodney W. Grimes wrote:
> > > On Wed, Aug 15, 2018, at 11:17 AM, Ravi Pokala wrote:
> > > > Brad,
> > > > 
> > > > -Original Message-
> > > > From:  on behalf of Brad Davis 
> > > > 
> > > > Date: 2018-08-15, Wednesday at 09:22
> > > > To: , ,  > > > h...@freebsd.org>
> > > > Subject: svn commit: r337857 - in head: bin/csh bin/sh etc
> > > > 
> > > > > Author: brd
> > > > > Date: Wed Aug 15 16:22:12 2018
> > > > > New Revision: 337857
> > > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > > 
> > > > > Log:
> > > > >   Fix build after r337849
> > > > >   
> > > > >   This moves the symlink creation to after where the files are 
> > > > > installed.
> > > > >   
> > > > >   This also inverts the shell change so that it only happens if 
> > > > > MK_TCSH is on.
> > > > ...
> > > > > Modified: head/etc/master.passwd
> > > > > ==
> > > > > --- head/etc/master.passwdWed Aug 15 16:16:59 2018
> > > > > (r337856)
> > > > > +++ head/etc/master.passwdWed Aug 15 16:22:12 2018
> > > > > (r337857)
> > > > > @@ -1,6 +1,6 @@
> > > > >  # $FreeBSD$
> > > > >  #
> > > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > > >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> > > > >  daemon:*:1:1::0:0:Owner of many system 
> > > > > processes:/root:/usr/sbin/nologin
> > > > >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
> > > > 
> > > > Woah! Changing the root shell wasn't mentioned in the change 
> > > > description, has nothing to do with fixing r337849, and is a *HUGE* 
> > > > POLA 
> > > > violation. At the very least, a change of this magnitude needs public 
> > > > discussion, and even if the community agreed, it would also require an 
> > > > UPDATING message and relnote.
> > > > 
> > > > Please revert this change to master.passwd immediately.
> > > 
> > > Hi Ravi,
> > > 
> > > Please, look closer.  It doesn't change what is actually installed in 
> > > either case, it just inverts the logic.
> > 
> > Though the end results maybe the same, we now have a sed that
> > is running in the normal case, is not run in the exception case,
> > a src file that must be editted to match the distribution file,
> > etc.  I can not express stronly enough how much I object to this.
> > 
> > I have explained in your diffential that this should actually be
> > put back as far as inverted, and that actually bin/csh/Makefile
> > nor bin/sh/Makefile should never even touch etc/master.password,
> > simply the wrong place to be doing it.   This should be in what
> > ever Makefile installs /etc/master.password an no place else.
> 
> As a side observation, this kind of editing at build time can break
> -DNO_ROOT.  See PR 209718 for a different example of the same problem.
> I haven't yet verified that this change has the same issue; my apologies
> if I'm missing something and there is no problem after all.
> 

I do not believe that there are any edits at build time here,
these are in install: type targets, or should be.   None the less,
there could be -DNO_ROOT issues I am not thinking of, as well as
half a dozen other issues.  My concern is we are now at a patch to
a patch to a patch, and that tells me the initial change was not
well thought out and it would probably be best to back out and
rethink the whole thing.

Does anyone have issue with reverting and starting back with
the original differential, fixing it to DTRT ?

-- 
Rod Grimes rgri...@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: r337864 - head

2018-08-15 Thread Kyle Evans
Author: kevans
Date: Wed Aug 15 19:28:48 2018
New Revision: 337864
URL: https://svnweb.freebsd.org/changeset/base/337864

Log:
  Add post-mortem note to UPDATING about r337506
  
  MFC after:3 days

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Wed Aug 15 18:35:42 2018(r337863)
+++ head/UPDATING   Wed Aug 15 19:28:48 2018(r337864)
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20180815:
+   ls(1) now respects the COLORTERM environment variable used in other
+   systems and software to indicate that a colored terminal is both
+   supported and desired.  If ls(1) is suddenly emitting colors, they may
+   be disabled again by removing the unwanted COLORTERM from your
+   environment.  The ls(1) specific CLICOLOR may not be observed in a
+   future release.
+
 20180808:
The default pager for most commands has been changed to "less".  To
restore the old behavior, set PAGER="more" and MANPAGER="more -s" in
___
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: r337849 - in head: bin/csh bin/sh etc etc/root [This broke ci.freebsd.org 's FreeBSD-head-*-build 's that have built since then]

2018-08-15 Thread Mark Millard via svn-src-head
On Wed, Aug 15, 2018, at 9:21 AM, Mark Millard wrote:
>> For example:
>> 
>> https://lists.freebsd.org/pipermail/svn-src-head/2018-August/117572.html
>> (-r337849 based) shows:
>> 
>> install -N /usr/src/etc -l h -o root -g wheel -m 555  /usr/obj/usr/src/
>> sparc64.sparc64/release/dist/base/root/.profile /usr/obj/usr/src/
>> sparc64.sparc64/release/dist/base/.profile
>> install: link /usr/obj/usr/src/sparc64.sparc64/release/dist/base/
>> root/.profile -> /usr/obj/usr/src/sparc64.sparc64/release/dist/
>> base/.profile: No such file or directory
>> *** Error code 71
> 
> Yes, I get the CI emails too :)
> 
> Working on it.

Okay. Sorry for the noise.

I learned something from the attempted fix
and what happened . . .

The fix in -r337857 allowed riscv64 to work but not the others,
the difference being a bin/csh "(installconfig)" for riscv64
but not the others vs. a bin/csh "(distribute)"  in the others
but not riscv64. riscv64 has no "(distribute)" in its log
and the others had no "(installconfig)".

riscv64:

===> bin/csh (installconfig)
installing DIRS ETCDIR
install -U -M /workspace/dest//METALOG -D /workspace/dest -T package=runtime -d 
-m 0755 -o root  -g wheel  /workspace/dest/etc
install -U -M /workspace/dest//METALOG -D /workspace/dest -T 
package=runtime,config -C -o root  -g wheel -m 644  
/workspace/src/bin/csh/csh.cshrc /workspace/dest/etc/csh.cshrc
install -U -M /workspace/dest//METALOG -D /workspace/dest -T 
package=runtime,config -C -o root  -g wheel -m 644  
/workspace/src/bin/csh/csh.login /workspace/dest/etc/csh.login
install -U -M /workspace/dest//METALOG -D /workspace/dest -T 
package=runtime,config -C -o root  -g wheel -m 644  
/workspace/src/bin/csh/csh.logout /workspace/dest/etc/csh.logout
installing DIRS ROOTDIR
install -U -M /workspace/dest//METALOG -D /workspace/dest -T package=runtime -d 
-m 0755 -o root  -g wheel  /workspace/dest/root
install -U -M /workspace/dest//METALOG -D /workspace/dest -T 
package=runtime,config -C -o root  -g wheel -m 644  
/workspace/src/bin/csh/dot.cshrc /workspace/dest/root/.cshrc
sed -i "" -e 's;/bin/sh;/bin/csh;' /workspace/dest/etc/master.passwd
pwd_mkdb -i -p -d /workspace/dest/etc /workspace/dest/etc/master.passwd


sparc64 (as an example):

===> bin/csh (distribute)
cd /usr/src/bin/csh;  make -DDB_FROM_SRC __MAKE_CONF=/dev/null 
SRCCONF=/dev/null install installconfig -DNO_SUBDIR 
DESTDIR=/usr/obj/usr/src/sparc64.sparc64/release/dist/base SHARED=copies
rm -f /usr/obj/usr/src/sparc64.sparc64/release/dist/base/.cshrc
install -N /usr/src/etc  -s -o root -g wheel -m 555   csh 
/usr/obj/usr/src/sparc64.sparc64/release/dist/base/bin/csh
. . .
install -N /usr/src/etc  -C -o root  -g wheel -m 644  
/usr/src/bin/csh/dot.cshrc 
/usr/obj/usr/src/sparc64.sparc64/release/dist/base/root/.cshrc
sed -i "" -e 's;/bin/sh;/bin/csh;' 
/usr/obj/usr/src/sparc64.sparc64/release/dist/base/etc/master.passwd
sed: /usr/obj/usr/src/sparc64.sparc64/release/dist/base/etc/master.passwd: No 
such file or directory
*** Error code 1

Stop.
make[7]: stopped in /usr/src/bin/csh
*** Error code 1






===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
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: r337863 - in head: sys/sys usr.sbin/jail

2018-08-15 Thread Alexander Leidinger
Author: netchild
Date: Wed Aug 15 18:35:42 2018
New Revision: 337863
URL: https://svnweb.freebsd.org/changeset/base/337863

Log:
  - Add exec hook "exec.created". This is called when the jail is
created and before exec.start is called.[1]
  - Bump __FreeBSD_version.
  
  This allows to attach ZFS datasets and various other things to be
  done before any command/service/rc-script is started in the new
  jail.
  
  PR:   228066  [1]
  Reviewed by:  jamie   [1]
  Submitted by: Stefan Grönke[1]
  Differential Revision:https://reviews.freebsd.org/D15330  [1]

Modified:
  head/sys/sys/param.h
  head/usr.sbin/jail/command.c
  head/usr.sbin/jail/config.c
  head/usr.sbin/jail/jail.8
  head/usr.sbin/jail/jail.c
  head/usr.sbin/jail/jailp.h

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hWed Aug 15 18:19:45 2018(r337862)
+++ head/sys/sys/param.hWed Aug 15 18:35:42 2018(r337863)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1200077  /* Master, propagated to newvers */
+#define __FreeBSD_version 1200078  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

Modified: head/usr.sbin/jail/command.c
==
--- head/usr.sbin/jail/command.cWed Aug 15 18:19:45 2018
(r337862)
+++ head/usr.sbin/jail/command.cWed Aug 15 18:35:42 2018
(r337863)
@@ -147,8 +147,8 @@ next_command(struct cfjail *j)
}
if (j->comstring == NULL || j->comstring->len == 0 ||
(create_failed && (comparam == IP_EXEC_PRESTART ||
-   comparam == IP_EXEC_START || comparam == IP_COMMAND ||
-   comparam == IP_EXEC_POSTSTART)))
+   comparam == IP_EXEC_CREATED || comparam == IP_EXEC_START ||
+   comparam == IP_COMMAND || comparam == IP_EXEC_POSTSTART)))
continue;
switch (run_command(j)) {
case -1:

Modified: head/usr.sbin/jail/config.c
==
--- head/usr.sbin/jail/config.c Wed Aug 15 18:19:45 2018(r337862)
+++ head/usr.sbin/jail/config.c Wed Aug 15 18:35:42 2018(r337863)
@@ -73,6 +73,7 @@ static const struct ipspec intparams[] = {
 [IP_EXEC_POSTSTOP] =   {"exec.poststop",   PF_INTERNAL},
 [IP_EXEC_PRESTART] =   {"exec.prestart",   PF_INTERNAL},
 [IP_EXEC_PRESTOP] ={"exec.prestop",PF_INTERNAL},
+[IP_EXEC_CREATED] ={"exec.created",PF_INTERNAL},
 [IP_EXEC_START] =  {"exec.start",  PF_INTERNAL},
 [IP_EXEC_STOP] =   {"exec.stop",   PF_INTERNAL},
 [IP_EXEC_SYSTEM_JAIL_USER]={"exec.system_jail_user",

Modified: head/usr.sbin/jail/jail.8
==
--- head/usr.sbin/jail/jail.8   Wed Aug 15 18:19:45 2018(r337862)
+++ head/usr.sbin/jail/jail.8   Wed Aug 15 18:35:42 2018(r337863)
@@ -706,6 +706,9 @@ The pseudo-parameters are:
 .Bl -tag -width indent
 .It Va exec.prestart
 Command(s) to run in the system environment before a jail is created.
+.It Va exec.created
+Command(s) to run in the system environment right after a jail has been
+created, but before commands (or services) get executed in the jail.
 .It Va exec.start
 Command(s) to run in the jail environment when a jail is created.
 A typical command to run is

Modified: head/usr.sbin/jail/jail.c
==
--- head/usr.sbin/jail/jail.c   Wed Aug 15 18:19:45 2018(r337862)
+++ head/usr.sbin/jail/jail.c   Wed Aug 15 18:35:42 2018(r337863)
@@ -98,6 +98,7 @@ static const enum intparam startcommands[] = {
 IP_MOUNT_PROCFS,
 IP_EXEC_PRESTART,
 IP__OP,
+IP_EXEC_CREATED,
 IP_VNET_INTERFACE,
 IP_EXEC_START,
 IP_COMMAND,

Modified: head/usr.sbin/jail/jailp.h
==
--- head/usr.sbin/jail/jailp.h  Wed Aug 15 18:19:45 2018(r337862)
+++ head/usr.sbin/jail/jailp.h  Wed Aug 15 18:35:42 2018(r337863)
@@ -88,6 +88,7 @@ enum intparam {
IP_EXEC_POSTSTOP,   /* Commands run outside jail after removing */
IP_EXEC_PRESTART,   /* Commands run outside jail before creating */
IP_EXEC_PRESTOP,/* Commands run outside jail before removing */
+   IP_EXEC_CREATED,/* Commands run outside jail right after it was 
started */

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

2018-08-15 Thread Mark Johnston
On Wed, Aug 15, 2018 at 10:31:04AM -0700, Rodney W. Grimes wrote:
> > On Wed, Aug 15, 2018, at 11:17 AM, Ravi Pokala wrote:
> > > Brad,
> > > 
> > > -Original Message-
> > > From:  on behalf of Brad Davis 
> > > 
> > > Date: 2018-08-15, Wednesday at 09:22
> > > To: , ,  > > h...@freebsd.org>
> > > Subject: svn commit: r337857 - in head: bin/csh bin/sh etc
> > > 
> > > > Author: brd
> > > > Date: Wed Aug 15 16:22:12 2018
> > > > New Revision: 337857
> > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > 
> > > > Log:
> > > >   Fix build after r337849
> > > >   
> > > >   This moves the symlink creation to after where the files are 
> > > > installed.
> > > >   
> > > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > > is on.
> > > ...
> > > > Modified: head/etc/master.passwd
> > > > ==
> > > > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -1,6 +1,6 @@
> > > >  # $FreeBSD$
> > > >  #
> > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> > > >  daemon:*:1:1::0:0:Owner of many system 
> > > > processes:/root:/usr/sbin/nologin
> > > >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
> > > 
> > > Woah! Changing the root shell wasn't mentioned in the change 
> > > description, has nothing to do with fixing r337849, and is a *HUGE* POLA 
> > > violation. At the very least, a change of this magnitude needs public 
> > > discussion, and even if the community agreed, it would also require an 
> > > UPDATING message and relnote.
> > > 
> > > Please revert this change to master.passwd immediately.
> > 
> > Hi Ravi,
> > 
> > Please, look closer.  It doesn't change what is actually installed in 
> > either case, it just inverts the logic.
> 
> Though the end results maybe the same, we now have a sed that
> is running in the normal case, is not run in the exception case,
> a src file that must be editted to match the distribution file,
> etc.  I can not express stronly enough how much I object to this.
> 
> I have explained in your diffential that this should actually be
> put back as far as inverted, and that actually bin/csh/Makefile
> nor bin/sh/Makefile should never even touch etc/master.password,
> simply the wrong place to be doing it.   This should be in what
> ever Makefile installs /etc/master.password an no place else.

As a side observation, this kind of editing at build time can break
-DNO_ROOT.  See PR 209718 for a different example of the same problem.
I haven't yet verified that this change has the same issue; my apologies
if I'm missing something and there is no problem after all.
___
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: r337862 - in head/usr.bin/indent: . tests

2018-08-15 Thread Piotr Pawel Stefaniak
Author: pstef
Date: Wed Aug 15 18:19:45 2018
New Revision: 337862
URL: https://svnweb.freebsd.org/changeset/base/337862

Log:
  indent(1): bug fix after r336333
  
  The bug was that isalnum() is not exactly equivalent to previous code which
  also allowed characters "$" and "_", so check for those explicitly.
  
  Reported by:  tuexen@

Modified:
  head/usr.bin/indent/lexi.c
  head/usr.bin/indent/tests/float.0
  head/usr.bin/indent/tests/float.0.stdout

Modified: head/usr.bin/indent/lexi.c
==
--- head/usr.bin/indent/lexi.c  Wed Aug 15 17:41:19 2018(r337861)
+++ head/usr.bin/indent/lexi.c  Wed Aug 15 18:19:45 2018(r337862)
@@ -193,6 +193,7 @@ lexi(struct parser_state *state)
 
 /* Scan an alphanumeric token */
 if (isalnum((unsigned char)*buf_ptr) ||
+   *buf_ptr == '_' || *buf_ptr == '$' ||
(buf_ptr[0] == '.' && isdigit((unsigned char)buf_ptr[1]))) {
/*
 * we have a character or number
@@ -222,7 +223,7 @@ lexi(struct parser_state *state)
else
while (isalnum((unsigned char)*buf_ptr) ||
*buf_ptr == BACKSLASH ||
-   *buf_ptr == '_') {
+   *buf_ptr == '_' || *buf_ptr == '$') {
/* fill_buffer() terminates buffer with newline */
if (*buf_ptr == BACKSLASH) {
if (*(buf_ptr + 1) == '\n') {

Modified: head/usr.bin/indent/tests/float.0
==
--- head/usr.bin/indent/tests/float.0   Wed Aug 15 17:41:19 2018
(r337861)
+++ head/usr.bin/indent/tests/float.0   Wed Aug 15 18:19:45 2018
(r337862)
@@ -4,4 +4,5 @@ void t(void) {
double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L};
int z = 0b0101;
DO_NOTHING;
+   x._y = 5;
 }

Modified: head/usr.bin/indent/tests/float.0.stdout
==
--- head/usr.bin/indent/tests/float.0.stdoutWed Aug 15 17:41:19 2018
(r337861)
+++ head/usr.bin/indent/tests/float.0.stdoutWed Aug 15 18:19:45 2018
(r337862)
@@ -6,4 +6,5 @@ t(void)
double  y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L};
int z = 0b0101;
DO_NOTHING;
+   x._y = 5;
 }
___
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: r337861 - head/sys/fs/fuse

2018-08-15 Thread Conrad Meyer
Author: cem
Date: Wed Aug 15 17:41:19 2018
New Revision: 337861
URL: https://svnweb.freebsd.org/changeset/base/337861

Log:
  FUSE: Document global sysctl knobs
  
  So that I don't have to keep grepping around the codebase to remember what 
each
  one does.  And maybe it saves someone else some time.
  
  Fix a trivial whitespace issue while here.
  
  No functional change.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/fs/fuse/fuse_node.c

Modified: head/sys/fs/fuse/fuse_node.c
==
--- head/sys/fs/fuse/fuse_node.cWed Aug 15 16:36:29 2018
(r337860)
+++ head/sys/fs/fuse/fuse_node.cWed Aug 15 17:41:19 2018
(r337861)
@@ -97,37 +97,48 @@ MALLOC_DEFINE(M_FUSEVN, "fuse_vnode", "fuse vnode priv
 static int fuse_node_count = 0;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, node_count, CTLFLAG_RD,
-_node_count, 0, "");
+_node_count, 0, "Count of FUSE vnodes");
 
 intfuse_data_cache_enable = 1;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, data_cache_enable, CTLFLAG_RW,
-_data_cache_enable, 0, "");
+_data_cache_enable, 0,
+"enable caching of FUSE file data (including dirty data)");
 
 intfuse_data_cache_invalidate = 0;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, data_cache_invalidate, CTLFLAG_RW,
-_data_cache_invalidate, 0, "");
+_data_cache_invalidate, 0,
+"If non-zero, discard cached clean file data when there are no active file"
+" users");
 
 intfuse_mmap_enable = 1;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, mmap_enable, CTLFLAG_RW,
-_mmap_enable, 0, "");
+_mmap_enable, 0,
+"If non-zero, and data_cache_enable is also non-zero, enable mmap(2) of "
+"FUSE files");
 
 intfuse_refresh_size = 0;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, refresh_size, CTLFLAG_RW,
-_refresh_size, 0, "");
+_refresh_size, 0,
+"If non-zero, and no dirty file extension data is buffered, fetch file "
+"size before write operations");
 
 intfuse_sync_resize = 1;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, sync_resize, CTLFLAG_RW,
-_sync_resize, 0, "");
+_sync_resize, 0,
+"If a cached write extended a file, inform FUSE filesystem of the changed"
+"size immediately subsequent to the issued writes");
 
 intfuse_fix_broken_io = 0;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, fix_broken_io, CTLFLAG_RW,
-_fix_broken_io, 0, "");
+_fix_broken_io, 0,
+"If non-zero, print a diagnostic warning if a userspace filesystem returns"
+" EIO on reads of recently extended portions of files");
 
 static void
 fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat,
@@ -336,7 +347,7 @@ fuse_vnode_savesize(struct vnode *vp, struct ucred *cr
fsai->valid = 0;
 
/* Truncate to a new value. */
-   fsai->size = fvdat->filesize;
+   fsai->size = fvdat->filesize;
fsai->valid |= FATTR_SIZE;
 
fuse_filehandle_getrw(vp, FUFH_WRONLY, );
___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Rodney W. Grimes
> > > Author: brd
> > > Date: Wed Aug 15 16:22:12 2018
> > > New Revision: 337857
> > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > 
> > > Log:
> > >   Fix build after r337849
> > >   
> > >   This moves the symlink creation to after where the files are installed.
> > >   
> > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > is on.
> > >   
> > >   Approved by:will (mentor)
> > >   Differential Revision:  https://reviews.freebsd.org/D16725
> > > 
> > > Modified:
> > >   head/bin/csh/Makefile
> > >   head/bin/sh/Makefile
> > >   head/etc/master.passwd
> > > 
> > > Modified: head/bin/csh/Makefile
> > > ==
> > > --- head/bin/csh/Makefile Wed Aug 15 16:16:59 2018(r337856)
> > > +++ head/bin/csh/Makefile Wed Aug 15 16:22:12 2018(r337857)
> > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > >  
> > >  LIBADD=  termcapw crypt
> > >  
> > > -LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh \
> > > - /root/.cshrc /.cshrc
> > > +LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh
> > >  
> > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > >  
> > > @@ -158,7 +157,7 @@ beforeinstall:
> > >   rm -f ${DESTDIR}/.cshrc
> > >  
> > >  afterinstallconfig:
> > > - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > > + sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > >   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > >  
> > >  .include 
> > > 
> > > Modified: head/bin/sh/Makefile
> > > ==
> > > --- head/bin/sh/Makefile  Wed Aug 15 16:16:59 2018(r337856)
> > > +++ head/bin/sh/Makefile  Wed Aug 15 16:22:12 2018(r337857)
> > > @@ -37,7 +37,6 @@ WFORMAT=0
> > >  
> > >  CLEANFILES+= mknodes mksyntax
> > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > -LINKS=   /root/.profile /.profile
> > >  
> > >  build-tools: mknodes mksyntax
> > >  
> > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > >  
> > >  beforeinstall:
> > >   rm -f ${DESTDIR}/.profile
> > 
> > Still unconditionally removing /.profile, but only replacing it
> > when installconfig: is run.
> 
> Yes, working on a separate review for this..
> 
> > > +
> > > +afterinstallconfig:
> > > + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
> > >  
> > >  .include 
> > > 
> > > Modified: head/etc/master.passwd
> > > ==
> > > --- head/etc/master.passwdWed Aug 15 16:16:59 2018
> > > (r337856)
> > > +++ head/etc/master.passwdWed Aug 15 16:22:12 2018
> > > (r337857)
> > > @@ -1,6 +1,6 @@
> > >  # $FreeBSD$
> > >  #
> > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > 
> > I strongly object to this change to master.passwd, and feel it should
> > be worked around if in anyway possible.  I have pointed out in the
> > review ways to not have to make this change.
> 
> I opened up the following which addresses some of your feedback:
> https://reviews.freebsd.org/D16728

Bleh, can we revert all of this, and take a second look with many more
eyes on this.  master.passwd coming from libc makes my head hurt!

Also this is now a patch on a patch on a patch, time to end the dive
down the rabbit hole!

> > >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> > >  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
> > >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin

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


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

2018-08-15 Thread Brad Davis



On Wed, Aug 15, 2018, at 11:31 AM, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
> > 
> > 
> > On Wed, Aug 15, 2018, at 10:35 AM, Rodney W. Grimes wrote:
> > > > Author: brd
> > > > Date: Wed Aug 15 16:22:12 2018
> > > > New Revision: 337857
> > > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > > 
> > > > Log:
> > > >   Fix build after r337849
> > > >   
> > > >   This moves the symlink creation to after where the files are 
> > > > installed.
> > > >   
> > > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > > is on.
> > > >   
> > > >   Approved by:  will (mentor)
> > > >   Differential Revision:https://reviews.freebsd.org/D16725
> > > > 
> > > > Modified:
> > > >   head/bin/csh/Makefile
> > > >   head/bin/sh/Makefile
> > > >   head/etc/master.passwd
> > > > 
> > > > Modified: head/bin/csh/Makefile
> > > > ==
> > > > --- head/bin/csh/Makefile   Wed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/bin/csh/Makefile   Wed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > > >  
> > > >  LIBADD=termcapw crypt
> > > >  
> > > > -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
> > > > -   /root/.cshrc /.cshrc
> > > > +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
> > > >  
> > > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > > >  
> > > > @@ -158,7 +157,7 @@ beforeinstall:
> > > > rm -f ${DESTDIR}/.cshrc
> > > >  
> > > >  afterinstallconfig:
> > > > -   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > > > +   sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > > > pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > > >  
> > > >  .include 
> > > > 
> > > > Modified: head/bin/sh/Makefile
> > > > ==
> > > > --- head/bin/sh/MakefileWed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/bin/sh/MakefileWed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -37,7 +37,6 @@ WFORMAT=0
> > > >  
> > > >  CLEANFILES+= mknodes mksyntax
> > > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > > -LINKS= /root/.profile /.profile
> > > >  
> > > >  build-tools: mknodes mksyntax
> > > >  
> > > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > > >  
> > > >  beforeinstall:
> > > > rm -f ${DESTDIR}/.profile
> > > 
> > > Still unconditionally removing /.profile, but only replacing it
> > > when installconfig: is run.
> > 
> > Yes, working on a separate review for this..
> > 
> > > > +
> > > > +afterinstallconfig:
> > > > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile 
> > > > ${DESTDIR}/.profile
> > > >  
> > > >  .include 
> > > > 
> > > > Modified: head/etc/master.passwd
> > > > ==
> > > > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018
> > > > (r337856)
> > > > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018
> > > > (r337857)
> > > > @@ -1,6 +1,6 @@
> > > >  # $FreeBSD$
> > > >  #
> > > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > > 
> > > I strongly object to this change to master.passwd, and feel it should
> > > be worked around if in anyway possible.  I have pointed out in the
> > > review ways to not have to make this change.
> > 
> > I opened up the following which addresses some of your feedback:
> > https://reviews.freebsd.org/D16728
> 
> Actually why not back out this whole set of changes, and come up with
> an agreeable solution, this is a bit of a mess right now.

And here is: https://reviews.freebsd.org/D16729

You where the one asking about repo churn..


Regards,
Brad Davis
___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018, at 11:17 AM, Ravi Pokala wrote:
> > Brad,
> > 
> > -Original Message-
> > From:  on behalf of Brad Davis 
> > 
> > Date: 2018-08-15, Wednesday at 09:22
> > To: , ,  > h...@freebsd.org>
> > Subject: svn commit: r337857 - in head: bin/csh bin/sh etc
> > 
> > > Author: brd
> > > Date: Wed Aug 15 16:22:12 2018
> > > New Revision: 337857
> > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > 
> > > Log:
> > >   Fix build after r337849
> > >   
> > >   This moves the symlink creation to after where the files are installed.
> > >   
> > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > is on.
> > ...
> > > Modified: head/etc/master.passwd
> > > ==
> > > --- head/etc/master.passwdWed Aug 15 16:16:59 2018
> > > (r337856)
> > > +++ head/etc/master.passwdWed Aug 15 16:22:12 2018
> > > (r337857)
> > > @@ -1,6 +1,6 @@
> > >  # $FreeBSD$
> > >  #
> > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> > >  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
> > >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
> > 
> > Woah! Changing the root shell wasn't mentioned in the change 
> > description, has nothing to do with fixing r337849, and is a *HUGE* POLA 
> > violation. At the very least, a change of this magnitude needs public 
> > discussion, and even if the community agreed, it would also require an 
> > UPDATING message and relnote.
> > 
> > Please revert this change to master.passwd immediately.
> 
> Hi Ravi,
> 
> Please, look closer.  It doesn't change what is actually installed in either 
> case, it just inverts the logic.

Though the end results maybe the same, we now have a sed that
is running in the normal case, is not run in the exception case,
a src file that must be editted to match the distribution file,
etc.  I can not express stronly enough how much I object to this.

I have explained in your diffential that this should actually be
put back as far as inverted, and that actually bin/csh/Makefile
nor bin/sh/Makefile should never even touch etc/master.password,
simply the wrong place to be doing it.   This should be in what
ever Makefile installs /etc/master.password an no place else.

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


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

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> 
> 
> On Wed, Aug 15, 2018, at 10:35 AM, Rodney W. Grimes wrote:
> > > Author: brd
> > > Date: Wed Aug 15 16:22:12 2018
> > > New Revision: 337857
> > > URL: https://svnweb.freebsd.org/changeset/base/337857
> > > 
> > > Log:
> > >   Fix build after r337849
> > >   
> > >   This moves the symlink creation to after where the files are installed.
> > >   
> > >   This also inverts the shell change so that it only happens if MK_TCSH 
> > > is on.
> > >   
> > >   Approved by:will (mentor)
> > >   Differential Revision:  https://reviews.freebsd.org/D16725
> > > 
> > > Modified:
> > >   head/bin/csh/Makefile
> > >   head/bin/sh/Makefile
> > >   head/etc/master.passwd
> > > 
> > > Modified: head/bin/csh/Makefile
> > > ==
> > > --- head/bin/csh/Makefile Wed Aug 15 16:16:59 2018(r337856)
> > > +++ head/bin/csh/Makefile Wed Aug 15 16:22:12 2018(r337857)
> > > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> > >  
> > >  LIBADD=  termcapw crypt
> > >  
> > > -LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh \
> > > - /root/.cshrc /.cshrc
> > > +LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh
> > >  
> > >  CLEANFILES= ${GENHDRS} gethost csh.1
> > >  
> > > @@ -158,7 +157,7 @@ beforeinstall:
> > >   rm -f ${DESTDIR}/.cshrc
> > >  
> > >  afterinstallconfig:
> > > - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > > + sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > >   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > >  
> > >  .include 
> > > 
> > > Modified: head/bin/sh/Makefile
> > > ==
> > > --- head/bin/sh/Makefile  Wed Aug 15 16:16:59 2018(r337856)
> > > +++ head/bin/sh/Makefile  Wed Aug 15 16:22:12 2018(r337857)
> > > @@ -37,7 +37,6 @@ WFORMAT=0
> > >  
> > >  CLEANFILES+= mknodes mksyntax
> > >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > > -LINKS=   /root/.profile /.profile
> > >  
> > >  build-tools: mknodes mksyntax
> > >  
> > > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> > >  
> > >  beforeinstall:
> > >   rm -f ${DESTDIR}/.profile
> > 
> > Still unconditionally removing /.profile, but only replacing it
> > when installconfig: is run.
> 
> Yes, working on a separate review for this..
> 
> > > +
> > > +afterinstallconfig:
> > > + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
> > >  
> > >  .include 
> > > 
> > > Modified: head/etc/master.passwd
> > > ==
> > > --- head/etc/master.passwdWed Aug 15 16:16:59 2018
> > > (r337856)
> > > +++ head/etc/master.passwdWed Aug 15 16:22:12 2018
> > > (r337857)
> > > @@ -1,6 +1,6 @@
> > >  # $FreeBSD$
> > >  #
> > > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > > +root::0:0::0:0:Charlie &:/root:/bin/sh
> > 
> > I strongly object to this change to master.passwd, and feel it should
> > be worked around if in anyway possible.  I have pointed out in the
> > review ways to not have to make this change.
> 
> I opened up the following which addresses some of your feedback:
> https://reviews.freebsd.org/D16728

Actually why not back out this whole set of changes, and come up with
an agreeable solution, this is a bit of a mess right now.

> 
> > >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> > >  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
> > >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-08-15 Thread Ravi Pokala
-Original Message-
From:  on behalf of Brad Davis 

Date: 2018-08-15, Wednesday at 10:18
To: Ravi Pokala , , 
, 
Subject: Re: svn commit: r337857 - in head: bin/csh bin/sh etc

> On Wed, Aug 15, 2018, at 11:17 AM, Ravi Pokala wrote:
>> Brad,
>> 
>> -Original Message-
>> From:  on behalf of Brad Davis 
>> 
>> Date: 2018-08-15, Wednesday at 09:22
>> To: , , > h...@freebsd.org>
>> Subject: svn commit: r337857 - in head: bin/csh bin/sh etc
>> 
>>> Author: brd
>>> Date: Wed Aug 15 16:22:12 2018
>>> New Revision: 337857
>>> URL: https://svnweb.freebsd.org/changeset/base/337857
>>> 
>>> Log:
>>>   Fix build after r337849
>>>   
>>>   This moves the symlink creation to after where the files are installed.
>>>   
>>>   This also inverts the shell change so that it only happens if MK_TCSH is 
>>> on.
>> ...
>>> Modified: head/etc/master.passwd
>>> ==
>>> --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018(r337856)
>>> +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018(r337857)
>>> @@ -1,6 +1,6 @@
>>>  # $FreeBSD$
>>>  #
>>> -root::0:0::0:0:Charlie &:/root:/bin/csh
>>> +root::0:0::0:0:Charlie &:/root:/bin/sh
>>>  toor:*:0:0::0:0:Bourne-again Superuser:/root:
>>>  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
>>>  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
>> 
>> Woah! Changing the root shell wasn't mentioned in the change 
>> description, has nothing to do with fixing r337849, and is a *HUGE* POLA 
>> violation. At the very least, a change of this magnitude needs public 
>> discussion, and even if the community agreed, it would also require an 
>> UPDATING message and relnote.
>> 
>> Please revert this change to master.passwd immediately.
> 
> Hi Ravi,
> 
> Please, look closer.  It doesn't change what is actually installed in either 
> case, it just inverts the logic.

This is master.passwd; it doesn't contain any logic, only data. Is there a 
different master.passwd somewhere that's used when MK_TCSH is on?

Oh, I see! bin/csh/Makefile does some `sed'ing. But it's not clear at all why 
you added the (incorrect) `sed'ing in r337849 in the first place. root's shell 
should be /bin/csh in master.passwd, and left alone. Maybe, if *csh* -- not 
*tcsh* -- were disabled, then `sed'ing to make root's shell /bin/sh would make 
sense. But I can't think of any reason master.passwd would start off with 
/bin/sh rather than /bin/csh.

What am I missing?

Thanks,

Ravi

> Regards,
> Brad Davis


___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Brad Davis



On Wed, Aug 15, 2018, at 10:35 AM, Rodney W. Grimes wrote:
> > Author: brd
> > Date: Wed Aug 15 16:22:12 2018
> > New Revision: 337857
> > URL: https://svnweb.freebsd.org/changeset/base/337857
> > 
> > Log:
> >   Fix build after r337849
> >   
> >   This moves the symlink creation to after where the files are installed.
> >   
> >   This also inverts the shell change so that it only happens if MK_TCSH is 
> > on.
> >   
> >   Approved by:  will (mentor)
> >   Differential Revision:https://reviews.freebsd.org/D16725
> > 
> > Modified:
> >   head/bin/csh/Makefile
> >   head/bin/sh/Makefile
> >   head/etc/master.passwd
> > 
> > Modified: head/bin/csh/Makefile
> > ==
> > --- head/bin/csh/Makefile   Wed Aug 15 16:16:59 2018(r337856)
> > +++ head/bin/csh/Makefile   Wed Aug 15 16:22:12 2018(r337857)
> > @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
> >  
> >  LIBADD=termcapw crypt
> >  
> > -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
> > -   /root/.cshrc /.cshrc
> > +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
> >  
> >  CLEANFILES= ${GENHDRS} gethost csh.1
> >  
> > @@ -158,7 +157,7 @@ beforeinstall:
> > rm -f ${DESTDIR}/.cshrc
> >  
> >  afterinstallconfig:
> > -   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > +   sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
> > pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> >  
> >  .include 
> > 
> > Modified: head/bin/sh/Makefile
> > ==
> > --- head/bin/sh/MakefileWed Aug 15 16:16:59 2018(r337856)
> > +++ head/bin/sh/MakefileWed Aug 15 16:22:12 2018(r337857)
> > @@ -37,7 +37,6 @@ WFORMAT=0
> >  
> >  CLEANFILES+= mknodes mksyntax
> >  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> > -LINKS= /root/.profile /.profile
> >  
> >  build-tools: mknodes mksyntax
> >  
> > @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
> >  
> >  beforeinstall:
> > rm -f ${DESTDIR}/.profile
> 
> Still unconditionally removing /.profile, but only replacing it
> when installconfig: is run.

Yes, working on a separate review for this..

> > +
> > +afterinstallconfig:
> > +   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
> >  
> >  .include 
> > 
> > Modified: head/etc/master.passwd
> > ==
> > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018(r337856)
> > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018(r337857)
> > @@ -1,6 +1,6 @@
> >  # $FreeBSD$
> >  #
> > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > +root::0:0::0:0:Charlie &:/root:/bin/sh
> 
> I strongly object to this change to master.passwd, and feel it should
> be worked around if in anyway possible.  I have pointed out in the
> review ways to not have to make this change.

I opened up the following which addresses some of your feedback:
https://reviews.freebsd.org/D16728


> >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> >  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
> >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
> 
> -- 
> Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-08-15 Thread Brad Davis
On Wed, Aug 15, 2018, at 11:17 AM, Ravi Pokala wrote:
> Brad,
> 
> -Original Message-
> From:  on behalf of Brad Davis 
> 
> Date: 2018-08-15, Wednesday at 09:22
> To: , ,  h...@freebsd.org>
> Subject: svn commit: r337857 - in head: bin/csh bin/sh etc
> 
> > Author: brd
> > Date: Wed Aug 15 16:22:12 2018
> > New Revision: 337857
> > URL: https://svnweb.freebsd.org/changeset/base/337857
> > 
> > Log:
> >   Fix build after r337849
> >   
> >   This moves the symlink creation to after where the files are installed.
> >   
> >   This also inverts the shell change so that it only happens if MK_TCSH is 
> > on.
> ...
> > Modified: head/etc/master.passwd
> > ==
> > --- head/etc/master.passwd  Wed Aug 15 16:16:59 2018(r337856)
> > +++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018(r337857)
> > @@ -1,6 +1,6 @@
> >  # $FreeBSD$
> >  #
> > -root::0:0::0:0:Charlie &:/root:/bin/csh
> > +root::0:0::0:0:Charlie &:/root:/bin/sh
> >  toor:*:0:0::0:0:Bourne-again Superuser:/root:
> >  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
> >  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
> 
> Woah! Changing the root shell wasn't mentioned in the change 
> description, has nothing to do with fixing r337849, and is a *HUGE* POLA 
> violation. At the very least, a change of this magnitude needs public 
> discussion, and even if the community agreed, it would also require an 
> UPDATING message and relnote.
> 
> Please revert this change to master.passwd immediately.

Hi Ravi,

Please, look closer.  It doesn't change what is actually installed in either 
case, it just inverts the logic.


Regards,
Brad Davis
___
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: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Ravi Pokala
Brad,

-Original Message-
From:  on behalf of Brad Davis 

Date: 2018-08-15, Wednesday at 09:22
To: , , 

Subject: svn commit: r337857 - in head: bin/csh bin/sh etc

> Author: brd
> Date: Wed Aug 15 16:22:12 2018
> New Revision: 337857
> URL: https://svnweb.freebsd.org/changeset/base/337857
> 
> Log:
>   Fix build after r337849
>   
>   This moves the symlink creation to after where the files are installed.
>   
>   This also inverts the shell change so that it only happens if MK_TCSH is on.
...
> Modified: head/etc/master.passwd
> ==
> --- head/etc/master.passwdWed Aug 15 16:16:59 2018(r337856)
> +++ head/etc/master.passwdWed Aug 15 16:22:12 2018(r337857)
> @@ -1,6 +1,6 @@
>  # $FreeBSD$
>  #
> -root::0:0::0:0:Charlie &:/root:/bin/csh
> +root::0:0::0:0:Charlie &:/root:/bin/sh
>  toor:*:0:0::0:0:Bourne-again Superuser:/root:
>  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
>  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin

Woah! Changing the root shell wasn't mentioned in the change description, has 
nothing to do with fixing r337849, and is a *HUGE* POLA violation. At the very 
least, a change of this magnitude needs public discussion, and even if the 
community agreed, it would also require an UPDATING message and relnote.

Please revert this change to master.passwd immediately.

-Ravi (rpokala@)


___
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: r337860 - head/sys/netpfil/ipfw

2018-08-15 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Aug 15 16:36:29 2018
New Revision: 337860
URL: https://svnweb.freebsd.org/changeset/base/337860

Log:
  Fix a typo in comment.
  
  MFC after:3 days
  X-MFC with:   r321316
  Sponsored by: Rubicon Communications, LLC (Netgate)

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

Modified: head/sys/netpfil/ipfw/ip_dn_io.c
==
--- head/sys/netpfil/ipfw/ip_dn_io.cWed Aug 15 16:34:31 2018
(r337859)
+++ head/sys/netpfil/ipfw/ip_dn_io.cWed Aug 15 16:36:29 2018
(r337860)
@@ -809,7 +809,7 @@ dummynet_send(struct mbuf *m)
ether_demux(m->m_pkthdr.rcvif, m);
break;
 
-   case DIR_OUT | PROTO_LAYER2: /* N_TO_ETH_OUT: */
+   case DIR_OUT | PROTO_LAYER2: /* DN_TO_ETH_OUT: */
ether_output_frame(ifp, m);
break;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-08-15 Thread Rodney W. Grimes
> Author: brd
> Date: Wed Aug 15 16:22:12 2018
> New Revision: 337857
> URL: https://svnweb.freebsd.org/changeset/base/337857
> 
> Log:
>   Fix build after r337849
>   
>   This moves the symlink creation to after where the files are installed.
>   
>   This also inverts the shell change so that it only happens if MK_TCSH is on.
>   
>   Approved by:will (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D16725
> 
> Modified:
>   head/bin/csh/Makefile
>   head/bin/sh/Makefile
>   head/etc/master.passwd
> 
> Modified: head/bin/csh/Makefile
> ==
> --- head/bin/csh/Makefile Wed Aug 15 16:16:59 2018(r337856)
> +++ head/bin/csh/Makefile Wed Aug 15 16:22:12 2018(r337857)
> @@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
>  
>  LIBADD=  termcapw crypt
>  
> -LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh \
> - /root/.cshrc /.cshrc
> +LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh
>  
>  CLEANFILES= ${GENHDRS} gethost csh.1
>  
> @@ -158,7 +157,7 @@ beforeinstall:
>   rm -f ${DESTDIR}/.cshrc
>  
>  afterinstallconfig:
> - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> + sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
>   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
>  
>  .include 
> 
> Modified: head/bin/sh/Makefile
> ==
> --- head/bin/sh/Makefile  Wed Aug 15 16:16:59 2018(r337856)
> +++ head/bin/sh/Makefile  Wed Aug 15 16:22:12 2018(r337857)
> @@ -37,7 +37,6 @@ WFORMAT=0
>  
>  CLEANFILES+= mknodes mksyntax
>  CLEANFILES+= ${GENSRCS} ${GENHDRS}
> -LINKS=   /root/.profile /.profile
>  
>  build-tools: mknodes mksyntax
>  
> @@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
>  
>  beforeinstall:
>   rm -f ${DESTDIR}/.profile

Still unconditionally removing /.profile, but only replacing it
when installconfig: is run.

> +
> +afterinstallconfig:
> + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
>  
>  .include 
> 
> Modified: head/etc/master.passwd
> ==
> --- head/etc/master.passwdWed Aug 15 16:16:59 2018(r337856)
> +++ head/etc/master.passwdWed Aug 15 16:22:12 2018(r337857)
> @@ -1,6 +1,6 @@
>  # $FreeBSD$
>  #
> -root::0:0::0:0:Charlie &:/root:/bin/csh
> +root::0:0::0:0:Charlie &:/root:/bin/sh

I strongly object to this change to master.passwd, and feel it should
be worked around if in anyway possible.  I have pointed out in the
review ways to not have to make this change.

>  toor:*:0:0::0:0:Bourne-again Superuser:/root:
>  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
>  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin

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


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

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: brd
> Date: Wed Aug 15 14:41:24 2018
> New Revision: 337849
> URL: https://svnweb.freebsd.org/changeset/base/337849
> 
> Log:
>   Move all sh and csh files into bin/sh/ or bin/csh/
>   
>   This simplifies pkgbase by migrating these to CONFS so they are properly
>   tagged as config files.

This makes some other changes to the state
of the system beyond just moving these files to work with
installconf.  Someone pointed at some of it, I commented
some on your review, further issues in this reply.  One
issue in review figured out and is a none issue.

>   
>   Approved by:will (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D16708
> 
> Added:
>   head/bin/csh/csh.cshrc
>  - copied unchanged from r337848, head/etc/csh.cshrc
>   head/bin/csh/csh.login
>  - copied unchanged from r337848, head/etc/csh.login
>   head/bin/csh/csh.logout
>  - copied unchanged from r337848, head/etc/csh.logout
>   head/bin/csh/dot.cshrc
>  - copied unchanged from r337848, head/etc/root/dot.cshrc
>   head/bin/csh/dot.login
>  - copied unchanged from r337848, head/etc/root/dot.login
>   head/bin/sh/dot.profile
>  - copied unchanged from r337848, head/etc/root/dot.profile
>   head/bin/sh/profile
>  - copied unchanged from r337848, head/etc/profile
> Deleted:
>   head/etc/csh.cshrc
>   head/etc/csh.login
>   head/etc/csh.logout
>   head/etc/profile
>   head/etc/root/dot.cshrc
>   head/etc/root/dot.login
>   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 15 14:29:04 2018(r337848)
> +++ head/bin/csh/Makefile Wed Aug 15 14:41:24 2018(r337849)
> @@ -8,6 +8,11 @@
>  
>  .include 
>  
> +CONFGROUPS=  ETC ROOT
> +ETC= csh.cshrc csh.login csh.logout
> +ROOT=dot.cshrc
> +ROOTDIR= /root
> +ROOTNAME=.cshrc
>  PACKAGE=runtime
>  TCSHDIR= ${SRCTOP}/contrib/tcsh
>  .PATH: ${TCSHDIR}
> @@ -44,7 +49,8 @@ MLINKS= csh.1 tcsh.1
>  
>  LIBADD=  termcapw crypt
>  
> -LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh
> +LINKS=   ${BINDIR}/csh ${BINDIR}/tcsh \
> + /root/.cshrc /.cshrc
>  
>  CLEANFILES= ${GENHDRS} gethost csh.1
>  
> @@ -147,5 +153,12 @@ 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}
> +
> +beforeinstall:
> + rm -f ${DESTDIR}/.cshrc

This target runs on ANY "install", this just blew away a custom /.cshrc
file and I did not ask this to be done.  Should this be in a target
called beforeinstallconfig:?

> +
> +afterinstallconfig:
> + sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd

Ok, found out
where this comes into play, this is for MK_TCSH knob, which is pushed
up a level in the Makefile above, so this no longer needs if {MK_TCSH}
protection.  Your review already fixes the reversal, so OK now.

Though I think it would be better to leave the edit in the way
it was done before (change csh to sh) in the src/bin/sh/Makefile
iff ${MK_TCSH} == no, this leaving the src/etc/master.passwd file
untouched by these changes.  And ONLY needing the special edit
if someone builds without tcsh.

>  
>  .include 
> 
> Copied: head/bin/csh/csh.cshrc (from r337848, head/etc/csh.cshrc)
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/csh.cshrcWed Aug 15 14:41:24 2018(r337849, copy 
> of r337848, head/etc/csh.cshrc)
> @@ -0,0 +1,3 @@
> +# $FreeBSD$
> +#
> +# System-wide .cshrc file for csh(1).
> 
> Copied: head/bin/csh/csh.login (from r337848, head/etc/csh.login)
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/csh.loginWed Aug 15 14:41:24 2018(r337849, copy 
> of r337848, head/etc/csh.login)
> @@ -0,0 +1,15 @@
> +# $FreeBSD$
> +#
> +# System-wide .login file for csh(1).
> +# Uncomment this to give you the default 4.2 behavior, where disk
> +# information is shown in K-Blocks
> +# setenv BLOCKSIZE   K
> +#
> +# For the setting of languages and character sets please see
> +# login.conf(5) and in particular the charset and lang options.
> +# For full locales list check /usr/share/locale/*
> +#
> +# Check system messages
> +# msgs -q
> +# Allow terminal messages
> +# mesg y
> 
> Copied: head/bin/csh/csh.logout (from r337848, head/etc/csh.logout)
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is 

svn commit: r337857 - in head: bin/csh bin/sh etc

2018-08-15 Thread Brad Davis
Author: brd
Date: Wed Aug 15 16:22:12 2018
New Revision: 337857
URL: https://svnweb.freebsd.org/changeset/base/337857

Log:
  Fix build after r337849
  
  This moves the symlink creation to after where the files are installed.
  
  This also inverts the shell change so that it only happens if MK_TCSH is on.
  
  Approved by:  will (mentor)
  Differential Revision:https://reviews.freebsd.org/D16725

Modified:
  head/bin/csh/Makefile
  head/bin/sh/Makefile
  head/etc/master.passwd

Modified: head/bin/csh/Makefile
==
--- head/bin/csh/Makefile   Wed Aug 15 16:16:59 2018(r337856)
+++ head/bin/csh/Makefile   Wed Aug 15 16:22:12 2018(r337857)
@@ -49,8 +49,7 @@ MLINKS= csh.1 tcsh.1
 
 LIBADD=termcapw crypt
 
-LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
-   /root/.cshrc /.cshrc
+LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
 
 CLEANFILES= ${GENHDRS} gethost csh.1
 
@@ -158,7 +157,7 @@ beforeinstall:
rm -f ${DESTDIR}/.cshrc
 
 afterinstallconfig:
-   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
+   sed -i "" -e 's;/bin/sh;/bin/csh;' ${DESTDIR}/etc/master.passwd
pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
 
 .include 

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Aug 15 16:16:59 2018(r337856)
+++ head/bin/sh/MakefileWed Aug 15 16:22:12 2018(r337857)
@@ -37,7 +37,6 @@ WFORMAT=0
 
 CLEANFILES+= mknodes mksyntax
 CLEANFILES+= ${GENSRCS} ${GENHDRS}
-LINKS= /root/.profile /.profile
 
 build-tools: mknodes mksyntax
 
@@ -66,5 +65,8 @@ SUBDIR.${MK_TESTS}+= tests
 
 beforeinstall:
rm -f ${DESTDIR}/.profile
+
+afterinstallconfig:
+   ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
 
 .include 

Modified: head/etc/master.passwd
==
--- head/etc/master.passwd  Wed Aug 15 16:16:59 2018(r337856)
+++ head/etc/master.passwd  Wed Aug 15 16:22:12 2018(r337857)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 #
-root::0:0::0:0:Charlie &:/root:/bin/csh
+root::0:0::0:0:Charlie &:/root:/bin/sh
 toor:*:0:0::0:0:Bourne-again Superuser:/root:
 daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
 operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
___
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: r337849 - in head: bin/csh bin/sh etc etc/root

2018-08-15 Thread Brad Davis

On Wed, Aug 15, 2018, at 9:27 AM, Oliver Pinter wrote:
> 
> 
> On Wednesday, August 15, 2018, Brad Davis  wrote:
>> Author: brd
>>  Date: Wed Aug 15 14:41:24 2018
>>  New Revision: 337849
>>  URL: https://svnweb.freebsd.org/changeset/base/337849
>>  
>>  Log:
>>    Move all sh and csh files into bin/sh/ or bin/csh/
>>  
>>    This simplifies pkgbase by migrating these to CONFS so they are properly
>>    tagged as config files.
>>  
>>    Approved by:  will (mentor)
>>    Differential Revision:        https://reviews.freebsd.org/D16708
>>  
>>  Added:
>>    head/bin/csh/csh.cshrc
>>       - copied unchanged from r337848, head/etc/csh.cshrc
>>    head/bin/csh/csh.login
>>       - copied unchanged from r337848, head/etc/csh.login
>>    head/bin/csh/csh.logout
>>       - copied unchanged from r337848, head/etc/csh.logout
>>    head/bin/csh/dot.cshrc
>>       - copied unchanged from r337848, head/etc/root/dot.cshrc
>>    head/bin/csh/dot.login
>>       - copied unchanged from r337848, head/etc/root/dot.login
>>    head/bin/sh/dot.profile
>>       - copied unchanged from r337848, head/etc/root/dot.profile
>>    head/bin/sh/profile
>>       - copied unchanged from r337848, head/etc/profile
>>  Deleted:
>>    head/etc/csh.cshrc
>>    head/etc/csh.login
>>    head/etc/csh.logout
>>    head/etc/profile
>>    head/etc/root/dot.cshrc
>>    head/etc/root/dot.login
>>    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 15 14:29:04 2018        (r337848)
>>  +++ head/bin/csh/Makefile       Wed Aug 15 14:41:24 2018        (r337849)
>>  @@ -8,6 +8,11 @@
>>  
>>   .include 
>>  
>>  +CONFGROUPS=    ETC ROOT
>>  +ETC=   csh.cshrc csh.login csh.logout
>>  +ROOT=  dot.cshrc
>>  +ROOTDIR=       /root
>>  +ROOTNAME=      .cshrc
>>   PACKAGE=runtime
>>   TCSHDIR= ${SRCTOP}/contrib/tcsh
>>   .PATH: ${TCSHDIR}
>>  @@ -44,7 +49,8 @@ MLINKS= csh.1 tcsh.1
>>  
>>   LIBADD=        termcapw crypt
>>  
>>  -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
>>  +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
>>  +       /root/.cshrc /.cshrc
>>  
>>   CLEANFILES= ${GENHDRS} gethost csh.1
>>  
>>  @@ -147,5 +153,12 @@ 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}
>>  +
>>  +beforeinstall:
>>  +       rm -f ${DESTDIR}/.cshrc
>>  +
>>  +afterinstallconfig:
>>  +       sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> 
> Why? If afterinstallconfig called unconditionally after install, then why 
> changing all of the csh entries to sh?
> 
> The old behavior was almost the same, but only when WITHOUT_CSH was 
> specified. 
> 
> Fixme if I'm wrong. 

You are correct, I have opened: https://reviews.freebsd.org/D16725


Regards,
Brad Davis
___
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: r337854 - head/sys/netinet

2018-08-15 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Aug 15 15:44:30 2018
New Revision: 337854
URL: https://svnweb.freebsd.org/changeset/base/337854

Log:
  Late style follow up on r312770.
  
  Submitted by: glebius
  X-MFC with:   r312770
  MFC after:3 days

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Wed Aug 15 14:57:34 2018(r337853)
+++ head/sys/netinet/in.c   Wed Aug 15 15:44:30 2018(r337854)
@@ -620,8 +620,7 @@ in_difaddr_ioctl(u_long cmd, caddr_t data, struct ifne
in_ifadown(>ia_ifa, 1);
 
if (ia->ia_ifa.ifa_carp)
-   (*carp_detach_p)(>ia_ifa,
-   (cmd == SIOCDIFADDR) ? false : true);
+   (*carp_detach_p)(>ia_ifa, cmd == SIOCAIFADDR);
 
/*
 * If this is the last IPv4 address configured on this
___
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: r337849 - in head: bin/csh bin/sh etc etc/root

2018-08-15 Thread Oliver Pinter
On Wednesday, August 15, 2018, Brad Davis  wrote:

> Author: brd
> Date: Wed Aug 15 14:41:24 2018
> New Revision: 337849
> URL: https://svnweb.freebsd.org/changeset/base/337849
>
> Log:
>   Move all sh and csh files into bin/sh/ or bin/csh/
>
>   This simplifies pkgbase by migrating these to CONFS so they are properly
>   tagged as config files.
>
>   Approved by:  will (mentor)
>   Differential Revision:https://reviews.freebsd.org/D16708
>
> Added:
>   head/bin/csh/csh.cshrc
>  - copied unchanged from r337848, head/etc/csh.cshrc
>   head/bin/csh/csh.login
>  - copied unchanged from r337848, head/etc/csh.login
>   head/bin/csh/csh.logout
>  - copied unchanged from r337848, head/etc/csh.logout
>   head/bin/csh/dot.cshrc
>  - copied unchanged from r337848, head/etc/root/dot.cshrc
>   head/bin/csh/dot.login
>  - copied unchanged from r337848, head/etc/root/dot.login
>   head/bin/sh/dot.profile
>  - copied unchanged from r337848, head/etc/root/dot.profile
>   head/bin/sh/profile
>  - copied unchanged from r337848, head/etc/profile
> Deleted:
>   head/etc/csh.cshrc
>   head/etc/csh.login
>   head/etc/csh.logout
>   head/etc/profile
>   head/etc/root/dot.cshrc
>   head/etc/root/dot.login
>   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 15 14:29:04 2018(r337848)
> +++ head/bin/csh/Makefile   Wed Aug 15 14:41:24 2018(r337849)
> @@ -8,6 +8,11 @@
>
>  .include 
>
> +CONFGROUPS=ETC ROOT
> +ETC=   csh.cshrc csh.login csh.logout
> +ROOT=  dot.cshrc
> +ROOTDIR=   /root
> +ROOTNAME=  .cshrc
>  PACKAGE=runtime
>  TCSHDIR= ${SRCTOP}/contrib/tcsh
>  .PATH: ${TCSHDIR}
> @@ -44,7 +49,8 @@ MLINKS= csh.1 tcsh.1
>
>  LIBADD=termcapw crypt
>
> -LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
> +LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
> +   /root/.cshrc /.cshrc
>
>  CLEANFILES= ${GENHDRS} gethost csh.1
>
> @@ -147,5 +153,12 @@ 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}
> +
> +beforeinstall:
> +   rm -f ${DESTDIR}/.cshrc
> +
> +afterinstallconfig:
> +   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd


Why? If afterinstallconfig called unconditionally after install, then why
changing all of the csh entries to sh?

The old behavior was almost the same, but only when WITHOUT_CSH was
specified.

Fixme if I'm wrong.


> +   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
>
>  .include 
>
> Copied: head/bin/csh/csh.cshrc (from r337848, head/etc/csh.cshrc)
> 
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/csh.cshrc  Wed Aug 15 14:41:24 2018(r337849,
> copy of r337848, head/etc/csh.cshrc)
> @@ -0,0 +1,3 @@
> +# $FreeBSD$
> +#
> +# System-wide .cshrc file for csh(1).
>
> Copied: head/bin/csh/csh.login (from r337848, head/etc/csh.login)
> 
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/csh.login  Wed Aug 15 14:41:24 2018(r337849,
> copy of r337848, head/etc/csh.login)
> @@ -0,0 +1,15 @@
> +# $FreeBSD$
> +#
> +# System-wide .login file for csh(1).
> +# Uncomment this to give you the default 4.2 behavior, where disk
> +# information is shown in K-Blocks
> +# setenv BLOCKSIZE K
> +#
> +# For the setting of languages and character sets please see
> +# login.conf(5) and in particular the charset and lang options.
> +# For full locales list check /usr/share/locale/*
> +#
> +# Check system messages
> +# msgs -q
> +# Allow terminal messages
> +# mesg y
>
> Copied: head/bin/csh/csh.logout (from r337848, head/etc/csh.logout)
> 
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/csh.logout Wed Aug 15 14:41:24 2018(r337849,
> copy of r337848, head/etc/csh.logout)
> @@ -0,0 +1,3 @@
> +# $FreeBSD$
> +#
> +# System-wide .logout file for csh(1).
>
> Copied: head/bin/csh/dot.cshrc (from r337848, head/etc/root/dot.cshrc)
> 
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/bin/csh/dot.cshrc  Wed Aug 15 14:41:24 2018(r337849,
> copy of r337848, 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).
> +# 

Re: svn commit: r337849 - in head: bin/csh bin/sh etc etc/root [This broke ci.freebsd.org 's FreeBSD-head-*-build 's that have built since then]

2018-08-15 Thread Brad Davis
On Wed, Aug 15, 2018, at 9:21 AM, Mark Millard wrote:
> For example:
> 
> https://lists.freebsd.org/pipermail/svn-src-head/2018-August/117572.html
> (-r337849 based) shows:
> 
> install -N /usr/src/etc -l h -o root -g wheel -m 555  /usr/obj/usr/src/
> sparc64.sparc64/release/dist/base/root/.profile /usr/obj/usr/src/
> sparc64.sparc64/release/dist/base/.profile
> install: link /usr/obj/usr/src/sparc64.sparc64/release/dist/base/
> root/.profile -> /usr/obj/usr/src/sparc64.sparc64/release/dist/
> base/.profile: No such file or directory
> *** Error code 71

Yes, I get the CI emails too :)

Working on it.


Regards,
Brad Davis
___
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: r337849 - in head: bin/csh bin/sh etc etc/root [This broke ci.freebsd.org 's FreeBSD-head-*-build 's that have built since then]

2018-08-15 Thread Mark Millard via svn-src-head
For example:

https://lists.freebsd.org/pipermail/svn-src-head/2018-August/117572.html
(-r337849 based) shows:

install -N /usr/src/etc -l h -o root -g wheel -m 555  
/usr/obj/usr/src/sparc64.sparc64/release/dist/base/root/.profile 
/usr/obj/usr/src/sparc64.sparc64/release/dist/base/.profile
install: link /usr/obj/usr/src/sparc64.sparc64/release/dist/base/root/.profile 
-> /usr/obj/usr/src/sparc64.sparc64/release/dist/base/.profile: No such file or 
directory
*** Error code 71

Stop.
make[7]: stopped in /usr/src/bin/sh
*** Error code 1


Later builds are similar.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
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: r337853 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 14:57:34 2018
New Revision: 337853
URL: https://svnweb.freebsd.org/changeset/base/337853

Log:
  Remove pmap_kenter_section from the arm pmap. It's unused.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:53:42 2018(r337852)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:57:34 2018(r337853)
@@ -2371,25 +2371,6 @@ pmap_remove_pages(pmap_t pmap)
 
 /* Map a section into the KVA. */
 
-void
-pmap_kenter_section(vm_offset_t va, vm_offset_t pa, int flags)
-{
-   pd_entry_t pd = L1_S_PROTO | pa | L1_S_PROT(PTE_KERNEL,
-   VM_PROT_READ|VM_PROT_WRITE) | L1_S_DOM(PMAP_DOMAIN_KERNEL);
-   struct l1_ttable *l1;
-
-   KASSERT(((va | pa) & L1_S_OFFSET) == 0,
-   ("Not a valid section mapping"));
-   if (flags & SECTION_CACHE)
-   pd |= pte_l1_s_cache_mode;
-   else if (flags & SECTION_PT)
-   pd |= pte_l1_s_cache_mode_pt;
-   SLIST_FOREACH(l1, _list, l1_link) {
-   l1->l1_kva[L1_IDX(va)] = pd;
-   PTE_SYNC(>l1_kva[L1_IDX(va)]);
-   }
-}
-
 /*
  * Make a temporary mapping for a physical address.  This is only intended
  * to be used for panic dumps.

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:53:42 2018
(r337852)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:57:34 2018
(r337853)
@@ -428,7 +428,6 @@ void vector_page_setprot(int);
 
 #define SECTION_CACHE  0x1
 #define SECTION_PT 0x2
-void   pmap_kenter_section(vm_offset_t, vm_paddr_t, int flags);
 void   pmap_postinit(void);
 
 #endif /* _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 commit: r337852 - in head: etc secure/usr.bin/ssh secure/usr.sbin/sshd

2018-08-15 Thread Brad Davis
Author: brd
Date: Wed Aug 15 14:53:42 2018
New Revision: 337852
URL: https://svnweb.freebsd.org/changeset/base/337852

Log:
  Move ssh config file handling into the ssh Makefiles.
  
  This helps with pkgbase by using CONFS and tagging these as config files.
  
  Approved by:  allanjude (mentor), des
  Differential Revision:https://reviews.freebsd.org/D16678

Modified:
  head/etc/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed Aug 15 14:52:56 2018(r337851)
+++ head/etc/Makefile   Wed Aug 15 14:53:42 2018(r337852)
@@ -74,11 +74,6 @@ BIN1+=   hosts.lpd printcap
 BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc
 .endif
 
-.if ${MK_OPENSSH} != "no"
-SSH=   ${SRCTOP}/crypto/openssh/ssh_config \
-   ${SRCTOP}/crypto/openssh/sshd_config \
-   ${SRCTOP}/crypto/openssh/moduli
-.endif
 .if ${MK_OPENSSL} != "no"
 SSL=   ${SRCTOP}/crypto/openssl/apps/openssl.cnf
 .endif
@@ -167,10 +162,6 @@ distribution:
 .endif
 .if ${MK_SENDMAIL} != "no"
${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
-.endif
-.if ${MK_OPENSSH} != "no"
-   cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-   ${SSH} ${DESTDIR}/etc/ssh
 .endif
 .if ${MK_OPENSSL} != "no"
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \

Modified: head/secure/usr.bin/ssh/Makefile
==
--- head/secure/usr.bin/ssh/MakefileWed Aug 15 14:52:56 2018
(r337851)
+++ head/secure/usr.bin/ssh/MakefileWed Aug 15 14:53:42 2018
(r337852)
@@ -2,6 +2,8 @@
 
 .include 
 
+CONFS= ssh_config
+CONFSDIR=  /etc/ssh
 PROG=  ssh
 LINKS= ${BINDIR}/ssh ${BINDIR}/slogin
 MAN=   ssh.1 ssh_config.5

Modified: head/secure/usr.sbin/sshd/Makefile
==
--- head/secure/usr.sbin/sshd/Makefile  Wed Aug 15 14:52:56 2018
(r337851)
+++ head/secure/usr.sbin/sshd/Makefile  Wed Aug 15 14:53:42 2018
(r337852)
@@ -2,6 +2,8 @@
 
 .include 
 
+CONFS= moduli sshd_config
+CONFSDIR=  /etc/ssh
 PROG=  sshd
 SRCS=  sshd.c auth-rhosts.c auth-passwd.c \
audit.c audit-bsm.c audit-linux.c platform.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: r337851 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 14:52:56 2018
New Revision: 337851
URL: https://svnweb.freebsd.org/changeset/base/337851

Log:
  Remove ARM_HAVE_SUPERSECTIONS. It was only supported on some XScale CPUs.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:45:01 2018(r337850)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:52:56 2018(r337851)
@@ -2369,36 +2369,6 @@ pmap_remove_pages(pmap_t pmap)
  * Low level mapping routines.
  ***/
 
-#ifdef ARM_HAVE_SUPERSECTIONS
-/* Map a super section into the KVA. */
-
-void
-pmap_kenter_supersection(vm_offset_t va, uint64_t pa, int flags)
-{
-   pd_entry_t pd = L1_S_PROTO | L1_S_SUPERSEC | (pa & L1_SUP_FRAME) |
-   (((pa >> 32) & 0xf) << 20) | L1_S_PROT(PTE_KERNEL,
-   VM_PROT_READ|VM_PROT_WRITE) | L1_S_DOM(PMAP_DOMAIN_KERNEL);
-   struct l1_ttable *l1;
-   vm_offset_t va0, va_end;
-
-   KASSERT(((va | pa) & L1_SUP_OFFSET) == 0,
-   ("Not a valid super section mapping"));
-   if (flags & SECTION_CACHE)
-   pd |= pte_l1_s_cache_mode;
-   else if (flags & SECTION_PT)
-   pd |= pte_l1_s_cache_mode_pt;
-   va0 = va & L1_SUP_FRAME;
-   va_end = va + L1_SUP_SIZE;
-   SLIST_FOREACH(l1, _list, l1_link) {
-   va = va0;
-   for (; va < va_end; va += L1_S_SIZE) {
-   l1->l1_kva[L1_IDX(va)] = pd;
-   PTE_SYNC(>l1_kva[L1_IDX(va)]);
-   }
-   }
-}
-#endif
-
 /* Map a section into the KVA. */
 
 void

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:45:01 2018
(r337850)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:52:56 2018
(r337851)
@@ -381,10 +381,6 @@ do {   
\
 
 void   pmap_pte_init_generic(void);
 
-#if defined(CPU_XSCALE_81342)
-#define ARM_HAVE_SUPERSECTIONS
-#endif
-
 #define PTE_KERNEL 0
 #define PTE_USER   1
 #definel1pte_valid(pde)((pde) != 0)
@@ -433,10 +429,6 @@ void vector_page_setprot(int);
 #define SECTION_CACHE  0x1
 #define SECTION_PT 0x2
 void   pmap_kenter_section(vm_offset_t, vm_paddr_t, int flags);
-#ifdef ARM_HAVE_SUPERSECTIONS
-void   pmap_kenter_supersection(vm_offset_t, uint64_t, int flags);
-#endif
-
 void   pmap_postinit(void);
 
 #endif /* _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 commit: r337850 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 14:45:01 2018
New Revision: 337850
URL: https://svnweb.freebsd.org/changeset/base/337850

Log:
  Make code and data only used within the arm pmap code as static.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:41:24 2018(r337849)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:45:01 2018(r337850)
@@ -240,17 +240,17 @@ static void   pmap_init_l1(struct l1_ttable 
*, pd_entry
  * them (though, they shouldn't).
  */
 
-pt_entry_t pte_l1_s_cache_mode;
-pt_entry_t pte_l1_s_cache_mode_pt;
-pt_entry_t pte_l1_s_cache_mask;
+static pt_entry_t  pte_l1_s_cache_mode;
+static pt_entry_t  pte_l1_s_cache_mode_pt;
+static pt_entry_t  pte_l1_s_cache_mask;
 
-pt_entry_t pte_l2_l_cache_mode;
-pt_entry_t pte_l2_l_cache_mode_pt;
-pt_entry_t pte_l2_l_cache_mask;
+static pt_entry_t  pte_l2_l_cache_mode;
+static pt_entry_t  pte_l2_l_cache_mode_pt;
+static pt_entry_t  pte_l2_l_cache_mask;
 
-pt_entry_t pte_l2_s_cache_mode;
-pt_entry_t pte_l2_s_cache_mode_pt;
-pt_entry_t pte_l2_s_cache_mask;
+static pt_entry_t  pte_l2_s_cache_mode;
+static pt_entry_t  pte_l2_s_cache_mode_pt;
+static pt_entry_t  pte_l2_s_cache_mask;
 
 /*
  * Crashdump maps.
@@ -3752,7 +3752,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t ev
  * StrongARM accesses to non-cached pages are non-burst making writing
  * _any_ bulk data very slow.
  */
-void
+static void
 pmap_zero_page_generic(vm_paddr_t phys, int off, int size)
 {
 
@@ -3909,7 +3909,7 @@ pmap_clean_page(struct pv_entry *pv, boolean_t is_src)
  * hook points. The same comment regarding cachability as in
  * pmap_zero_page also applies here.
  */
-void
+static void
 pmap_copy_page_generic(vm_paddr_t src, vm_paddr_t dst)
 {
 #if 0

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:41:24 2018
(r337849)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:45:01 2018
(r337850)
@@ -379,27 +379,6 @@ do {   
\
cpu_drain_writebuf();   \
 } while (/*CONSTCOND*/0)
 
-extern pt_entry_t  pte_l1_s_cache_mode;
-extern pt_entry_t  pte_l1_s_cache_mask;
-
-extern pt_entry_t  pte_l2_l_cache_mode;
-extern pt_entry_t  pte_l2_l_cache_mask;
-
-extern pt_entry_t  pte_l2_s_cache_mode;
-extern pt_entry_t  pte_l2_s_cache_mask;
-
-extern pt_entry_t  pte_l1_s_cache_mode_pt;
-extern pt_entry_t  pte_l2_l_cache_mode_pt;
-extern pt_entry_t  pte_l2_s_cache_mode_pt;
-
-extern void (*pmap_copy_page_func)(vm_paddr_t, vm_paddr_t);
-extern void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys,
-vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt);
-extern void (*pmap_zero_page_func)(vm_paddr_t, int, int);
-
-void   pmap_copy_page_generic(vm_paddr_t, vm_paddr_t);
-void   pmap_zero_page_generic(vm_paddr_t, int, int);
-
 void   pmap_pte_init_generic(void);
 
 #if defined(CPU_XSCALE_81342)
___
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: r337849 - in head: bin/csh bin/sh etc etc/root

2018-08-15 Thread Brad Davis
Author: brd
Date: Wed Aug 15 14:41:24 2018
New Revision: 337849
URL: https://svnweb.freebsd.org/changeset/base/337849

Log:
  Move all sh and csh files into bin/sh/ or bin/csh/
  
  This simplifies pkgbase by migrating these to CONFS so they are properly
  tagged as config files.
  
  Approved by:  will (mentor)
  Differential Revision:https://reviews.freebsd.org/D16708

Added:
  head/bin/csh/csh.cshrc
 - copied unchanged from r337848, head/etc/csh.cshrc
  head/bin/csh/csh.login
 - copied unchanged from r337848, head/etc/csh.login
  head/bin/csh/csh.logout
 - copied unchanged from r337848, head/etc/csh.logout
  head/bin/csh/dot.cshrc
 - copied unchanged from r337848, head/etc/root/dot.cshrc
  head/bin/csh/dot.login
 - copied unchanged from r337848, head/etc/root/dot.login
  head/bin/sh/dot.profile
 - copied unchanged from r337848, head/etc/root/dot.profile
  head/bin/sh/profile
 - copied unchanged from r337848, head/etc/profile
Deleted:
  head/etc/csh.cshrc
  head/etc/csh.login
  head/etc/csh.logout
  head/etc/profile
  head/etc/root/dot.cshrc
  head/etc/root/dot.login
  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 15 14:29:04 2018(r337848)
+++ head/bin/csh/Makefile   Wed Aug 15 14:41:24 2018(r337849)
@@ -8,6 +8,11 @@
 
 .include 
 
+CONFGROUPS=ETC ROOT
+ETC=   csh.cshrc csh.login csh.logout
+ROOT=  dot.cshrc
+ROOTDIR=   /root
+ROOTNAME=  .cshrc
 PACKAGE=runtime
 TCSHDIR= ${SRCTOP}/contrib/tcsh
 .PATH: ${TCSHDIR}
@@ -44,7 +49,8 @@ MLINKS= csh.1 tcsh.1
 
 LIBADD=termcapw crypt
 
-LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
+LINKS= ${BINDIR}/csh ${BINDIR}/tcsh \
+   /root/.cshrc /.cshrc
 
 CLEANFILES= ${GENHDRS} gethost csh.1
 
@@ -147,5 +153,12 @@ 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}
+
+beforeinstall:
+   rm -f ${DESTDIR}/.cshrc
+
+afterinstallconfig:
+   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
+   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
 
 .include 

Copied: head/bin/csh/csh.cshrc (from r337848, head/etc/csh.cshrc)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/csh/csh.cshrc  Wed Aug 15 14:41:24 2018(r337849, copy 
of r337848, head/etc/csh.cshrc)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+#
+# System-wide .cshrc file for csh(1).

Copied: head/bin/csh/csh.login (from r337848, head/etc/csh.login)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/csh/csh.login  Wed Aug 15 14:41:24 2018(r337849, copy 
of r337848, head/etc/csh.login)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+#
+# System-wide .login file for csh(1).
+# Uncomment this to give you the default 4.2 behavior, where disk
+# information is shown in K-Blocks
+# setenv BLOCKSIZE K
+#
+# For the setting of languages and character sets please see
+# login.conf(5) and in particular the charset and lang options.
+# For full locales list check /usr/share/locale/*
+#
+# Check system messages
+# msgs -q
+# Allow terminal messages
+# mesg y

Copied: head/bin/csh/csh.logout (from r337848, head/etc/csh.logout)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/csh/csh.logout Wed Aug 15 14:41:24 2018(r337849, copy 
of r337848, head/etc/csh.logout)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+#
+# System-wide .logout file for csh(1).

Copied: head/bin/csh/dot.cshrc (from r337848, head/etc/root/dot.cshrc)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/csh/dot.cshrc  Wed Aug 15 14:41:24 2018(r337849, copy 
of r337848, 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 = "%#"
+

svn commit: r337848 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 14:29:04 2018
New Revision: 337848
URL: https://svnweb.freebsd.org/changeset/base/337848

Log:
  Remove arm pmap variables that are only ever set and never read.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:19:07 2018(r337847)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:29:04 2018(r337848)
@@ -252,14 +252,6 @@ pt_entry_t pte_l2_s_cache_mode;
 pt_entry_t pte_l2_s_cache_mode_pt;
 pt_entry_t pte_l2_s_cache_mask;
 
-pt_entry_t pte_l2_s_prot_u;
-pt_entry_t pte_l2_s_prot_w;
-pt_entry_t pte_l2_s_prot_mask;
-
-pt_entry_t pte_l1_s_proto;
-pt_entry_t pte_l1_c_proto;
-pt_entry_t pte_l2_s_proto;
-
 /*
  * Crashdump maps.
  */
@@ -474,14 +466,6 @@ pmap_pte_init_generic(void)
pte_l2_l_cache_mode_pt = L2_C;
pte_l2_s_cache_mode_pt = L2_C;
}
-
-   pte_l2_s_prot_u = L2_S_PROT_U_generic;
-   pte_l2_s_prot_w = L2_S_PROT_W_generic;
-   pte_l2_s_prot_mask = L2_S_PROT_MASK_generic;
-
-   pte_l1_s_proto = L1_S_PROTO_generic;
-   pte_l1_c_proto = L1_C_PROTO_generic;
-   pte_l2_s_proto = L2_S_PROTO_generic;
 }
 
 /*

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:19:07 2018
(r337847)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:29:04 2018
(r337848)
@@ -392,14 +392,6 @@ extern pt_entry_t  pte_l1_s_cache_mode_pt;
 extern pt_entry_t  pte_l2_l_cache_mode_pt;
 extern pt_entry_t  pte_l2_s_cache_mode_pt;
 
-extern pt_entry_t  pte_l2_s_prot_u;
-extern pt_entry_t  pte_l2_s_prot_w;
-extern pt_entry_t  pte_l2_s_prot_mask;
-
-extern pt_entry_t  pte_l1_s_proto;
-extern pt_entry_t  pte_l1_c_proto;
-extern pt_entry_t  pte_l2_s_proto;
-
 extern void (*pmap_copy_page_func)(vm_paddr_t, vm_paddr_t);
 extern void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys,
 vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt);
___
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: r337847 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 14:19:07 2018
New Revision: 337847
URL: https://svnweb.freebsd.org/changeset/base/337847

Log:
  Remove ARM_MMU_GENERIC, it's the only ARMV4/v5 MMU we support.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 13:52:31 2018(r337846)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 14:19:07 2018(r337847)
@@ -447,7 +447,6 @@ kernel_pt_lookup(vm_paddr_t pa)
return (0);
 }
 
-#if ARM_MMU_GENERIC != 0
 void
 pmap_pte_init_generic(void)
 {
@@ -485,8 +484,6 @@ pmap_pte_init_generic(void)
pte_l2_s_proto = L2_S_PROTO_generic;
 }
 
-#endif /* ARM_MMU_GENERIC != 0 */
-
 /*
  * Allocate an L1 translation table for the specified pmap.
  * This is called at pmap creation time.
@@ -3771,7 +3768,6 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t ev
  * StrongARM accesses to non-cached pages are non-burst making writing
  * _any_ bulk data very slow.
  */
-#if ARM_MMU_GENERIC != 0 || defined(CPU_XSCALE_CORE3)
 void
 pmap_zero_page_generic(vm_paddr_t phys, int off, int size)
 {
@@ -3798,7 +3794,6 @@ pmap_zero_page_generic(vm_paddr_t phys, int off, int s
 
mtx_unlock();
 }
-#endif /* ARM_MMU_GENERIC != 0 */
 
 /*
  * pmap_zero_page zeros the specified hardware page by mapping
@@ -3930,7 +3925,6 @@ pmap_clean_page(struct pv_entry *pv, boolean_t is_src)
  * hook points. The same comment regarding cachability as in
  * pmap_zero_page also applies here.
  */
-#if ARM_MMU_GENERIC != 0 || defined (CPU_XSCALE_CORE3)
 void
 pmap_copy_page_generic(vm_paddr_t src, vm_paddr_t dst)
 {
@@ -3995,7 +3989,6 @@ pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offs
cpu_l2cache_inv_range(csrcp + a_offs, cnt);
cpu_l2cache_wbinv_range(cdstp + b_offs, cnt);
 }
-#endif /* ARM_MMU_GENERIC != 0 */
 
 void
 pmap_copy_page(vm_page_t src, vm_page_t dst)

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 13:52:31 2018
(r337846)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 14:19:07 2018
(r337847)
@@ -53,22 +53,6 @@
 #include 
 
 /*
- * Define the MMU types we support based on the cpu types.  While the code has
- * some theoretical support for multiple MMU types in a single kernel, there 
are
- * no actual working configurations that use that feature.
- */
-#if defined(CPU_ARM9E)
-#defineARM_MMU_GENERIC 1
-#else
-#defineARM_MMU_GENERIC 0
-#endif
-
-#defineARM_NMMUS   (ARM_MMU_GENERIC)
-#if ARM_NMMUS == 0 && !defined(KLD_MODULE) && defined(_KERNEL)
-#error ARM_NMMUS is 0
-#endif
-
-/*
  * Pte related macros
  */
 #define PTE_NOCACHE1
@@ -306,21 +290,6 @@ extern int pmap_needs_pte_sync;
  */
 #defineL2_AP(x)(L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x))
 
-#if ARM_NMMUS > 1
-/* More than one MMU class configured; use variables. */
-#defineL2_S_PROT_U pte_l2_s_prot_u
-#defineL2_S_PROT_W pte_l2_s_prot_w
-#defineL2_S_PROT_MASK  pte_l2_s_prot_mask
-
-#defineL1_S_CACHE_MASK pte_l1_s_cache_mask
-#defineL2_L_CACHE_MASK pte_l2_l_cache_mask
-#defineL2_S_CACHE_MASK pte_l2_s_cache_mask
-
-#defineL1_S_PROTO  pte_l1_s_proto
-#defineL1_C_PROTO  pte_l1_c_proto
-#defineL2_S_PROTO  pte_l2_s_proto
-
-#elif ARM_MMU_GENERIC != 0
 #defineL2_S_PROT_U L2_S_PROT_U_generic
 #defineL2_S_PROT_W L2_S_PROT_W_generic
 #defineL2_S_PROT_MASK  L2_S_PROT_MASK_generic
@@ -333,8 +302,6 @@ extern int pmap_needs_pte_sync;
 #defineL1_C_PROTO  L1_C_PROTO_generic
 #defineL2_S_PROTO  L2_S_PROTO_generic
 
-#endif /* ARM_NMMUS > 1 */
-
 #if defined(CPU_XSCALE_81342)
 #define CPU_XSCALE_CORE3
 #define PMAP_NEEDS_PTE_SYNC1
@@ -438,12 +405,10 @@ extern void (*pmap_copy_page_offs_func)(vm_paddr_t a_p
 vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt);
 extern void (*pmap_zero_page_func)(vm_paddr_t, int, int);
 
-#if ARM_MMU_GENERIC != 0 || defined(CPU_XSCALE_81342)
 void   pmap_copy_page_generic(vm_paddr_t, vm_paddr_t);
 void   pmap_zero_page_generic(vm_paddr_t, int, int);
 
 void   pmap_pte_init_generic(void);
-#endif /* ARM_MMU_GENERIC != 0 */
 
 #if defined(CPU_XSCALE_81342)
 #define ARM_HAVE_SUPERSECTIONS
___
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: r337846 - head/sys/arm/arm

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:52:31 2018
New Revision: 337846
URL: https://svnweb.freebsd.org/changeset/base/337846

Log:
  Remove the ARMv5 pmap function pointers. These were to support XScale so
  are now unused.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 13:48:59 2018(r337845)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 13:52:31 2018(r337846)
@@ -260,12 +260,6 @@ pt_entry_t pte_l1_s_proto;
 pt_entry_t pte_l1_c_proto;
 pt_entry_t pte_l2_s_proto;
 
-void   (*pmap_copy_page_func)(vm_paddr_t, vm_paddr_t);
-void   (*pmap_copy_page_offs_func)(vm_paddr_t a_phys,
-   vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs,
-   int cnt);
-void   (*pmap_zero_page_func)(vm_paddr_t, int, int);
-
 /*
  * Crashdump maps.
  */
@@ -489,10 +483,6 @@ pmap_pte_init_generic(void)
pte_l1_s_proto = L1_S_PROTO_generic;
pte_l1_c_proto = L1_C_PROTO_generic;
pte_l2_s_proto = L2_S_PROTO_generic;
-
-   pmap_copy_page_func = pmap_copy_page_generic;
-   pmap_copy_page_offs_func = pmap_copy_page_offs_generic;
-   pmap_zero_page_func = pmap_zero_page_generic;
 }
 
 #endif /* ARM_MMU_GENERIC != 0 */
@@ -3817,7 +3807,7 @@ pmap_zero_page_generic(vm_paddr_t phys, int off, int s
 void
 pmap_zero_page(vm_page_t m)
 {
-   pmap_zero_page_func(VM_PAGE_TO_PHYS(m), 0, PAGE_SIZE);
+   pmap_zero_page_generic(VM_PAGE_TO_PHYS(m), 0, PAGE_SIZE);
 }
 
 
@@ -3831,7 +3821,7 @@ void
 pmap_zero_page_area(vm_page_t m, int off, int size)
 {
 
-   pmap_zero_page_func(VM_PAGE_TO_PHYS(m), off, size);
+   pmap_zero_page_generic(VM_PAGE_TO_PHYS(m), off, size);
 }
 
 
@@ -4017,7 +4007,7 @@ pmap_copy_page(vm_page_t src, vm_page_t dst)
_arm_memcpy((void *)VM_PAGE_TO_PHYS(dst),
(void *)VM_PAGE_TO_PHYS(src), PAGE_SIZE, IS_PHYSICAL) == 0)
return;
-   pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst));
+   pmap_copy_page_generic(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst));
 }
 
 /*
@@ -4045,7 +4035,7 @@ pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, 
b_pg = mb[b_offset >> PAGE_SHIFT];
b_pg_offset = b_offset & PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - b_pg_offset);
-   pmap_copy_page_offs_func(VM_PAGE_TO_PHYS(a_pg), a_pg_offset,
+   pmap_copy_page_offs_generic(VM_PAGE_TO_PHYS(a_pg), a_pg_offset,
VM_PAGE_TO_PHYS(b_pg), b_pg_offset, cnt);
xfersize -= cnt;
a_offset += cnt;
___
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: r337845 - head/sys/arm/include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:48:59 2018
New Revision: 337845
URL: https://svnweb.freebsd.org/changeset/base/337845

Log:
  Remove checks for now unsupported CPU_* values in arm headers.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/include/intr.h
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/include/intr.h
==
--- head/sys/arm/include/intr.h Wed Aug 15 13:42:22 2018(r337844)
+++ head/sys/arm/include/intr.h Wed Aug 15 13:48:59 2018(r337845)
@@ -68,14 +68,9 @@ int intr_pic_ipi_setup(u_int, const char *, intr_ipi_h
 #else /* INTRNG */
 
 /* XXX move to std.* files? */
-#ifdef CPU_XSCALE_81342
-#define NIRQ   128
-#elif defined(CPU_XSCALE_PXA2X0)
-#include 
-#defineNIRQIRQ_GPIO_MAX
-#elif defined(SOC_MV_DISCOVERY)
+#if defined(SOC_MV_DISCOVERY)
 #define NIRQ   96
-#elif defined(CPU_ARM9) || defined(SOC_MV_KIRKWOOD)
+#elif defined(SOC_MV_KIRKWOOD)
 #define NIRQ   64
 #elif defined(CPU_CORTEXA)
 #define NIRQ   1020

Modified: head/sys/arm/include/pmap-v4.h
==
--- head/sys/arm/include/pmap-v4.h  Wed Aug 15 13:42:22 2018
(r337844)
+++ head/sys/arm/include/pmap-v4.h  Wed Aug 15 13:48:59 2018
(r337845)
@@ -57,19 +57,13 @@
  * some theoretical support for multiple MMU types in a single kernel, there 
are
  * no actual working configurations that use that feature.
  */
-#if (defined(CPU_ARM9) || defined(CPU_ARM9E) ||defined(CPU_FA526))
+#if defined(CPU_ARM9E)
 #defineARM_MMU_GENERIC 1
 #else
 #defineARM_MMU_GENERIC 0
 #endif
 
-#if (defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342))
-#defineARM_MMU_XSCALE  1
-#else
-#defineARM_MMU_XSCALE  0
-#endif
-
-#defineARM_NMMUS   (ARM_MMU_GENERIC + ARM_MMU_XSCALE)
+#defineARM_NMMUS   (ARM_MMU_GENERIC)
 #if ARM_NMMUS == 0 && !defined(KLD_MODULE) && defined(_KERNEL)
 #error ARM_NMMUS is 0
 #endif
@@ -338,19 +332,6 @@ extern int pmap_needs_pte_sync;
 #defineL1_S_PROTO  L1_S_PROTO_generic
 #defineL1_C_PROTO  L1_C_PROTO_generic
 #defineL2_S_PROTO  L2_S_PROTO_generic
-
-#elif ARM_MMU_XSCALE == 1
-#defineL2_S_PROT_U L2_S_PROT_U_xscale
-#defineL2_S_PROT_W L2_S_PROT_W_xscale
-#defineL2_S_PROT_MASK  L2_S_PROT_MASK_xscale
-
-#defineL1_S_CACHE_MASK L1_S_CACHE_MASK_xscale
-#defineL2_L_CACHE_MASK L2_L_CACHE_MASK_xscale
-#defineL2_S_CACHE_MASK L2_S_CACHE_MASK_xscale
-
-#defineL1_S_PROTO  L1_S_PROTO_xscale
-#defineL1_C_PROTO  L1_C_PROTO_xscale
-#defineL2_S_PROTO  L2_S_PROTO_xscale
 
 #endif /* ARM_NMMUS > 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: r337844 - head/sys/netgraph

2018-08-15 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Aug 15 13:42:22 2018
New Revision: 337844
URL: https://svnweb.freebsd.org/changeset/base/337844

Log:
  The interface name must be sanitized before the search to match the existing
  netgraph node.
  
  Fixes the search (and use) of VLANs with dot notation.
  
  Obtained from:pfSense
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/netgraph/ng_ether.c

Modified: head/sys/netgraph/ng_ether.c
==
--- head/sys/netgraph/ng_ether.cWed Aug 15 13:40:16 2018
(r337843)
+++ head/sys/netgraph/ng_ether.cWed Aug 15 13:42:22 2018
(r337844)
@@ -314,7 +314,8 @@ ng_ether_attach(struct ifnet *ifp)
 * eiface nodes, which may be problematic due to naming
 * clashes.
 */
-   if ((node = ng_name2noderef(NULL, ifp->if_xname)) != NULL) {
+   ng_ether_sanitize_ifname(ifp->if_xname, name);
+   if ((node = ng_name2noderef(NULL, name)) != NULL) {
NG_NODE_UNREF(node);
return;
}
@@ -341,7 +342,6 @@ ng_ether_attach(struct ifnet *ifp)
priv->hwassist = ifp->if_hwassist;
 
/* Try to give the node the same name as the interface */
-   ng_ether_sanitize_ifname(ifp->if_xname, name);
if (ng_name_node(node, name) != 0)
log(LOG_WARNING, "%s: can't name node %s\n", __func__, name);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r337843 - in head/sys/arm: arm include

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:40:16 2018
New Revision: 337843
URL: https://svnweb.freebsd.org/changeset/base/337843

Log:
  Start to remove XScale support from the ARMv4/v5 pmap. Support for XScale
  has been removed from the kernel so we can remove it from here to help
  simplify the code.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/arm/pmap-v4.c
  head/sys/arm/arm/vm_machdep.c
  head/sys/arm/include/pmap-v4.h

Modified: head/sys/arm/arm/pmap-v4.c
==
--- head/sys/arm/arm/pmap-v4.c  Wed Aug 15 13:19:15 2018(r337842)
+++ head/sys/arm/arm/pmap-v4.c  Wed Aug 15 13:40:16 2018(r337843)
@@ -406,10 +406,6 @@ static struct rwlock pvh_global_lock;
 
 void pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offset_t a_offs,
 vm_paddr_t b_phys, vm_offset_t b_offs, int cnt);
-#if ARM_MMU_XSCALE == 1
-void pmap_copy_page_offs_xscale(vm_paddr_t a_phys, vm_offset_t a_offs,
-vm_paddr_t b_phys, vm_offset_t b_offs, int cnt);
-#endif
 
 /*
  * This list exists for the benefit of pmap_map_chunk().  It keeps track
@@ -501,177 +497,7 @@ pmap_pte_init_generic(void)
 
 #endif /* ARM_MMU_GENERIC != 0 */
 
-#if ARM_MMU_XSCALE == 1
-#if (ARM_NMMUS > 1) || defined (CPU_XSCALE_CORE3)
-static u_int xscale_use_minidata;
-#endif
-
-void
-pmap_pte_init_xscale(void)
-{
-   uint32_t auxctl;
-   int write_through = 0;
-
-   pte_l1_s_cache_mode = L1_S_B|L1_S_C|L1_S_XSCALE_P;
-   pte_l1_s_cache_mask = L1_S_CACHE_MASK_xscale;
-
-   pte_l2_l_cache_mode = L2_B|L2_C;
-   pte_l2_l_cache_mask = L2_L_CACHE_MASK_xscale;
-
-   pte_l2_s_cache_mode = L2_B|L2_C;
-   pte_l2_s_cache_mask = L2_S_CACHE_MASK_xscale;
-
-   pte_l1_s_cache_mode_pt = L1_S_C;
-   pte_l2_l_cache_mode_pt = L2_C;
-   pte_l2_s_cache_mode_pt = L2_C;
-#ifdef XSCALE_CACHE_READ_WRITE_ALLOCATE
-   /*
-* The XScale core has an enhanced mode where writes that
-* miss the cache cause a cache line to be allocated.  This
-* is significantly faster than the traditional, write-through
-* behavior of this case.
-*/
-   pte_l1_s_cache_mode |= L1_S_XSCALE_TEX(TEX_XSCALE_X);
-   pte_l2_l_cache_mode |= L2_XSCALE_L_TEX(TEX_XSCALE_X);
-   pte_l2_s_cache_mode |= L2_XSCALE_T_TEX(TEX_XSCALE_X);
-#endif /* XSCALE_CACHE_READ_WRITE_ALLOCATE */
-#ifdef XSCALE_CACHE_WRITE_THROUGH
-   /*
-* Some versions of the XScale core have various bugs in
-* their cache units, the work-around for which is to run
-* the cache in write-through mode.  Unfortunately, this
-* has a major (negative) impact on performance.  So, we
-* go ahead and run fast-and-loose, in the hopes that we
-* don't line up the planets in a way that will trip the
-* bugs.
-*
-* However, we give you the option to be slow-but-correct.
-*/
-   write_through = 1;
-#elif defined(XSCALE_CACHE_WRITE_BACK)
-   /* force write back cache mode */
-   write_through = 0;
-#elif defined(CPU_XSCALE_PXA2X0)
-   /*
-* Intel PXA2[15]0 processors are known to have a bug in
-* write-back cache on revision 4 and earlier (stepping
-* A[01] and B[012]).  Fixed for C0 and later.
-*/
-   {
-   uint32_t id, type;
-
-   id = cpu_ident();
-   type = id & ~(CPU_ID_XSCALE_COREREV_MASK|CPU_ID_REVISION_MASK);
-
-   if (type == CPU_ID_PXA250 || type == CPU_ID_PXA210) {
-   if ((id & CPU_ID_REVISION_MASK) < 5) {
-   /* write through for stepping A0-1 and B0-2 */
-   write_through = 1;
-   }
-   }
-   }
-#endif /* XSCALE_CACHE_WRITE_THROUGH */
-
-   if (write_through) {
-   pte_l1_s_cache_mode = L1_S_C;
-   pte_l2_l_cache_mode = L2_C;
-   pte_l2_s_cache_mode = L2_C;
-   }
-
-#if (ARM_NMMUS > 1)
-   xscale_use_minidata = 1;
-#endif
-
-   pte_l2_s_prot_u = L2_S_PROT_U_xscale;
-   pte_l2_s_prot_w = L2_S_PROT_W_xscale;
-   pte_l2_s_prot_mask = L2_S_PROT_MASK_xscale;
-
-   pte_l1_s_proto = L1_S_PROTO_xscale;
-   pte_l1_c_proto = L1_C_PROTO_xscale;
-   pte_l2_s_proto = L2_S_PROTO_xscale;
-
-#ifdef CPU_XSCALE_CORE3
-   pmap_copy_page_func = pmap_copy_page_generic;
-   pmap_copy_page_offs_func = pmap_copy_page_offs_generic;
-   pmap_zero_page_func = pmap_zero_page_generic;
-   xscale_use_minidata = 0;
-   /* Make sure it is L2-cachable */
-   pte_l1_s_cache_mode |= L1_S_XSCALE_TEX(TEX_XSCALE_T);
-   pte_l1_s_cache_mode_pt = pte_l1_s_cache_mode &~ L1_S_XSCALE_P;
-   pte_l2_l_cache_mode |= L2_XSCALE_L_TEX(TEX_XSCALE_T) ;
-   pte_l2_l_cache_mode_pt = pte_l1_s_cache_mode;
-   pte_l2_s_cache_mode |= L2_XSCALE_T_TEX(TEX_XSCALE_T);
-   pte_l2_s_cache_mode_pt = pte_l2_s_cache_mode;
-

Re: svn commit: r337821 - in head/contrib/amd: . hlfsd

2018-08-15 Thread Mateusz Piotrowski
On Wed, 15 Aug 2018 00:11:40 +0200
Mariusz Zaborski  wrote:

>On Tue, Aug 14, 2018 at 08:33:48PM +, Mateusz Piotrowski wrote:
>> Author: 0mp (ports committer)
>> Date: Tue Aug 14 20:33:48 2018
>> New Revision: 337821
>> URL: https://svnweb.freebsd.org/changeset/base/337821
>> 
>> Modified: head/contrib/amd/hlfsd/hlfsd.8
>> ==
>> --- head/contrib/amd/hlfsd/hlfsd.8   Tue Aug 14 20:26:54 2018
>> (r337820)
>> +++ head/contrib/amd/hlfsd/hlfsd.8   Tue Aug 14 20:33:48 2018
>> (r337821)  
>Please bump the date.

There's no need to do so according to the FDP. It's just a trivial patch.
___
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: r337842 - head/sys/arm64/arm64

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:19:15 2018
New Revision: 337842
URL: https://svnweb.freebsd.org/changeset/base/337842

Log:
  Set the Execute Never flags in EFI device memory as required by the ARMv8
  spec.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm64/arm64/efirt_machdep.c

Modified: head/sys/arm64/arm64/efirt_machdep.c
==
--- head/sys/arm64/arm64/efirt_machdep.cWed Aug 15 13:13:19 2018
(r337841)
+++ head/sys/arm64/arm64/efirt_machdep.cWed Aug 15 13:19:15 2018
(r337842)
@@ -162,7 +162,7 @@ bool
 efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
 {
struct efi_md *p;
-   pt_entry_t *l3;
+   pt_entry_t *l3, l3_attr;
vm_offset_t va;
uint64_t idx;
int i, mode;
@@ -218,12 +218,17 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int 
}
 
printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, 
p->md_pages);
+
+   l3_attr = ATTR_DEFAULT | ATTR_IDX(mode) | ATTR_AP(ATTR_AP_RW) |
+   L3_PAGE;
+   if (mode == VM_MEMATTR_DEVICE)
+   l3_attr |= ATTR_UXN | ATTR_PXN;
+
VM_OBJECT_WLOCK(obj_1t1_pt);
for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++,
va += PAGE_SIZE) {
l3 = efi_1t1_l3(va);
-   *l3 = va | ATTR_DEFAULT | ATTR_IDX(mode) |
-   ATTR_AP(ATTR_AP_RW) | L3_PAGE;
+   *l3 = va | l3_attr;
}
VM_OBJECT_WUNLOCK(obj_1t1_pt);
}
___
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: r337841 - in head/sys/arm: conf mv/discovery mv/orion ralink

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:13:19 2018
New Revision: 337841
URL: https://svnweb.freebsd.org/changeset/base/337841

Log:
  Remove PHYSADDR from kernel configurations that don't need it. The only
  place we need to set it is when we also have FLASHADDR set.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/conf/NOTES
  head/sys/arm/mv/discovery/std.db78xxx
  head/sys/arm/mv/orion/std.db88f5xxx
  head/sys/arm/ralink/std.ralink

Modified: head/sys/arm/conf/NOTES
==
--- head/sys/arm/conf/NOTES Wed Aug 15 13:05:04 2018(r337840)
+++ head/sys/arm/conf/NOTES Wed Aug 15 13:13:19 2018(r337841)
@@ -10,8 +10,6 @@ files "../mv/kirkwood/files.kirkwood"
 files  "../mv/orion/files.db88f5xxx"
 files  "../mv/orion/files.ts7800"
 
-optionsPHYSADDR=0x
-
 makeoptionsCONF_CFLAGS+="-march=armv5te"
 makeoptionsLDFLAGS="-zmuldefs"
 makeoptionsKERNPHYSADDR=0x

Modified: head/sys/arm/mv/discovery/std.db78xxx
==
--- head/sys/arm/mv/discovery/std.db78xxx   Wed Aug 15 13:05:04 2018
(r337840)
+++ head/sys/arm/mv/discovery/std.db78xxx   Wed Aug 15 13:13:19 2018
(r337841)
@@ -6,4 +6,3 @@ files   "../mv/discovery/files.db78xxx"
 makeoptionsKERNPHYSADDR=0x0090
 makeoptionsKERNVIRTADDR=0xc090
 optionsKERNVIRTADDR=0xc090
-optionsPHYSADDR=0x

Modified: head/sys/arm/mv/orion/std.db88f5xxx
==
--- head/sys/arm/mv/orion/std.db88f5xxx Wed Aug 15 13:05:04 2018
(r337840)
+++ head/sys/arm/mv/orion/std.db88f5xxx Wed Aug 15 13:13:19 2018
(r337841)
@@ -6,4 +6,3 @@ files   "../mv/orion/files.db88f5xxx"
 makeoptionsKERNPHYSADDR=0x0090
 makeoptionsKERNVIRTADDR=0xc090
 optionsKERNVIRTADDR=0xc090
-optionsPHYSADDR=0x

Modified: head/sys/arm/ralink/std.ralink
==
--- head/sys/arm/ralink/std.ralink  Wed Aug 15 13:05:04 2018
(r337840)
+++ head/sys/arm/ralink/std.ralink  Wed Aug 15 13:13:19 2018
(r337841)
@@ -8,4 +8,3 @@ options INTRNG
 makeoptionsKERNPHYSADDR=0x4000
 makeoptionsKERNVIRTADDR=0xc000
 optionsKERNVIRTADDR=0xc000
-optionsPHYSADDR=0x4000
___
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: r337840 - in head: cddl/usr.bin/ztest cddl/usr.bin/ztest/tests etc/mtree

2018-08-15 Thread Will Andrews
Author: will
Date: Wed Aug 15 13:05:04 2018
New Revision: 337840
URL: https://svnweb.freebsd.org/changeset/base/337840

Log:
  zfs: add ztest to the kyua test suite.
  
  This program is currently failing, and has been for >6 months on HEAD.
  Ideally, this should be run 24x7 in CI, to discover hard-to-find bugs that
  only manifest with concurrent i/o.
  
  Requested by: lwhsu, mmacy

Added:
  head/cddl/usr.bin/ztest/tests/
  head/cddl/usr.bin/ztest/tests/Makefile   (contents, props changed)
  head/cddl/usr.bin/ztest/tests/ztest.sh   (contents, props changed)
Modified:
  head/cddl/usr.bin/ztest/Makefile
  head/etc/mtree/BSD.tests.dist

Modified: head/cddl/usr.bin/ztest/Makefile
==
--- head/cddl/usr.bin/ztest/MakefileWed Aug 15 13:03:01 2018
(r337839)
+++ head/cddl/usr.bin/ztest/MakefileWed Aug 15 13:05:04 2018
(r337840)
@@ -25,4 +25,7 @@ CSTD= c99
 # it without debugging.
 CFLAGS+= -g -DDEBUG=1 -Wno-format
 
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
+
 .include 

Added: head/cddl/usr.bin/ztest/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/cddl/usr.bin/ztest/tests/Makefile  Wed Aug 15 13:05:04 2018
(r337840)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+.include 
+
+ATF_TESTS_SH+= ztest
+
+.include 

Added: head/cddl/usr.bin/ztest/tests/ztest.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/cddl/usr.bin/ztest/tests/ztest.sh  Wed Aug 15 13:05:04 2018
(r337840)
@@ -0,0 +1,52 @@
+#
+# Test Case: ztest
+# $FreeBSD$
+#
+atf_test_case ztest
+ztest_head()
+{
+   atf_set "descr" "Run ztest"
+   atf_set "timeout" 900
+   atf_set "require.config" "rt_long"
+}
+
+ztest_body()
+{
+   ARGS="-V -f ${TMPDIR:-/tmp}"
+   if atf_config_has ztest_extra_args; then
+   ARGS="${ARGS} $(atf_config_get ztest_extra_args)"
+   fi
+   ztest ${ARGS}
+   if [ $? != 0 ]; then
+   echo "failing"
+   save_ztest_artifacts
+   atf_fail "Testcase failed"
+   else
+   echo "passing"
+   atf_pass
+   fi
+}
+
+#
+# ATF Test Program Init Function
+#
+atf_init_test_cases()
+{
+   atf_add_test_case ztest
+}
+
+save_ztest_artifacts()
+{
+   # If artifacts_dir is defined, save test artifacts for
+   # post-mortem analysis
+   if atf_config_has artifacts_dir; then
+   TC_ARTIFACTS_DIR=`atf_config_get 
artifacts_dir`/cddl/usr.bin/ztest/$(atf_get ident)
+   mkdir -p $TC_ARTIFACTS_DIR
+   TC_CORE_DIR=/var/crash
+   if atf_config_has core_dir; then
+   TC_CORE_DIR=`atf_config_get core_dir`
+   fi
+   mv *ztest*.core* $TC_ARTIFACTS_DIR || true
+   mv ${TC_CORE_DIR}/*ztest*.core* $TC_ARTIFACTS_DIR || true
+   fi
+}

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Wed Aug 15 13:03:01 2018
(r337839)
+++ head/etc/mtree/BSD.tests.dist   Wed Aug 15 13:05:04 2018
(r337840)
@@ -67,6 +67,8 @@
 usr.bin
 ctfconvert
 ..
+ztest
+..
 ..
 usr.sbin
 dtrace
___
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: r337839 - head/sys/arm/conf

2018-08-15 Thread Andrew Turner
Author: andrew
Date: Wed Aug 15 13:03:01 2018
New Revision: 337839
URL: https://svnweb.freebsd.org/changeset/base/337839

Log:
  Remove the VIRT armv7 kernel config. It is supported by GENERIC.
  
  Sponsored by: DARPA, AFRL

Deleted:
  head/sys/arm/conf/VIRT
___
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: r337838 - head/sys/amd64/amd64

2018-08-15 Thread Konstantin Belousov
Author: kib
Date: Wed Aug 15 12:48:49 2018
New Revision: 337838
URL: https://svnweb.freebsd.org/changeset/base/337838

Log:
  Fix early EFIRT on PCID machines after r337773.
  
  Ensure that the valid PCID state is created for proc0 pmap, since it
  might be used by efirt enter() before first context switch on the BSP.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:6 days

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Wed Aug 15 12:12:21 2018(r337837)
+++ head/sys/amd64/amd64/pmap.c Wed Aug 15 12:48:49 2018(r337838)
@@ -1188,8 +1188,16 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN;
kernel_pmap->pm_pcids[i].pm_gen = 1;
}
-   PCPU_SET(pcid_next, PMAP_PCID_KERN + 1);
+
+   /*
+* PMAP_PCID_KERN + 1 is used for initialization of
+* proc0 pmap.  The pmap' pcid state might be used by
+* EFIRT entry before first context switch, so it
+* needs to be valid.
+*/
+   PCPU_SET(pcid_next, PMAP_PCID_KERN + 2);
PCPU_SET(pcid_gen, 1);
+
/*
 * pcpu area for APs is zeroed during AP startup.
 * pc_pcid_next and pc_pcid_gen are initialized by AP
@@ -2651,8 +2659,8 @@ pmap_pinit0(pmap_t pmap)
bzero(>pm_stats, sizeof pmap->pm_stats);
pmap->pm_flags = pmap_flags;
CPU_FOREACH(i) {
-   pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE;
-   pmap->pm_pcids[i].pm_gen = 0;
+   pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN + 1;
+   pmap->pm_pcids[i].pm_gen = 1;
if (!pti) {
__pcpu[i].pc_kcr3 = PMAP_NO_CR3;
__pcpu[i].pc_ucr3 = PMAP_NO_CR3;
___
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: r337837 - head/sys/kern

2018-08-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Aug 15 12:12:21 2018
New Revision: 337837
URL: https://svnweb.freebsd.org/changeset/base/337837

Log:
  In the help message at the mountroot prompt, suggest something that
  actually works and matches the bsdinstall(8) default.
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/kern/vfs_mountroot.c

Modified: head/sys/kern/vfs_mountroot.c
==
--- head/sys/kern/vfs_mountroot.c   Wed Aug 15 11:39:13 2018
(r337836)
+++ head/sys/kern/vfs_mountroot.c   Wed Aug 15 12:12:21 2018
(r337837)
@@ -508,7 +508,7 @@ parse_dir_ask(char **conf)
printf("  and with the specified (optional) option list.\n");
printf("\n");
printf("eg. ufs:/dev/da0s1a\n");
-   printf("zfs:tank\n");
+   printf("zfs:zroot/ROOT/default\n");
printf("cd9660:/dev/cd0 ro\n");
printf("  (which is equivalent to: ");
printf("mount -t cd9660 -o ro /dev/cd0 /)\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: r337836 - head/stand/man

2018-08-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Aug 15 11:39:13 2018
New Revision: 337836
URL: https://svnweb.freebsd.org/changeset/base/337836

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

Modified:
  head/stand/man/loader.8

Modified: head/stand/man/loader.8
==
--- head/stand/man/loader.8 Wed Aug 15 10:45:24 2018(r337835)
+++ head/stand/man/loader.8 Wed Aug 15 11:39:13 2018(r337836)
@@ -951,7 +951,7 @@ Access to the
 command line provides several ways of compromising system security,
 including, but not limited to:
 .Pp
-.Bl -bullet -compact
+.Bl -bullet
 .It
 Booting from removable storage, by setting the
 .Va currdev
___
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: r337835 - head/share/man/man5

2018-08-15 Thread Mateusz Piotrowski
Author: 0mp (ports committer)
Date: Wed Aug 15 10:45:24 2018
New Revision: 337835
URL: https://svnweb.freebsd.org/changeset/base/337835

Log:
  make.conf(5): Note that src.conf should not be used for ports and 
documentation.
  
  Reviewed by:  bcr, kevans, krion, matthew
  Approved by:  krion (mentor)
  Differential Revision:https://reviews.freebsd.org/D15177

Modified:
  head/share/man/man5/make.conf.5

Modified: head/share/man/man5/make.conf.5
==
--- head/share/man/man5/make.conf.5 Wed Aug 15 08:45:05 2018
(r337834)
+++ head/share/man/man5/make.conf.5 Wed Aug 15 10:45:24 2018
(r337835)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 11, 2018
+.Dd August 15, 2018
 .Dt MAKE.CONF 5
 .Os
 .Sh NAME
@@ -104,6 +104,13 @@ option of
 .Xr make 1
 or in
 .Xr environ 7 .
+In the case of world and kernel builds it is possible to put these variables
+into
+.Xr src.conf 5
+instead of
+.Nm .
+This way the environment for documentation and ports builds is not polluted
+by unrelated variables.
 .Pp
 The following lists provide a name and short description for each
 variable you can use during the indicated builds.
___
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: r337674 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2018-08-15 Thread Bruce Evans

On Wed, 15 Aug 2018, John Baldwin wrote:


On 8/12/18 3:09 AM, Matt Macy wrote:


Log:
  Restore legacy dnode_phys layout on tier 2 arches

  Evidently gcc4 doesn't support anonymous union members


Even gcc3 supports anonomous union members.  Maybe even gcc1.  They
are a standard gcc feature unless turned off by requesting a stricter
standard.  Kernel builds are misconfigured by requesting the stricter
standard C99 with -std=c99.  clang is too broken to support this, but
gcc4 -std=c99 resembles a C99 compiler so it doesn't allow anonymous
unions.


It does.  We use it in 'struct mbuf'.  It does require
-fms-extensions which we enable for kernel builds.  Perhaps ZFS is
missing this flag due to using custom build flags and/or rules?


-fms-extensions is a wart on a bug.  After misconfiguring kernel builds
using -std=c99, -fms-extensions is misused to add some extensions.  It
gives many unwanted ms extensions together with extra gcc anonymous unions
and some unneeded but harmless extensions for gcc anonymous unions.  It
doesn't give all gcc extensions AFAIK, so it is surprising that -std=c99
doesn't break more than it does.  Very little code compiles with strict
C99 compilers.  It takes -pedantic as well as well as a -std directive to
get nearer to strictness for the requested standard.  Apparently not using
pedantic, together with using the correct spelling for __asm() and
__volatile, hides most of the problems.  However, __extension__ is usually
not used, so many of the problems should not be hidden.

kern.mk enforces its broken standard using CSTD=c99 instead of CSTD?=c99,
and then has a lot of garbage ifdefs to support the even more unusable
standards k, c89, c90, c94 and c95.

All these bugs are missing in userland.  bsd.sys.mk defaults to the correct
standard gnu99 but doesn't enforce it.  It uses CSTD?=gnu99.  This is followed
the same ifdefs.  These ifdefs are silly instead of garbage for userland.
In theory, the user can request plain k, though support for it has rotted
and is not needed for for FreeBSD sources.  Even the c90 support is unlikely
to work.  There is no direct support for the more useful standard gnu89.
Except for k, all the ifdef does is encrypt the standard name into iso-speak.
E.g., -std=c99 becomes -std=iso9899:1999, to make CFLAGS and thus make -n
output less readable.  In the kern.mk, the forced -std=c99 turns into
-std=iso-mumble, so might as well be hard-coded as the latter.

The -fms-extensions wart is mishandled differently:
- in system mk files, it is added to CFLAGS in kern.pre.mk and kmod.mk.
- again the addition is unconditional, except it is only done for gcc.
  clang -std=c99 is apparently so broken that it allows all ms extensions,
  not just anonymous unions.
- in kern.pre.mk, -fms-extensions is added on the same line as -fno-common
  and an actual gcc4-specific flag -finline-limit.  -fno-common is not
  added anywhere for clang, and clang is not incompatible enough to force
  it, so clang restores old bugs involving common variables (separate
  compilation units can have "int x;" or even "int x[1];" and "int x[2];",
  and the error is not detected).
- in kmod.mk, -fms-extensions is on a line by itself, and -fno-common is
  not broken for clang by mixing it into an unrelated gcc section.  The
  gcc inline flags are on separate lines and merely have style bugs
  (excessive line splitting for related things, and inconsistent whitespace).

Userland is again much better.  The fms-extensions wart is missing from
all user mk files.  Ordinary gcc extensions given by gnu99 (and probably
also gnu89) are apparently enough for the much larger userland.  It is
much larger since it needs to work for ports and also for any extensions
in used in kernel headers.  E.g., the extensive use of anonymous unions
in  is not under _KERNEL, so userland must understand it.  And
userland does understand it since it uses the correct standard gnu99.

The wrong CSTD implemented in bsd.sys.mk too, but was quickly backed
out since userland has larger test coverage so the bug was obvious.
Some history of it there:

r115902 in 2003-06-06:
default to gnu99 and note than c99 doesn't work since it kills alloca
r115942 in 2003-06-07:
default to c99 on most arches
r116316 in 2003-06-13:
default to gnu99 on all arches except i386, since c99 kills alloca on amd65
r116330 in 2003-06-14:
don't default to anything, as before this round of churning (only use
CSTD if it is already set)
r116342 in 2003-06-14:
remove all CSTD support
r161214 in 2006-08-11:
restore CSTD support to almost what it was in r116330
r188801 in 2009-03-14:
restore CSTD support to almost what it was in in r115902 (default to
the correct standard of gnu89)

The userland bugs in this were little more than style bugs except for using
the wrong standard.

I used to thing that it was a style bug for mk files to set the C
standard at all, but it is now clear that unportable code in system
headers needs to set 

svn commit: r337834 - in head: sbin/init stand/man

2018-08-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Aug 15 08:45:05 2018
New Revision: 337834
URL: https://svnweb.freebsd.org/changeset/base/337834

Log:
  Add SECURITY section to loader(8).
  
  Reviewed by:  bcr, jilles, imp (earlier version)
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D16700

Modified:
  head/sbin/init/init.8
  head/stand/man/loader.8

Modified: head/sbin/init/init.8
==
--- head/sbin/init/init.8   Wed Aug 15 06:42:31 2018(r337833)
+++ head/sbin/init/init.8   Wed Aug 15 08:45:05 2018(r337834)
@@ -31,7 +31,7 @@
 .\" @(#)init.8 8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd August 14, 2018
+.Dd August 15, 2018
 .Dt INIT 8
 .Os
 .Sh NAME
@@ -86,6 +86,15 @@ The password check is skipped if the
 .Em console
 is marked as
 .Dq secure .
+Note that the password check does not protect from variables
+such as
+.Va init_script
+being set from the
+.Xr loader 8
+command line; see the
+.Sx SECURITY
+section of
+.Xr loader 8 .
 .Pp
 If the system security level (see
 .Xr security 7 )

Modified: head/stand/man/loader.8
==
--- head/stand/man/loader.8 Wed Aug 15 06:42:31 2018(r337833)
+++ head/stand/man/loader.8 Wed Aug 15 08:45:05 2018(r337834)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 14, 2018
+.Dd August 15, 2018
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -945,6 +945,42 @@ version at compile time.
 .Nm
 version.
 .El
+.Sh SECURITY
+Access to the
+.Nm
+command line provides several ways of compromising system security,
+including, but not limited to:
+.Pp
+.Bl -bullet -compact
+.It
+Booting from removable storage, by setting the
+.Va currdev
+or
+.Va loaddev
+variables
+.It
+Executing binary of choice, by setting the
+.Va init_path
+or
+.Va init_script
+variables
+.It
+Overriding ACPI DSDT to inject arbitrary code into the ACPI subsystem
+.El
+.Pp
+One can prevent unauthorized access
+to the
+.Nm
+command line by setting the
+.Va password ,
+or setting
+.Va autoboot_delay
+to -1.
+See
+.Xr loader.conf 5
+for details.
+In order for this to be effective, one should also configure the firmware
+(BIOS or UEFI) to prevent booting from unauthorized devices.
 .Sh FILES
 .Bl -tag -width /usr/share/examples/bootforth/ -compact
 .It Pa /boot/loader
___
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: r337773 - in head/sys/amd64: amd64 include

2018-08-15 Thread Alexey Dokuchaev
On Tue, Aug 14, 2018 at 04:37:15PM +, Konstantin Belousov wrote:
> New Revision: 337773
> URL: https://svnweb.freebsd.org/changeset/base/337773
> 
> Log:
>   amd64: ensure that curproc->p_vmspace pmap always matches PCPU
>   curpmap.
>   
>   When performing context switch on a machine without PCID, if current
>   %cr3 equals to the new pmap %cr3, which is typical for kernel_pmap
>   vs. kernel process, I overlooked to update PCPU curpmap value.  Remove
>   check for %cr3 not equal to pm_cr3 for doing the update.  It is
>   believed that this case cannot happen at all, due to other changes in
>   this revision.
> ...
> - } else if (cr3 != pmap->pm_cr3) {
> + } else {
>   load_cr3(pmap->pm_cr3);

If this case cannot happen at all, would it make sense to assert it?

./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"


Re: svn commit: r337674 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2018-08-15 Thread John Baldwin
On 8/12/18 3:09 AM, Matt Macy wrote:
> Author: mmacy
> Date: Sun Aug 12 02:09:06 2018
> New Revision: 337674
> URL: https://svnweb.freebsd.org/changeset/base/337674
> 
> Log:
>   Restore legacy dnode_phys layout on tier 2 arches
>   
>   Evidently gcc4 doesn't support anonymous union members

It does.  We use it in 'struct mbuf'.  It does require
-fms-extensions which we enable for kernel builds.  Perhaps ZFS is
missing this flag due to using custom build flags and/or rules?

-- 
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: r337833 - head/sys/fs/cd9660

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Wed Aug 15 06:42:31 2018
New Revision: 337833
URL: https://svnweb.freebsd.org/changeset/base/337833

Log:
  cd9660 pointer sign issues and missing __packed attribute
  
  The isonum_* functions are defined to take unsigend char* as an argument,
  but the structure fields are defined as char. Change to u_char where needed.
  
  Probably the full structure should be changed, but I'm not sure about the
  side affects.
  
  While there, add __packed attribute.
  
  Differential Revision:https://reviews.freebsd.org/D16564

Modified:
  head/sys/fs/cd9660/cd9660_rrip.h
  head/sys/fs/cd9660/iso.h

Modified: head/sys/fs/cd9660/cd9660_rrip.h
==
--- head/sys/fs/cd9660/cd9660_rrip.hWed Aug 15 05:05:02 2018
(r337832)
+++ head/sys/fs/cd9660/cd9660_rrip.hWed Aug 15 06:42:31 2018
(r337833)
@@ -133,7 +133,7 @@ typedef struct {
 
 typedef struct {
ISO_SUSP_HEADER h;
-   char location   [ISODCL (  4,   11)];
-   char offset [ISODCL ( 12,   19)];
-   char length [ISODCL ( 20,   27)];
+   u_char location [ISODCL (  4,   11)];
+   u_char offset   [ISODCL ( 12,   19)];
+   u_char length   [ISODCL ( 20,   27)];
 } ISO_RRIP_CONT;

Modified: head/sys/fs/cd9660/iso.h
==
--- head/sys/fs/cd9660/iso.hWed Aug 15 05:05:02 2018(r337832)
+++ head/sys/fs/cd9660/iso.hWed Aug 15 06:42:31 2018(r337833)
@@ -61,7 +61,7 @@ struct iso_volume_descriptor {
 #define ISO_SIERRA_ID  "CDROM"
 
 struct iso_primary_descriptor {
-   char type   [ISODCL (  1,   1)]; /* 711 */
+   u_char type [ISODCL (  1,   1)]; /* 711 */
char id [ISODCL (  2,   6)];
char version[ISODCL (  7,   7)]; /* 711 */
char unused1[ISODCL (  8,   8)];
@@ -72,7 +72,7 @@ struct iso_primary_descriptor {
char unused3[ISODCL ( 89, 120)];
char volume_set_size[ISODCL (121, 124)]; /* 723 */
char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
-   char logical_block_size [ISODCL (129, 132)]; /* 723 */
+   u_char logical_block_size   [ISODCL (129, 132)]; /* 723 */
char path_table_size[ISODCL (133, 140)]; /* 733 */
char type_l_path_table  [ISODCL (141, 144)]; /* 731 */
char opt_type_l_path_table  [ISODCL (145, 148)]; /* 731 */
@@ -94,7 +94,7 @@ struct iso_primary_descriptor {
char unused4[ISODCL (883, 883)];
char application_data   [ISODCL (884, 1395)];
char unused5[ISODCL (1396, 2048)];
-};
+} __packed;
 #define ISO_DEFAULT_BLOCK_SHIFT11
 #define ISO_DEFAULT_BLOCK_SIZE (1 << ISO_DEFAULT_BLOCK_SHIFT)
 
@@ -115,7 +115,7 @@ struct iso_supplementary_descriptor {
   char escape [ISODCL ( 89, 120)];
   char volume_set_size[ISODCL (121, 124)]; /* 723 */
   char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
-  char logical_block_size [ISODCL (129, 132)]; /* 723 */
+  u_char logical_block_size [ISODCL (129, 132)]; /* 723 */
   char path_table_size[ISODCL (133, 140)]; /* 733 */
   char type_l_path_table  [ISODCL (141, 144)]; /* 731 */
   char opt_type_l_path_table  [ISODCL (145, 148)]; /* 731 */
@@ -152,7 +152,7 @@ struct iso_sierra_primary_descriptor {
char unused3[ISODCL ( 97, 128)];
char volume_set_size[ISODCL (129, 132)]; /* 723 */
char volume_sequence_number [ISODCL (133, 136)]; /* 723 */
-   char logical_block_size [ISODCL (137, 140)]; /* 723 */
+   u_char logical_block_size   [ISODCL (137, 140)]; /* 723 */
char path_table_size[ISODCL (141, 148)]; /* 733 */
char type_l_path_table  [ISODCL (149, 152)]; /* 731 */
char opt_type_l_path_table  [ISODCL (153, 156)]; /* 731 */
@@ -177,18 +177,18 @@ struct iso_sierra_primary_descriptor {
 };
 
 struct iso_directory_record {
-   char length [ISODCL (1, 1)]; /* 711 */
-   char ext_attr_length[ISODCL (2, 2)]; /* 711 */
+   u_char length   [ISODCL (1, 1)]; /* 711 */
+   u_char ext_attr_length  [ISODCL (2, 2)]; /* 711 */
u_char extent   [ISODCL (3, 10)]; /* 733 */
u_char size [ISODCL (11, 18)]; /* 733 */
-   char date   [ISODCL (19, 25)]; /* 7 by 711 */
-   char flags  [ISODCL (26, 26)];
-   char file_unit_size