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

2018-08-15 Thread Toomas Soome
Author: tsoome
Date: Thu Aug 16 06:50:53 2018
New Revision: 337890
URL: https://svnweb.freebsd.org/changeset/base/337890

Log:
  libi386: small style updates in biosdisk
  
  Use break instead of return in for loop, as done earlier. Insert and remove
  some blank lines. No functional changes intended.

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

Modified: head/stand/i386/libi386/biosdisk.c
==
--- head/stand/i386/libi386/biosdisk.c  Thu Aug 16 06:38:01 2018
(r337889)
+++ head/stand/i386/libi386/biosdisk.c  Thu Aug 16 06:50:53 2018
(r337890)
@@ -306,6 +306,7 @@ bd_print(int verbose)
bdinfo[i].bd_sectorsize);
if ((ret = pager_output(line)) != 0)
break;
+
dev.dd.d_dev = &biosdisk;
dev.dd.d_unit = i;
dev.d_slice = -1;
@@ -317,7 +318,7 @@ bd_print(int verbose)
ret = disk_print(&dev, line, verbose);
disk_close(&dev);
if (ret != 0)
-   return (ret);
+   break;
}
}
return (ret);
@@ -385,7 +386,6 @@ bd_open(struct open_file *f, ...)
BD(dev).bd_bcache = NULL;
}
}
-
return (rc);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337889 - head/usr.sbin/bhyve

2018-08-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Aug 16 06:38:01 2018
New Revision: 337889
URL: https://svnweb.freebsd.org/changeset/base/337889

Log:
  Fix a resource leak when using strdup(3) and also fix few style(9).
  
  Reported by:  Coverity
  CID:  1394929
  MFC after:1 week
  Sponsored by: iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==
--- head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:35:44 2018
(r337888)
+++ head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:38:01 2018
(r337889)
@@ -1746,6 +1746,8 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o
 
optidx++;
}
+   free(uopt);
+
if (sc->nvstore.ctx == NULL || sc->nvstore.size == 0) {
fprintf(stderr, "backing store not specified\n");
return (-1);
@@ -1756,9 +1758,7 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o
sc->nvstore.sectsz = blockif_sectsz(sc->nvstore.ctx);
for (sc->nvstore.sectsz_bits = 9;
 (1 << sc->nvstore.sectsz_bits) < sc->nvstore.sectsz;
-sc->nvstore.sectsz_bits++)
-   ;
-
+sc->nvstore.sectsz_bits++);
 
if (sc->max_queues == 0) {
fprintf(stderr, "Invalid maxq option\n");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337888 - head/usr.sbin/bhyve

2018-08-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Aug 16 06:35:44 2018
New Revision: 337888
URL: https://svnweb.freebsd.org/changeset/base/337888

Log:
  Remove duplicated code.
  
  Reported by:  Coverity
  CID:  1394893
  MFC after:1 week
  Sponsored by: iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==
--- head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:31:54 2018
(r337887)
+++ head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:35:44 2018
(r337888)
@@ -1159,11 +1159,6 @@ pci_nvme_io_done(struct blockif_req *br, int err)
DPRINTF(("%s error %d %s\r\n", __func__, err, strerror(err)));

/* TODO return correct error */
-   if (err)
-   code = NVME_SC_DATA_TRANSFER_ERROR;
-   else
-   code = NVME_SC_SUCCESS;
-
code = err ? NVME_SC_DATA_TRANSFER_ERROR : NVME_SC_SUCCESS;
pci_nvme_status_genc(&status, code);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337887 - head/usr.sbin/bhyve

2018-08-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Aug 16 06:31:54 2018
New Revision: 337887
URL: https://svnweb.freebsd.org/changeset/base/337887

Log:
  Add a comment explaining how the PSN works and why there is no need for
  a null terminator. Also mark CID 1394825 as intentional.
  
  Reported by:  Coverity
  CID:  1394825
  MFC after:1 week
  Sponsored by: iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==
--- head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:20:25 2018
(r337886)
+++ head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:31:54 2018
(r337887)
@@ -1714,6 +1714,11 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o
} else if (!strcmp("sectsz", xopts)) {
sectsz = atoi(config);
} else if (!strcmp("ser", xopts)) {
+   /*
+* This field indicates the Product Serial Number in
+* 8-bit ASCII, unused bytes should be NULL characters.
+* Ref: NVM Express Management Interface 1.0a.
+*/
memset(sc->ctrldata.sn, 0, sizeof(sc->ctrldata.sn));
strncpy(sc->ctrldata.sn, config,
sizeof(sc->ctrldata.sn));
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337886 - head/usr.sbin/bhyve

2018-08-15 Thread Marcelo Araujo
Author: araujo
Date: Thu Aug 16 06:20:25 2018
New Revision: 337886
URL: https://svnweb.freebsd.org/changeset/base/337886

Log:
  Increase the mask from 15 to 255 or otherwise NVME_FEAT_SOFTWARE_PROGRESS
  will never be reached.
  
  Discussed with:   Leon Dang and Darius Mihai 
  MFC after:1 week.
  Sponsored by: iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==
--- head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 01:27:16 2018
(r337885)
+++ head/usr.sbin/bhyve/pci_nvme.c  Thu Aug 16 06:20:25 2018
(r337886)
@@ -653,7 +653,7 @@ static int
 nvme_opc_set_features(struct pci_nvme_softc* sc, struct nvme_command* command,
struct nvme_completion* compl)
 {
-   int feature = command->cdw10 & 0x0F;
+   int feature = command->cdw10 & 0xFF;
uint32_t iv;
 
DPRINTF(("%s feature 0x%x\r\n", __func__, feature));
@@ -748,7 +748,7 @@ static int
 nvme_opc_get_features(struct pci_nvme_softc* sc, struct nvme_command* command,
struct nvme_completion* compl)
 {
-   int feature = command->cdw10 & 0x0F;
+   int feature = command->cdw10 & 0xFF;
 
DPRINTF(("%s feature 0x%x\r\n", __func__, feature));
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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", &bp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337884 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> Author: kevans
> Date: Thu Aug 16 01:18:20 2018
> New Revision: 337884
> URL: https://svnweb.freebsd.org/changeset/base/337884
> 
> Log:
>   Revert r337826: MFC of ls(1) COLORTERM honoring
>   
>   It was not ready, and was much-objected-to.

Thanks, just objected to, not much.
I think once the --color=foo and the NULL COLORTERM
fix goes in this should work as expected and not
cause the issue seen by the user, or if it does
I can tell them how to get color VIM, but not
color ls without too much magic.

> 
> Modified:
>   stable/11/bin/ls/ls.1
>   stable/11/bin/ls/ls.c
> Directory Properties:
>   stable/11/   (props changed)
> 
> Modified: stable/11/bin/ls/ls.1
> ==
> --- stable/11/bin/ls/ls.1 Thu Aug 16 00:50:14 2018(r337883)
> +++ stable/11/bin/ls/ls.1 Thu Aug 16 01:18:20 2018(r337884)
> @@ -32,7 +32,7 @@
>  .\" @(#)ls.1 8.7 (Berkeley) 7/29/94
>  .\" $FreeBSD$
>  .\"
> -.Dd August 8, 2018
> +.Dd December 1, 2015
>  .Dt LS 1
>  .Os
>  .Sh NAME
> @@ -140,8 +140,6 @@ after each that is a
>  Enable colorized output.
>  This option is equivalent to defining
>  .Ev CLICOLOR
> -or
> -.Ev COLORTERM
>  in the environment.
>  (See below.)
>  This functionality can be compiled out by removing the definition of
> @@ -638,10 +636,6 @@ The
>  variable still needs to reference a color capable terminal however
>  otherwise it is not possible to determine which color sequences to
>  use.
> -.It Ev COLORTERM
> -See description for
> -.Ev CLICOLOR
> -above.
>  .It Ev COLUMNS
>  If this variable contains a string representing a
>  decimal integer, it is used as the
> @@ -666,9 +660,7 @@ for more information.
>  .It Ev LSCOLORS
>  The value of this variable describes what color to use for which
>  attribute when colors are enabled with
> -.Ev CLICOLOR
> -or
> -.Ev COLORTERM .
> +.Ev CLICOLOR .
>  This string is a concatenation of pairs of the format
>  .Ar f Ns Ar b ,
>  where
> @@ -775,8 +767,6 @@ option for more details.
>  .It Ev TERM
>  The
>  .Ev CLICOLOR
> -and
> -.Ev COLORTERM
>  functionality depends on a terminal type with color capabilities.
>  .It Ev TZ
>  The timezone to use when displaying dates.
> 
> Modified: stable/11/bin/ls/ls.c
> ==
> --- stable/11/bin/ls/ls.c Thu Aug 16 00:50:14 2018(r337883)
> +++ stable/11/bin/ls/ls.c Thu Aug 16 01:18:20 2018(r337884)
> @@ -374,7 +374,7 @@ main(int argc, char *argv[])
>   f_listdot = 1;
>  
>   /* Enabling of colours is conditional on the environment. */
> - if ((getenv("CLICOLOR") || getenv("COLORTERM")) &&
> + if (getenv("CLICOLOR") &&
>   (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE")))
>  #ifdef COLORLS
>   if (tgetent(termcapbuf, getenv("TERM")) == 1) {
> 
> 

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


svn commit: r337884 - stable/11/bin/ls

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

Log:
  Revert r337826: MFC of ls(1) COLORTERM honoring
  
  It was not ready, and was much-objected-to.

Modified:
  stable/11/bin/ls/ls.1
  stable/11/bin/ls/ls.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/ls/ls.1
==
--- stable/11/bin/ls/ls.1   Thu Aug 16 00:50:14 2018(r337883)
+++ stable/11/bin/ls/ls.1   Thu Aug 16 01:18:20 2018(r337884)
@@ -32,7 +32,7 @@
 .\" @(#)ls.1   8.7 (Berkeley) 7/29/94
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2018
+.Dd December 1, 2015
 .Dt LS 1
 .Os
 .Sh NAME
@@ -140,8 +140,6 @@ after each that is a
 Enable colorized output.
 This option is equivalent to defining
 .Ev CLICOLOR
-or
-.Ev COLORTERM
 in the environment.
 (See below.)
 This functionality can be compiled out by removing the definition of
@@ -638,10 +636,6 @@ The
 variable still needs to reference a color capable terminal however
 otherwise it is not possible to determine which color sequences to
 use.
-.It Ev COLORTERM
-See description for
-.Ev CLICOLOR
-above.
 .It Ev COLUMNS
 If this variable contains a string representing a
 decimal integer, it is used as the
@@ -666,9 +660,7 @@ for more information.
 .It Ev LSCOLORS
 The value of this variable describes what color to use for which
 attribute when colors are enabled with
-.Ev CLICOLOR
-or
-.Ev COLORTERM .
+.Ev CLICOLOR .
 This string is a concatenation of pairs of the format
 .Ar f Ns Ar b ,
 where
@@ -775,8 +767,6 @@ option for more details.
 .It Ev TERM
 The
 .Ev CLICOLOR
-and
-.Ev COLORTERM
 functionality depends on a terminal type with color capabilities.
 .It Ev TZ
 The timezone to use when displaying dates.

Modified: stable/11/bin/ls/ls.c
==
--- stable/11/bin/ls/ls.c   Thu Aug 16 00:50:14 2018(r337883)
+++ stable/11/bin/ls/ls.c   Thu Aug 16 01:18:20 2018(r337884)
@@ -374,7 +374,7 @@ main(int argc, char *argv[])
f_listdot = 1;
 
/* Enabling of colours is conditional on the environment. */
-   if ((getenv("CLICOLOR") || getenv("COLORTERM")) &&
+   if (getenv("CLICOLOR") &&
(isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE")))
 #ifdef COLORLS
if (tgetent(termcapbuf, getenv("TERM")) == 1) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

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

>
>
> On Wed, Aug 15, 2018 at 2:41 PM, Rodney W. Grimes <
> free...@pdx.rh.cn85.dnsmgr.net> wrote:
>
>> > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore  wrote:
>> >
>> > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
>> > > > >
>> > > > > Will backing out the MFC and leaving this a 12.0 feature end this?
>> > > > =(
>> > > >
>> > > > Sadly no, as the person responded with that reaction when
>> > > > they installed 12.0-ALPHA :-(.
>> > >
>> > > So one whiner can demand of the project that any new feature be
>> removed
>> > > before a new release is made?
>> > >
>> >
>> > This is a good change. I don't see why people are so fussed about it...
>> For
>> > people fighting colored environments a simple unsetenv COLORTERM seems
>> to
>> > solve this problem no only on FreeBSD but for any other system they have
>> > access to...
>>
>> This is exactly the dismissive attitude by FreeBSD developers that
>> I was speaking to in my reply to Ian.
>>
>
> I see how it disagrees with you, but it's not dismissive. It's just asking
> for better data to support your view given that in general when all systems
> do X when Y happens, except FreeBSD, we generally make FreeBSD do X when Y
> unless there's a compelling reason not to. I've not seen a compelling
> reason not to yet.
>
> Basically, why should this be different than our general pattern of being
> in line with industry standards?
>
>
It has been pointed out privately to me that I was being dismissive in the
second sentence. I accept that. I'd like to apologize for that.

I just took a close look at both gnu coretuils' ls code and our ls code.
There's one minor difference in behavior. With gnu ls, if COLORTERM is
empty, it will be ignored. With our code, we'll assume an empty value means
to use colors. That difference should be fixed. This difference is clear if
you look at the unit-tests from coreutils ls as well.

I'll leave for others to debate the meaning of 'standard behavior' and just
focus on what gnu ls does, because that's what Linux users expect, and that
is what the fix was designed to implement. There's a wide variety of
terminals that set this, however. For info see https://gist.
github.com/XVilka/8346728 which goes into detail about it wrt
COLORTERM=truecolor, but is good reading.

I have a patch to make the behavior the same that I've shared that fixes
this, though it's a bit ugly.

There's also -color=xxx in gnu ls that would be a more complete solution,
but our current ls doesn't have long options at all, so it's more of a
heavy lift to merge that functionality into our ls.

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes
>  wrote:
> >> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes
> >>  wrote:
> >> > [ Charset UTF-8 unsupported, converting... ]
> >> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
> >> >>  wrote:
> >> >> >
> >> >> > From the Linux man page at: 
> >> >> > http://man7.org/linux/man-pages/man1/ls.1.html
> >> >> >
> >> >> >Using color to distinguish file types is disabled both by 
> >> >> > default and
> >> >> >with --color=never.  With --color=auto, ls emits color codes 
> >> >> > only
> >> >> >when standard output is connected to a terminal.  The LS_COLORS
> >> >> >environment variable can change the settings.  Use the 
> >> >> > dircolors
> >> >> >command to set it.
> >> >> >
> >> >> > Um, so by default we should not be doing any colour... and we are...
> >> >> >
> >> >>
> >> >> I don't recall making any argument that we're trying to match GNU
> >> >> ls(1) behavior. Furthermore, again, we aren't doing any color by
> >> >> default- only when the COLORTERM environment variable is set.
> >> >
> >> > So we are intentially being different?
> >> >
> >>
> >> No, we are not intentionally being different. See: the next paragraph,
> >> where I described that we've now-historically been honoring an
> >> environment variable for this and have simply added a more standard
> >> name for this variable.
> >
> > And one that is set by default many more places than the one that
> > had been set before, changing behavior people have been seeing for
> > a long time, and some of those people did not expect that,
> > nor seem to want it either.
> 
> Will backing out the MFC and leaving this a 12.0 feature end this? =(

>From some other private discussion with Warner I think it may
be wise at this time to revert the MFC until some other things
are done in 12.0 to address some of the concerns and merge a
more complete solution.

Thanks,
Rod

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


svn commit: 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,
+&spa_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,
 &zfs_vdev_queue_depth_pct, 0,
 "Queue depth percentage for each top-level");
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, def_queue_depth, CTLFLAG_RWTUN,
+&zfs_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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-h...@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-all@freebsd.org mailing list
ht

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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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
+ali

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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337879 - stable/11/lib/libjail

2018-08-15 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 15 22:32:43 2018
New Revision: 337879
URL: https://svnweb.freebsd.org/changeset/base/337879

Log:
  Load filesystem modules associated with allow.mount permissions.
  
  PR:   192092

Modified:
  stable/11/lib/libjail/jail.c

Modified: stable/11/lib/libjail/jail.c
==
--- stable/11/lib/libjail/jail.cWed Aug 15 22:25:05 2018
(r337878)
+++ stable/11/lib/libjail/jail.cWed Aug 15 22:32:43 2018
(r337879)
@@ -513,7 +513,18 @@ jailparam_set(struct jailparam *jp, unsigned njp, int 
}
jiov[i - 1].iov_base = nname;
jiov[i - 1].iov_len = strlen(nname) + 1;
-   
+   }
+   /*
+* Load filesystem modules associated with allow.mount
+* permissions.  Ignore failure, since the module may
+* be static, and even a failure to load is not a jail
+* error.
+*/
+   if (strncmp(jp[j].jp_name, "allow.mount.", 12) == 0) {
+   if (kldload(jp[j].jp_name + 12) < 0 &&
+   errno == ENOENT &&
+   strncmp(jp[j].jp_name + 12, "no", 2) == 0)
+   (void)kldload(jp[j].jp_name + 14);
}
} else {
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337880 - stable/10/lib/libjail

2018-08-15 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 15 22:32:55 2018
New Revision: 337880
URL: https://svnweb.freebsd.org/changeset/base/337880

Log:
  Load filesystem modules associated with allow.mount permissions.
  
  PR:   192092

Modified:
  stable/10/lib/libjail/jail.c

Modified: stable/10/lib/libjail/jail.c
==
--- stable/10/lib/libjail/jail.cWed Aug 15 22:32:43 2018
(r337879)
+++ stable/10/lib/libjail/jail.cWed Aug 15 22:32:55 2018
(r337880)
@@ -513,7 +513,18 @@ jailparam_set(struct jailparam *jp, unsigned njp, int 
}
jiov[i - 1].iov_base = nname;
jiov[i - 1].iov_len = strlen(nname) + 1;
-   
+   }
+   /*
+* Load filesystem modules associated with allow.mount
+* permissions.  Ignore failure, since the module may
+* be static, and even a failure to load is not a jail
+* error.
+*/
+   if (strncmp(jp[j].jp_name, "allow.mount.", 12) == 0) {
+   if (kldload(jp[j].jp_name + 12) < 0 &&
+   errno == ENOENT &&
+   strncmp(jp[j].jp_name + 12, "no", 2) == 0)
+   (void)kldload(jp[j].jp_name + 14);
}
} else {
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Warner Losh
On Wed, Aug 15, 2018 at 2:41 PM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> > On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore  wrote:
> >
> > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > > > >
> > > > > Will backing out the MFC and leaving this a 12.0 feature end this?
> > > > =(
> > > >
> > > > Sadly no, as the person responded with that reaction when
> > > > they installed 12.0-ALPHA :-(.
> > >
> > > So one whiner can demand of the project that any new feature be removed
> > > before a new release is made?
> > >
> >
> > This is a good change. I don't see why people are so fussed about it...
> For
> > people fighting colored environments a simple unsetenv COLORTERM seems to
> > solve this problem no only on FreeBSD but for any other system they have
> > access to...
>
> This is exactly the dismissive attitude by FreeBSD developers that
> I was speaking to in my reply to Ian.
>

I see how it disagrees with you, but it's not dismissive. It's just asking
for better data to support your view given that in general when all systems
do X when Y happens, except FreeBSD, we generally make FreeBSD do X when Y
unless there's a compelling reason not to. I've not seen a compelling
reason not to yet.

Basically, why should this be different than our general pattern of being
in line with industry standards?

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


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337876 - stable/10/lib/libjail

2018-08-15 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 15 21:38:44 2018
New Revision: 337876
URL: https://svnweb.freebsd.org/changeset/base/337876

Log:
  MFC r331332:
  
If a jail parameter isn't found, try loading a related kernel module.
  
  PR:   192092

Modified:
  stable/10/lib/libjail/jail.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libjail/jail.c
==
--- stable/10/lib/libjail/jail.cWed Aug 15 21:38:10 2018
(r337875)
+++ stable/10/lib/libjail/jail.cWed Aug 15 21:38:44 2018
(r337876)
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$");
 static int jailparam_import_enum(const char **values, int nvalues,
 const char *valstr, size_t valsize, int *value);
 static int jailparam_type(struct jailparam *jp);
+static int kldload_param(const char *name);
 static char *noname(const char *name);
 static char *nononame(const char *name);
 
@@ -885,6 +887,9 @@ jailparam_type(struct jailparam *jp)
"sysctl(0.3.%s): %s", name, strerror(errno));
return (-1);
}
+   if (kldload_param(name) >= 0 && sysctl(mib, 2, mib + 2, &miblen,
+   desc.s, strlen(desc.s)) >= 0)
+   goto mib_desc;
/*
 * The parameter probably doesn't exist.  But it might be
 * the "no" counterpart to a boolean.
@@ -1021,6 +1026,33 @@ jailparam_type(struct jailparam *jp)
jp->jp_valuelen = 0;
}
return (0);
+}
+
+/*
+ * Attempt to load a kernel module matching an otherwise nonexistent parameter.
+ */
+static int
+kldload_param(const char *name)
+{
+   int kl;
+
+   if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0)
+   kl = kldload("linux");
+   else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 ||
+   strcmp(name, "sysvshm") == 0)
+   kl = kldload(name);
+   else {
+   errno = ENOENT;
+   return (-1);
+   }
+   if (kl < 0 && errno == EEXIST) {
+   /*
+* In the module is already loaded, then it must not contain
+* the parameter.
+*/
+   errno = ENOENT;
+   }
+   return kl;
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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, &spa);
if (ret == 0 && pool_guid != NULL)
*pool_guid = spa->spa_guid;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337875 - stable/11/lib/libjail

2018-08-15 Thread Jamie Gritton
Author: jamie
Date: Wed Aug 15 21:38:10 2018
New Revision: 337875
URL: https://svnweb.freebsd.org/changeset/base/337875

Log:
  MFC r331332:
  
If a jail parameter isn't found, try loading a related kernel module.
  
  PR:   192092

Modified:
  stable/11/lib/libjail/jail.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libjail/jail.c
==
--- stable/11/lib/libjail/jail.cWed Aug 15 21:38:06 2018
(r337874)
+++ stable/11/lib/libjail/jail.cWed Aug 15 21:38:10 2018
(r337875)
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -57,6 +58,7 @@ __FBSDID("$FreeBSD$");
 static int jailparam_import_enum(const char **values, int nvalues,
 const char *valstr, size_t valsize, int *value);
 static int jailparam_type(struct jailparam *jp);
+static int kldload_param(const char *name);
 static char *noname(const char *name);
 static char *nononame(const char *name);
 
@@ -885,6 +887,9 @@ jailparam_type(struct jailparam *jp)
"sysctl(0.3.%s): %s", name, strerror(errno));
return (-1);
}
+   if (kldload_param(name) >= 0 && sysctl(mib, 2, mib + 2, &miblen,
+   desc.s, strlen(desc.s)) >= 0)
+   goto mib_desc;
/*
 * The parameter probably doesn't exist.  But it might be
 * the "no" counterpart to a boolean.
@@ -1021,6 +1026,33 @@ jailparam_type(struct jailparam *jp)
jp->jp_valuelen = 0;
}
return (0);
+}
+
+/*
+ * Attempt to load a kernel module matching an otherwise nonexistent parameter.
+ */
+static int
+kldload_param(const char *name)
+{
+   int kl;
+
+   if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0)
+   kl = kldload("linux");
+   else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 ||
+   strcmp(name, "sysvshm") == 0)
+   kl = kldload(name);
+   else {
+   errno = ENOENT;
+   return (-1);
+   }
+   if (kl < 0 && errno == EEXIST) {
+   /*
+* In the module is already loaded, then it must not contain
+* the parameter.
+*/
+   errno = ENOENT;
+   }
+   return kl;
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags

2018-08-15 Thread Konstantin Belousov
On Sun, Aug 12, 2018 at 08:54:15AM -0700, Rodney W. Grimes wrote:
> > Author: kib
> > Date: Sun Aug 12 08:45:23 2018
> > New Revision: 337682
> > URL: https://svnweb.freebsd.org/changeset/base/337682
> > 
> > Log:
> >   MFC r336569:
> >   Move mostly useless examples binaries from OFED, as well as the Subnet
> >   Manager, under the new option WITH_OFED_EXTRA, disabled by default.
> > 
> > Added:
> >   stable/11/tools/build/options/WITH_OFED_EXTRA
> >  - copied unchanged from r336569, 
> > head/tools/build/options/WITH_OFED_EXTRA
> 
> This is also now kinda a POLA issue for those who have been building
> on stable/11 with just OFED defined, on our next builds a bunch of
> stuff is gona go missing.  The needs an UPDATING entry, and defanitly a
> 
> ReleaseNotes: Yes

Using this thread to inform about what happens next:
there are several missed commits in stable/11 which do not allow to
enable OFED unconditionally on several architectures.  I will only enable
it on amd64 and add some UPDATING text.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337682 - in stable/11: share/mk tools/build/options usr.bin/ofed usr.bin/ofed/infiniband-diags

2018-08-15 Thread Konstantin Belousov
On Sun, Aug 12, 2018 at 08:50:57AM -0700, Rodney W. Grimes wrote:
> > Author: kib
> > Date: Sun Aug 12 08:45:23 2018
> > New Revision: 337682
> > URL: https://svnweb.freebsd.org/changeset/base/337682
> > 
> > Log:
> >   MFC r336569:
> >   Move mostly useless examples binaries from OFED, as well as the Subnet
> >   Manager, under the new option WITH_OFED_EXTRA, disabled by default.
> 
> I never got a response on putting opensm out from under _EXTRA.
I thought that I already answered.  If no, sorry.

I do not see much point in this split.  Right now you get either nothing
or everyting, the split allows to get nothing/libs/everything.  I do not
see allowing SM by a separate option to serve significant number of users
to justify me spending several more days tinderboxing the change.

If somebody else wants to do that, I have no objections.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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(&vi->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, &vid);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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 != &pkgfs_fsops)
pkgfs_cleanup();
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, 2018-08-15 at 13:34 -0700, Rodney W. Grimes wrote:
> > > 
> > > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > > > 
> > > > > 
> > > > > ?
> > > > > Will backing out the MFC and leaving this a 12.0 feature end
> > > > > this?
> > > > =(
> > > > 
> > > > Sadly no, as the person responded with that reaction when
> > > > they installed 12.0-ALPHA :-(.
> > > So one whiner can demand of the project that any new feature be
> > > removed
> > > before a new release is made?
> > Saddly our sample size is never reflective of the user base,
> > any and all feedback from ANY user, one or one hundred should
> > be considered.??Most people have come to the point that they
> > wont even say anything any more cause the FreeBSD developer
> > community just ignores them, and that I hear from many more
> > than 1.
> > 
> > I doubt very many of the "user" base is running with this
> > patch in place yet.
> > 
> > 
> 
> If citing invisible armies of supporters is acceptable, it appears that
> any single person can in fact demand removal of something.

No one is demanding any removal of anything here, your going very
far off on that.   I have how ever asked, and in one case Kyle
has already said he would add --color= support, that we maintain
some simbliance of compatibility with respect to knob turning.


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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018 at 2:28 PM, Ian Lepore  wrote:
> 
> > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > > >
> > > > Will backing out the MFC and leaving this a 12.0 feature end this?
> > > =(
> > >
> > > Sadly no, as the person responded with that reaction when
> > > they installed 12.0-ALPHA :-(.
> >
> > So one whiner can demand of the project that any new feature be removed
> > before a new release is made?
> >
> 
> This is a good change. I don't see why people are so fussed about it... For
> people fighting colored environments a simple unsetenv COLORTERM seems to
> solve this problem no only on FreeBSD but for any other system they have
> access to...

This is exactly the dismissive attitude by FreeBSD developers that
I was speaking to in my reply to Ian.

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Ian Lepore
On Wed, 2018-08-15 at 13:34 -0700, Rodney W. Grimes wrote:
> > 
> > On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > > 
> > > > 
> > > > ?
> > > > Will backing out the MFC and leaving this a 12.0 feature end
> > > > this?
> > > =(
> > > 
> > > Sadly no, as the person responded with that reaction when
> > > they installed 12.0-ALPHA :-(.
> > So one whiner can demand of the project that any new feature be
> > removed
> > before a new release is made?
> Saddly our sample size is never reflective of the user base,
> any and all feedback from ANY user, one or one hundred should
> be considered.  Most people have come to the point that they
> wont even say anything any more cause the FreeBSD developer
> community just ignores them, and that I hear from many more
> than 1.
> 
> I doubt very many of the "user" base is running with this
> patch in place yet.
> 
> 

If citing invisible armies of supporters is acceptable, it appears that
any single person can in fact demand removal of something.

-- Ian

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > >?
> > > Will backing out the MFC and leaving this a 12.0 feature end this?
> > =(
> > 
> > Sadly no, as the person responded with that reaction when
> > they installed 12.0-ALPHA :-(.
> 
> So one whiner can demand of the project that any new feature be removed
> before a new release is made?

Saddly our sample size is never reflective of the user base,
any and all feedback from ANY user, one or one hundred should
be considered.  Most people have come to the point that they
wont even say anything any more cause the FreeBSD developer
community just ignores them, and that I hear from many more
than 1.

I doubt very many of the "user" base is running with this
patch in place yet.


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


Re: svn commit: r337826 - stable/11/bin/ls

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

> On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > >
> > > Will backing out the MFC and leaving this a 12.0 feature end this?
> > =(
> >
> > Sadly no, as the person responded with that reaction when
> > they installed 12.0-ALPHA :-(.
>
> So one whiner can demand of the project that any new feature be removed
> before a new release is made?
>

This is a good change. I don't see why people are so fussed about it... For
people fighting colored environments a simple unsetenv COLORTERM seems to
solve this problem no only on FreeBSD but for any other system they have
access to...

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


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Ian Lepore
On Wed, 2018-08-15 at 13:26 -0700, Rodney W. Grimes wrote:
> > 
> > Will backing out the MFC and leaving this a 12.0 feature end this?
> =(
> 
> Sadly no, as the person responded with that reaction when
> they installed 12.0-ALPHA :-(.

So one whiner can demand of the project that any new feature be removed
before a new release is made?

-- Ian

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes
>  wrote:
> >> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes
> >>  wrote:
> >> > [ Charset UTF-8 unsupported, converting... ]
> >> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
> >> >>  wrote:
> >> >> >
> >> >> > From the Linux man page at: 
> >> >> > http://man7.org/linux/man-pages/man1/ls.1.html
> >> >> >
> >> >> >Using color to distinguish file types is disabled both by 
> >> >> > default and
> >> >> >with --color=never.  With --color=auto, ls emits color codes 
> >> >> > only
> >> >> >when standard output is connected to a terminal.  The LS_COLORS
> >> >> >environment variable can change the settings.  Use the 
> >> >> > dircolors
> >> >> >command to set it.
> >> >> >
> >> >> > Um, so by default we should not be doing any colour... and we are...
> >> >> >
> >> >>
> >> >> I don't recall making any argument that we're trying to match GNU
> >> >> ls(1) behavior. Furthermore, again, we aren't doing any color by
> >> >> default- only when the COLORTERM environment variable is set.
> >> >
> >> > So we are intentially being different?
> >> >
> >>
> >> No, we are not intentionally being different. See: the next paragraph,
> >> where I described that we've now-historically been honoring an
> >> environment variable for this and have simply added a more standard
> >> name for this variable.
> >
> > And one that is set by default many more places than the one that
> > had been set before, changing behavior people have been seeing for
> > a long time, and some of those people did not expect that,
> > nor seem to want it either.
> 
> Will backing out the MFC and leaving this a 12.0 feature end this? =(

Sadly no, as the person responded with that reaction when
they installed 12.0-ALPHA :-(.

> Many changes we make fit the same same description that you just
> wrote, perhaps with "many many more places" replaced with "".
> Standardization is hard to argue against, leaving one knob to turn
> everything off or on and not having to have a profile full of:
> 
> LSCOLORS=yes; export LSCOLORS
> GREPCOLORS=yes; export GREPCOLORS
> DPVCOLORS=yes; export DPVCOLORS
> ...
> 
> I would hazard a guess that most people err to one side or the other:
> all the colors or none of the colors.

Yes, and probably those people have figured out how to turn on
all the colour stuff, so this has little to no effect on them,
it does however effect the people who have intentionally turned
off colors, it now suddenly pops on, and they are now having
to do something like your list above to disable more and more
color things.

It is a double edge sword, I can see neither side is right nor wrong,
its just a mess.

> >> >> ls(1) on FreeBSD historically honors -an- environment variable for
> >> >> enabling color.
> >> >
> >> > Short history, long history it had no color support at all.
> >>
> >> Color support in ls(1) is now old enough to drink having been
> >> introduced in 2000- I think that's long enough to call it
> >> "historically" here in 2018.
> >
> > ok, but for 25 years that ls has output in b&w even in
> > a colour terminal unless I took action to make it color output.
> 
> And still, with a base FreeBSD install, you take action to make it
> color output. Some third party software claims COLORTERM for you, and
> you should be aware if this is the case. Not all color terminals will
> set COLORTERM for you.
> 
> >> >> This environment variable is CLICOLOR. This commit
> >> >> switched the environment variable honored to the more-standard
> >> >> COLORTERM that is honored in other software and set by terminals that
> >> >> are generally expected to be used with color.
> >> >>
> >> >> I'm writing an UPDATING entry for this now to notify these users that
> >> >> they should remove COLORTERM from their environment if they do not, in
> >> >> fact, want a colored terminal.
> >> >
> >> > Is that the only way to turn this off?
> >> > That may not be desired either.
> >> > Atleast GNU ls allows me to force it off on command invocation
> >> > with --color=never, do we have an equivelent?
> >> >
> >>
> >> Sure- it gets turned off the same way it got turned on. =)
> >
> > Well, it now gets turned on when it was not turned on before,
> > and as is I now have to completly decolor to decolor ls(1),
> > I have no easy knob to turn off colorls only.
> >
> >> I'm
> >> certainly not averse to adding a --color long option, and will do so
> >> when I find the time (later today, most likely).
> >
> > That would help, atleast the annoyed can alias ls ls --color=never.
> >
> 
> Ok
> 
> > NB: from the GNU ls documentation there is a significant performance
> > impact with having colorls turned on as you now have to stat every
> > file in a directory listing.  Is this also true of the BSD colorls?
> >
> 
> No clue.

We should probalby find out and document that.

-- 
Rod Grimes   

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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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(&ifp->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(&ifp->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(&ifp->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(&ifp->if_multiaddrs, ll_ifma, 
ifmultiaddr,
-   ifma_link);
+   if (ll_ifma->ifma_flags & IFMA_F_ENQUEUED) {
+   CK_STAILQ_REMOVE(&ifp->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_d

Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Kyle Evans
On Wed, Aug 15, 2018 at 2:55 PM, Rodney W. Grimes
 wrote:
>> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes
>>  wrote:
>> > [ Charset UTF-8 unsupported, converting... ]
>> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
>> >>  wrote:
>> >> >
>> >> > From the Linux man page at: 
>> >> > http://man7.org/linux/man-pages/man1/ls.1.html
>> >> >
>> >> >Using color to distinguish file types is disabled both by 
>> >> > default and
>> >> >with --color=never.  With --color=auto, ls emits color codes only
>> >> >when standard output is connected to a terminal.  The LS_COLORS
>> >> >environment variable can change the settings.  Use the dircolors
>> >> >command to set it.
>> >> >
>> >> > Um, so by default we should not be doing any colour... and we are...
>> >> >
>> >>
>> >> I don't recall making any argument that we're trying to match GNU
>> >> ls(1) behavior. Furthermore, again, we aren't doing any color by
>> >> default- only when the COLORTERM environment variable is set.
>> >
>> > So we are intentially being different?
>> >
>>
>> No, we are not intentionally being different. See: the next paragraph,
>> where I described that we've now-historically been honoring an
>> environment variable for this and have simply added a more standard
>> name for this variable.
>
> And one that is set by default many more places than the one that
> had been set before, changing behavior people have been seeing for
> a long time, and some of those people did not expect that,
> nor seem to want it either.

Will backing out the MFC and leaving this a 12.0 feature end this? =(

Many changes we make fit the same same description that you just
wrote, perhaps with "many many more places" replaced with "".
Standardization is hard to argue against, leaving one knob to turn
everything off or on and not having to have a profile full of:

LSCOLORS=yes; export LSCOLORS
GREPCOLORS=yes; export GREPCOLORS
DPVCOLORS=yes; export DPVCOLORS
...

I would hazard a guess that most people err to one side or the other:
all the colors or none of the colors.

>>
>> >>
>> >> ls(1) on FreeBSD historically honors -an- environment variable for
>> >> enabling color.
>> >
>> > Short history, long history it had no color support at all.
>>
>> Color support in ls(1) is now old enough to drink having been
>> introduced in 2000- I think that's long enough to call it
>> "historically" here in 2018.
>
> ok, but for 25 years that ls has output in b&w even in
> a colour terminal unless I took action to make it color output.

And still, with a base FreeBSD install, you take action to make it
color output. Some third party software claims COLORTERM for you, and
you should be aware if this is the case. Not all color terminals will
set COLORTERM for you.

>> >> This environment variable is CLICOLOR. This commit
>> >> switched the environment variable honored to the more-standard
>> >> COLORTERM that is honored in other software and set by terminals that
>> >> are generally expected to be used with color.
>> >>
>> >> I'm writing an UPDATING entry for this now to notify these users that
>> >> they should remove COLORTERM from their environment if they do not, in
>> >> fact, want a colored terminal.
>> >
>> > Is that the only way to turn this off?
>> > That may not be desired either.
>> > Atleast GNU ls allows me to force it off on command invocation
>> > with --color=never, do we have an equivelent?
>> >
>>
>> Sure- it gets turned off the same way it got turned on. =)
>
> Well, it now gets turned on when it was not turned on before,
> and as is I now have to completly decolor to decolor ls(1),
> I have no easy knob to turn off colorls only.
>
>> I'm
>> certainly not averse to adding a --color long option, and will do so
>> when I find the time (later today, most likely).
>
> That would help, atleast the annoyed can alias ls ls --color=never.
>

Ok

> NB: from the GNU ls documentation there is a significant performance
> impact with having colorls turned on as you now have to stat every
> file in a directory listing.  Is this also true of the BSD colorls?
>

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes
>  wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
> >>  wrote:
> >> >
> >> > From the Linux man page at: 
> >> > http://man7.org/linux/man-pages/man1/ls.1.html
> >> >
> >> >Using color to distinguish file types is disabled both by default 
> >> > and
> >> >with --color=never.  With --color=auto, ls emits color codes only
> >> >when standard output is connected to a terminal.  The LS_COLORS
> >> >environment variable can change the settings.  Use the dircolors
> >> >command to set it.
> >> >
> >> > Um, so by default we should not be doing any colour... and we are...
> >> >
> >>
> >> I don't recall making any argument that we're trying to match GNU
> >> ls(1) behavior. Furthermore, again, we aren't doing any color by
> >> default- only when the COLORTERM environment variable is set.
> >
> > So we are intentially being different?
> >
> 
> No, we are not intentionally being different. See: the next paragraph,
> where I described that we've now-historically been honoring an
> environment variable for this and have simply added a more standard
> name for this variable.

And one that is set by default many more places than the one that
had been set before, changing behavior people have been seeing for
a long time, and some of those people did not expect that,
nor seem to want it either.

> 
> >>
> >> ls(1) on FreeBSD historically honors -an- environment variable for
> >> enabling color.
> >
> > Short history, long history it had no color support at all.
> 
> Color support in ls(1) is now old enough to drink having been
> introduced in 2000- I think that's long enough to call it
> "historically" here in 2018.

ok, but for 25 years that ls has output in b&w even in
a colour terminal unless I took action to make it color output.

> >> This environment variable is CLICOLOR. This commit
> >> switched the environment variable honored to the more-standard
> >> COLORTERM that is honored in other software and set by terminals that
> >> are generally expected to be used with color.
> >>
> >> I'm writing an UPDATING entry for this now to notify these users that
> >> they should remove COLORTERM from their environment if they do not, in
> >> fact, want a colored terminal.
> >
> > Is that the only way to turn this off?
> > That may not be desired either.
> > Atleast GNU ls allows me to force it off on command invocation
> > with --color=never, do we have an equivelent?
> >
> 
> Sure- it gets turned off the same way it got turned on. =)

Well, it now gets turned on when it was not turned on before,
and as is I now have to completly decolor to decolor ls(1),
I have no easy knob to turn off colorls only.

> I'm
> certainly not averse to adding a --color long option, and will do so
> when I find the time (later today, most likely).

That would help, atleast the annoyed can alias ls ls --color=never.

NB: from the GNU ls documentation there is a significant performance
impact with having colorls turned on as you now have to stat every
file in a directory listing.  Is this also true of the BSD colorls?

> Thanks,
> Kyle Evans

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


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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, &itv, 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, &timer, NULL);
-   }
-
if (clock_gettime(CLOCK_MONOTONIC, &st.start))
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"

Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Kyle Evans
On Wed, Aug 15, 2018 at 2:34 PM, Rodney W. Grimes
 wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
>>  wrote:
>> >
>> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html
>> >
>> >Using color to distinguish file types is disabled both by default 
>> > and
>> >with --color=never.  With --color=auto, ls emits color codes only
>> >when standard output is connected to a terminal.  The LS_COLORS
>> >environment variable can change the settings.  Use the dircolors
>> >command to set it.
>> >
>> > Um, so by default we should not be doing any colour... and we are...
>> >
>>
>> I don't recall making any argument that we're trying to match GNU
>> ls(1) behavior. Furthermore, again, we aren't doing any color by
>> default- only when the COLORTERM environment variable is set.
>
> So we are intentially being different?
>

No, we are not intentionally being different. See: the next paragraph,
where I described that we've now-historically been honoring an
environment variable for this and have simply added a more standard
name for this variable.

>>
>> ls(1) on FreeBSD historically honors -an- environment variable for
>> enabling color.
>
> Short history, long history it had no color support at all.

Color support in ls(1) is now old enough to drink having been
introduced in 2000- I think that's long enough to call it
"historically" here in 2018.

>
>> This environment variable is CLICOLOR. This commit
>> switched the environment variable honored to the more-standard
>> COLORTERM that is honored in other software and set by terminals that
>> are generally expected to be used with color.
>>
>> I'm writing an UPDATING entry for this now to notify these users that
>> they should remove COLORTERM from their environment if they do not, in
>> fact, want a colored terminal.
>
> Is that the only way to turn this off?
> That may not be desired either.
> Atleast GNU ls allows me to force it off on command invocation
> with --color=never, do we have an equivelent?
>

Sure- it gets turned off the same way it got turned on. =) I'm
certainly not averse to adding a --color long option, and will do so
when I find the time (later today, most likely).

Thanks,

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
>  wrote:
> >
> > From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html
> >
> >Using color to distinguish file types is disabled both by default and
> >with --color=never.  With --color=auto, ls emits color codes only
> >when standard output is connected to a terminal.  The LS_COLORS
> >environment variable can change the settings.  Use the dircolors
> >command to set it.
> >
> > Um, so by default we should not be doing any colour... and we are...
> >
> 
> I don't recall making any argument that we're trying to match GNU
> ls(1) behavior. Furthermore, again, we aren't doing any color by
> default- only when the COLORTERM environment variable is set.

So we are intentially being different?

> 
> ls(1) on FreeBSD historically honors -an- environment variable for
> enabling color.

Short history, long history it had no color support at all.

> This environment variable is CLICOLOR. This commit
> switched the environment variable honored to the more-standard
> COLORTERM that is honored in other software and set by terminals that
> are generally expected to be used with color.
> 
> I'm writing an UPDATING entry for this now to notify these users that
> they should remove COLORTERM from their environment if they do not, in
> fact, want a colored terminal.

Is that the only way to turn this off?
That may not be desired either.
Atleast GNU ls allows me to force it off on command invocation
with --color=never, do we have an equivelent?

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


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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 */
IP_EXEC_STA

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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Kyle Evans
On Wed, Aug 15, 2018 at 12:43 PM, Rodney W. Grimes
 wrote:
>
> From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html
>
>Using color to distinguish file types is disabled both by default and
>with --color=never.  With --color=auto, ls emits color codes only
>when standard output is connected to a terminal.  The LS_COLORS
>environment variable can change the settings.  Use the dircolors
>command to set it.
>
> Um, so by default we should not be doing any colour... and we are...
>

I don't recall making any argument that we're trying to match GNU
ls(1) behavior. Furthermore, again, we aren't doing any color by
default- only when the COLORTERM environment variable is set.

ls(1) on FreeBSD historically honors -an- environment variable for
enabling color. This environment variable is CLICOLOR. This commit
switched the environment variable honored to the more-standard
COLORTERM that is honored in other software and set by terminals that
are generally expected to be used with color.

I'm writing an UPDATING entry for this now to notify these users that
they should remove COLORTERM from their environment if they do not, in
fact, want a colored terminal.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Ian Lepore
On Wed, 2018-08-15 at 10:36 -0700, Rodney W. Grimes wrote:
> > 
> > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes
> >  wrote:
> > > 
> > > [ Charset UTF-8 unsupported, converting... ]
> > > > 
> > > > On 14 August 2018 at 21:41, Rodney W. Grimes
> > > >  wrote:
> > > > > 
> > > > > > 
> > > > > > Author: kevans
> > > > > > Date: Wed Aug 15 01:29:02 2018
> > > > > > New Revision: 337826
> > > > > > URL: https://svnweb.freebsd.org/changeset/base/337826
> > > > > > 
> > > > > > Log:
> > > > > >   MFC r337506: ls(1): Enable colors with COLORTERM is set
> > > > > > in the environment
> > > > > > 
> > > > > >   COLORTERM is the de facto standard, while CLICOLOR is
> > > > > > generally specific to
> > > > > >   FreeBSD and ls(1).
> > > > > I have already seen one "Who enabled %&*@(#$@) colored ls
> > > > > output in 12?"
> > > > > Seems that the defaults for xfce terminal is to have
> > > > > COLORTERM.
> > > > If xfce's default is to request colour via the de-facto
> > > > environment
> > > > variable then we should generally honour it -- the answer to
> > > > the
> > > > %&*@(#$@) question is "you did, via your terminal's default."
> > > And I pointed that out to them, but it is kinda a POLA, people
> > > have
> > > had to take explicit action to get colorls, that is no longer
> > > true
> > > and that suprises them when they see it.
> > > 
> > I find the POLA angle kind-of hard to buy, though. Nothing in the
> > base
> > system offers a way for the default behavior of ls(1) to be
> > altered,
> > and this whole change is only honoring a de-facto standard for
> > indicating that a colored terminal is supported and desired.
> > 
> > IMO, one should be aware of how the software they use is affecting
> > their environment and the kinds of repercussions these changes may
> > have. This is hardly the first bit of software that respects
> > COLORTERM, and it surely won't be the last (in general... no
> > specific
> > plans here). =(
> You can say it isnt a POLA, but the user was asstonished when it
> happened and made the comment, hence forth, it is POLA.
> 
> Personally, I dont care, I do not use xfce's default terminal,
> I specificially invoke xterm.
> 

I would expect the thing that would lead to the most astonishment by
most users would be "Even though I (or my shell) set COLORTERM, nothing
in freebsd respects that and I still have to turn 18 other knobs to get
color support from standard utilities."

There's not much I hate more than colored output in my preferred black-
on-white terminal windows, but having to enable or disable that support
in multiple places is the kind of thing that would rank right up there.

-- Ian

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Wed, Aug 15, 2018 at 11:31 AM Kyle Evans  wrote:
> >
> > On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes
> >  wrote:
> > > [ Charset UTF-8 unsupported, converting... ]
> > >> On 14 August 2018 at 21:41, Rodney W. Grimes
> > >>  wrote:
> > >> >> Author: kevans
> > >> >> Date: Wed Aug 15 01:29:02 2018
> > >> >> New Revision: 337826
> > >> >> URL: https://svnweb.freebsd.org/changeset/base/337826
> > >> >>
> > >> >> Log:
> > >> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> > >> >> environment
> > >> >>
> > >> >>   COLORTERM is the de facto standard, while CLICOLOR is generally 
> > >> >> specific to
> > >> >>   FreeBSD and ls(1).
> > >> >
> > >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 
> > >> > 12?"
> > >> > Seems that the defaults for xfce terminal is to have COLORTERM.
> > >>
> > >> If xfce's default is to request colour via the de-facto environment
> > >> variable then we should generally honour it -- the answer to the
> > >> %&*@(#$@) question is "you did, via your terminal's default."
> > >
> > > And I pointed that out to them, but it is kinda a POLA, people have
> > > had to take explicit action to get colorls, that is no longer true
> > > and that suprises them when they see it.
> > >
> >
> > I find the POLA angle kind-of hard to buy, though. Nothing in the base
> > system offers a way for the default behavior of ls(1) to be altered,
> > and this whole change is only honoring a de-facto standard for
> > indicating that a colored terminal is supported and desired.
> >
> > IMO, one should be aware of how the software they use is affecting
> > their environment and the kinds of repercussions these changes may
> > have. This is hardly the first bit of software that respects
> > COLORTERM, and it surely won't be the last (in general... no specific
> > plans here). =(
> 
> Respecting the same env var that other OS's do seems like a reduction in POLA.
> 
> Please consider putting a note in one or more of /usr/src/UPDATING,
> /usr/ports/UPDATING, and xfce/pkg-message explaining the change and
> what people should do to get the old behaviour. They're the best tools
> we have for improving POLA.

>From the Linux man page at: http://man7.org/linux/man-pages/man1/ls.1.html

   Using color to distinguish file types is disabled both by default and
   with --color=never.  With --color=auto, ls emits color codes only
   when standard output is connected to a terminal.  The LS_COLORS
   environment variable can change the settings.  Use the dircolors
   command to set it.

Um, so by default we should not be doing any colour... and we are...

> 
> # Adam
> 
> 
> -- 
> Adam Weinberger
> ad...@adamw.org
> https://www.adamw.org
> 

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


svn commit: 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,
-&fuse_node_count, 0, "");
+&fuse_node_count, 0, "Count of FUSE vnodes");
 
 intfuse_data_cache_enable = 1;
 
 SYSCTL_INT(_vfs_fuse, OID_AUTO, data_cache_enable, CTLFLAG_RW,
-&fuse_data_cache_enable, 0, "");
+&fuse_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,
-&fuse_data_cache_invalidate, 0, "");
+&fuse_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,
-&fuse_mmap_enable, 0, "");
+&fuse_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,
-&fuse_refresh_size, 0, "");
+&fuse_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,
-&fuse_sync_resize, 0, "");
+&fuse_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,
-&fuse_fix_broken_io, 0, "");
+&fuse_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, &fufh);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Adam Weinberger
On Wed, Aug 15, 2018 at 11:31 AM Kyle Evans  wrote:
>
> On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes
>  wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> On 14 August 2018 at 21:41, Rodney W. Grimes
> >>  wrote:
> >> >> Author: kevans
> >> >> Date: Wed Aug 15 01:29:02 2018
> >> >> New Revision: 337826
> >> >> URL: https://svnweb.freebsd.org/changeset/base/337826
> >> >>
> >> >> Log:
> >> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> >> >> environment
> >> >>
> >> >>   COLORTERM is the de facto standard, while CLICOLOR is generally 
> >> >> specific to
> >> >>   FreeBSD and ls(1).
> >> >
> >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> >> > Seems that the defaults for xfce terminal is to have COLORTERM.
> >>
> >> If xfce's default is to request colour via the de-facto environment
> >> variable then we should generally honour it -- the answer to the
> >> %&*@(#$@) question is "you did, via your terminal's default."
> >
> > And I pointed that out to them, but it is kinda a POLA, people have
> > had to take explicit action to get colorls, that is no longer true
> > and that suprises them when they see it.
> >
>
> I find the POLA angle kind-of hard to buy, though. Nothing in the base
> system offers a way for the default behavior of ls(1) to be altered,
> and this whole change is only honoring a de-facto standard for
> indicating that a colored terminal is supported and desired.
>
> IMO, one should be aware of how the software they use is affecting
> their environment and the kinds of repercussions these changes may
> have. This is hardly the first bit of software that respects
> COLORTERM, and it surely won't be the last (in general... no specific
> plans here). =(

Respecting the same env var that other OS's do seems like a reduction in POLA.

Please consider putting a note in one or more of /usr/src/UPDATING,
/usr/ports/UPDATING, and xfce/pkg-message explaining the change and
what people should do to get the old behaviour. They're the best tools
we have for improving POLA.

# Adam


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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes
>  wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> On 14 August 2018 at 21:41, Rodney W. Grimes
> >>  wrote:
> >> >> Author: kevans
> >> >> Date: Wed Aug 15 01:29:02 2018
> >> >> New Revision: 337826
> >> >> URL: https://svnweb.freebsd.org/changeset/base/337826
> >> >>
> >> >> Log:
> >> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> >> >> environment
> >> >>
> >> >>   COLORTERM is the de facto standard, while CLICOLOR is generally 
> >> >> specific to
> >> >>   FreeBSD and ls(1).
> >> >
> >> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> >> > Seems that the defaults for xfce terminal is to have COLORTERM.
> >>
> >> If xfce's default is to request colour via the de-facto environment
> >> variable then we should generally honour it -- the answer to the
> >> %&*@(#$@) question is "you did, via your terminal's default."
> >
> > And I pointed that out to them, but it is kinda a POLA, people have
> > had to take explicit action to get colorls, that is no longer true
> > and that suprises them when they see it.
> >
> 
> I find the POLA angle kind-of hard to buy, though. Nothing in the base
> system offers a way for the default behavior of ls(1) to be altered,
> and this whole change is only honoring a de-facto standard for
> indicating that a colored terminal is supported and desired.
> 
> IMO, one should be aware of how the software they use is affecting
> their environment and the kinds of repercussions these changes may
> have. This is hardly the first bit of software that respects
> COLORTERM, and it surely won't be the last (in general... no specific
> plans here). =(

You can say it isnt a POLA, but the user was asstonished when it
happened and made the comment, hence forth, it is POLA.

Personally, I dont care, I do not use xfce's default terminal,
I specificially invoke xterm.

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


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Kyle Evans
On Wed, Aug 15, 2018 at 11:07 AM, Rodney W. Grimes
 wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> On 14 August 2018 at 21:41, Rodney W. Grimes
>>  wrote:
>> >> Author: kevans
>> >> Date: Wed Aug 15 01:29:02 2018
>> >> New Revision: 337826
>> >> URL: https://svnweb.freebsd.org/changeset/base/337826
>> >>
>> >> Log:
>> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
>> >> environment
>> >>
>> >>   COLORTERM is the de facto standard, while CLICOLOR is generally 
>> >> specific to
>> >>   FreeBSD and ls(1).
>> >
>> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
>> > Seems that the defaults for xfce terminal is to have COLORTERM.
>>
>> If xfce's default is to request colour via the de-facto environment
>> variable then we should generally honour it -- the answer to the
>> %&*@(#$@) question is "you did, via your terminal's default."
>
> And I pointed that out to them, but it is kinda a POLA, people have
> had to take explicit action to get colorls, that is no longer true
> and that suprises them when they see it.
>

I find the POLA angle kind-of hard to buy, though. Nothing in the base
system offers a way for the default behavior of ls(1) to be altered,
and this whole change is only honoring a de-facto standard for
indicating that a colored terminal is supported and desired.

IMO, one should be aware of how the software they use is affecting
their environment and the kinds of repercussions these changes may
have. This is hardly the first bit of software that respects
COLORTERM, and it surely won't be the last (in general... no specific
plans here). =(
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337859 - stable/11/sys/net

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

Log:
  MFC r321649:
  
  Remove the unused mutex since r273220.
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  stable/11/sys/net/if_stf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/if_stf.c
==
--- stable/11/sys/net/if_stf.c  Wed Aug 15 16:27:52 2018(r337858)
+++ stable/11/sys/net/if_stf.c  Wed Aug 15 16:34:31 2018(r337859)
@@ -139,7 +139,6 @@ SYSCTL_INT(_net_link_stf, OID_AUTO, permit_rfc1918, CT
 
 struct stf_softc {
struct ifnet*sc_ifp;
-   struct mtx  sc_ro_mtx;
u_int   sc_fibnum;
const struct encaptab *encap_cookie;
 };
@@ -147,10 +146,6 @@ struct stf_softc {
 
 static const char stfname[] = "stf";
 
-/*
- * Note that mutable fields in the softc are not currently locked.
- * We do lock sc_ro in stf_output though.
- */
 static MALLOC_DEFINE(M_STF, stfname, "6to4 Tunnel Interface");
 static const int ip_stf_ttl = 40;
 
@@ -253,7 +248,6 @@ stf_clone_create(struct if_clone *ifc, char *name, siz
ifp->if_dname = stfname;
ifp->if_dunit = IF_DUNIT_NONE;
 
-   mtx_init(&(sc)->sc_ro_mtx, "stf ro", NULL, MTX_DEF);
sc->encap_cookie = encap_attach_func(AF_INET, IPPROTO_IPV6,
stf_encapcheck, &in_stf_protosw, sc);
if (sc->encap_cookie == NULL) {
@@ -280,7 +274,6 @@ stf_clone_destroy(struct if_clone *ifc, struct ifnet *
 
err = encap_detach(sc->encap_cookie);
KASSERT(err == 0, ("Unexpected error detaching encap_cookie"));
-   mtx_destroy(&(sc)->sc_ro_mtx);
bpfdetach(ifp);
if_detach(ifp);
if_free(ifp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337858 - stable/11/sys/dev/sdhci

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

Log:
  MFC r317800:
  
  Add support for the no-1-8-v and wp-inverted properties in generic SDHCI
  FDT glue.
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  stable/11/sys/dev/sdhci/sdhci_fdt.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/sdhci/sdhci_fdt.c
==
--- stable/11/sys/dev/sdhci/sdhci_fdt.c Wed Aug 15 16:22:12 2018
(r337857)
+++ stable/11/sys/dev/sdhci/sdhci_fdt.c Wed Aug 15 16:27:52 2018
(r337858)
@@ -70,6 +70,9 @@ struct sdhci_fdt_softc {
int num_slots;  /* Number of slots on this controller*/
struct sdhci_slot slots[MAX_SLOTS];
struct resource *mem_res[MAX_SLOTS];/* Memory resource */
+
+   boolwp_inverted;/* WP pin is inverted */
+   boolno_18v; /* No 1.8V support */
 };
 
 static uint8_t
@@ -110,8 +113,13 @@ static uint32_t
 sdhci_fdt_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
 {
struct sdhci_fdt_softc *sc = device_get_softc(dev);
+   uint32_t val32;
 
-   return (bus_read_4(sc->mem_res[slot->num], off));
+   val32 = bus_read_4(sc->mem_res[slot->num], off);
+   if (off == SDHCI_CAPABILITIES && sc->no_18v)
+   val32 &= ~SDHCI_CAN_VDD_180;
+
+   return (val32);
 }
 
 static void
@@ -152,6 +160,14 @@ sdhci_fdt_intr(void *arg)
 }
 
 static int
+sdhci_fdt_get_ro(device_t bus, device_t dev)
+{
+   struct sdhci_fdt_softc *sc = device_get_softc(bus);
+
+   return (sdhci_generic_get_ro(bus, dev) ^ sc->wp_inverted);
+}
+
+static int
 sdhci_fdt_probe(device_t dev)
 {
struct sdhci_fdt_softc *sc = device_get_softc(dev);
@@ -182,6 +198,10 @@ sdhci_fdt_probe(device_t dev)
sc->num_slots = cid;
if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0)
sc->max_clk = cid;
+   if (OF_hasprop(node, "no-1-8-v"))
+   sc->no_18v = true;
+   if (OF_hasprop(node, "wp-inverted"))
+   sc->wp_inverted = true;
 
return (0);
 }
@@ -279,7 +299,7 @@ static device_method_t sdhci_fdt_methods[] = {
/* mmcbr_if */
DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios),
DEVMETHOD(mmcbr_request,sdhci_generic_request),
-   DEVMETHOD(mmcbr_get_ro, sdhci_generic_get_ro),
+   DEVMETHOD(mmcbr_get_ro, sdhci_fdt_get_ro),
DEVMETHOD(mmcbr_acquire_host,   sdhci_generic_acquire_host),
DEVMETHOD(mmcbr_release_host,   sdhci_generic_release_host),
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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 new

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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337856 - stable/11/sys/dev/vmware/vmxnet3

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

Log:
  MFC r313911:
  
  Spell VMXNET3_LEGACY_TX correctly.

Modified:
  stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.h
==
--- stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.hWed Aug 15 16:12:13 
2018(r337855)
+++ stable/11/sys/dev/vmware/vmxnet3/if_vmxvar.hWed Aug 15 16:16:59 
2018(r337856)
@@ -131,7 +131,7 @@ struct vmxnet3_txq_stats {
 struct vmxnet3_txqueue {
struct mtx   vxtxq_mtx;
struct vmxnet3_softc*vxtxq_sc;
-#ifndef VMXNET3_TX_LEGACY
+#ifndef VMXNET3_LEGACY_TX
struct buf_ring *vxtxq_br;
 #endif
int  vxtxq_id;
@@ -142,7 +142,7 @@ struct vmxnet3_txqueue {
struct vmxnet3_txq_stats vxtxq_stats;
struct vmxnet3_txq_shared   *vxtxq_ts;
struct sysctl_oid_list  *vxtxq_sysctl;
-#ifndef VMXNET3_TX_LEGACY
+#ifndef VMXNET3_LEGACY_TX
struct task  vxtxq_defrtask;
 #endif
char vxtxq_name[16];
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r337855 - stable/11/sys/net

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

Log:
  MFC r312953:
  
  The stf(4) interface name does not conform with the default naming
  convention for interfaces, because only one stf(4) interface can exist
  in the system.
  
  This disallow the use of unit numbers different than 0, however, it is
  possible to create the clone without specify the unit number (wildcard).
  
  In the wildcard case we must update the interface name before return.
  
  This fix an infinite recursion in pf code that keeps track of network
  interfaces and groups:
  
  1 - a group for the cloned type of the interface is added (stf in this
  case);
  2 - the system will now try to add an interface named stf (instead of
  stf0) to stf group;
  3 - when pfi_kif_attach() tries to search for an already existing 'stf'
  interface, the 'stf' group is returned and thus the group is added
  as an interface of itself;
  
  This will now cause a crash at the first attempt to traverse the groups
  which the stf interface belongs (which loops over itself).
  
  Obtained from:pfSense
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  stable/11/sys/net/if_stf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/if_stf.c
==
--- stable/11/sys/net/if_stf.c  Wed Aug 15 15:44:30 2018(r337854)
+++ stable/11/sys/net/if_stf.c  Wed Aug 15 16:12:13 2018(r337855)
@@ -202,10 +202,16 @@ stf_clone_match(struct if_clone *ifc, const char *name
 static int
 stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
 {
-   int err, unit;
+   char *dp;
+   int err, unit, wildcard;
struct stf_softc *sc;
struct ifnet *ifp;
 
+   err = ifc_name2unit(name, &unit);
+   if (err != 0)
+   return (err);
+   wildcard = (unit < 0);
+
/*
 * We can only have one unit, but since unit allocation is
 * already locked, we use it to keep from allocating extra
@@ -229,7 +235,20 @@ stf_clone_create(struct if_clone *ifc, char *name, siz
/*
 * Set the name manually rather then using if_initname because
 * we don't conform to the default naming convention for interfaces.
+* In the wildcard case, we need to update the name.
 */
+   if (wildcard) {
+   for (dp = name; *dp != '\0'; dp++);
+   if (snprintf(dp, len - (dp-name), "%d", unit) >
+   len - (dp-name) - 1) {
+   /*
+* This can only be a programmer error and
+* there's no straightforward way to recover if
+* it happens.
+*/
+   panic("if_clone_create(): interface name too long");
+   }
+   }
strlcpy(ifp->if_xname, name, IFNAMSIZ);
ifp->if_dname = stfname;
ifp->if_dunit = IF_DUNIT_NONE;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On 14 August 2018 at 21:41, Rodney W. Grimes
>  wrote:
> >> Author: kevans
> >> Date: Wed Aug 15 01:29:02 2018
> >> New Revision: 337826
> >> URL: https://svnweb.freebsd.org/changeset/base/337826
> >>
> >> Log:
> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> >> environment
> >>
> >>   COLORTERM is the de facto standard, while CLICOLOR is generally specific 
> >> to
> >>   FreeBSD and ls(1).
> >
> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> > Seems that the defaults for xfce terminal is to have COLORTERM.
> 
> If xfce's default is to request colour via the de-facto environment
> variable then we should generally honour it -- the answer to the
> %&*@(#$@) question is "you did, via your terminal's default."

And I pointed that out to them, but it is kinda a POLA, people have
had to take explicit action to get colorls, that is no longer true
and that suprises them when they see it.


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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Ed Maste
On 14 August 2018 at 21:41, Rodney W. Grimes
 wrote:
>> Author: kevans
>> Date: Wed Aug 15 01:29:02 2018
>> New Revision: 337826
>> URL: https://svnweb.freebsd.org/changeset/base/337826
>>
>> Log:
>>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the environment
>>
>>   COLORTERM is the de facto standard, while CLICOLOR is generally specific to
>>   FreeBSD and ls(1).
>
> I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> Seems that the defaults for xfce terminal is to have COLORTERM.

If xfce's default is to request colour via the de-facto environment
variable then we should generally honour it -- the answer to the
%&*@(#$@) question is "you did, via your terminal's default."
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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->ia_ifa, 1);
 
if (ia->ia_ifa.ifa_carp)
-   (*carp_detach_p)(&ia->ia_ifa,
-   (cmd == SIOCDIFADDR) ? false : true);
+   (*carp_detach_p)(&ia->ia_ifa, cmd == SIOCAIFADDR);
 
/*
 * If this is the last IPv4 address configured on this
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
> [ Charset UTF-8 unsupported, converting... ]
> > On Tue, Aug 14, 2018 at 8:41 PM, Rodney W. Grimes
> >  wrote:
> > >> Author: kevans
> > >> Date: Wed Aug 15 01:29:02 2018
> > >> New Revision: 337826
> > >> URL: https://svnweb.freebsd.org/changeset/base/337826
> > >>
> > >> Log:
> > >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> > >> environment
> > >>
> > >>   COLORTERM is the de facto standard, while CLICOLOR is generally 
> > >> specific to
> > >>   FreeBSD and ls(1).
> > >
> > > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> > > Seems that the defaults for xfce terminal is to have COLORTERM.
> > >
> > 
> > Hmm? No one's pointed me at any such complaints, and I've not seen any
> > seen pass by -- neither in response to the initial commit mail, or on
> > -current@
> 
> It was not in a public forum.  And it was just yesterday, so it
> takes times for these things to trickle out and be noticed.
> Just be aware, this change is gona have a few shocked users as
> it proliferates.  
> 
> My 'changes' that are made take 1 to 2 years before the mass user

My -> Many

> community notices there over all effects.  
> 

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


Re: svn commit: r337826 - stable/11/bin/ls

2018-08-15 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Tue, Aug 14, 2018 at 8:41 PM, Rodney W. Grimes
>  wrote:
> >> Author: kevans
> >> Date: Wed Aug 15 01:29:02 2018
> >> New Revision: 337826
> >> URL: https://svnweb.freebsd.org/changeset/base/337826
> >>
> >> Log:
> >>   MFC r337506: ls(1): Enable colors with COLORTERM is set in the 
> >> environment
> >>
> >>   COLORTERM is the de facto standard, while CLICOLOR is generally specific 
> >> to
> >>   FreeBSD and ls(1).
> >
> > I have already seen one "Who enabled %&*@(#$@) colored ls output in 12?"
> > Seems that the defaults for xfce terminal is to have COLORTERM.
> >
> 
> Hmm? No one's pointed me at any such complaints, and I've not seen any
> seen pass by -- neither in response to the initial commit mail, or on
> -current@

It was not in a public forum.  And it was just yesterday, so it
takes times for these things to trickle out and be noticed.
Just be aware, this change is gona have a few shocked users as
it proliferates.  

My 'changes' that are made take 1 to 2 years before the mass user
community notices there over all effects.  

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


Re: svn commit: 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).
> +# 

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, &l1_list, l1_link) {
-   l1->l1_kva[L1_IDX(va)] = pd;
-   PTE_SYNC(&l1->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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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, &l1_list, l1_link) {
-   va = va0;
-   for (; va < va_end; va += L1_S_SIZE) {
-   l1->l1_kva[L1_IDX(va)] = pd;
-   PTE_SYNC(&l1->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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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(&cmtx);
 }
-#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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: 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;
-
-#

  1   2   >