svn commit: r335757 - head/sbin/ifconfig

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Thu Jun 28 03:37:15 2018
New Revision: 335757
URL: https://svnweb.freebsd.org/changeset/base/335757

Log:
  ifconfig(8): Attempt to render non-printable sequences w/ UTF-8 Environment
  
  Currently ifconfig(8) only prints the hex representation of ssid names
  with non-ASCII characters. Many modern terminals are able to properly render
  non-ASCII characters. This change checks if the terminal charmap is UTF-8,
  and if so, will render the characters, rather than the hex value.
  
  This behavior is circumvented by running ifconfig(8) in a non-UTF8 locale;
  e.g. C or POSIX.
  
  It was pointed out by kp@ during the review that APs have the option to
  broadcast whether their SSIDs may be interpreted as UTF-8. Ideally, we would
  honor this and only attempt this behavior if it's so-broadcasted by the AP.
  
  However, a sample survey showed that hostapd will advertise this if
  indicated in config but it doesn't seem to be so common in the AP market, so
  this would be effectively useless as we'll rarely know if the SSID should be
  renderable as UTF-8.
  
  Despite this, it was decided to be OK with this anyways- there's a
  straightforward path to doing it the right way based on advertisement by AP
  if we need to go that route, and one can revert to old behavior easily
  enough at runtime if we get it wrong.
  
  Submitted by: Farhan Khan 
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D15922

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cThu Jun 28 01:45:53 2018
(r335756)
+++ head/sbin/ifconfig/ifieee80211.cThu Jun 28 03:37:15 2018
(r335757)
@@ -90,6 +90,8 @@
 #include 
 #include 
 #include /* NB: for offsetof */
+#include 
+#include 
 
 #include "ifconfig.h"
 
@@ -5383,16 +5385,21 @@ print_string(const u_int8_t *buf, int len)
 {
int i;
int hasspc;
+   int utf8;
 
i = 0;
hasspc = 0;
+
+   setlocale(LC_CTYPE, "");
+   utf8 = strncmp("UTF-8", nl_langinfo(CODESET), 5) == 0;
+
for (; i < len; i++) {
-   if (!isprint(buf[i]) && buf[i] != '\0')
+   if (!isprint(buf[i]) && buf[i] != '\0' && !utf8)
break;
if (isspace(buf[i]))
hasspc++;
}
-   if (i == len) {
+   if (i == len || utf8) {
if (hasspc || len == 0 || buf[0] == '\0')
printf("\"%.*s\"", len, buf);
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: r335690 - head/sys/kern

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 8:14 PM, Devin Teske  wrote:

>
> On Jun 27, 2018, at 6:58 PM, Warner Losh  wrote:
>
>
>
> On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske  wrote:
>
>>
>> On Jun 27, 2018, at 5:59 PM, Warner Losh  wrote:
>>
>>
>>
>> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff 
>> wrote:
>>
>>> On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
>>> W> Author: imp
>>> W> Date: Wed Jun 27 04:11:09 2018
>>> W> New Revision: 335690
>>> W> URL: https://svnweb.freebsd.org/changeset/base/335690
>>> W>
>>> W> Log:
>>> W>   Fix devctl generation for core files.
>>> W>
>>> W>   We have a problem with vn_fullpath_global when the file exists. Work
>>> W>   around it by printing the full path if the core file name starts
>>> with /,
>>> W>   or current working directory followed by the filename if not.
>>>
>>> Is this going to work when a core is dumped not at current working
>>> directory,
>>> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
>>>
>>
>> Yes. That works.
>>
>>
>>> Looks like the vn_fullpath_global needs to be fixed rather than problem
>>> workarounded.
>>>
>>
>> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a
>> name. The only reason we're able to at all is due to the name cache. And
>> when we recreate a file, we invalidate the name cache. And even if we fixed
>> that, there's no guarantee the name cache won't get flushed before we
>> translate the name Linux can do this because it keeps the path name
>> associated with the inode. FreeBSD simply doesn't.
>>
>>
>> They said it couldn't be done, but I personally have done it ...
>>
>> I map vnodes to full paths in dwatch. It's not impossible, just
>> implausibly hard.
>>
>> I derived my formula by reading the C code which was very twisty-turny
>> and rather hard to read at times (and I have been using C since 1998 on
>> everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless
>> Linux-like things, IRIX, and a God-awful remainder of many others; the
>> vnode code was an adventure to say the least).
>>
>> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create
>>
>> I load up a clause-local variable named "path" with a path constructed
>> from a pointer to a vnode structure argument to VOP_CREATE(9).
>>
>> The D code could easily be rewritten back into C to walk the vnode to
>> completion (compared to the D code which is bounded by depth-limit since
>> DTrace doesn't provide loops; so you have to, as I have done, use a
>> higher-level language wrapper to repeat the code to some desired limit;
>> dwatch defaulting to 64 for directory depth limit).
>>
>> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which
>> utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more
>> accurate, produces full paths, and I've benchmarked it at lower overhead
>> with better results.
>>
>> Maybe some of this can be useful? If not, just ignore me.
>>
>
> IMHO, there's no benefit from the crazy hoops than the super simple
> heuristic I did: if the path starts with / print it. If the path doesn't
> print cwd / and then the path.
>
> I look forward to seeing your conversion of the D to C that works, even
> when there's namespace cache pressure.
>
>
> I was looking at the output of "dwatch -dX vop_create" (the -d flag to
> dwatch causes the generated dwatch to be printed instead of executed) and
> thinking to myself:
>
> I could easily convert this, as I can recognize the flattened loop
> structure. However, not many people will be able to do it. I wasn't really
> volunteering, but now I'm curious what other people see when they run
> "dwatch -dX vop_create". If it's half as bad as I think it is, then I'll
> gladly do it -- but will have to balance it against work priorities.
>

We don't have the data you do in vop_create anymore, just the vp at the
point in the code where we want to do the reverse translation... But we
also have a name that's been filled in from the template and cwd, which
gives us almost the same thing as we'd hoped to dig out of the name cache...

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: r335690 - head/sys/kern

2018-06-27 Thread Devin Teske


> On Jun 27, 2018, at 6:58 PM, Warner Losh  wrote:
> 
> 
> 
> On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske  > wrote:
> 
>> On Jun 27, 2018, at 5:59 PM, Warner Losh > > wrote:
>> 
>> 
>> 
>> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > > wrote:
>> On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
>> W> Author: imp
>> W> Date: Wed Jun 27 04:11:09 2018
>> W> New Revision: 335690
>> W> URL: https://svnweb.freebsd.org/changeset/base/335690 
>> 
>> W> 
>> W> Log:
>> W>   Fix devctl generation for core files.
>> W>   
>> W>   We have a problem with vn_fullpath_global when the file exists. Work
>> W>   around it by printing the full path if the core file name starts with /,
>> W>   or current working directory followed by the filename if not.
>> 
>> Is this going to work when a core is dumped not at current working directory,
>> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
>> 
>> Yes. That works.
>>  
>> Looks like the vn_fullpath_global needs to be fixed rather than problem
>> workarounded.
>> 
>> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a 
>> name. The only reason we're able to at all is due to the name cache. And 
>> when we recreate a file, we invalidate the name cache. And even if we fixed 
>> that, there's no guarantee the name cache won't get flushed before we 
>> translate the name Linux can do this because it keeps the path name 
>> associated with the inode. FreeBSD simply doesn't.
>> 
> 
> They said it couldn't be done, but I personally have done it ...
> 
> I map vnodes to full paths in dwatch. It's not impossible, just implausibly 
> hard.
> 
> I derived my formula by reading the C code which was very twisty-turny and 
> rather hard to read at times (and I have been using C since 1998 on 
> everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless 
> Linux-like things, IRIX, and a God-awful remainder of many others; the vnode 
> code was an adventure to say the least).
> 
> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create
> 
> I load up a clause-local variable named "path" with a path constructed from a 
> pointer to a vnode structure argument to VOP_CREATE(9).
> 
> The D code could easily be rewritten back into C to walk the vnode to 
> completion (compared to the D code which is bounded by depth-limit since 
> DTrace doesn't provide loops; so you have to, as I have done, use a 
> higher-level language wrapper to repeat the code to some desired limit; 
> dwatch defaulting to 64 for directory depth limit).
> 
> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which 
> utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more 
> accurate, produces full paths, and I've benchmarked it at lower overhead with 
> better results.
> 
> Maybe some of this can be useful? If not, just ignore me.
> 
> IMHO, there's no benefit from the crazy hoops than the super simple heuristic 
> I did: if the path starts with / print it. If the path doesn't print cwd / 
> and then the path.
> 
> I look forward to seeing your conversion of the D to C that works, even when 
> there's namespace cache pressure.
> 

I was looking at the output of "dwatch -dX vop_create" (the -d flag to dwatch 
causes the generated dwatch to be printed instead of executed) and thinking to 
myself:

I could easily convert this, as I can recognize the flattened loop structure. 
However, not many people will be able to do it. I wasn't really volunteering, 
but now I'm curious what other people see when they run "dwatch -dX 
vop_create". If it's half as bad as I think it is, then I'll gladly do it -- 
but will have to balance it against work priorities.
-- 
Devin
___
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: r335690 - head/sys/kern

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske  wrote:

>
> On Jun 27, 2018, at 5:59 PM, Warner Losh  wrote:
>
>
>
> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff 
> wrote:
>
>> On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
>> W> Author: imp
>> W> Date: Wed Jun 27 04:11:09 2018
>> W> New Revision: 335690
>> W> URL: https://svnweb.freebsd.org/changeset/base/335690
>> W>
>> W> Log:
>> W>   Fix devctl generation for core files.
>> W>
>> W>   We have a problem with vn_fullpath_global when the file exists. Work
>> W>   around it by printing the full path if the core file name starts
>> with /,
>> W>   or current working directory followed by the filename if not.
>>
>> Is this going to work when a core is dumped not at current working
>> directory,
>> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
>>
>
> Yes. That works.
>
>
>> Looks like the vn_fullpath_global needs to be fixed rather than problem
>> workarounded.
>>
>
> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a
> name. The only reason we're able to at all is due to the name cache. And
> when we recreate a file, we invalidate the name cache. And even if we fixed
> that, there's no guarantee the name cache won't get flushed before we
> translate the name Linux can do this because it keeps the path name
> associated with the inode. FreeBSD simply doesn't.
>
>
> They said it couldn't be done, but I personally have done it ...
>
> I map vnodes to full paths in dwatch. It's not impossible, just
> implausibly hard.
>
> I derived my formula by reading the C code which was very twisty-turny and
> rather hard to read at times (and I have been using C since 1998 on
> everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless
> Linux-like things, IRIX, and a God-awful remainder of many others; the
> vnode code was an adventure to say the least).
>
> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create
>
> I load up a clause-local variable named "path" with a path constructed
> from a pointer to a vnode structure argument to VOP_CREATE(9).
>
> The D code could easily be rewritten back into C to walk the vnode to
> completion (compared to the D code which is bounded by depth-limit since
> DTrace doesn't provide loops; so you have to, as I have done, use a
> higher-level language wrapper to repeat the code to some desired limit;
> dwatch defaulting to 64 for directory depth limit).
>
> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which
> utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more
> accurate, produces full paths, and I've benchmarked it at lower overhead
> with better results.
>
> Maybe some of this can be useful? If not, just ignore me.
>

IMHO, there's no benefit from the crazy hoops than the super simple
heuristic I did: if the path starts with / print it. If the path doesn't
print cwd / and then the path.

I look forward to seeing your conversion of the D to C that works, even
when there's namespace cache pressure.

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: r335690 - head/sys/kern

2018-06-27 Thread Devin Teske


> On Jun 27, 2018, at 5:59 PM, Warner Losh  wrote:
> 
> 
> 
> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff  > wrote:
> On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
> W> Author: imp
> W> Date: Wed Jun 27 04:11:09 2018
> W> New Revision: 335690
> W> URL: https://svnweb.freebsd.org/changeset/base/335690 
> 
> W> 
> W> Log:
> W>   Fix devctl generation for core files.
> W>   
> W>   We have a problem with vn_fullpath_global when the file exists. Work
> W>   around it by printing the full path if the core file name starts with /,
> W>   or current working directory followed by the filename if not.
> 
> Is this going to work when a core is dumped not at current working directory,
> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
> 
> Yes. That works.
>  
> Looks like the vn_fullpath_global needs to be fixed rather than problem
> workarounded.
> 
> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a 
> name. The only reason we're able to at all is due to the name cache. And when 
> we recreate a file, we invalidate the name cache. And even if we fixed that, 
> there's no guarantee the name cache won't get flushed before we translate the 
> name Linux can do this because it keeps the path name associated with the 
> inode. FreeBSD simply doesn't.
> 

They said it couldn't be done, but I personally have done it ...

I map vnodes to full paths in dwatch. It's not impossible, just implausibly 
hard.

I derived my formula by reading the C code which was very twisty-turny and 
rather hard to read at times (and I have been using C since 1998 on everything 
from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless Linux-like 
things, IRIX, and a God-awful remainder of many others; the vnode code was an 
adventure to say the least).

You're welcome to see how it's done in /usr/libexec/dwatch/vop_create

I load up a clause-local variable named "path" with a path constructed from a 
pointer to a vnode structure argument to VOP_CREATE(9).

The D code could easily be rewritten back into C to walk the vnode to 
completion (compared to the D code which is bounded by depth-limit since DTrace 
doesn't provide loops; so you have to, as I have done, use a higher-level 
language wrapper to repeat the code to some desired limit; dwatch defaulting to 
64 for directory depth limit).

Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which 
utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more 
accurate, produces full paths, and I've benchmarked it at lower overhead with 
better results.

Maybe some of this can be useful? If not, just ignore me.
-- 
Devin
___
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: r335756 - head/sbin/devd

2018-06-27 Thread Warner Losh
Author: imp
Date: Thu Jun 28 01:45:53 2018
New Revision: 335756
URL: https://svnweb.freebsd.org/changeset/base/335756

Log:
  We're not, yet, at C++11 capable on all our plaforms.
  
  Use a possibly slower, but C++98 compatibe way to iterate through the
  string.
  
  Noticed by: g++ 4.2.1 and Mark Millard

Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
==
--- head/sbin/devd/devd.cc  Thu Jun 28 01:32:37 2018(r335755)
+++ head/sbin/devd/devd.cc  Thu Jun 28 01:45:53 2018(r335756)
@@ -640,6 +640,8 @@ string
 config::shell_quote(const string )
 {
string buffer;
+   const char *cs, *ce;
+   char c;
 
/*
 * Enclose the string in $' ' with escapes for ' and / characters making
@@ -649,7 +651,10 @@ config::shell_quote(const string )
buffer.reserve(s.length() * 3 / 2);
buffer += '$';
buffer += '\'';
-   for (const char  : s) {
+   cs = s.c_str();
+   ce = cs + strlen(cs);
+   for (; cs < ce; cs++) {
+   c = *cs;
if (c == '\'' || c == '\\') {
buffer += '\\';
}
___
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: r335755 - in stable/11/stand: common efi/loader i386/libi386 userboot/userboot

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Thu Jun 28 01:32:37 2018
New Revision: 335755
URL: https://svnweb.freebsd.org/changeset/base/335755

Log:
  MFC r334882, r334884-r334885: loader(8) boot flag <-> environment fixes
  
  r334882:
  stand: Consolidate checking for boot flags driven by environment vars
  
  e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these
  in multiple places, consolidate into common/ and allow a setting of "NO" for
  any of these to turn them off. This allows systems with multiple
  loader.conf(5) or loader.conf(5) overlay systems to easily turn off
  variables in later processed files by setting it to NO.
  
  Reported by:  Nick Wolff @ iXsystems
  Reviewed by:  imp
  
  r334884:
  stand: Fix build after r334882
  
  Not sure how this was not caught in Universe.
  
  r334885:
  stand: One more trivial consolidation (setting environment from howto)

Modified:
  stable/11/stand/common/boot.c
  stable/11/stand/common/bootstrap.h
  stable/11/stand/common/metadata.c
  stable/11/stand/efi/loader/bootinfo.c
  stable/11/stand/efi/loader/main.c
  stable/11/stand/i386/libi386/bootinfo.c
  stable/11/stand/userboot/userboot/bootinfo.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/common/boot.c
==
--- stable/11/stand/common/boot.c   Thu Jun 28 01:30:03 2018
(r335754)
+++ stable/11/stand/common/boot.c   Thu Jun 28 01:32:37 2018
(r335755)
@@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$");
  */
 
 #include 
+#include 
+#include 
 #include 
 
 #include "bootstrap.h"
@@ -156,6 +158,30 @@ autoboot_maybe()
cp = getenv("autoboot_delay");
if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO")))
autoboot(-1, NULL); /* try to boot automatically */
+}
+
+int
+bootenv_flags()
+{
+   int i, howto;
+   char *val;
+
+   for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) {
+   val = getenv(howto_names[i].ev);
+   if (val != NULL && strcasecmp(val, "no") != 0)
+   howto |= howto_names[i].mask;
+   }
+   return (howto);
+}
+
+void
+bootenv_set(int howto)
+{
+   int i;
+
+   for (i = 0; howto_names[i].ev != NULL; i++)
+   if (howto & howto_names[i].mask)
+   setenv(howto_names[i].ev, "YES", 1);
 }
 
 static int

Modified: stable/11/stand/common/bootstrap.h
==
--- stable/11/stand/common/bootstrap.h  Thu Jun 28 01:30:03 2018
(r335754)
+++ stable/11/stand/common/bootstrap.h  Thu Jun 28 01:32:37 2018
(r335755)
@@ -63,6 +63,8 @@ int   parse(int *argc, char ***argv, const char *str);
 /* boot.c */
 void   autoboot_maybe(void);
 intgetrootmount(char *rootdev);
+intbootenv_flags(void);
+void   bootenv_set(int);
 
 /* misc.c */
 char   *unargv(int argc, char *argv[]);

Modified: stable/11/stand/common/metadata.c
==
--- stable/11/stand/common/metadata.c   Thu Jun 28 01:30:03 2018
(r335754)
+++ stable/11/stand/common/metadata.c   Thu Jun 28 01:32:37 2018
(r335755)
@@ -31,9 +31,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
 #if defined(LOADER_FDT_SUPPORT)
 #include 
 #endif
@@ -100,7 +99,6 @@ md_getboothowto(char *kargs)
 char   *cp;
 inthowto;
 intactive;
-inti;
 
 /* Parse kargs */
 howto = 0;
@@ -153,10 +151,7 @@ md_getboothowto(char *kargs)
}
 }
 
-/* get equivalents from the environment */
-for (i = 0; howto_names[i].ev != NULL; i++)
-   if (getenv(howto_names[i].ev) != NULL)
-   howto |= howto_names[i].mask;
+howto |= bootenv_flags();
 #if defined(__sparc64__)
 if (md_bootserial() != -1)
howto |= RB_SERIAL;

Modified: stable/11/stand/efi/loader/bootinfo.c
==
--- stable/11/stand/efi/loader/bootinfo.c   Thu Jun 28 01:30:03 2018
(r335754)
+++ stable/11/stand/efi/loader/bootinfo.c   Thu Jun 28 01:32:37 2018
(r335755)
@@ -32,9 +32,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -72,15 +71,9 @@ bi_getboothowto(char *kargs)
const char *sw;
char *opts;
char *console;
-   int howto, i;
+   int howto;
 
-   howto = 0;
-
-   /* Get the boot options from the environment first. */
-   for (i = 0; howto_names[i].ev != NULL; i++) {
-   if (getenv(howto_names[i].ev) != NULL)
-   howto |= howto_names[i].mask;
-   }
+   howto = bootenv_flags();
 
console = getenv("console");
if (console != NULL) {


svn commit: r335754 - stable/11/stand/libsa

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Thu Jun 28 01:30:03 2018
New Revision: 335754
URL: https://svnweb.freebsd.org/changeset/base/335754

Log:
  MFC r334878: libsa(3): Correct statement about FS Write-support, name change
  
  - jhb implemented UFS write support a little over 16 years ago.
  - Update the library name while we're here.

Modified:
  stable/11/stand/libsa/libsa.3
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/libsa/libsa.3
==
--- stable/11/stand/libsa/libsa.3   Wed Jun 27 23:44:37 2018
(r335753)
+++ stable/11/stand/libsa/libsa.3   Thu Jun 28 01:30:03 2018
(r335754)
@@ -24,11 +24,11 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 1, 2018
-.Dt LIBSTAND 3
+.Dd February 22, 2018
+.Dt LIBSA 3
 .Os
 .Sh NAME
-.Nm libstand
+.Nm libsa
 .Nd support library for standalone executables
 .Sh SYNOPSIS
 .In stand.h
@@ -402,8 +402,8 @@ except that file creation is not supported, so the mod
 required.
 The
 .Fa flags
-argument may be one of O_RDONLY, O_WRONLY and O_RDWR (although no file systems
-currently support writing).
+argument may be one of O_RDONLY, O_WRONLY and O_RDWR.
+Only UFS currently supports writing.
 .It Xo
 .Ft int
 .Fn close "int fd"
___
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: r335690 - head/sys/kern

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff  wrote:

> On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
> W> Author: imp
> W> Date: Wed Jun 27 04:11:09 2018
> W> New Revision: 335690
> W> URL: https://svnweb.freebsd.org/changeset/base/335690
> W>
> W> Log:
> W>   Fix devctl generation for core files.
> W>
> W>   We have a problem with vn_fullpath_global when the file exists. Work
> W>   around it by printing the full path if the core file name starts with
> /,
> W>   or current working directory followed by the filename if not.
>
> Is this going to work when a core is dumped not at current working
> directory,
> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
>

Yes. That works.


> Looks like the vn_fullpath_global needs to be fixed rather than problem
> workarounded.
>

It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a
name. The only reason we're able to at all is due to the name cache. And
when we recreate a file, we invalidate the name cache. And even if we fixed
that, there's no guarantee the name cache won't get flushed before we
translate the name Linux can do this because it keeps the path name
associated with the inode. FreeBSD simply doesn't.

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: r335690 - head/sys/kern

2018-06-27 Thread Gleb Smirnoff
On Wed, Jun 27, 2018 at 04:11:09AM +, Warner Losh wrote:
W> Author: imp
W> Date: Wed Jun 27 04:11:09 2018
W> New Revision: 335690
W> URL: https://svnweb.freebsd.org/changeset/base/335690
W> 
W> Log:
W>   Fix devctl generation for core files.
W>   
W>   We have a problem with vn_fullpath_global when the file exists. Work
W>   around it by printing the full path if the core file name starts with /,
W>   or current working directory followed by the filename if not.

Is this going to work when a core is dumped not at current working directory,
but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core

Looks like the vn_fullpath_global needs to be fixed rather than problem
workarounded.

-- 
Gleb Smirnoff
___
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: r335753 - head/sbin/devd

2018-06-27 Thread Warner Losh
Author: imp
Date: Wed Jun 27 23:44:37 2018
New Revision: 335753
URL: https://svnweb.freebsd.org/changeset/base/335753

Log:
  Safely quote all variable expansions.
  
  When expanding a variable set by a message from the kernel, safely
  quote all arguments expanded when creating a command line for the
  shell.
  
  Reviewd by: Shawn Webb, Oliver Pinter, brd@
  Sponsored by: Netflix

Modified:
  head/sbin/devd/devd.cc
  head/sbin/devd/devd.hh

Modified: head/sbin/devd/devd.cc
==
--- head/sbin/devd/devd.cc  Wed Jun 27 23:02:18 2018(r335752)
+++ head/sbin/devd/devd.cc  Wed Jun 27 23:44:37 2018(r335753)
@@ -636,6 +636,30 @@ config::is_id_char(char ch) const
ch == '-'));
 }
 
+string
+config::shell_quote(const string )
+{
+   string buffer;
+
+   /*
+* Enclose the string in $' ' with escapes for ' and / characters making
+* it one argument and ensuring the shell won't be affected by its
+* usual list of candidates.
+*/
+   buffer.reserve(s.length() * 3 / 2);
+   buffer += '$';
+   buffer += '\'';
+   for (const char  : s) {
+   if (c == '\'' || c == '\\') {
+   buffer += '\\';
+   }
+   buffer += c;
+   }
+   buffer += '\'';
+
+   return buffer;
+}
+
 void
 config::expand_one(const char *, string )
 {
@@ -650,8 +674,7 @@ config::expand_one(const char *, string )
}
 
// $(foo) -> $(foo)
-   // Not sure if I want to support this or not, so for now we just pass
-   // it through.
+   // This is the escape hatch for passing down shell subcommands
if (*src == '(') {
dst += '$';
count = 1;
@@ -677,7 +700,7 @@ config::expand_one(const char *, string )
do {
buffer += *src++;
} while (is_id_char(*src));
-   dst.append(get_variable(buffer));
+   dst.append(shell_quote(get_variable(buffer)));
 }
 
 const string

Modified: head/sbin/devd/devd.hh
==
--- head/sbin/devd/devd.hh  Wed Jun 27 23:02:18 2018(r335752)
+++ head/sbin/devd/devd.hh  Wed Jun 27 23:44:37 2018(r335753)
@@ -173,6 +173,7 @@ class config (protected)
void parse_one_file(const char *fn);
void parse_files_in_dir(const char *dirname);
void expand_one(const char *, std::string );
+   std::string shell_quote(const std::string );
bool is_id_char(char) const;
bool chop_var(char *, char *, char *) const;
 private:
___
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: r335612 - head/sbin/dhclient

2018-06-27 Thread Philip Paeps

On 2018-06-25 11:40:48 (-0700), Xin LI wrote:

On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler  wrote:

Author: eadler
Date: Mon Jun 25 01:29:54 2018
New Revision: 335612
URL: https://svnweb.freebsd.org/changeset/base/335612

Log:
  dhclient: recorrect __progname to getprogname()

  A more correct way to modernize code that uses __progname is to just
  replace each occurance of it with a call to getprogname(3)


We should probably take a look at dhcpcd or ISC dhclient and teach
whatever we have chosen sandbox, etc.  The current FreeBSD dhclient is
based on an ancient ISC dhclient fork with enhancements from OpenBSD
(but not being kept up-to-date with OpenBSD) and do not support IPv6,
etc.


The IPv6 support in ISC dhclient is basically having dhclient and 
dhclient6, which is a real pain to configure.  NetBSD's dhcpcd is 
probably the best DHCP client these days in terms of completeness.


Philip

--
Philip Paeps
Senior Reality Engineer
Ministry of Information
___
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: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips

2018-06-27 Thread Bryan Drewery
On 6/27/2018 4:05 PM, Dimitry Andric wrote:
> On 27 Jun 2018, at 22:53, John Baldwin  wrote:
>>
>> On 6/27/18 12:45 PM, Bryan Drewery wrote:
>>> On 6/27/2018 12:35 PM, Dimitry Andric wrote:
 On 27 Jun 2018, at 21:29, Bryan Drewery  wrote:
>
> Author: bdrewery
> Date: Wed Jun 27 19:29:15 2018
> New Revision: 335733
> URL: https://svnweb.freebsd.org/changeset/base/335733
>
> Log:
> Don't use CCACHE for linking.
>
> MFC after:2 weeks
> Sponsored by: Dell EMC
>
> Modified:
> head/bin/csh/Makefile
> head/gnu/usr.bin/cc/cc1/Makefile
> head/gnu/usr.bin/cc/cc1plus/Makefile
> head/gnu/usr.bin/cc/cc_tools/Makefile
> head/lib/libmagic/Makefile
> head/lib/libpam/static_libpam/Makefile
> head/lib/ncurses/ncurses/Makefile
> head/share/syscons/scrnmaps/Makefile
> head/stand/mips/beri/boot2/Makefile
> head/usr.bin/vi/catalog/Makefile
>
> Modified: head/bin/csh/Makefile
> ==
> --- head/bin/csh/Makefile Wed Jun 27 19:28:37 2018(r335732)
> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018(r335733)
> @@ -113,7 +113,7 @@ build-tools: gethost
>
> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
>   @rm -f ${.TARGET}
> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>   ${TCSHDIR}/gethost.c

 Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL
 or something like that? :)
>>>
>>> Yeah probably. I'd paint it CC_LINK.
>>
>> CCLD was my initial thought *duck*
> 
> Actually, that is not bad, and something I have seem more often.  In the
> sense that ${LD} would be e.g. /usr/bin/ld or at least, a "low level"
> linker, while ${CCLD} would be the compiler driver doing the work.
> Maybe it is specifically for these cases, that you don't directly use
> ${CC}, but ${CCLD}...
> 

+1


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips

2018-06-27 Thread Dimitry Andric
On 27 Jun 2018, at 22:53, John Baldwin  wrote:
> 
> On 6/27/18 12:45 PM, Bryan Drewery wrote:
>> On 6/27/2018 12:35 PM, Dimitry Andric wrote:
>>> On 27 Jun 2018, at 21:29, Bryan Drewery  wrote:
 
 Author: bdrewery
 Date: Wed Jun 27 19:29:15 2018
 New Revision: 335733
 URL: https://svnweb.freebsd.org/changeset/base/335733
 
 Log:
 Don't use CCACHE for linking.
 
 MFC after: 2 weeks
 Sponsored by:  Dell EMC
 
 Modified:
 head/bin/csh/Makefile
 head/gnu/usr.bin/cc/cc1/Makefile
 head/gnu/usr.bin/cc/cc1plus/Makefile
 head/gnu/usr.bin/cc/cc_tools/Makefile
 head/lib/libmagic/Makefile
 head/lib/libpam/static_libpam/Makefile
 head/lib/ncurses/ncurses/Makefile
 head/share/syscons/scrnmaps/Makefile
 head/stand/mips/beri/boot2/Makefile
 head/usr.bin/vi/catalog/Makefile
 
 Modified: head/bin/csh/Makefile
 ==
 --- head/bin/csh/Makefile  Wed Jun 27 19:28:37 2018(r335732)
 +++ head/bin/csh/Makefile  Wed Jun 27 19:29:15 2018(r335733)
 @@ -113,7 +113,7 @@ build-tools: gethost
 
 gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
 -  ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
 +  ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
${TCSHDIR}/gethost.c
>>> 
>>> Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL
>>> or something like that? :)
>> 
>> Yeah probably. I'd paint it CC_LINK.
> 
> CCLD was my initial thought *duck*

Actually, that is not bad, and something I have seem more often.  In the
sense that ${LD} would be e.g. /usr/bin/ld or at least, a "low level"
linker, while ${CCLD} would be the compiler driver doing the work.
Maybe it is specifically for these cases, that you don't directly use
${CC}, but ${CCLD}...

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Kyle Evans
On Wed, Jun 27, 2018 at 6:00 PM, Devin Teske  wrote:
>
> On Jun 27, 2018, at 2:58 PM, Kyle Evans  wrote:
>
> On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske  wrote:
>
>
> On Jun 27, 2018, at 2:24 PM, Kyle Evans  wrote:
>
> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske  wrote:
>
> Author: dteske
> Date: Wed Jun 27 21:22:00 2018
> New Revision: 335744
> URL: https://svnweb.freebsd.org/changeset/base/335744
>
> Log:
> MFC r335607: check-password.4th(8): Fix manual [in]accuracy
>
> SVN r280384 updated the maximum password length from 16 bytes to 255. The
> manual was not updated to reflect this.
>
> Sponsored by: Smule, Inc.
>
> Modified:
> stable/10/sys/boot/forth/check-password.4th.8
>
>
> Hi,
>
> I think this should probably have been supplemented with a record-only
> merge of r335607 since it has actually been MFC'd, just in the old
> location. I'm not sure how much it matters, though, other than
> reflecting that this (general this; stable/10 commits) really wasn't a
> direct commit.
>
>
> I kept trying that and kept getting "tree conflict" because it wants to
> record info in stand which doesn't exist.
>
> Do you have a recommended way to achieve this that has a half-way chance of
> working?
> --
>
>
> Target the base directory should be fine; assuming you're at base/:
>
> svn merge -c r335607 --record-only ^/head stable/11
>
>
> stable/11 ???
> --
> Devin
>

s/11/10/

Works just the same. =)
___
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: r335752 - stable/11/tools/build/mk

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 23:02:18 2018
New Revision: 335752
URL: https://svnweb.freebsd.org/changeset/base/335752

Log:
  MFC r335467: Don't remove loader.conf(5) when built WITHOUT_FORTH
  
  The new stand/ structure installs loader.conf(5) and defaults/loader.conf
  regardless of interpreter. The only thing gating installation now is
  MK_BOOT.

Modified:
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jun 27 22:52:32 
2018(r335751)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jun 27 23:02:18 
2018(r335752)
@@ -2306,7 +2306,6 @@ OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz
 .endif
 
 .if ${MK_FORTH} == no
-OLD_FILES+=usr/share/man/man5/loader.conf.5.gz
 OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz
 OLD_FILES+=usr/share/man/man8/brand.4th.8.gz
 OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz
___
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: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Devin Teske


> On Jun 27, 2018, at 2:58 PM, Kyle Evans  wrote:
> 
> On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske  > wrote:
>> 
>> On Jun 27, 2018, at 2:24 PM, Kyle Evans  wrote:
>> 
>> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske  wrote:
>> 
>> Author: dteske
>> Date: Wed Jun 27 21:22:00 2018
>> New Revision: 335744
>> URL: https://svnweb.freebsd.org/changeset/base/335744
>> 
>> Log:
>> MFC r335607: check-password.4th(8): Fix manual [in]accuracy
>> 
>> SVN r280384 updated the maximum password length from 16 bytes to 255. The
>> manual was not updated to reflect this.
>> 
>> Sponsored by: Smule, Inc.
>> 
>> Modified:
>> stable/10/sys/boot/forth/check-password.4th.8
>> 
>> 
>> Hi,
>> 
>> I think this should probably have been supplemented with a record-only
>> merge of r335607 since it has actually been MFC'd, just in the old
>> location. I'm not sure how much it matters, though, other than
>> reflecting that this (general this; stable/10 commits) really wasn't a
>> direct commit.
>> 
>> 
>> I kept trying that and kept getting "tree conflict" because it wants to
>> record info in stand which doesn't exist.
>> 
>> Do you have a recommended way to achieve this that has a half-way chance of
>> working?
>> --
> 
> Target the base directory should be fine; assuming you're at base/:
> 
> svn merge -c r335607 --record-only ^/head stable/11

stable/11 ???
-- 
Devin

___
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: r335751 - stable/11/etc/mtree

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 22:52:32 2018
New Revision: 335751
URL: https://svnweb.freebsd.org/changeset/base/335751

Log:
  MFC r330090:
  
Add 'usr.bin/seq' to tests mtree after r330086
  
  PR:   217149

Modified:
  stable/11/etc/mtree/BSD.tests.dist
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/mtree/BSD.tests.dist
==
--- stable/11/etc/mtree/BSD.tests.dist  Wed Jun 27 22:15:50 2018
(r335750)
+++ stable/11/etc/mtree/BSD.tests.dist  Wed Jun 27 22:52:32 2018
(r335751)
@@ -696,6 +696,8 @@
 regress.multitest.out
 ..
 ..
+seq
+..
 soelim
 ..
 stat
___
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: r335750 - head

2018-06-27 Thread Devin Teske
Author: dteske
Date: Wed Jun 27 22:15:50 2018
New Revision: 335750
URL: https://svnweb.freebsd.org/changeset/base/335750

Log:
  Fix typo in top-level Makefile
  
  Submitted by: Ben Widawsky 
  MFC after:3 days
  X-MFC-to: stable/11 stable/10
  Sponsored by: Smule, Inc.
  Differential Revision:https://reviews.freebsd.org/P186

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Wed Jun 27 22:01:59 2018(r335749)
+++ head/Makefile   Wed Jun 27 22:15:50 2018(r335750)
@@ -205,7 +205,7 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAK
 # We often need to use the tree's version of make to build it.
 # Choices add to complexity though.
 # We cannot blindly use a make which may not be the one we want
-# so be exlicit - until all choice is removed.
+# so be explicit - until all choice is removed.
 WANT_MAKE= bmake
 .if !empty(.MAKE.MODE:Mmeta)
 # 20160604 - support missing-meta,missing-filemon and performance improvements
___
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: r335749 - head/sys/netinet

2018-06-27 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jun 27 22:01:59 2018
New Revision: 335749
URL: https://svnweb.freebsd.org/changeset/base/335749

Log:
  Check the inp_flags under inp lock. Looks like the race was hidden
  before, the conversion of tcbinfo to CK_LIST have uncovered it.

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Wed Jun 27 22:00:50 2018(r335748)
+++ head/sys/netinet/tcp_subr.c Wed Jun 27 22:01:59 2018(r335749)
@@ -2019,9 +2019,11 @@ tcp_drain(void)
 */
INP_INFO_WLOCK(_tcbinfo);
CK_LIST_FOREACH(inpb, V_tcbinfo.ipi_listhead, inp_list) {
-   if (inpb->inp_flags & INP_TIMEWAIT)
-   continue;
INP_WLOCK(inpb);
+   if (inpb->inp_flags & INP_TIMEWAIT) {
+   INP_WUNLOCK(inpb);
+   continue;
+   }
if ((tcpb = intotcpcb(inpb)) != NULL) {
tcp_reass_flush(tcpb);
tcp_clean_sackreport(tcpb);
___
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: r335748 - head/sys/kern

2018-06-27 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jun 27 22:00:50 2018
New Revision: 335748
URL: https://svnweb.freebsd.org/changeset/base/335748

Log:
  Correct r335242. Use unsigned cast instead of abs(). Using abs() gives
  incorrect result when ticks has already wrapped, and are about to reach
  the cr_ticks value (cr_ticks - ticks < hz).
  
  Submitted by: bde

Modified:
  head/sys/kern/subr_counter.c

Modified: head/sys/kern/subr_counter.c
==
--- head/sys/kern/subr_counter.cWed Jun 27 21:36:57 2018
(r335747)
+++ head/sys/kern/subr_counter.cWed Jun 27 22:00:50 2018
(r335748)
@@ -140,7 +140,7 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim
val = cr->cr_over;
now = ticks;
 
-   if (abs(now - cr->cr_ticks) >= hz) {
+   if ((u_int)(now - cr->cr_ticks) >= hz) {
/*
 * Time to clear the structure, we are in the next second.
 * First try unlocked read, and then proceed with atomic.
@@ -151,7 +151,7 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim
 * Check if other thread has just went through the
 * reset sequence before us.
 */
-   if (abs(now - cr->cr_ticks) >= hz) {
+   if ((u_int)(now - cr->cr_ticks) >= hz) {
val = counter_u64_fetch(cr->cr_rate);
counter_u64_zero(cr->cr_rate);
cr->cr_over = 0;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Kyle Evans
On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske  wrote:
>
> On Jun 27, 2018, at 2:24 PM, Kyle Evans  wrote:
>
> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske  wrote:
>
> Author: dteske
> Date: Wed Jun 27 21:22:00 2018
> New Revision: 335744
> URL: https://svnweb.freebsd.org/changeset/base/335744
>
> Log:
>  MFC r335607: check-password.4th(8): Fix manual [in]accuracy
>
>  SVN r280384 updated the maximum password length from 16 bytes to 255. The
>  manual was not updated to reflect this.
>
>  Sponsored by: Smule, Inc.
>
> Modified:
>  stable/10/sys/boot/forth/check-password.4th.8
>
>
> Hi,
>
> I think this should probably have been supplemented with a record-only
> merge of r335607 since it has actually been MFC'd, just in the old
> location. I'm not sure how much it matters, though, other than
> reflecting that this (general this; stable/10 commits) really wasn't a
> direct commit.
>
>
> I kept trying that and kept getting "tree conflict" because it wants to
> record info in stand which doesn't exist.
>
> Do you have a recommended way to achieve this that has a half-way chance of
> working?
> --

Target the base directory should be fine; assuming you're at base/:

svn merge -c r335607 --record-only ^/head stable/11
___
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: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Devin Teske


> On Jun 27, 2018, at 2:24 PM, Kyle Evans  wrote:
> 
> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske  > wrote:
>> Author: dteske
>> Date: Wed Jun 27 21:22:00 2018
>> New Revision: 335744
>> URL: https://svnweb.freebsd.org/changeset/base/335744
>> 
>> Log:
>>  MFC r335607: check-password.4th(8): Fix manual [in]accuracy
>> 
>>  SVN r280384 updated the maximum password length from 16 bytes to 255. The
>>  manual was not updated to reflect this.
>> 
>>  Sponsored by: Smule, Inc.
>> 
>> Modified:
>>  stable/10/sys/boot/forth/check-password.4th.8
>> 
> 
> Hi,
> 
> I think this should probably have been supplemented with a record-only
> merge of r335607 since it has actually been MFC'd, just in the old
> location. I'm not sure how much it matters, though, other than
> reflecting that this (general this; stable/10 commits) really wasn't a
> direct commit.
> 

I kept trying that and kept getting "tree conflict" because it wants to record 
info in stand which doesn't exist.

Do you have a recommended way to achieve this that has a half-way chance of 
working?
-- 
Cheers,
Devin
___
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: r335747 - head/share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 21:36:57 2018
New Revision: 335747
URL: https://svnweb.freebsd.org/changeset/base/335747

Log:
  LLVM_TARGET_ALL: Default LLVM_TARGET_ARM on for aarch64.
  
  This is needed for -m32 support which is used in the kernel cloudabi32 module.
  
  Tweak the style to make it easier to understand.
  
  MFC after:2 weeks
  X-MFC-with:   r335706
  Reported by:  Mark Millard
  Sponsored by: Dell EMC

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Jun 27 21:36:49 2018(r335746)
+++ head/share/mk/src.opts.mk   Wed Jun 27 21:36:57 2018(r335747)
@@ -259,15 +259,17 @@ __LLVM_TARGETS= \
sparc \
x86
 __LLVM_TARGET_FILT=C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/
-# Default the given TARGET_ARCH's LLVM_TARGET support to the value of
-# MK_CLANG.
+.for __llt in ${__LLVM_TARGETS}
+# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG.
+.if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
+__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+# aarch64 needs arm for -m32 support.
+.elif ${__TT} == "arm64" && ${__llt} == "arm"
+__DEFAULT_DEPENDENT_OPTIONS+=  LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
 # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
 # which is based on MK_CLANG.
-.for __llt in ${__LLVM_TARGETS}
-.if ${__llt} != ${__TT:${__LLVM_TARGET_FILT}}
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .else
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .endif
 .endfor
 
___
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: r335746 - head/bin/sh

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 21:36:49 2018
New Revision: 335746
URL: https://svnweb.freebsd.org/changeset/base/335746

Log:
  Stop building intermediate .o files.
  
  These are not used to link the final tool anymore.  At some point in the past
  the suffix rules changed to not link these in.  The original reason for this 
in
  r19176 is unclear but seems to be related to mkdep.  The .depend handling is
  still broken here as it is for all build tool patterns like this.
  
  Sponsored by: Dell EMC

Modified:
  head/bin/sh/Makefile

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileWed Jun 27 21:22:48 2018(r335745)
+++ head/bin/sh/MakefileWed Jun 27 21:36:49 2018(r335746)
@@ -32,8 +32,7 @@ WFORMAT=0
${.CURDIR:H}/test \
${SRCTOP}/usr.bin/printf
 
-CLEANFILES+= mknodes mknodes.o \
-   mksyntax mksyntax.o
+CLEANFILES+= mknodes mksyntax
 CLEANFILES+= ${GENSRCS} ${GENHDRS}
 
 build-tools: mknodes mksyntax
@@ -43,13 +42,7 @@ builtins.h: .NOMETA
 builtins.c builtins.h: mkbuiltins builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
 
-# XXX this is just to stop the default .c rule being used, so that the
-# intermediate object has a fixed name.
-# XXX we have a default .c rule, but no default .o rule.
-mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
-   ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
-mknodes: mknodes.o ${BUILD_TOOLS_META}
-mksyntax: mksyntax.o ${BUILD_TOOLS_META}
+mknodes mksyntax: ${BUILD_TOOLS_META}
 
 .ORDER: nodes.c nodes.h
 nodes.h: .NOMETA
___
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: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Kyle Evans
On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske  wrote:
> Author: dteske
> Date: Wed Jun 27 21:22:00 2018
> New Revision: 335744
> URL: https://svnweb.freebsd.org/changeset/base/335744
>
> Log:
>   MFC r335607: check-password.4th(8): Fix manual [in]accuracy
>
>   SVN r280384 updated the maximum password length from 16 bytes to 255. The
>   manual was not updated to reflect this.
>
>   Sponsored by: Smule, Inc.
>
> Modified:
>   stable/10/sys/boot/forth/check-password.4th.8
>

Hi,

I think this should probably have been supplemented with a record-only
merge of r335607 since it has actually been MFC'd, just in the old
location. I'm not sure how much it matters, though, other than
reflecting that this (general this; stable/10 commits) really wasn't a
direct commit.

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"


svn commit: r335745 - stable/11/sys/kern

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:22:48 2018
New Revision: 335745
URL: https://svnweb.freebsd.org/changeset/base/335745

Log:
  MFC r332395 (ian): Use explicit_bzero() when cleaning values out of the kenv
  
  Sometimes the values contain geli passphrases being communicated from
  loader(8) to the kernel, and some day the compiler may decide to start
  eliding calls to memset() for a pointer which is not dereferenced again
  before being passed to free().

Modified:
  stable/11/sys/kern/kern_environment.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_environment.c
==
--- stable/11/sys/kern/kern_environment.c   Wed Jun 27 21:22:00 2018
(r335744)
+++ stable/11/sys/kern/kern_environment.c   Wed Jun 27 21:22:48 2018
(r335745)
@@ -288,7 +288,7 @@ init_dynamic_kenv(void *data __unused)
if (i < KENV_SIZE) {
kenvp[i] = malloc(len, M_KENV, M_WAITOK);
strcpy(kenvp[i++], cp);
-   memset(cp, 0, strlen(cp));
+   explicit_bzero(cp, strlen(cp));
} else
printf(
"WARNING: too many kenv strings, ignoring %s\n",
@@ -307,7 +307,7 @@ freeenv(char *env)
 {
 
if (dynamic_kenv && env != NULL) {
-   memset(env, 0, strlen(env));
+   explicit_bzero(env, strlen(env));
free(env, M_KENV);
}
 }
@@ -485,7 +485,7 @@ kern_unsetenv(const char *name)
kenvp[i++] = kenvp[j];
kenvp[i] = NULL;
mtx_unlock(_lock);
-   memset(oldenv, 0, strlen(oldenv));
+   explicit_bzero(oldenv, strlen(oldenv));
free(oldenv, M_KENV);
return (0);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335744 - stable/10/sys/boot/forth

2018-06-27 Thread Devin Teske
Author: dteske
Date: Wed Jun 27 21:22:00 2018
New Revision: 335744
URL: https://svnweb.freebsd.org/changeset/base/335744

Log:
  MFC r335607: check-password.4th(8): Fix manual [in]accuracy
  
  SVN r280384 updated the maximum password length from 16 bytes to 255. The
  manual was not updated to reflect this.
  
  Sponsored by: Smule, Inc.

Modified:
  stable/10/sys/boot/forth/check-password.4th.8

Modified: stable/10/sys/boot/forth/check-password.4th.8
==
--- stable/10/sys/boot/forth/check-password.4th.8   Wed Jun 27 21:13:20 
2018(r335743)
+++ stable/10/sys/boot/forth/check-password.4th.8   Wed Jun 27 21:22:00 
2018(r335744)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2015 Devin Teske
+.\" Copyright (c) 2011-2018 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 20, 2015
+.Dd June 24, 2018
 .Dt CHECK-PASSWORD.4TH 8
 .Os
 .Sh NAME
@@ -91,7 +91,7 @@ for additional information.
 The environment variables that effect its behavior are:
 .Bl -tag -width bootlock_password -offset indent
 .It Va bootlock_password
-Sets the bootlock password (up to 16 characters long) that is required by
+Sets the bootlock password (up to 255 characters long) that is required by
 .Ic check-password
 to be entered before the system is allowed to boot.
 .It Va geom_eli_passphrase_prompt
@@ -100,7 +100,7 @@ kernel for later mounting of
 .Xr geli 8
 encrypted root device(s).
 .It Va password
-Sets the password (up to 16 characters long) that is required by
+Sets the password (up to 255 characters long) that is required by
 .Ic check-password
 before the user is allowed to visit the boot menu.
 .El
___
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: r335743 - stable/11/sys/kern

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:13:20 2018
New Revision: 335743
URL: https://svnweb.freebsd.org/changeset/base/335743

Log:
  MFC r335458: Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT
  
  VERBOSE_SYSINIT is currently an all-or-nothing option. debug.verbose_sysinit
  adds an option to have the code compiled in but quiet by default so that
  getting this information from a device in the field doesn't necessarily
  require distributing a recompiled kernel.
  
  Its default is VERBOSE_SYSINIT's value as defined in the kernconf. As such,
  the default behavior for simply omitting or including this option is
  unchanged.

Modified:
  stable/11/sys/kern/init_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/init_main.c
==
--- stable/11/sys/kern/init_main.c  Wed Jun 27 21:11:28 2018
(r335742)
+++ stable/11/sys/kern/init_main.c  Wed Jun 27 21:13:20 2018
(r335743)
@@ -117,6 +117,18 @@ intbootverbose = BOOTVERBOSE;
 SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, , 0,
"Control the output of verbose kernel messages");
 
+#ifdef VERBOSE_SYSINIT
+/*
+ * We'll use the defined value of VERBOSE_SYSINIT from the kernel config to
+ * dictate the default VERBOSE_SYSINIT behavior.  Significant values for this
+ * option and associated tunable are:
+ * - 0, 'compiled in but silent by default'
+ * - 1, 'compiled in but verbose by default' (default)
+ */
+intverbose_sysinit = VERBOSE_SYSINIT;
+TUNABLE_INT("debug.verbose_sysinit", _sysinit);
+#endif
+
 #ifdef INVARIANTS
 FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance");
 #endif
@@ -264,7 +276,7 @@ restart:
continue;
 
 #if defined(VERBOSE_SYSINIT)
-   if ((*sipp)->subsystem > last) {
+   if ((*sipp)->subsystem > last && verbose_sysinit != 0) {
verbose = 1;
last = (*sipp)->subsystem;
printf("subsystem %x\n", last);
___
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: r335742 - stable/11/usr.bin/sort

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:11:28 2018
New Revision: 335742
URL: https://svnweb.freebsd.org/changeset/base/335742

Log:
  MFC r335404: sort(1): Fix -m when only implicit stdin is used for input
  
  Observe:
  
  printf "a\nb\nc\n" > /tmp/foo
  # Next command results in no output
  cat /tmp/foo | sort -m
  # Next command results in proper output
  cat /tmp/foo | sort -m -
  # Also works:
  sort -m /tmp/foo
  
  Some const'ification was done to simplify the actual solution of adding "-"
  explicitly to the file list if we didn't have any file arguments left over.
  
  PR:   190099

Modified:
  stable/11/usr.bin/sort/file.c
  stable/11/usr.bin/sort/file.h
  stable/11/usr.bin/sort/sort.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/sort/file.c
==
--- stable/11/usr.bin/sort/file.c   Wed Jun 27 21:09:55 2018
(r335741)
+++ stable/11/usr.bin/sort/file.c   Wed Jun 27 21:11:28 2018
(r335742)
@@ -227,7 +227,7 @@ file_list_init(struct file_list *fl, bool tmp)
  * Add a file name to the list
  */
 void
-file_list_add(struct file_list *fl, char *fn, bool allocate)
+file_list_add(struct file_list *fl, const char *fn, bool allocate)
 {
 
if (fl && fn) {
@@ -1116,7 +1116,7 @@ file_headers_merge(size_t fnum, struct file_header **f
  * stdout.
  */
 static void
-merge_files_array(size_t argc, char **argv, const char *fn_out)
+merge_files_array(size_t argc, const char **argv, const char *fn_out)
 {
 
if (argv && fn_out) {

Modified: stable/11/usr.bin/sort/file.h
==
--- stable/11/usr.bin/sort/file.h   Wed Jun 27 21:09:55 2018
(r335741)
+++ stable/11/usr.bin/sort/file.h   Wed Jun 27 21:11:28 2018
(r335742)
@@ -66,7 +66,7 @@ struct file_reader;
  */
 struct file_list
 {
-   char**fns;
+   const char **fns;
size_t   count;
size_t   sz;
bool tmp;
@@ -108,7 +108,7 @@ char *new_tmp_file_name(void);
 void tmp_file_atexit(const char *tmp_file);
 
 void file_list_init(struct file_list *fl, bool tmp);
-void file_list_add(struct file_list *fl, char *fn, bool allocate);
+void file_list_add(struct file_list *fl, const char *fn, bool allocate);
 void file_list_populate(struct file_list *fl, int argc, char **argv, bool 
allocate);
 void file_list_clean(struct file_list *fl);
 

Modified: stable/11/usr.bin/sort/sort.c
==
--- stable/11/usr.bin/sort/sort.c   Wed Jun 27 21:09:55 2018
(r335741)
+++ stable/11/usr.bin/sort/sort.c   Wed Jun 27 21:11:28 2018
(r335742)
@@ -1299,7 +1299,11 @@ main(int argc, char **argv)
struct file_list fl;
 
file_list_init(, false);
-   file_list_populate(, argc, argv, true);
+   /* No file arguments remaining means "read from stdin." */
+   if (argc == 0)
+   file_list_add(, "-", true);
+   else
+   file_list_populate(, argc, argv, true);
merge_files(, outfile);
file_list_clean();
}
___
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: r335741 - stable/11/share/man/man4

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:09:55 2018
New Revision: 335741
URL: https://svnweb.freebsd.org/changeset/base/335741

Log:
  MFC r333221: rsu(4) does not require legal.realtek.license_ack=1
  
  The rsu firmware license check has been disabled since r292756. Changes
  rsu(4) since the license ack is no longer required.
  
  While here, add `device rsufw` hint to the kernel configuration lines and
  add/update paths to the installed license file in both rsu(4) and rsufw(4).

Modified:
  stable/11/share/man/man4/rsu.4
  stable/11/share/man/man4/rsufw.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/rsu.4
==
--- stable/11/share/man/man4/rsu.4  Wed Jun 27 21:04:29 2018
(r335740)
+++ stable/11/share/man/man4/rsu.4  Wed Jun 27 21:09:55 2018
(r335741)
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd October 15, 2015
+.Dd April 4, 2018
 .Dt RSU 4
 .Os
 .Sh NAME
@@ -30,22 +30,15 @@ place the following lines in your kernel configuration
 .Cd "device ohci"
 .Cd "device usb"
 .Cd "device rsu"
+.Cd "device rsufw"
 .Cd "device wlan"
 .Ed
 .Pp
 Alternatively, to load the driver as a module at boot time,
-place the following line in
+place the following lines in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 if_rsu_load="YES"
-.Ed
-.Pp
-After you have read the license in
-.Pa /usr/share/doc/legal/realtek.LICENSE
-you will want to add the following lines to
-.Xr loader.conf 5 :
-.Bd -literal -offset indent
-legal.realtek.license_ack=1
 rsu-rtl8712fw_load="YES"
 .Ed
 .Sh DESCRIPTION
@@ -96,6 +89,12 @@ The
 driver can be configured at runtime with
 .Xr ifconfig 8 .
 .Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
+.It Pa /usr/share/doc/legal/realtek.LICENSE
+.Nm
+firmware license
+.El
+.Pp
 The driver needs at least version 1.2 of the following firmware file,
 which is loaded when an interface is attached:
 .Pp

Modified: stable/11/share/man/man4/rsufw.4
==
--- stable/11/share/man/man4/rsufw.4Wed Jun 27 21:04:29 2018
(r335740)
+++ stable/11/share/man/man4/rsufw.4Wed Jun 27 21:09:55 2018
(r335741)
@@ -13,7 +13,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd July 21, 2013
+.Dd April 4, 2018
 .Dt RSUFW 4
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@ rsu-rtl8712fw_load="YES"
 This module provides the firmware for the Realtek RTL8188SU and
 RTL8192SU chip based USB WiFi adapters.
 Please read Realtek's license,
-.Pa /usr/share/license/realtek .
+.Pa /usr/share/doc/legal/realtek.LICENSE .
 .Sh SEE ALSO
 .Xr rsu 4 ,
 .Xr firmware 9
___
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: r335740 - stable/11/lib/libc/sys

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:04:29 2018
New Revision: 335740
URL: https://svnweb.freebsd.org/changeset/base/335740

Log:
  MFC r333192: fcntl(2): Vaguely document that ENOTTY is possible + examples

Modified:
  stable/11/lib/libc/sys/fcntl.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/fcntl.2
==
--- stable/11/lib/libc/sys/fcntl.2  Wed Jun 27 21:03:05 2018
(r335739)
+++ stable/11/lib/libc/sys/fcntl.2  Wed Jun 27 21:04:29 2018
(r335740)
@@ -28,7 +28,7 @@
 .\" @(#)fcntl.28.2 (Berkeley) 1/12/94
 .\" $FreeBSD$
 .\"
-.Dd July 7, 2016
+.Dd May 2, 2018
 .Dt FCNTL 2
 .Os
 .Sh NAME
@@ -572,6 +572,14 @@ process are already in use,
 or no file descriptors greater than or equal to
 .Fa arg
 are available.
+.It Bq Er ENOTTY
+The
+.Fa fd
+argument is not a valid file descriptor for the requested operation.
+This may be the case if
+.Fa fd
+is a device node, or a descriptor returned by
+.Xr kqueue 2 .
 .It Bq Er ENOLCK
 The argument
 .Fa cmd
___
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: r335739 - in stable/11/usr.bin/seq: . tests

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:03:05 2018
New Revision: 335739
URL: https://svnweb.freebsd.org/changeset/base/335739

Log:
  MFC r330086, r333155: seq(1) improvements
  
  MFC r330086 (cem): seq(1): Consistently include 'last' for non-integers
  
  The source of error is a rounded increment being too large and thus the loop
  steps slightly past 'last'.  Perform a final comparison using the formatted
  string values (truncated precision) to determine if we still need to print
  the 'last' value.
  
  MFC r333155: seq(1): Move long_opts up with globals
  
  PR:   217149

Added:
  stable/11/usr.bin/seq/tests/
 - copied from r330086, head/usr.bin/seq/tests/
Modified:
  stable/11/usr.bin/seq/Makefile
  stable/11/usr.bin/seq/seq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/seq/Makefile
==
--- stable/11/usr.bin/seq/Makefile  Wed Jun 27 21:00:09 2018
(r335738)
+++ stable/11/usr.bin/seq/Makefile  Wed Jun 27 21:03:05 2018
(r335739)
@@ -1,8 +1,13 @@
 #   $NetBSD: Makefile,v 1.3 2009/04/14 22:15:26 lukem Exp $
 # $FreeBSD$
 
+.include 
+
 PROG=  seq
 
 LIBADD=m
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+=   tests
 
 .include 

Modified: stable/11/usr.bin/seq/seq.c
==
--- stable/11/usr.bin/seq/seq.c Wed Jun 27 21:00:09 2018(r335738)
+++ stable/11/usr.bin/seq/seq.c Wed Jun 27 21:03:05 2018(r335739)
@@ -57,6 +57,15 @@ __FBSDID("$FreeBSD$");
 static const char *decimal_point = ".";/* default */
 static char default_format[] = { "%g" };   /* default */
 
+static const struct option long_opts[] =
+{
+   {"format",  required_argument,  NULL, 'f'},
+   {"separator",   required_argument,  NULL, 's'},
+   {"terminator",  required_argument,  NULL, 't'},
+   {"equal-width", no_argument,NULL, 'w'},
+   {NULL,  no_argument,NULL, 0}
+};
+
 /* Prototypes */
 
 static double e_atof(const char *);
@@ -68,15 +77,6 @@ static int valid_format(const char *);
 static char *generate_format(double, double, double, int, char);
 static char *unescape(char *);
 
-static const struct option long_opts[] =
-{
-   {"format",  required_argument,  NULL, 'f'},
-   {"separator",   required_argument,  NULL, 's'},
-   {"terminator",  required_argument,  NULL, 't'},
-   {"equal-width", no_argument,NULL, 'w'},
-   {NULL,  no_argument,NULL, 0}
-};
-
 /*
  * The seq command will print out a numeric sequence from 1, the default,
  * to a user specified upper limit by 1.  The lower bound and increment
@@ -86,17 +86,20 @@ static const struct option long_opts[] =
 int
 main(int argc, char *argv[])
 {
-   int c = 0, errflg = 0;
-   int equalize = 0;
-   double first = 1.0;
-   double last = 0.0;
-   double incr = 0.0;
+   const char *sep, *term;
struct lconv *locale;
-   char *fmt = NULL;
-   const char *sep = "\n";
-   const char *term = NULL;
-   char pad = ZERO;
+   char pad, *fmt, *cur_print, *last_print;
+   double first, last, incr, last_shown_value, cur, step;
+   int c, errflg, equalize;
 
+   pad = ZERO;
+   fmt = NULL;
+   first = 1.0;
+   last = incr = last_shown_value = 0.0;
+   c = errflg = equalize = 0;
+   sep = "\n";
+   term = NULL;
+
/* Determine the locale's decimal point. */
locale = localeconv();
if (locale && locale->decimal_point && locale->decimal_point[0] != '\0')
@@ -179,17 +182,32 @@ main(int argc, char *argv[])
} else
fmt = generate_format(first, incr, last, equalize, pad);
 
-   if (incr > 0) {
-   for (; first <= last; first += incr) {
-   printf(fmt, first);
-   fputs(sep, stdout);
-   }
-   } else {
-   for (; first >= last; first += incr) {
-   printf(fmt, first);
-   fputs(sep, stdout);
-   }
+   for (step = 1, cur = first; incr > 0 ? cur <= last : cur >= last;
+   cur = first + incr * step++) {
+   printf(fmt, cur);
+   fputs(sep, stdout);
+   last_shown_value = cur;
}
+
+   /*
+* Did we miss the last value of the range in the loop above?
+*
+* We might have, so check if the printable version of the last
+* computed value ('cur') and desired 'last' value are equal.  If they
+* are equal after formatting truncation, but 'cur' and
+* 'last_shown_value' are not equal, it means the exit condition of the
+* loop held true due to a rounding error and we still need to print
+* 'last'.
+*/
+   asprintf(_print, fmt, cur);
+   asprintf(_print, 

svn commit: r335738 - stable/11/usr.bin/cmp

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 21:00:09 2018
New Revision: 335738
URL: https://svnweb.freebsd.org/changeset/base/335738

Log:
  MFC r333157: cmp(1): Provide some long options
  
  These match GNU cmp(1) for compatibility where applicable.
  
  Future work might implement the -i option from GNU cmp(1) to express skip
  either in terms of both files or of the form "SKIP1:SKIP2" rather than
  specifying them as additional arguments to cmp(1).

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

Modified: stable/11/usr.bin/cmp/cmp.1
==
--- stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 20:55:49 2018(r335737)
+++ stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 21:00:09 2018(r335738)
@@ -31,7 +31,7 @@
 .\" @(#)cmp.1  8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd November 18, 2013
+.Dd May 1, 2018
 .Dt CMP 1
 .Os
 .Sh NAME
@@ -59,10 +59,10 @@ The following options are available:
 .Bl -tag -width indent
 .It Fl h
 Do not follow symbolic links.
-.It Fl l
+.It Fl l , Fl -verbose
 Print the byte number (decimal) and the differing
 byte values (octal) for each difference.
-.It Fl s
+.It Fl s , Fl -silent , Fl -quiet
 Print nothing for differing files; return exit
 status only.
 .It Fl x

Modified: stable/11/usr.bin/cmp/cmp.c
==
--- stable/11/usr.bin/cmp/cmp.c Wed Jun 27 20:55:49 2018(r335737)
+++ stable/11/usr.bin/cmp/cmp.c Wed Jun 27 21:00:09 2018(r335738)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -57,6 +58,14 @@ __FBSDID("$FreeBSD$");
 
 intlflag, sflag, xflag, zflag;
 
+static const struct option long_opts[] =
+{
+   {"verbose", no_argument,NULL, 'l'},
+   {"silent",  no_argument,NULL, 's'},
+   {"quiet",   no_argument,NULL, 's'},
+   {NULL,  no_argument,NULL, 0}
+};
+
 static void usage(void);
 
 int
@@ -68,7 +77,7 @@ main(int argc, char *argv[])
const char *file1, *file2;
 
oflag = O_RDONLY;
-   while ((ch = getopt(argc, argv, "hlsxz")) != -1)
+   while ((ch = getopt_long(argc, argv, "+hlsxz", long_opts, NULL)) != -1)
switch (ch) {
case 'h':   /* Don't follow symlinks */
oflag |= O_NOFOLLOW;
___
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: r335737 - stable/11/usr.bin/uniq

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 20:55:49 2018
New Revision: 335737
URL: https://svnweb.freebsd.org/changeset/base/335737

Log:
  MFC r333156: uniq(1): Add some long options
  
  These match GNU uniq(1) where appropriate for compatibility's sake.
  
  While here, re-sort options alphabetically by the short-option.

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

Modified: stable/11/usr.bin/uniq/uniq.1
==
--- stable/11/usr.bin/uniq/uniq.1   Wed Jun 27 20:54:12 2018
(r335736)
+++ stable/11/usr.bin/uniq/uniq.1   Wed Jun 27 20:55:49 2018
(r335737)
@@ -31,7 +31,7 @@
 .\" From: @(#)uniq.1   8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd May 15, 2017
+.Dd May 1, 2018
 .Dt UNIQ 1
 .Os
 .Sh NAME
@@ -71,34 +71,34 @@ so it may be necessary to sort the files first.
 .Pp
 The following options are available:
 .Bl -tag -width Ds
-.It Fl c
+.It Fl c , Fl -count
 Precede each output line with the count of the number of times the line
 occurred in the input, followed by a single space.
-.It Fl d
+.It Fl d , Fl -repeated
 Only output lines that are repeated in the input.
-.It Fl f Ar num
+.It Fl f Ar num , Fl -skip-fields Ar num
 Ignore the first
 .Ar num
 fields in each input line when doing comparisons.
 A field is a string of non-blank characters separated from adjacent fields
 by blanks.
 Field numbers are one based, i.e., the first field is field one.
-.It Fl s Ar chars
+.It Fl i , Fl -ignore-case
+Case insensitive comparison of lines.
+.It Fl s Ar chars , Fl -skip-chars Ar chars
 Ignore the first
 .Ar chars
 characters in each input line when doing comparisons.
 If specified in conjunction with the
-.Fl f
+.Fl f , Fl -unique
 option, the first
 .Ar chars
 characters after the first
 .Ar num
 fields will be ignored.
 Character numbers are one based, i.e., the first character is character one.
-.It Fl u
+.It Fl u , Fl -unique
 Only output lines that are not repeated in the input.
-.It Fl i
-Case insensitive comparison of lines.
 .\".It Fl Ns Ar n
 .\"(Deprecated; replaced by
 .\".Fl f ) .

Modified: stable/11/usr.bin/uniq/uniq.c
==
--- stable/11/usr.bin/uniq/uniq.c   Wed Jun 27 20:54:12 2018
(r335736)
+++ stable/11/usr.bin/uniq/uniq.c   Wed Jun 27 20:55:49 2018
(r335737)
@@ -49,6 +49,7 @@ static const char rcsid[] =
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -65,6 +66,17 @@ static const char rcsid[] =
 static int cflag, dflag, uflag, iflag;
 static int numchars, numfields, repeats;
 
+static const struct option long_opts[] =
+{
+   {"count",   no_argument,NULL, 'c'},
+   {"repeated",no_argument,NULL, 'd'},
+   {"skip-fields", required_argument,  NULL, 'f'},
+   {"ignore-case", no_argument,NULL, 'i'},
+   {"skip-chars",  required_argument,  NULL, 's'},
+   {"unique",  no_argument,NULL, 'u'},
+   {NULL,  no_argument,NULL, 0}
+};
+
 static FILE*file(const char *, const char *);
 static wchar_t *convert(const char *);
 static int  inlcmp(const char *, const char *);
@@ -98,7 +110,8 @@ main (int argc, char *argv[])
(void) setlocale(LC_ALL, "");
 
obsolete(argv);
-   while ((ch = getopt(argc, argv, "cdif:s:u")) != -1)
+   while ((ch = getopt_long(argc, argv, "+cdif:s:u", long_opts,
+   NULL)) != -1)
switch (ch) {
case 'c':
cflag = 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: r335736 - stable/11/usr.bin/seq

2018-06-27 Thread Kyle Evans
Author: kevans
Date: Wed Jun 27 20:54:12 2018
New Revision: 335736
URL: https://svnweb.freebsd.org/changeset/base/335736

Log:
  MFC r333122: seq(1): Provide some long options
  
  These match GNU seq(1) names where applicable for compatibility purposes.

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

Modified: stable/11/usr.bin/seq/seq.1
==
--- stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:50:23 2018(r335735)
+++ stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:54:12 2018(r335736)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 12, 2016
+.Dd April 30, 2018
 .Dt SEQ 1
 .Os
 .Sh NAME
@@ -72,7 +72,7 @@ The
 .Nm
 utility accepts the following options:
 .Bl -tag -width Ar
-.It Fl f Ar format
+.It Fl f Ar format , Fl -format Ar format
 Use a
 .Xr printf 3
 style
@@ -98,7 +98,7 @@ defined in
 .St -ansiC .
 The default is
 .Cm %g .
-.It Fl s Ar string
+.It Fl s Ar string , Fl -separator Ar string
 Use
 .Ar string
 to separate numbers.
@@ -109,7 +109,7 @@ defined in
 .St -ansiC .
 The default is
 .Cm \en .
-.It Fl t Ar string
+.It Fl t Ar string , Fl -terminator Ar string
 Use
 .Ar string
 to terminate sequence of numbers.
@@ -121,7 +121,7 @@ defined in
 This option is useful when the default separator
 does not contain a
 .Cm \en .
-.It Fl w
+.It Fl w , Fl -fixed-width
 Equalize the widths of all numbers by padding with zeros as necessary.
 This option has no effect with the
 .Fl f

Modified: stable/11/usr.bin/seq/seq.c
==
--- stable/11/usr.bin/seq/seq.c Wed Jun 27 20:50:23 2018(r335735)
+++ stable/11/usr.bin/seq/seq.c Wed Jun 27 20:54:12 2018(r335736)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -67,6 +68,15 @@ static int valid_format(const char *);
 static char *generate_format(double, double, double, int, char);
 static char *unescape(char *);
 
+static const struct option long_opts[] =
+{
+   {"format",  required_argument,  NULL, 'f'},
+   {"separator",   required_argument,  NULL, 's'},
+   {"terminator",  required_argument,  NULL, 't'},
+   {"equal-width", no_argument,NULL, 'w'},
+   {NULL,  no_argument,NULL, 0}
+};
+
 /*
  * The seq command will print out a numeric sequence from 1, the default,
  * to a user specified upper limit by 1.  The lower bound and increment
@@ -97,7 +107,7 @@ main(int argc, char *argv[])
  * least they trip up getopt(3).
  */
while ((optind < argc) && !numeric(argv[optind]) &&
-   (c = getopt(argc, argv, "f:hs:t:w")) != -1) {
+   (c = getopt_long(argc, argv, "+f:hs:t:w", long_opts, NULL)) != -1) {
 
switch (c) {
case 'f':   /* format (plan9) */
___
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: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips

2018-06-27 Thread John Baldwin
On 6/27/18 12:45 PM, Bryan Drewery wrote:
> On 6/27/2018 12:35 PM, Dimitry Andric wrote:
>> On 27 Jun 2018, at 21:29, Bryan Drewery  wrote:
>>>
>>> Author: bdrewery
>>> Date: Wed Jun 27 19:29:15 2018
>>> New Revision: 335733
>>> URL: https://svnweb.freebsd.org/changeset/base/335733
>>>
>>> Log:
>>>  Don't use CCACHE for linking.
>>>
>>>  MFC after: 2 weeks
>>>  Sponsored by:  Dell EMC
>>>
>>> Modified:
>>>  head/bin/csh/Makefile
>>>  head/gnu/usr.bin/cc/cc1/Makefile
>>>  head/gnu/usr.bin/cc/cc1plus/Makefile
>>>  head/gnu/usr.bin/cc/cc_tools/Makefile
>>>  head/lib/libmagic/Makefile
>>>  head/lib/libpam/static_libpam/Makefile
>>>  head/lib/ncurses/ncurses/Makefile
>>>  head/share/syscons/scrnmaps/Makefile
>>>  head/stand/mips/beri/boot2/Makefile
>>>  head/usr.bin/vi/catalog/Makefile
>>>
>>> Modified: head/bin/csh/Makefile
>>> ==
>>> --- head/bin/csh/Makefile   Wed Jun 27 19:28:37 2018(r335732)
>>> +++ head/bin/csh/Makefile   Wed Jun 27 19:29:15 2018(r335733)
>>> @@ -113,7 +113,7 @@ build-tools: gethost
>>>
>>> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
>>> @rm -f ${.TARGET}
>>> -   ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>>> +   ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>>> ${TCSHDIR}/gethost.c
>>
>> Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL
>> or something like that? :)
> 
> Yeah probably. I'd paint it CC_LINK.

CCLD was my initial thought *duck*

-- 
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: r335735 - stable/11/stand/forth

2018-06-27 Thread Devin Teske
Author: dteske
Date: Wed Jun 27 20:50:23 2018
New Revision: 335735
URL: https://svnweb.freebsd.org/changeset/base/335735

Log:
  MFC r335607: check-password.4th(8): Fix manual [in]accuracy
  
  SVN r280384 updated the maximum password length from 16 bytes to 255. The
  manual was not updated to reflect this.
  
  Sponsored by: Smule, Inc.

Modified:
  stable/11/stand/forth/check-password.4th.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/forth/check-password.4th.8
==
--- stable/11/stand/forth/check-password.4th.8  Wed Jun 27 19:42:55 2018
(r335734)
+++ stable/11/stand/forth/check-password.4th.8  Wed Jun 27 20:50:23 2018
(r335735)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2015 Devin Teske
+.\" Copyright (c) 2011-2018 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 20, 2015
+.Dd June 24, 2018
 .Dt CHECK-PASSWORD.4TH 8
 .Os
 .Sh NAME
@@ -91,7 +91,7 @@ for additional information.
 The environment variables that effect its behavior are:
 .Bl -tag -width bootlock_password -offset indent
 .It Va bootlock_password
-Sets the bootlock password (up to 16 characters long) that is required by
+Sets the bootlock password (up to 255 characters long) that is required by
 .Ic check-password
 to be entered before the system is allowed to boot.
 .It Va geom_eli_passphrase_prompt
@@ -100,7 +100,7 @@ kernel for later mounting of
 .Xr geli 8
 encrypted root device(s).
 .It Va password
-Sets the password (up to 16 characters long) that is required by
+Sets the password (up to 255 characters long) that is required by
 .Ic check-password
 before the user is allowed to visit the boot menu.
 .El
___
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: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips

2018-06-27 Thread Bryan Drewery
On 6/27/2018 12:35 PM, Dimitry Andric wrote:
> On 27 Jun 2018, at 21:29, Bryan Drewery  wrote:
>>
>> Author: bdrewery
>> Date: Wed Jun 27 19:29:15 2018
>> New Revision: 335733
>> URL: https://svnweb.freebsd.org/changeset/base/335733
>>
>> Log:
>>  Don't use CCACHE for linking.
>>
>>  MFC after:  2 weeks
>>  Sponsored by:   Dell EMC
>>
>> Modified:
>>  head/bin/csh/Makefile
>>  head/gnu/usr.bin/cc/cc1/Makefile
>>  head/gnu/usr.bin/cc/cc1plus/Makefile
>>  head/gnu/usr.bin/cc/cc_tools/Makefile
>>  head/lib/libmagic/Makefile
>>  head/lib/libpam/static_libpam/Makefile
>>  head/lib/ncurses/ncurses/Makefile
>>  head/share/syscons/scrnmaps/Makefile
>>  head/stand/mips/beri/boot2/Makefile
>>  head/usr.bin/vi/catalog/Makefile
>>
>> Modified: head/bin/csh/Makefile
>> ==
>> --- head/bin/csh/MakefileWed Jun 27 19:28:37 2018(r335732)
>> +++ head/bin/csh/MakefileWed Jun 27 19:29:15 2018(r335733)
>> @@ -113,7 +113,7 @@ build-tools: gethost
>>
>> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
>>  @rm -f ${.TARGET}
>> -${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>> +${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>>  ${TCSHDIR}/gethost.c
> 
> Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL
> or something like that? :)

Yeah probably. I'd paint it CC_LINK.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq

2018-06-27 Thread Cy Schubert
Author: cy
Date: Wed Jun 27 19:42:55 2018
New Revision: 335734
URL: https://svnweb.freebsd.org/changeset/base/335734

Log:
  MFC r335355:
  
  Fix amq -i timestamp segmentation violation.

Modified:
  stable/10/contrib/amd/amq/amq.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/amd/amq/amq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/contrib/amd/amq/amq.c
==
--- stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018
(r335733)
+++ stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018
(r335734)
@@ -79,7 +79,7 @@ enum show_opt {
 static void
 time_print(time_type tt)
 {
-  time_t t = (time_t)*tt;
+  time_t t = (time_t)(intptr_t)tt;
   struct tm *tp = localtime();
   printf("%02d/%02d/%04d %02d:%02d:%02d",
 tp->tm_mon + 1, tp->tm_mday,
___
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: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq

2018-06-27 Thread Cy Schubert
Author: cy
Date: Wed Jun 27 19:42:55 2018
New Revision: 335734
URL: https://svnweb.freebsd.org/changeset/base/335734

Log:
  MFC r335355:
  
  Fix amq -i timestamp segmentation violation.

Modified:
  stable/11/contrib/amd/amq/amq.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/amd/amq/amq.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/contrib/amd/amq/amq.c
==
--- stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018
(r335733)
+++ stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018
(r335734)
@@ -79,7 +79,7 @@ enum show_opt {
 static void
 time_print(time_type tt)
 {
-  time_t t = (time_t)*tt;
+  time_t t = (time_t)(intptr_t)tt;
   struct tm *tp = localtime();
   printf("%02d/%02d/%04d %02d:%02d:%02d",
 tp->tm_mon + 1, tp->tm_mday,
___
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: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips

2018-06-27 Thread Dimitry Andric
On 27 Jun 2018, at 21:29, Bryan Drewery  wrote:
> 
> Author: bdrewery
> Date: Wed Jun 27 19:29:15 2018
> New Revision: 335733
> URL: https://svnweb.freebsd.org/changeset/base/335733
> 
> Log:
>  Don't use CCACHE for linking.
> 
>  MFC after:   2 weeks
>  Sponsored by:Dell EMC
> 
> Modified:
>  head/bin/csh/Makefile
>  head/gnu/usr.bin/cc/cc1/Makefile
>  head/gnu/usr.bin/cc/cc1plus/Makefile
>  head/gnu/usr.bin/cc/cc_tools/Makefile
>  head/lib/libmagic/Makefile
>  head/lib/libpam/static_libpam/Makefile
>  head/lib/ncurses/ncurses/Makefile
>  head/share/syscons/scrnmaps/Makefile
>  head/stand/mips/beri/boot2/Makefile
>  head/usr.bin/vi/catalog/Makefile
> 
> Modified: head/bin/csh/Makefile
> ==
> --- head/bin/csh/Makefile Wed Jun 27 19:28:37 2018(r335732)
> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018(r335733)
> @@ -113,7 +113,7 @@ build-tools: gethost
> 
> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
>   @rm -f ${.TARGET}
> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
>   ${TCSHDIR}/gethost.c

Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL
or something like that? :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/...

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 19:29:15 2018
New Revision: 335733
URL: https://svnweb.freebsd.org/changeset/base/335733

Log:
  Don't use CCACHE for linking.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC

Modified:
  head/bin/csh/Makefile
  head/gnu/usr.bin/cc/cc1/Makefile
  head/gnu/usr.bin/cc/cc1plus/Makefile
  head/gnu/usr.bin/cc/cc_tools/Makefile
  head/lib/libmagic/Makefile
  head/lib/libpam/static_libpam/Makefile
  head/lib/ncurses/ncurses/Makefile
  head/share/syscons/scrnmaps/Makefile
  head/stand/mips/beri/boot2/Makefile
  head/usr.bin/vi/catalog/Makefile

Modified: head/bin/csh/Makefile
==
--- head/bin/csh/Makefile   Wed Jun 27 19:28:37 2018(r335732)
+++ head/bin/csh/Makefile   Wed Jun 27 19:29:15 2018(r335733)
@@ -113,7 +113,7 @@ build-tools: gethost
 
 gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
-   ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
+   ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
${TCSHDIR}/gethost.c
 
 tc.defs.c: gethost ${TCSHDIR}/host.defs

Modified: head/gnu/usr.bin/cc/cc1/Makefile
==
--- head/gnu/usr.bin/cc/cc1/MakefileWed Jun 27 19:28:37 2018
(r335732)
+++ head/gnu/usr.bin/cc/cc1/MakefileWed Jun 27 19:29:15 2018
(r335733)
@@ -20,7 +20,7 @@ LDADD=${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIB
 
 DOBJS+=${SRCS:N*.h:R:S/$/.o/g}
 ${PROG}-dummy: ${DOBJS}
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} 
${LDADD}
 CLEANFILES+=   ${PROG}-dummy
 
 ${PROG}-checksum.c:${PROG}-dummy

Modified: head/gnu/usr.bin/cc/cc1plus/Makefile
==
--- head/gnu/usr.bin/cc/cc1plus/MakefileWed Jun 27 19:28:37 2018
(r335732)
+++ head/gnu/usr.bin/cc/cc1plus/MakefileWed Jun 27 19:29:15 2018
(r335733)
@@ -35,7 +35,7 @@ CLEANFILES= cfns.h
 
 DOBJS+=${SRCS:N*.h:R:S/$/.o/g}
 ${PROG}-dummy: ${DOBJS}
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} 
${LDADD}
 CLEANFILES+=   ${PROG}-dummy
 
 ${PROG}-checksum.c:${PROG}-dummy

Modified: head/gnu/usr.bin/cc/cc_tools/Makefile
==
--- head/gnu/usr.bin/cc/cc_tools/Makefile   Wed Jun 27 19:28:37 2018
(r335732)
+++ head/gnu/usr.bin/cc/cc_tools/Makefile   Wed Jun 27 19:29:15 2018
(r335733)
@@ -276,7 +276,7 @@ CLEANFILES+= gengtype-yacc.c
 
 gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
  ${LIBIBERTY}
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
 
 gtype-desc.h:  gengtype
${BTOOLSPATH:U.}/gengtype
@@ -292,18 +292,18 @@ CLEANFILES+=  gt-*.h gtype-*.h
 #
 .for F in check checksum genrtl modes
 gen$F: gen$F.o errors.o ${LIBIBERTY}
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
 .endfor
 
 .for F in attr attrtab automata codes conditions config constants emit \
extract flags  opinit output peep preds recog
 gen$F: gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
gensupport.o print-rtl.o errors.o ${LIBIBERTY}
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
 .endfor
 
 gencondmd: gencondmd.o
-   ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
 
 #
 # Generated .md files.

Modified: head/lib/libmagic/Makefile
==
--- head/lib/libmagic/Makefile  Wed Jun 27 19:28:37 2018(r335732)
+++ head/lib/libmagic/Makefile  Wed Jun 27 19:29:15 2018(r335733)
@@ -43,7 +43,7 @@ magic.mgc: mkmagic magic
 CLEANFILES+=   mkmagic
 build-tools: mkmagic
 mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} 
${BUILD_TOOLS_META}
-   ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} 
\
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} 
${.ALLSRC:N*.h} \
${LDADD}
 
 FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \

Modified: head/lib/libpam/static_libpam/Makefile
==
--- head/lib/libpam/static_libpam/Makefile  Wed Jun 27 19:28:37 2018
(r335732)
+++ 

svn commit: r335732 - head/sbin/ifconfig

2018-06-27 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Jun 27 19:28:37 2018
New Revision: 335732
URL: https://svnweb.freebsd.org/changeset/base/335732

Log:
  Fix description for the "autoconf" ifconfig(8) flag; it's an address
  property, not something you set for an interface.
  
  MFC after:2 weeks

Modified:
  head/sbin/ifconfig/ifconfig.8

Modified: head/sbin/ifconfig/ifconfig.8
==
--- head/sbin/ifconfig/ifconfig.8   Wed Jun 27 19:15:17 2018
(r335731)
+++ head/sbin/ifconfig/ifconfig.8   Wed Jun 27 19:28:37 2018
(r335732)
@@ -28,7 +28,7 @@
 .\" From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd April 29, 2017
+.Dd June 27, 2018
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -724,10 +724,6 @@ controls whether this flag is set by default or not.
 .It Cm -accept_rtadv
 Clear a flag
 .Cm accept_rtadv .
-.It Cm autoconf
-Set a flag to accept router advertisements on an interface.
-.It Fl autoconf
-Disable autoconfiguration.
 .It Cm no_radr
 Set a flag to control whether routers from which the system accepts
 Router Advertisement messages will be added to the Default Router List
@@ -800,6 +796,10 @@ Note that the address family keyword
 .Dq Li inet6
 is needed for them:
 .Bl -tag -width indent
+.It Cm autoconf
+Set the IPv6 autoconfigured address bit.
+.It Fl autoconf
+Clear the IPv6 autoconfigured address bit.
 .It Cm deprecated
 Set the IPv6 deprecated address bit.
 .It Fl deprecated
___
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: r335731 - vendor/lldb/lldb-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:15:17 2018
New Revision: 335731
URL: https://svnweb.freebsd.org/changeset/base/335731

Log:
  Tag lldb 6.0.1 release r335540.

Added:
  vendor/lldb/lldb-release_601-r335540/
 - copied from r335730, vendor/lldb/dist-release_60/
___
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: r335726 - in vendor/libc++/dist-release_60: include src/support/runtime test/libcxx/debug/containers test/std/language.support/support.exception/uncaught

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:54 2018
New Revision: 335726
URL: https://svnweb.freebsd.org/changeset/base/335726

Log:
  Vendor import of libc++ 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_601/final@335540

Modified:
  vendor/libc++/dist-release_60/include/list
  vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp
  
vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
  
vendor/libc++/dist-release_60/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp

Modified: vendor/libc++/dist-release_60/include/list
==
--- vendor/libc++/dist-release_60/include/list  Wed Jun 27 19:14:48 2018
(r335725)
+++ vendor/libc++/dist-release_60/include/list  Wed Jun 27 19:14:54 2018
(r335726)
@@ -2058,15 +2058,15 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __
 #endif
 if (__f != __l)
 {
+__link_pointer __first = __f.__ptr_;
+--__l;
+__link_pointer __last = __l.__ptr_;
 if (this != &__c)
 {
-size_type __s = _VSTD::distance(__f, __l);
+size_type __s = _VSTD::distance(__f, __l) + 1;
 __c.__sz() -= __s;
 base::__sz() += __s;
 }
-__link_pointer __first = __f.__ptr_;
---__l;
-__link_pointer __last = __l.__ptr_;
 base::__unlink_nodes(__first, __last);
 __link_nodes(__p.__ptr_, __first, __last);
 #if _LIBCPP_DEBUG_LEVEL >= 2

Modified: 
vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp
==
--- vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp   
Wed Jun 27 19:14:48 2018(r335725)
+++ vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp   
Wed Jun 27 19:14:54 2018(r335726)
@@ -18,7 +18,7 @@ bool uncaught_exception() _NOEXCEPT { return uncaught_
 
 int uncaught_exceptions() _NOEXCEPT
 {
-# if _LIBCPPABI_VERSION > 1101
+# if _LIBCPPABI_VERSION > 1001
 return __cxa_uncaught_exceptions();
 # else
 return __cxa_uncaught_exception() ? 1 : 0;

Modified: 
vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
==
--- 
vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
 Wed Jun 27 19:14:48 2018(r335725)
+++ 
vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
 Wed Jun 27 19:14:54 2018(r335726)
@@ -42,6 +42,7 @@ struct SequenceContainerChecks : BasicContainerChecks<
 Base::run();
 try {
   FrontOnEmptyContainer();
+
   if constexpr (CT != CT_ForwardList) {
 AssignInvalidates();
 BackOnEmptyContainer();
@@ -50,6 +51,8 @@ struct SequenceContainerChecks : BasicContainerChecks<
 InsertIterIterIter();
 EmplaceIterValue();
 EraseIterIter();
+  } else {
+SpliceFirstElemAfter();
   }
   if constexpr (CT == CT_Vector || CT == CT_Deque || CT == CT_List) {
 PopBack();
@@ -57,12 +60,66 @@ struct SequenceContainerChecks : BasicContainerChecks<
   if constexpr (CT == CT_List || CT == CT_Deque) {
 PopFront(); // FIXME: Run with forward list as well
   }
+  if constexpr (CT == CT_List || CT == CT_ForwardList) {
+RemoveFirstElem();
+  }
+  if constexpr (CT == CT_List) {
+SpliceFirstElem();
+  }
 } catch (...) {
   assert(false && "uncaught debug exception");
 }
   }
 
 private:
+  static void RemoveFirstElem() {
+// See llvm.org/PR35564
+CHECKPOINT("remove()");
+{
+  Container C = makeContainer(1);
+  auto FirstVal = *(C.begin());
+  C.remove(FirstVal);
+  assert(C.empty());
+}
+{
+  Container C = {1, 1, 1, 1};
+  auto FirstVal = *(C.begin());
+  C.remove(FirstVal);
+  assert(C.empty());
+}
+  }
+
+  static void SpliceFirstElem() {
+// See llvm.org/PR35564
+CHECKPOINT("splice()");
+{
+  Container C = makeContainer(1);
+  Container C2;
+  C2.splice(C2.end(), C, C.begin(), ++C.begin());
+}
+{
+  Container C = makeContainer(1);
+  Container C2;
+  C2.splice(C2.end(), C, C.begin());
+}
+  }
+
+
+  static void SpliceFirstElemAfter() {
+// See llvm.org/PR35564
+CHECKPOINT("splice()");
+{
+  Container C = makeContainer(1);
+  Container C2;
+  C2.splice_after(C2.begin(), C, C.begin(), ++C.begin());
+}
+{
+  Container C = makeContainer(1);
+  Container C2;
+  C2.splice_after(C2.begin(), C, C.begin());
+}
+  }
+
   static void AssignInvalidates() {
 CHECKPOINT("assign(Size, Value)");
 Container 

svn commit: r335725 - vendor/compiler-rt/compiler-rt-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:48 2018
New Revision: 335725
URL: https://svnweb.freebsd.org/changeset/base/335725

Log:
  Tag compiler-rt 6.0.1 release r335540.

Added:
  vendor/compiler-rt/compiler-rt-release_601-r335540/
 - copied from r335724, vendor/compiler-rt/dist-release_60/
___
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: r335730 - vendor/lldb/dist-release_60/cmake/modules

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:15:13 2018
New Revision: 335730
URL: https://svnweb.freebsd.org/changeset/base/335730

Log:
  Vendor import of lldb 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_601/final@335540

Modified:
  vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake

Modified: vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake
==
--- vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake  Wed Jun 27 
19:15:08 2018(r335729)
+++ vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake  Wed Jun 27 
19:15:13 2018(r335730)
@@ -277,27 +277,31 @@ include_directories(BEFORE
 
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/
-COMPONENT lldb_headers
+COMPONENT lldb-headers
 DESTINATION include
 FILES_MATCHING
 PATTERN "*.h"
 PATTERN ".svn" EXCLUDE
 PATTERN ".cmake" EXCLUDE
 PATTERN "Config.h" EXCLUDE
-PATTERN "lldb-*.h" EXCLUDE
-PATTERN "API/*.h" EXCLUDE
 )
 
   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
-COMPONENT lldb_headers
+COMPONENT lldb-headers
 DESTINATION include
 FILES_MATCHING
 PATTERN "*.h"
 PATTERN ".svn" EXCLUDE
 PATTERN ".cmake" EXCLUDE
-PATTERN "lldb-*.h" EXCLUDE
-PATTERN "API/*.h" EXCLUDE
 )
+
+  add_custom_target(lldb-headers)
+  set_target_properties(lldb-headers PROPERTIES FOLDER "Misc")
+
+  if (NOT CMAKE_CONFIGURATION_TYPES)
+add_llvm_install_targets(install-lldb-headers
+ COMPONENT lldb-headers)
+  endif()
 endif()
 
 if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows"))
___
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: r335729 - vendor/lld/lld-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:15:08 2018
New Revision: 335729
URL: https://svnweb.freebsd.org/changeset/base/335729

Log:
  Tag lld 6.0.1 release r335540.

Added:
  vendor/lld/lld-release_601-r335540/
 - copied from r335728, vendor/lld/dist-release_60/
___
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: r335724 - vendor/compiler-rt/dist-release_60/lib/sanitizer_common

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:44 2018
New Revision: 335724
URL: https://svnweb.freebsd.org/changeset/base/335724

Log:
  Vendor import of compiler-rt 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_601/final@335540

Modified:
  
vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc

Modified: 
vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
==
--- 
vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
  Wed Jun 27 19:14:40 2018(r335723)
+++ 
vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
  Wed Jun 27 19:14:44 2018(r335724)
@@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t;
 # include 
 #endif
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -253,7 +252,19 @@ namespace __sanitizer {
 #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
 
 #if SANITIZER_LINUX && !SANITIZER_ANDROID
-  unsigned struct_ustat_sz = sizeof(struct ustat);
+  // Use pre-computed size of struct ustat to avoid  which
+  // has been removed from glibc 2.28.
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+  || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
+  || defined(__x86_64__)
+#define SIZEOF_STRUCT_USTAT 32
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
+  || defined(__powerpc__) || defined(__s390__)
+#define SIZEOF_STRUCT_USTAT 20
+#else
+#error Unknown size of struct ustat
+#endif
+  unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
 #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
___
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: r335727 - vendor/libc++/libc++-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:58 2018
New Revision: 335727
URL: https://svnweb.freebsd.org/changeset/base/335727

Log:
  Tag libc++ 6.0.1 release r335540.

Added:
  vendor/libc++/libc++-release_601-r335540/
 - copied from r335726, vendor/libc++/dist-release_60/
___
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: r335728 - in vendor/lld/dist-release_60: COFF ELF ELF/Arch MinGW test/COFF test/ELF test/MinGW

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:15:02 2018
New Revision: 335728
URL: https://svnweb.freebsd.org/changeset/base/335728

Log:
  Vendor import of lld 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/lld/tags/RELEASE_601/final@335540

Modified:
  vendor/lld/dist-release_60/COFF/Config.h
  vendor/lld/dist-release_60/COFF/Driver.cpp
  vendor/lld/dist-release_60/COFF/DriverUtils.cpp
  vendor/lld/dist-release_60/COFF/Options.td
  vendor/lld/dist-release_60/ELF/Arch/Mips.cpp
  vendor/lld/dist-release_60/ELF/Config.h
  vendor/lld/dist-release_60/ELF/Driver.cpp
  vendor/lld/dist-release_60/MinGW/Driver.cpp
  vendor/lld/dist-release_60/MinGW/Options.td
  vendor/lld/dist-release_60/test/COFF/def-export-stdcall.s
  vendor/lld/dist-release_60/test/ELF/mips-26-n32-n64.s
  vendor/lld/dist-release_60/test/ELF/mips-plt-r6.s
  vendor/lld/dist-release_60/test/MinGW/driver.test

Modified: vendor/lld/dist-release_60/COFF/Config.h
==
--- vendor/lld/dist-release_60/COFF/Config.hWed Jun 27 19:14:58 2018
(r335727)
+++ vendor/lld/dist-release_60/COFF/Config.hWed Jun 27 19:15:02 2018
(r335728)
@@ -175,6 +175,7 @@ struct Configuration {
   bool AppContainer = false;
   bool MinGW = false;
   bool WarnLocallyDefinedImported = true;
+  bool KillAt = false;
 };
 
 extern Configuration *Config;

Modified: vendor/lld/dist-release_60/COFF/Driver.cpp
==
--- vendor/lld/dist-release_60/COFF/Driver.cpp  Wed Jun 27 19:14:58 2018
(r335727)
+++ vendor/lld/dist-release_60/COFF/Driver.cpp  Wed Jun 27 19:15:02 2018
(r335728)
@@ -970,6 +970,10 @@ void LinkerDriver::link(ArrayRef ArgsArr
   if (Args.hasArg(OPT_lldsavetemps))
 Config->SaveTemps = true;
 
+  // Handle /kill-at
+  if (Args.hasArg(OPT_kill_at))
+Config->KillAt = true;
+
   // Handle /lldltocache
   if (auto *Arg = Args.getLastArg(OPT_lldltocache))
 Config->LTOCache = Arg->getValue();

Modified: vendor/lld/dist-release_60/COFF/DriverUtils.cpp
==
--- vendor/lld/dist-release_60/COFF/DriverUtils.cpp Wed Jun 27 19:14:58 
2018(r335727)
+++ vendor/lld/dist-release_60/COFF/DriverUtils.cpp Wed Jun 27 19:15:02 
2018(r335728)
@@ -561,6 +561,26 @@ static StringRef undecorate(StringRef Sym) {
   return Sym.startswith("_") ? Sym.substr(1) : Sym;
 }
 
+// Convert stdcall/fastcall style symbols into unsuffixed symbols,
+// with or without a leading underscore. (MinGW specific.)
+static StringRef killAt(StringRef Sym, bool Prefix) {
+  if (Sym.empty())
+return Sym;
+  // Strip any trailing stdcall suffix
+  Sym = Sym.substr(0, Sym.find('@', 1));
+  if (!Sym.startswith("@")) {
+if (Prefix && !Sym.startswith("_"))
+  return Saver.save("_" + Sym);
+return Sym;
+  }
+  // For fastcall, remove the leading @ and replace it with an
+  // underscore, if prefixes are used.
+  Sym = Sym.substr(1);
+  if (Prefix)
+Sym = Saver.save("_" + Sym);
+  return Sym;
+}
+
 // Performs error checking on all /export arguments.
 // It also sets ordinals.
 void fixupExports() {
@@ -590,6 +610,15 @@ void fixupExports() {
   E.ExportName = undecorate(E.Name);
 } else {
   E.ExportName = undecorate(E.ExtName.empty() ? E.Name : E.ExtName);
+}
+  }
+
+  if (Config->KillAt && Config->Machine == I386) {
+for (Export  : Config->Exports) {
+  E.Name = killAt(E.Name, true);
+  E.ExportName = killAt(E.ExportName, false);
+  E.ExtName = killAt(E.ExtName, true);
+  E.SymbolName = killAt(E.SymbolName, true);
 }
   }
 

Modified: vendor/lld/dist-release_60/COFF/Options.td
==
--- vendor/lld/dist-release_60/COFF/Options.td  Wed Jun 27 19:14:58 2018
(r335727)
+++ vendor/lld/dist-release_60/COFF/Options.td  Wed Jun 27 19:15:02 2018
(r335728)
@@ -121,6 +121,7 @@ def help_q : Flag<["/?", "-?"], "">, Alias;
 def debug_ghash : F<"debug:ghash">;
 def debug_dwarf : F<"debug:dwarf">;
 def export_all_symbols : F<"export-all-symbols">;
+def kill_at : F<"kill-at">;
 def lldmingw : F<"lldmingw">;
 def msvclto : F<"msvclto">;
 def output_def : Joined<["/", "-"], "output-def:">;

Modified: vendor/lld/dist-release_60/ELF/Arch/Mips.cpp
==
--- vendor/lld/dist-release_60/ELF/Arch/Mips.cppWed Jun 27 19:14:58 
2018(r335727)
+++ vendor/lld/dist-release_60/ELF/Arch/Mips.cppWed Jun 27 19:15:02 
2018(r335728)
@@ -296,7 +296,8 @@ template  void MIPS::writePltHeader(
 write32(Buf + 20, 0x0018c082); // srl   $24, $24, 2
   }
 
-  write32(Buf + 24, 0x0320f809); // jalr  $25
+  uint32_t JalrInst = Config->ZHazardplt ? 0x0320fc09 : 0x0320f809;
+  write32(Buf + 24, JalrInst); // jalr.hb $25 or jalr $25
   

svn commit: r335723 - vendor/clang/clang-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:40 2018
New Revision: 335723
URL: https://svnweb.freebsd.org/changeset/base/335723

Log:
  Tag clang 6.0.1 release r335540.

Added:
  vendor/clang/clang-release_601-r335540/
 - copied from r335722, vendor/clang/dist-release_60/
___
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: r335721 - vendor/llvm/llvm-release_601-r335540

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:21 2018
New Revision: 335721
URL: https://svnweb.freebsd.org/changeset/base/335721

Log:
  Tag llvm 6.0.1 release r335540.

Added:
  vendor/llvm/llvm-release_601-r335540/
 - copied from r335720, vendor/llvm/dist-release_60/
___
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: r335722 - in vendor/clang/dist-release_60: docs include/clang/Basic include/clang/Driver lib/AST lib/Basic lib/Basic/Targets lib/CodeGen lib/Driver lib/Driver/ToolChains lib/Driver/Tool...

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:32 2018
New Revision: 335722
URL: https://svnweb.freebsd.org/changeset/base/335722

Log:
  Vendor import of clang 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final@335540

Added:
  vendor/clang/dist-release_60/test/CodeGen/ms_struct-long-double.c   
(contents, props changed)
  vendor/clang/dist-release_60/test/Driver/Inputs/empty.cfg
  vendor/clang/dist-release_60/test/Driver/config-file4.c   (contents, props 
changed)
  vendor/clang/dist-release_60/test/Driver/mips-indirect-branch.c   (contents, 
props changed)
  vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h   (contents, 
props changed)
  vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h-0
  vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h-1
  vendor/clang/dist-release_60/test/Index/reparsed-live-issue.cpp   (contents, 
props changed)
Modified:
  vendor/clang/dist-release_60/docs/UsersManual.rst
  vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist-release_60/include/clang/Driver/CLCompatOptions.td
  vendor/clang/dist-release_60/include/clang/Driver/Options.td
  vendor/clang/dist-release_60/lib/AST/ExprConstant.cpp
  vendor/clang/dist-release_60/lib/AST/RecordLayoutBuilder.cpp
  vendor/clang/dist-release_60/lib/Basic/Targets/AArch64.cpp
  vendor/clang/dist-release_60/lib/Basic/Targets/Mips.h
  vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp
  vendor/clang/dist-release_60/lib/Basic/Targets/X86.h
  vendor/clang/dist-release_60/lib/Basic/Version.cpp
  vendor/clang/dist-release_60/lib/CodeGen/TargetInfo.cpp
  vendor/clang/dist-release_60/lib/Driver/Driver.cpp
  vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.cpp
  vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.h
  vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp
  vendor/clang/dist-release_60/lib/Driver/ToolChains/CrossWindows.cpp
  vendor/clang/dist-release_60/lib/Driver/ToolChains/MinGW.cpp
  vendor/clang/dist-release_60/lib/Frontend/ASTUnit.cpp
  vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist-release_60/lib/Headers/avx512vlbitalgintrin.h
  vendor/clang/dist-release_60/lib/Headers/avx512vlvbmi2intrin.h
  vendor/clang/dist-release_60/lib/Headers/avx512vlvnniintrin.h
  vendor/clang/dist-release_60/lib/Sema/SemaDecl.cpp
  vendor/clang/dist-release_60/test/CodeGen/aarch64-inline-asm.c
  vendor/clang/dist-release_60/test/CodeGen/attr-target-x86.c
  vendor/clang/dist-release_60/test/CodeGen/avx512vlbitalg-builtins.c
  vendor/clang/dist-release_60/test/CodeGen/avx512vlvbmi2-builtins.c
  vendor/clang/dist-release_60/test/CodeGen/avx512vlvnni-builtins.c
  vendor/clang/dist-release_60/test/CodeGen/decl.c
  vendor/clang/dist-release_60/test/CodeGen/function-attributes.c
  vendor/clang/dist-release_60/test/CodeGen/mingw-long-double.c
  vendor/clang/dist-release_60/test/CodeGenCXX/const-init-cxx11.cpp
  vendor/clang/dist-release_60/test/CodeGenCXX/cxx0x-initializer-references.cpp
  
vendor/clang/dist-release_60/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
  vendor/clang/dist-release_60/test/CodeGenObjCXX/arc-cxx11-init-list.mm
  vendor/clang/dist-release_60/test/Driver/clang_f_opts.c
  vendor/clang/dist-release_60/test/Driver/mingw-libgcc.c
  vendor/clang/dist-release_60/test/Driver/mips-features.c
  vendor/clang/dist-release_60/test/Driver/windows-cross.c
  vendor/clang/dist-release_60/test/SemaCXX/constant-expression-cxx11.cpp
  
vendor/clang/dist-release_60/test/SemaCXX/warn-missing-variable-declarations.cpp
  vendor/clang/dist-release_60/tools/driver/driver.cpp

Modified: vendor/clang/dist-release_60/docs/UsersManual.rst
==
--- vendor/clang/dist-release_60/docs/UsersManual.rst   Wed Jun 27 19:14:21 
2018(r335721)
+++ vendor/clang/dist-release_60/docs/UsersManual.rst   Wed Jun 27 19:14:32 
2018(r335722)
@@ -2741,7 +2741,7 @@ Execute ``clang-cl /?`` to see a list of supported opt
   /Gv Set __vectorcall as a default calling convention
   /Gw-Don't put each data item in its own section
   /Gw Put each data item in its own section
-  /GX-Enable exception handling
+  /GX-Disable exception handling
   /GX Enable exception handling
   /Gy-Don't put each function in its own section
   /Gy Put each function in its own section

Modified: 
vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td
==
--- vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td   
Wed Jun 27 19:14:21 2018(r335721)
+++ 

svn commit: r335720 - in vendor/llvm/dist-release_60: . include/llvm/CodeGen include/llvm/IR lib/Analysis lib/CodeGen lib/ExecutionEngine/RuntimeDyld lib/IR lib/MC lib/Support lib/Target/AArch64 li...

2018-06-27 Thread Dimitry Andric
Author: dim
Date: Wed Jun 27 19:14:09 2018
New Revision: 335720
URL: https://svnweb.freebsd.org/changeset/base/335720

Log:
  Vendor import of llvm 6.0.1 release r335540:
  https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_601/final@335540

Added:
  vendor/llvm/dist-release_60/lib/Target/X86/X86FlagsCopyLowering.cpp   
(contents, props changed)
  vendor/llvm/dist-release_60/test/Analysis/MemorySSA/pr36883.ll
  vendor/llvm/dist-release_60/test/CodeGen/AArch64/inlineasm-S-constraint.ll
  vendor/llvm/dist-release_60/test/CodeGen/AArch64/spill-stack-realignment.mir
  vendor/llvm/dist-release_60/test/CodeGen/AMDGPU/ctpop16.ll
  vendor/llvm/dist-release_60/test/CodeGen/Hexagon/ifcvt-diamond-ret.mir
  vendor/llvm/dist-release_60/test/CodeGen/MIR/PowerPC/ifcvt-diamond-ret.mir
  vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/
  vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/calls.ll
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/guards-verify-call.mir
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/guards-verify-tailcall.mir
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/jumptables.ll
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/long-branch.ll
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/long-calls.ll
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/unsupported-micromips.ll
  
vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/unsupported-mips32.ll
  vendor/llvm/dist-release_60/test/CodeGen/Mips/inlineasm-cnstrnt-bad-l1.ll
  vendor/llvm/dist-release_60/test/CodeGen/PowerPC/no-dup-of-bdnz.ll
  vendor/llvm/dist-release_60/test/CodeGen/PowerPC/pr35402.ll
  vendor/llvm/dist-release_60/test/CodeGen/Thumb/PR36658.mir
  
vendor/llvm/dist-release_60/test/CodeGen/X86/domain-reassignment-implicit-def.ll
  vendor/llvm/dist-release_60/test/CodeGen/X86/domain-reassignment-test.ll
  vendor/llvm/dist-release_60/test/CodeGen/X86/flags-copy-lowering.mir
  vendor/llvm/dist-release_60/test/CodeGen/X86/pr37264.ll
  
vendor/llvm/dist-release_60/test/DebugInfo/X86/live-debug-vars-discard-invalid.mir
  vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/Inputs/
  
vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/Inputs/ppc64_elf_module_b.s
   (contents, props changed)
  
vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/ppc64_elf.s
   (contents, props changed)
  vendor/llvm/dist-release_60/test/MC/Mips/unsupported-relocation.s   
(contents, props changed)
  vendor/llvm/dist-release_60/test/Transforms/ArgumentPromotion/musttail.ll
  vendor/llvm/dist-release_60/test/Transforms/CallSiteSplitting/musttail.ll
  vendor/llvm/dist-release_60/test/Transforms/DeadArgElim/musttail-caller.ll
  vendor/llvm/dist-release_60/test/Transforms/GlobalOpt/musttail_cc.ll
  vendor/llvm/dist-release_60/test/Transforms/IPConstantProp/musttail-call.ll
  vendor/llvm/dist-release_60/test/Transforms/JumpThreading/header-succ.ll
  vendor/llvm/dist-release_60/test/Transforms/MergeFunc/inline-asm.ll
  vendor/llvm/dist-release_60/test/Transforms/MergeFunc/weak-small.ll
Deleted:
  vendor/llvm/dist-release_60/test/CodeGen/X86/clobber-fi0.ll
  vendor/llvm/dist-release_60/test/CodeGen/X86/eflags-copy-expansion.mir
Modified:
  vendor/llvm/dist-release_60/CMakeLists.txt
  vendor/llvm/dist-release_60/include/llvm/CodeGen/MachineBasicBlock.h
  vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetInstrInfo.h
  vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsPowerPC.td
  vendor/llvm/dist-release_60/lib/Analysis/GlobalsModRef.cpp
  vendor/llvm/dist-release_60/lib/Analysis/MemorySSA.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/IfConversion.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/MachineBasicBlock.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/MachineBlockPlacement.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/PeepholeOptimizer.cpp
  vendor/llvm/dist-release_60/lib/CodeGen/TargetInstrInfo.cpp
  vendor/llvm/dist-release_60/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
  vendor/llvm/dist-release_60/lib/IR/Core.cpp
  vendor/llvm/dist-release_60/lib/MC/MCObjectFileInfo.cpp
  vendor/llvm/dist-release_60/lib/Support/CMakeLists.txt
  vendor/llvm/dist-release_60/lib/Support/Host.cpp
  vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64AsmPrinter.cpp
  vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
  vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FrameLowering.cpp
  vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp
  vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstrInfo.td
  vendor/llvm/dist-release_60/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp
  vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIInstructions.td
  

svn commit: r335719 - in head: . release/packages

2018-06-27 Thread Brad Davis
Author: brd
Date: Wed Jun 27 19:10:32 2018
New Revision: 335719
URL: https://svnweb.freebsd.org/changeset/base/335719

Log:
  Chase the pwd_mkdb endian changes.
  
  Approved by:  bapt (mentor)

Modified:
  head/Makefile.inc1
  head/release/packages/generate-ucl.sh
  head/release/packages/runtime.ucl

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Jun 27 18:43:34 2018(r335718)
+++ head/Makefile.inc1  Wed Jun 27 19:10:32 2018(r335719)
@@ -1804,14 +1804,12 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
-   pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \
-e "s/%KERNELDIR%/kernel/" \
-e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
-   -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
${SRCDIR}/release/packages/kernel.ucl \
> ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl 
; \
@@ -1840,14 +1838,12 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
-v kernel=yes -v _kernconf=${_kernel} ; \
cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
-   pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \
-e "s/%KERNELDIR%/kernel.${_kernel}/" \
-e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
-   -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
${SRCDIR}/release/packages/kernel.ucl \
> ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl 
; \

Modified: head/release/packages/generate-ucl.sh
==
--- head/release/packages/generate-ucl.sh   Wed Jun 27 18:43:34 2018
(r335718)
+++ head/release/packages/generate-ucl.sh   Wed Jun 27 19:10:32 2018
(r335719)
@@ -132,13 +132,11 @@ main() {
 
cp "${uclsource}" "${uclfile}"
cap_arg="$(make -C ${srctree}/etc -VCAP_MKDB_ENDIAN)"
-   pwd_arg="$(make -C ${srctree}/etc -VPWD_MKDB_ENDIAN)"
sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/${origname}/" \
-e "s/%COMMENT%/${comment}/" \
-e "s/%DESC%/${desc}/" \
-e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
-   -e "s/%PWD_MKDB_ENDIAN%/${pwd_arg}/g" \
-e "s/%PKGDEPS%/${pkgdeps}/" \
${uclfile}
return 0

Modified: head/release/packages/runtime.ucl
==
--- head/release/packages/runtime.ucl   Wed Jun 27 18:43:34 2018
(r335718)
+++ head/release/packages/runtime.ucl   Wed Jun 27 19:10:32 2018
(r335719)
@@ -19,7 +19,7 @@ EOD
 scripts: {
post-install = 

Re: svn commit: r335718 - head/share/mk

2018-06-27 Thread Bryan Drewery
On 6/27/2018 11:43 AM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Jun 27 18:43:34 2018
> New Revision: 335718
> URL: https://svnweb.freebsd.org/changeset/base/335718
> 
> Log:
>   Follow-up r335706: Fix LLVM_TARGET_ALL handling to use TARGET_ARCH.

Oops, I meant to say TARGET here. I intended for this to use TARGET as
it does now.
__T
__TT, great names :(

>   
>   Pointyhat to:   bdrewery
>   MFC after:  2 weeks
>   X-MFC-with: r335706
>   Reported by:Mark Millard
>   Sponsored by:   Dell EMC
> 
> Modified:
>   head/share/mk/src.opts.mk
> 
> Modified: head/share/mk/src.opts.mk
> ==
> --- head/share/mk/src.opts.mk Wed Jun 27 18:14:33 2018(r335717)
> +++ head/share/mk/src.opts.mk Wed Jun 27 18:43:34 2018(r335718)
> @@ -264,7 +264,7 @@ __LLVM_TARGET_FILT=   
> C/(amd64|i386)/x86/:S/sparc64/spar
>  # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
>  # which is based on MK_CLANG.
>  .for __llt in ${__LLVM_TARGETS}
> -.if ${__llt} != ${__T:${__LLVM_TARGET_FILT}}
> +.if ${__llt} != ${__TT:${__LLVM_TARGET_FILT}}
>  __DEFAULT_DEPENDENT_OPTIONS+=
> LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
>  .else
>  __DEFAULT_DEPENDENT_OPTIONS+=
> LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r335718 - head/share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 18:43:34 2018
New Revision: 335718
URL: https://svnweb.freebsd.org/changeset/base/335718

Log:
  Follow-up r335706: Fix LLVM_TARGET_ALL handling to use TARGET_ARCH.
  
  Pointyhat to: bdrewery
  MFC after:2 weeks
  X-MFC-with:   r335706
  Reported by:  Mark Millard
  Sponsored by: Dell EMC

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Jun 27 18:14:33 2018(r335717)
+++ head/share/mk/src.opts.mk   Wed Jun 27 18:43:34 2018(r335718)
@@ -264,7 +264,7 @@ __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/spar
 # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
 # which is based on MK_CLANG.
 .for __llt in ${__LLVM_TARGETS}
-.if ${__llt} != ${__T:${__LLVM_TARGET_FILT}}
+.if ${__llt} != ${__TT:${__LLVM_TARGET_FILT}}
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .else
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
___
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: r335717 - in head: contrib/gcc gnu/usr.bin/cc gnu/usr.bin/cc/cc_tools

2018-06-27 Thread John Baldwin
Author: jhb
Date: Wed Jun 27 18:14:33 2018
New Revision: 335717
URL: https://svnweb.freebsd.org/changeset/base/335717

Log:
  Fix GCC 4.2.1 to honor --sysroot for includes.
  
  - Change the C++ directory entries to honor --sysroot if it is set.
  - Don't define CROSS_INCLUDE_DIR for the cross compiler.  Instead, set
TARGET_SYSTEM_ROOT to point to WORLDTMP and always define
STANDARD_INCLUDE_DIR.
  - Change STANDARD_INCLUDE_DIR and the C++ include directories to just
start with "/usr" always.  The compiler will prepend the sysroot when
doing cross-builds.  GCC_INCLUDE_DIR (which contains headers that ship
with the compiler such as intrinsincs rather than OS-supplied headers)
remains hardcoded to look in TOOLS_PREFIX.
  
  Reviewed by:  bdrewery (older version)
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D15127

Modified:
  head/contrib/gcc/cppdefault.c
  head/gnu/usr.bin/cc/Makefile.inc
  head/gnu/usr.bin/cc/cc_tools/freebsd-native.h

Modified: head/contrib/gcc/cppdefault.c
==
--- head/contrib/gcc/cppdefault.c   Wed Jun 27 18:11:47 2018
(r335716)
+++ head/contrib/gcc/cppdefault.c   Wed Jun 27 18:14:33 2018
(r335717)
@@ -48,7 +48,7 @@ const struct default_include cpp_include_defaults[]
 = {
 #ifdef GPLUSPLUS_INCLUDE_DIR
 /* Pick up GNU C++ generic include files.  */
-{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
+{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
 #endif
 #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
 /* Pick up GNU C++ target-dependent include files.  */
@@ -56,7 +56,7 @@ const struct default_include cpp_include_defaults[]
 #endif
 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
 /* Pick up GNU C++ backward and deprecated include files.  */
-{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
+{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
 #endif
 #ifdef LOCAL_INCLUDE_DIR
 /* /usr/local/include comes before the fixincluded header files.  */

Modified: head/gnu/usr.bin/cc/Makefile.inc
==
--- head/gnu/usr.bin/cc/Makefile.incWed Jun 27 18:11:47 2018
(r335716)
+++ head/gnu/usr.bin/cc/Makefile.incWed Jun 27 18:14:33 2018
(r335717)
@@ -25,6 +25,7 @@ CSTD?=gnu89
 
 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
 CFLAGS+=   -DCROSS_DIRECTORY_STRUCTURE
+CFLAGS+=   -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\"
 .endif
 
 .if ${TARGET_CPUARCH} == "arm"

Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h
==
--- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h   Wed Jun 27 18:11:47 
2018(r335716)
+++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h   Wed Jun 27 18:14:33 
2018(r335717)
@@ -15,14 +15,10 @@
 #undef LOCAL_INCLUDE_DIR   /* We don't wish to support one. */
 
 /* Look for the include files in the system-defined places.  */
-#define GPLUSPLUS_INCLUDE_DIR  PREFIX"/include/c++/"GCCVER
-#defineGPLUSPLUS_BACKWARD_INCLUDE_DIR  
PREFIX"/include/c++/"GCCVER"/backward"
+#define GPLUSPLUS_INCLUDE_DIR  "/usr/include/c++/"GCCVER
+#defineGPLUSPLUS_BACKWARD_INCLUDE_DIR  
"/usr/include/c++/"GCCVER"/backward"
 #define GCC_INCLUDE_DIRPREFIX"/include/gcc/"GCCVER
-#ifdef CROSS_DIRECTORY_STRUCTURE
-#define CROSS_INCLUDE_DIR  PREFIX"/include"
-#else
-#define STANDARD_INCLUDE_DIR   PREFIX"/include"
-#endif
+#define STANDARD_INCLUDE_DIR   "/usr/include"
 
 /* Under FreeBSD, the normal location of the compiler back ends is the
/usr/libexec directory.
___
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: r335716 - head/gnu/usr.bin/cc/cc_tools

2018-06-27 Thread John Baldwin
Author: jhb
Date: Wed Jun 27 18:11:47 2018
New Revision: 335716
URL: https://svnweb.freebsd.org/changeset/base/335716

Log:
  Don't hardcode the TOOLS_PREFIX for the startfiles directories.
  
  GCC 4.2 prefixes these directories with --sysroot meaning that during
  buildworld they have a double sysroot.
  
  Reviewed by:  bdrewery
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D14780

Modified:
  head/gnu/usr.bin/cc/cc_tools/freebsd-native.h

Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h
==
--- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h   Wed Jun 27 17:40:29 
2018(r335715)
+++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h   Wed Jun 27 18:11:47 
2018(r335716)
@@ -43,8 +43,8 @@
/usr/lib directory.  */
 
 #undef  MD_STARTFILE_PREFIX/* We don't need one for now. */
-#define STANDARD_STARTFILE_PREFIX  PREFIX"/lib/"
-#define STARTFILE_PREFIX_SPEC  PREFIX"/lib/"
+#define STANDARD_STARTFILE_PREFIX  "/usr/lib/"
+#define STARTFILE_PREFIX_SPEC  "/usr/lib/"
 
 #if 0
 #define LIBGCC_SPEC"%{shared: -lgcc_pic} \
___
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: r335715 - head/share/misc

2018-06-27 Thread Glen Barber
Author: gjb
Date: Wed Jun 27 17:40:29 2018
New Revision: 335715
URL: https://svnweb.freebsd.org/changeset/base/335715

Log:
  Add FreeBSD 11.2.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==
--- head/share/misc/bsd-family-tree Wed Jun 27 17:29:27 2018
(r335714)
+++ head/share/misc/bsd-family-tree Wed Jun 27 17:40:29 2018
(r335715)
@@ -372,6 +372,8 @@ FreeBSD 5.2   |  | |  
  | |  | |  v   |   |
  | |  | |  |   |   DragonFly 5.2.1
  | |  | |  v   |   |
+ |  FreeBSD   | |  |   |
+ |   11.2 | |  |   |
  | v  | |  |   |
  || |  |   |
 FreeBSD 12 -current   | NetBSD -current   OpenBSD -currentDragonFly 
-current
@@ -746,6 +748,7 @@ NetBSD 7.1.22018-03-15 [NBD]
 OpenBSD 6.32018-04-02 [OBD]
 DragonFly 5.2.02018-04-10 [DFB]
 DragonFly 5.2.12018-05-20 [DFB]
+FreeBSD 11.2   2018-06-27 [FBD]
 
 Bibliography
 
___
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: r335708 - head

2018-06-27 Thread Ravi Pokala
-Original Message-
From:  on behalf of Bryan Drewery 

Date: 2018-06-27, Wednesday at 09:58
To: , , 

Subject: svn commit: r335708 - head

> Author: bdrewery
> Date: Wed Jun 27 16:57:59 2018
> New Revision: 335708
> URL: https://svnweb.freebsd.org/changeset/base/335708
> 
> Log:
>   tinderbox: Give details about kernel builds.
>   
>   This is a bit noisy now but it was silent before leading to
>   wondering if it was doing anything.
>   
>   MFC after:  1 week
>   Suggested by:   rpokala
>   Sponsored by:   Dell EMC
> 
> Modified:
>   head/Makefile

\o/ Yay!

Thank you sir!

-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: r335714 - stable/11/release/doc/en_US.ISO8859-1/errata

2018-06-27 Thread Glen Barber
Author: gjb
Date: Wed Jun 27 17:29:27 2018
New Revision: 335714
URL: https://svnweb.freebsd.org/changeset/base/335714

Log:
  Add an entry about an incorrectly-listed driver name in the
  11.2 announcement.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/doc/en_US.ISO8859-1/errata/article.xml

Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml
==
--- stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlWed Jun 27 
17:18:12 2018(r335713)
+++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlWed Jun 27 
17:29:27 2018(r335714)
@@ -211,6 +211,13 @@ boot
  that no longer exists.  The correct URL is https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html;
 />.
   
+
+  
+   [2018-06-27] The announcement email for 11.2
+ incorrectly states the ocs_fw(4) driver
+ had been added; this should have stated
+ .
+  
 
   
 
___
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: r335713 - head/share/man/man5

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 17:18:12 2018
New Revision: 335713
URL: https://svnweb.freebsd.org/changeset/base/335713

Log:
  Regenerate

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed Jun 27 17:13:36 2018
(r335712)
+++ head/share/man/man5/src.conf.5  Wed Jun 27 17:18:12 2018
(r335713)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd June 22, 2018
+.Dd June 27, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -183,11 +183,13 @@ Set this if you do not want to build
 .Xr blacklistd 8
 and
 .Xr blacklistctl 8 .
-When set, it enforces these options:
+When set, these options are also in effect:
 .Pp
-.Bl -item -compact
-.It
-.Va WITHOUT_BLACKLIST_SUPPORT
+.Bl -inset -compact
+.It Va WITHOUT_BLACKLIST_SUPPORT
+(unless
+.Va WITH_BLACKLIST_SUPPORT
+is set explicitly)
 .El
 .It Va WITHOUT_BLACKLIST_SUPPORT
 Set to build some programs without
@@ -228,11 +230,13 @@ Set to not build contributed bzip2 software as a part 
 .Bf -symbolic
 The option has no effect yet.
 .Ef
-When set, it enforces these options:
+When set, these options are also in effect:
 .Pp
-.Bl -item -compact
-.It
-.Va WITHOUT_BZIP2_SUPPORT
+.Bl -inset -compact
+.It Va WITHOUT_BZIP2_SUPPORT
+(unless
+.Va WITH_BZIP2_SUPPORT
+is set explicitly)
 .El
 .It Va WITHOUT_BZIP2_SUPPORT
 Set to build some programs without optional bzip2 support.
@@ -317,6 +321,39 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_LLVM_COV
 .El
+.Pp
+When set, these options are also in effect:
+.Pp
+.Bl -inset -compact
+.It Va WITHOUT_LLVM_TARGET_AARCH64
+(unless
+.Va WITH_LLVM_TARGET_AARCH64
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_ALL
+(unless
+.Va WITH_LLVM_TARGET_ALL
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_ARM
+(unless
+.Va WITH_LLVM_TARGET_ARM
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_MIPS
+(unless
+.Va WITH_LLVM_TARGET_MIPS
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_POWERPC
+(unless
+.Va WITH_LLVM_TARGET_POWERPC
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_SPARC
+(unless
+.Va WITH_LLVM_TARGET_SPARC
+is set explicitly)
+.It Va WITHOUT_LLVM_TARGET_X86
+(unless
+.Va WITH_LLVM_TARGET_X86
+is set explicitly)
+.El
 .It Va WITH_CLANG
 Set to build the Clang C/C++ compiler during the normal phase of the build.
 .Pp
@@ -405,8 +442,6 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_KERBEROS
 .It
-.Va WITHOUT_KERBEROS_SUPPORT
-.It
 .Va WITHOUT_OPENSSH
 .It
 .Va WITHOUT_OPENSSL
@@ -470,8 +505,6 @@ When set, it enforces these options:
 .Va WITHOUT_LLVM_COV
 .It
 .Va WITHOUT_TESTS
-.It
-.Va WITHOUT_TESTS_SUPPORT
 .El
 .It Va WITH_CXX
 Set to build
@@ -860,13 +893,6 @@ and
 .Xr truss 1 .
 .It Va WITHOUT_KERBEROS
 Set this to not build Kerberos 5 (KTH Heimdal).
-When set, it enforces these options:
-.Pp
-.Bl -item -compact
-.It
-.Va WITHOUT_KERBEROS_SUPPORT
-.El
-.Pp
 When set, these options are also in effect:
 .Pp
 .Bl -inset -compact
@@ -874,6 +900,10 @@ When set, these options are also in effect:
 (unless
 .Va WITH_GSSAPI
 is set explicitly)
+.It Va WITHOUT_KERBEROS_SUPPORT
+(unless
+.Va WITH_KERBEROS_SUPPORT
+is set explicitly)
 .El
 .It Va WITHOUT_KERBEROS_SUPPORT
 Set to build some programs without Kerberos support, like
@@ -897,11 +927,13 @@ library as a part of the base system.
 .Bf -symbolic
 The option has no effect yet.
 .Ef
-When set, it enforces these options:
+When set, these options are also in effect:
 .Pp
-.Bl -item -compact
-.It
-.Va WITHOUT_KVM_SUPPORT
+.Bl -inset -compact
+.It Va WITHOUT_KVM_SUPPORT
+(unless
+.Va WITH_KVM_SUPPORT
+is set explicitly)
 .El
 .It Va WITHOUT_KVM_SUPPORT
 Set to build some programs without optional
@@ -1021,61 +1053,134 @@ This is a default setting on
 amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, 
mips/mips64hf, riscv/riscv64 and riscv/riscv64sf.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.
 .Pp
 This is a default setting on
 riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
 .It Va WITH_LLVM_TARGET_AARCH64
 Set to build LLVM target support for AArch64.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.
 .Pp
 This is a default setting on
 amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, 
i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
+.It Va WITHOUT_LLVM_TARGET_ALL
+Set to only build the required LLVM target support.
+This option is preferred to specific target support options.
+.Pp
+This is a default setting on
+riscv/riscv64, 

svn commit: r335712 - head/tools/build/options

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 17:13:36 2018
New Revision: 335712
URL: https://svnweb.freebsd.org/changeset/base/335712

Log:
  Push users towards LLVM_TARGET_ALL.
  
  MFC after:1 week

Modified:
  head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64
  head/tools/build/options/WITHOUT_LLVM_TARGET_ARM
  head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS
  head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC
  head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC
  head/tools/build/options/WITHOUT_LLVM_TARGET_X86
  head/tools/build/options/WITH_LLVM_TARGET_AARCH64
  head/tools/build/options/WITH_LLVM_TARGET_ARM
  head/tools/build/options/WITH_LLVM_TARGET_MIPS
  head/tools/build/options/WITH_LLVM_TARGET_POWERPC
  head/tools/build/options/WITH_LLVM_TARGET_SPARC
  head/tools/build/options/WITH_LLVM_TARGET_X86

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64Wed Jun 27 
16:58:10 2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64Wed Jun 27 
17:13:36 2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for AArch64.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_ARM
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_ARMWed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_ARMWed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for ARM.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS   Wed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS   Wed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for MIPS.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPCWed Jun 27 
16:58:10 2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPCWed Jun 27 
17:13:36 2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for PowerPC.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC  Wed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC  Wed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for SPARC.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_X86
==
--- head/tools/build/options/WITHOUT_LLVM_TARGET_X86Wed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_X86Wed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to not build LLVM target support for X86.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITH_LLVM_TARGET_AARCH64
==
--- head/tools/build/options/WITH_LLVM_TARGET_AARCH64   Wed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITH_LLVM_TARGET_AARCH64   Wed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to build LLVM target support for AArch64.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITH_LLVM_TARGET_ARM
==
--- head/tools/build/options/WITH_LLVM_TARGET_ARM   Wed Jun 27 16:58:10 
2018(r335711)
+++ head/tools/build/options/WITH_LLVM_TARGET_ARM   Wed Jun 27 17:13:36 
2018(r335712)
@@ -1,2 +1,5 @@
 .\" $FreeBSD$
 Set to build LLVM target support for ARM.
+The
+.Va LLVM_TARGET_ALL
+option should be used rather than this in most cases.

Modified: head/tools/build/options/WITH_LLVM_TARGET_MIPS
==
--- 

svn commit: r335711 - in head: . share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:58:10 2018
New Revision: 335711
URL: https://svnweb.freebsd.org/changeset/base/335711

Log:
  tinderbox: Only build clang/lld once if needed.
  
  Need to handle LLD_BOOTSTRAP separately (for archs like i386).
  This would be much better off with an off-by-default option like
  SHARED_TOOLCHAIN that universe force-enabled.  Then a normal buildworld
  would store the toolchain there if enabled and otherwise in WORLDTMP
  with only the 1 arch selected.
  
  MFC after:3 weeks
  Sponsored by: Dell EMC

Modified:
  head/Makefile
  head/Makefile.inc1
  head/share/mk/src.sys.obj.mk

Modified: head/Makefile
==
--- head/Makefile   Wed Jun 27 16:58:07 2018(r335710)
+++ head/Makefile   Wed Jun 27 16:58:10 2018(r335711)
@@ -169,7 +169,7 @@ META_TGT_WHITELIST+= \
buildworld everything kernel-toolchain kernel-toolchains kernel \
kernels libraries native-xtools showconfig test-system-compiler \
test-system-linker tinderbox toolchain \
-   toolchains universe world worlds xdev xdev-build
+   toolchains universe universe-toolchain world worlds xdev xdev-build
 
 .ORDER: buildworld installworld
 .ORDER: buildworld distrib-dirs
@@ -480,7 +480,8 @@ worlds: .PHONY
 # with a reasonable chance of success, regardless of how old your
 # existing system is.
 #
-.if make(universe) || make(universe_kernels) || make(tinderbox) || 
make(targets)
+.if make(universe) || make(universe_kernels) || make(tinderbox) || \
+make(targets) || make(universe-toolchain)
 TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64
 _UNIVERSE_TARGETS= ${TARGETS}
 TARGET_ARCHES_arm?=arm armeb armv6 armv7
@@ -542,6 +543,36 @@ universe_prologue: .PHONY
 .if defined(DOING_TINDERBOX)
@rm -f ${FAILFILE}
 .endif
+
+universe-toolchain: .PHONY universe_prologue
+   @echo "--"
+   @echo "> Toolchain bootstrap started on `LC_ALL=C date`"
+   @echo "--"
+   ${_+_}@cd ${.CURDIR}; \
+   env PATH=${PATH} ${SUB_MAKE} ${JFLAG} kernel-toolchain \
+   TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH} \
+   OBJTOP="${HOST_OBJTOP}" \
+   WITHOUT_SYSTEM_COMPILER=yes \
+   WITHOUT_SYSTEM_LINKER=yes \
+   TOOLS_PREFIX_UNDEF= \
+   kernel-toolchain \
+   MK_LLVM_TARGET_ALL=yes \
+   > _.${.TARGET} 2>&1 || \
+   (echo "${.TARGET} failed," \
+   "check _.${.TARGET} for details" | \
+   ${MAKEFAIL}; false)
+   @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \
+   echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; 
\
+   false; \
+   fi
+   @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/ld" ]; then \
+   echo "Missing host linker at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \
+   false; \
+   fi
+   @echo "--"
+   @echo "> Toolchain bootstrap completed on `LC_ALL=C date`"
+   @echo "--"
+
 .for target in ${_UNIVERSE_TARGETS}
 universe: universe_${target}
 universe_epilogue: universe_${target}
@@ -550,10 +581,56 @@ universe_${target}_prologue: universe_prologue .PHONY
@echo ">> ${target} started on `LC_ALL=C date`"
 universe_${target}_worlds: .PHONY
 
+.if !make(targets) && !make(universe-toolchain)
+.for target_arch in ${TARGET_ARCHES_${target}}
+.if !defined(_need_clang_${target}_${target_arch})
+_need_clang_${target}_${target_arch} != \
+   env TARGET=${target} TARGET_ARCH=${target_arch} \
+   ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \
+   -V MK_CLANG_BOOTSTRAP
+.export _need_clang_${target}_${target_arch}
+.endif
+.if !defined(_need_lld_${target}_${target_arch})
+_need_lld_${target}_${target_arch} != \
+   env TARGET=${target} TARGET_ARCH=${target_arch} \
+   ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \
+   -V MK_LLD_BOOTSTRAP
+.export _need_lld_${target}_${target_arch}
+.endif
+# Setup env for each arch to use the one clang.
+.if defined(_need_clang_${target}_${target_arch}) && \
+${_need_clang_${target}_${target_arch}} != "no"
+# No check on existing XCC or CROSS_BINUTILS_PREFIX, etc, is needed since
+# we use the test-system-compiler logic to determine if clang needs to be
+# built.  It will be no from that logic if already using an external
+# toolchain or /usr/bin/cc.
+# XXX: Passing HOST_OBJTOP into the PATH would allow skipping legacy,
+#  bootstrap-tools, and cross-tools.  Need to ensure each tool actually
+#  supports all TARGETS though.
+MAKE_PARAMS_${target}+= \
+   XCC="${HOST_OBJTOP}/tmp/usr/bin/cc" \
+   XCXX="${HOST_OBJTOP}/tmp/usr/bin/c++" \
+   

svn commit: r335710 - head/share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:58:07 2018
New Revision: 335710
URL: https://svnweb.freebsd.org/changeset/base/335710

Log:
  CCACHE_BUILD: Don't try using ccache for compile-linking .c files.
  
  Without -c ccache just executes the real compiler.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC

Modified:
  head/share/mk/bsd.suffixes.mk

Modified: head/share/mk/bsd.suffixes.mk
==
--- head/share/mk/bsd.suffixes.mk   Wed Jun 27 16:58:03 2018
(r335709)
+++ head/share/mk/bsd.suffixes.mk   Wed Jun 27 16:58:07 2018
(r335710)
@@ -5,7 +5,7 @@
chmod a+x ${.TARGET}
 
 .c:
-   ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o 
${.TARGET}
${CTFCONVERT_CMD}
 
 .c.o:
___
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: r335706 - in head: . share/mk tools/build/options

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:57:51 2018
New Revision: 335706
URL: https://svnweb.freebsd.org/changeset/base/335706

Log:
  Add LLVM_TARGET_ALL option.
  
  LLVM_TARGET_* will auto be set based on LLVM_TARGET_ALL and MK_CLANG.
  
  If LLVM_TARGET_ALL is disabled, during a cross-build, then SYSTEM_COMPILER
  and SYSTEM_LINKER are auto disabled.
  
  This option should be used by users rather than the per-arch LLVM_TARGET
  options as it is simpler to maintain for them should the supported
  target list change.
  
  MFC after:2 weeks
  Reviewed by:  sbruno, dim
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D16020

Added:
  head/tools/build/options/WITHOUT_LLVM_TARGET_ALL   (contents, props changed)
  head/tools/build/options/WITH_LLVM_TARGET_ALL   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/share/mk/src.opts.mk

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Jun 27 16:57:47 2018(r335705)
+++ head/Makefile.inc1  Wed Jun 27 16:57:51 2018(r335706)
@@ -130,6 +130,15 @@ MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//
 TARGET_ABI?=   unknown
 TARGET_TRIPLE?=
${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0
 
+# If all targets are disabled for system llvm then don't expect it to work
+# for cross-builds.
+.if ${MK_LLVM_TARGET_ALL} == "no" && \
+${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \
+!make(showconfig)
+MK_SYSTEM_COMPILER=no
+MK_SYSTEM_LINKER=  no
+.endif
+
 # Handle external binutils.
 .if defined(CROSS_TOOLCHAIN_PREFIX)
 CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Jun 27 16:57:47 2018(r335705)
+++ head/share/mk/src.opts.mk   Wed Jun 27 16:57:51 2018(r335706)
@@ -211,6 +211,7 @@ __DEFAULT_NO_OPTIONS = \
 # RIGHT option is disabled.
 __DEFAULT_DEPENDENT_OPTIONS= \
CLANG_FULL/CLANG \
+   LLVM_TARGET_ALL/CLANG \
 
 # MK_*_SUPPORT options which default to "yes" unless their corresponding
 # MK_* variable is set to "no".
@@ -249,6 +250,27 @@ __TT=${TARGET}
 __TT=${MACHINE}
 .endif
 
+# All supported backends for LLVM_TARGET_XXX
+__LLVM_TARGETS= \
+   aarch64 \
+   arm \
+   mips \
+   powerpc \
+   sparc \
+   x86
+__LLVM_TARGET_FILT=C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/
+# Default the given TARGET_ARCH's LLVM_TARGET support to the value of
+# MK_CLANG.
+# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
+# which is based on MK_CLANG.
+.for __llt in ${__LLVM_TARGETS}
+.if ${__llt} != ${__T:${__LLVM_TARGET_FILT}}
+__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
+.else
+__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+.endif
+.endfor
+
 .include 
 # If the compiler is not C++11 capable, disable Clang and use GCC instead.
 # This means that architectures that have GCC 4.2 as default can not
@@ -258,23 +280,17 @@ __TT=${MACHINE}
 ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
 # Clang is enabled, and will be installed as the default /usr/bin/cc.
 __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
-__DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
-__DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
 .elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != 
"sparc64"
 # If an external compiler that supports C++11 is used as ${CC} and Clang
 # supports the target, then Clang is enabled but GCC is installed as the
 # default /usr/bin/cc.
 __DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD
-__DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
-__DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
 .else
 # Everything else disables Clang, and uses GCC instead.
 __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
 __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
-__DEFAULT_NO_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
-__DEFAULT_NO_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 .endif
 # In-tree binutils/gcc are older versions without modern architecture support.
 .if ${__T} == "aarch64" || ${__T:Mriscv*} != ""

Added: head/tools/build/options/WITHOUT_LLVM_TARGET_ALL
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLVM_TARGET_ALLWed Jun 27 16:57:51 

svn commit: r335704 - head/lib/libc/tests/ssp

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:56:46 2018
New Revision: 335704
URL: https://svnweb.freebsd.org/changeset/base/335704

Log:
  Rework check for libclang_rt to see if the needed library exists.
  
  Currently libclang_rt is not provided for cross-building and as such
  is not connected to cross-tools.  For building clang once in universe
  it is likely that libclang_rt won't exist for the universe toolchain
  but even if it did it would not support anything but the native arch.
  So explicitly check for support before enabling h_raw.
  
  MFC after:1 week
  Reviewed by:  dim
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D16012

Modified:
  head/lib/libc/tests/ssp/Makefile

Modified: head/lib/libc/tests/ssp/Makefile
==
--- head/lib/libc/tests/ssp/MakefileWed Jun 27 15:28:09 2018
(r335703)
+++ head/lib/libc/tests/ssp/MakefileWed Jun 27 16:56:46 2018
(r335704)
@@ -1,9 +1,5 @@
 # $FreeBSD$
 
-# XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
-.include 
-# XXX ---
-
 .include 
 
 NO_WERROR=
@@ -35,21 +31,16 @@ PROGS+= h_memset
 # probably needs to be fixed as it's currently hardcoded.
 #
 # sanitizer is not tested or supported for ARM right now. sbruno
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-.if ${COMPILER_TYPE} == "clang" && ${MK_TOOLCHAIN} == "yes"
-.if ${COMPILER_VERSION} < 30500 || 30700 <= ${COMPILER_VERSION}
-
-# XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
-.if ${MACHINE_CPUARCH} == ${_HOST_ARCH}
-# XXX ---
-
-PROGS+=h_raw
-
-# XXX This is a workaround to allow i386 to cross-compile on an amd64 host.
+.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \
+(!defined(_RECURSING_PROGS) || ${PROG} == "h_raw")
+.if !defined(_CLANG_RESOURCE_DIR)
+_CLANG_RESOURCE_DIR!=  ${CC:N${CCACHE_BIN}} -print-resource-dir
+.export _CLANG_RESOURCE_DIR
 .endif
-# XXX ---
-
-.endif
+_libclang_rt_arch= 
${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}
+_libclang_rt_ubsan=
${_CLANG_RESOURCE_DIR}/lib/freebsd/libclang_rt.ubsan_standalone-${_libclang_rt_arch}.a
+.if exists(${_libclang_rt_ubsan})
+PROGS+=h_raw
 .endif
 .endif
 PROGS+=h_read
___
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: r335711 - in head: . share/mk

2018-06-27 Thread Bryan Drewery
On 6/27/2018 9:58 AM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Jun 27 16:58:10 2018
> New Revision: 335711
> URL: https://svnweb.freebsd.org/changeset/base/335711
> 
> Log:
>   tinderbox: Only build clang/lld once if needed.
>   
>   Need to handle LLD_BOOTSTRAP separately (for archs like i386).
>   This would be much better off with an off-by-default option like
>   SHARED_TOOLCHAIN that universe force-enabled.  Then a normal buildworld
>   would store the toolchain there if enabled and otherwise in WORLDTMP
>   with only the 1 arch selected.

I plan to work towards this footnote. I wanted to get something workable
in before the major rework of buildworld's WORLDTMP to support a
SHARED_WORLDTMP kind of thing. That was much more work that was slowing
down a working solution here.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r335709 - head/share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:58:03 2018
New Revision: 335709
URL: https://svnweb.freebsd.org/changeset/base/335709

Log:
  CCACHE_BUILD: Avoid ccache when looking up compiler metadata.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC

Modified:
  head/share/mk/bsd.compiler.mk

Modified: head/share/mk/bsd.compiler.mk
==
--- head/share/mk/bsd.compiler.mk   Wed Jun 27 16:57:59 2018
(r335708)
+++ head/share/mk/bsd.compiler.mk   Wed Jun 27 16:58:03 2018
(r335709)
@@ -148,7 +148,7 @@ ${X_}COMPILER_TYPE= none
 ${X_}COMPILER_VERSION= 0
 ${X_}COMPILER_FREEBSD_VERSION= 0
 .elif !defined(${X_}COMPILER_TYPE) || !defined(${X_}COMPILER_VERSION)
-_v!=   ${${cc}} --version || echo 0.0.0
+_v!=   ${${cc}:N${CCACHE_BIN}} --version || echo 0.0.0
 
 .if !defined(${X_}COMPILER_TYPE)
 . if ${${cc}:T:M*gcc*}
@@ -171,7 +171,7 @@ ${X_}COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | aw
 .undef _v
 .endif
 .if !defined(${X_}COMPILER_FREEBSD_VERSION)
-${X_}COMPILER_FREEBSD_VERSION!={ echo "__FreeBSD_cc_version" | 
${${cc}} -E - 2>/dev/null || echo __FreeBSD_cc_version; } | sed -n '$$p'
+${X_}COMPILER_FREEBSD_VERSION!={ echo "__FreeBSD_cc_version" | 
${${cc}:N${CCACHE_BIN}} -E - 2>/dev/null || echo __FreeBSD_cc_version; } | sed 
-n '$$p'
 # If we get a literal "__FreeBSD_cc_version" back then the compiler
 # is a non-FreeBSD build that doesn't support it or some other error
 # occurred.
___
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: r335708 - head

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:57:59 2018
New Revision: 335708
URL: https://svnweb.freebsd.org/changeset/base/335708

Log:
  tinderbox: Give details about kernel builds.
  
  This is a bit noisy now but it was silent before leading to
  wondering if it was doing anything.
  
  MFC after:1 week
  Suggested by: rpokala
  Sponsored by: Dell EMC

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Wed Jun 27 16:57:56 2018(r335707)
+++ head/Makefile   Wed Jun 27 16:57:59 2018(r335708)
@@ -590,10 +590,13 @@ universe_${target}_done:
@echo ">> ${target} completed on `LC_ALL=C date`"
 .endfor
 .if make(universe_kernconfs) || make(universe_kernels)
-universe_kernels: universe_kernconfs .PHONY
 .if !defined(TARGET)
 TARGET!=   uname -m
 .endif
+universe_kernels_prologue: .PHONY
+   @echo ">> ${TARGET} kernels started on `LC_ALL=C date`"
+universe_kernels: universe_kernconfs .PHONY
+   @echo ">> ${TARGET} kernels completed on `LC_ALL=C date`"
 .if defined(MAKE_ALL_KERNELS)
 _THINNER=cat
 .elif defined(MAKE_LINT_KERNELS)
@@ -606,7 +609,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
-type f -maxdepth 0 \
! -name DEFAULTS ! -name NOTES | \
${_THINNER}
-universe_kernconfs: .PHONY
+universe_kernconfs: universe_kernels_prologue .PHONY
 .for kernel in ${KERNCONFS}
 TARGET_ARCH_${kernel}!=cd ${KERNSRCDIR}/${TARGET}/conf && \
config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
@@ -616,6 +619,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/con
 .endif
 universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
 universe_kernconf_${TARGET}_${kernel}: .MAKE
+   @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started 
on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
${SUB_MAKE} ${JFLAG} buildkernel \
TARGET=${TARGET} \
@@ -625,6 +629,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
> _.${TARGET}.${kernel} 2>&1 || \
(echo "${TARGET} ${kernel} kernel failed," \
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
+   @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed 
on `LC_ALL=C date`"
 .endfor
 .endif # make(universe_kernels)
 universe: universe_epilogue
___
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: r335707 - in head: . tools/build/options

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:57:56 2018
New Revision: 335707
URL: https://svnweb.freebsd.org/changeset/base/335707

Log:
  Clang: Only build needed target for bootstrap compiler.
  
  This will disable the new LLVM_TARGET_ALL option which will only
  enable the required target.
  
  This only impacts the bootstrap compiler in WORLDTMP, not the target compiler
  that will be installed.
  
  MFC after:2 weeks
  Reviewed by:  sbruno, dim (earlier version)
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D16021

Modified:
  head/Makefile.inc1
  head/tools/build/options/WITH_LLVM_TARGET_ALL

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Jun 27 16:57:51 2018(r335706)
+++ head/Makefile.inc1  Wed Jun 27 16:57:56 2018(r335707)
@@ -686,6 +686,9 @@ TMAKE=  \
 XMAKE= ${BMAKE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
MK_GDB=no MK_TESTS=no
+.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL)
+XMAKE+=MK_LLVM_TARGET_ALL=no
+.endif
 
 # kernel-tools stage
 KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \

Modified: head/tools/build/options/WITH_LLVM_TARGET_ALL
==
--- head/tools/build/options/WITH_LLVM_TARGET_ALL   Wed Jun 27 16:57:51 
2018(r335706)
+++ head/tools/build/options/WITH_LLVM_TARGET_ALL   Wed Jun 27 16:57:56 
2018(r335707)
@@ -1,2 +1,4 @@
 .\" $FreeBSD$
 Set to build support for all LLVM targets.
+This option is always applied to the bootstrap compiler for buildworld when
+LLVM is used.
___
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: r335705 - head/share/mk

2018-06-27 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 27 16:57:47 2018
New Revision: 335705
URL: https://svnweb.freebsd.org/changeset/base/335705

Log:
  Use dependent options to auto enable _SUPPORT and CLANG_FULL options.
  
  MFC after:1 week
  Reviewed by:  sbruno, dim
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D16018

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Jun 27 16:56:46 2018(r335704)
+++ head/share/mk/src.opts.mk   Wed Jun 27 16:57:47 2018(r335705)
@@ -207,8 +207,29 @@ __DEFAULT_NO_OPTIONS = \
 ZONEINFO_LEAPSECONDS_SUPPORT \
 ZONEINFO_OLD_TIMEZONES_SUPPORT \
 
+# LEFT/RIGHT. Left options which default to "yes" unless their corresponding
+# RIGHT option is disabled.
+__DEFAULT_DEPENDENT_OPTIONS= \
+   CLANG_FULL/CLANG \
 
+# MK_*_SUPPORT options which default to "yes" unless their corresponding
+# MK_* variable is set to "no".
 #
+.for var in \
+BLACKLIST \
+BZIP2 \
+INET \
+INET6 \
+KERBEROS \
+KVM \
+NETGRAPH \
+PAM \
+TESTS \
+WIRELESS
+__DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var}
+.endfor
+
+#
 # Default behaviour of some options depends on the architecture.  Unfortunately
 # this means that we have to test TARGET_ARCH (the buildworld case) as well
 # as MACHINE_ARCH (the non-buildworld case).  Normally TARGET_ARCH is not
@@ -236,7 +257,7 @@ __TT=${MACHINE}
 .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \
 ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
 # Clang is enabled, and will be installed as the default /usr/bin/cc.
-__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
+__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
 __DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
 __DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
@@ -244,14 +265,14 @@ __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
 # If an external compiler that supports C++11 is used as ${CC} and Clang
 # supports the target, then Clang is enabled but GCC is installed as the
 # default /usr/bin/cc.
-__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD
+__DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD
 __DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
 __DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
 .else
 # Everything else disables Clang, and uses GCC instead.
 __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
-__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
+__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
 __DEFAULT_NO_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS
 __DEFAULT_NO_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86
 .endif
@@ -491,28 +512,6 @@ MK_${vv:H}:=   ${MK_${vv:T}}
 #
 # Set defaults for the MK_*_SUPPORT variables.
 #
-
-#
-# MK_*_SUPPORT options which default to "yes" unless their corresponding
-# MK_* variable is set to "no".
-#
-.for var in \
-BLACKLIST \
-BZIP2 \
-INET \
-INET6 \
-KERBEROS \
-KVM \
-NETGRAPH \
-PAM \
-TESTS \
-WIRELESS
-.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
-MK_${var}_SUPPORT:= no
-.else
-MK_${var}_SUPPORT:= yes
-.endif
-.endfor
 
 .if !${COMPILER_FEATURES:Mc++11}
 MK_LLDB:=  no
___
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: r335703 - head/tests/sys/audit

2018-06-27 Thread Alan Somers
Author: asomers
Date: Wed Jun 27 15:28:09 2018
New Revision: 335703
URL: https://svnweb.freebsd.org/changeset/base/335703

Log:
  audit(4): fix Coverity issues
  
  Fix several incorrect buffer size arguments and a file descriptor leak.
  
  Submitted by: aniketp
  Reported by:  Coverity
  CID:  1393489 1393501 1393509 1393510 1393514 1393515 1393516
  CID:  1393517 1393518 1393519
  MFC after:2 weeks
  X-MFC-With:   335284
  X-MFC-With:   335318
  X-MFC-With:   335320
  Sponsored by: Google, Inc. (GSoC 2018)
  Differential Revision:https://reviews.freebsd.org/D16000

Modified:
  head/tests/sys/audit/administrative.c
  head/tests/sys/audit/file-attribute-access.c
  head/tests/sys/audit/file-attribute-modify.c

Modified: head/tests/sys/audit/administrative.c
==
--- head/tests/sys/audit/administrative.c   Wed Jun 27 14:45:13 2018
(r335702)
+++ head/tests/sys/audit/administrative.c   Wed Jun 27 15:28:09 2018
(r335703)
@@ -163,7 +163,7 @@ ATF_TC_BODY(nfs_getfh_success, tc)
snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*success", pid);
 
/* File needs to exist to call getfh(2) */
-   ATF_REQUIRE(filedesc = open(path, O_CREAT, mode) != -1);
+   ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
FILE *pipefd = setup(fds, auclass);
ATF_REQUIRE_EQ(0, getfh(path, ));
check_audit(fds, adregex, pipefd);

Modified: head/tests/sys/audit/file-attribute-access.c
==
--- head/tests/sys/audit/file-attribute-access.cWed Jun 27 14:45:13 
2018(r335702)
+++ head/tests/sys/audit/file-attribute-access.cWed Jun 27 15:28:09 
2018(r335703)
@@ -44,9 +44,9 @@ static pid_t pid;
 static fhandle_t fht;
 static int filedesc, fhdesc;
 static char extregex[80];
+static char buff[] = "ezio";
 static struct stat statbuff;
 static struct statfs statfsbuff;
-static const char *buff = "ezio";
 static const char *auclass = "fa";
 static const char *name = "authorname";
 static const char *path = "fileforaudit";

Modified: head/tests/sys/audit/file-attribute-modify.c
==
--- head/tests/sys/audit/file-attribute-modify.cWed Jun 27 14:45:13 
2018(r335702)
+++ head/tests/sys/audit/file-attribute-modify.cWed Jun 27 15:28:09 
2018(r335703)
@@ -46,7 +46,7 @@ static int filedesc, retval;
 static struct pollfd fds[1];
 static mode_t mode = 0777;
 static char extregex[80];
-static const char *buff = "ezio";
+static char buff[] = "ezio";
 static const char *auclass = "fm";
 static const char *name = "authorname";
 static const char *path = "fileforaudit";
___
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: r335702 - in head/sys: compat/linux sys vm

2018-06-27 Thread Ed Maste
Author: emaste
Date: Wed Jun 27 14:45:13 2018
New Revision: 335702
URL: https://svnweb.freebsd.org/changeset/base/335702

Log:
  Split kern_break from sys_break and use it in linuxulator
  
  Previously the linuxulator's linux_brk invoked the FreeBSD sys_break
  syscall implementation directly.  Instead, move the bulk of the existing
  implementation to kern_break, and call that from both sys_break and
  linux_brk.
  
  This also addresses a minor bug in linux_brk in that we now return the
  actual (rounded up) break address, rather than the requested value.
  
  Reviewed by:  brooks (earlier version)
  Sponsored by: Turing Robotic Industries
  Differential Revision:https://reviews.freebsd.org/D16019

Modified:
  head/sys/compat/linux/linux_misc.c
  head/sys/sys/syscallsubr.h
  head/sys/vm/vm_unix.c

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Wed Jun 27 14:29:13 2018
(r335701)
+++ head/sys/compat/linux/linux_misc.c  Wed Jun 27 14:45:13 2018
(r335702)
@@ -232,22 +232,18 @@ int
 linux_brk(struct thread *td, struct linux_brk_args *args)
 {
struct vmspace *vm = td->td_proc->p_vmspace;
-   vm_offset_t new, old;
-   struct break_args /* {
-   char * nsize;
-   } */ tmp;
+   uintptr_t new, old;
 
 #ifdef DEBUG
if (ldebug(brk))
printf(ARGS(brk, "%p"), (void *)(uintptr_t)args->dsend);
 #endif
-   old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
-   new = (vm_offset_t)args->dsend;
-   tmp.nsize = (char *)new;
-   if (((caddr_t)new > vm->vm_daddr) && !sys_break(td, ))
-   td->td_retval[0] = (long)new;
+   old = (uintptr_t)vm->vm_daddr + ctob(vm->vm_dsize);
+   new = (uintptr_t)args->dsend;
+   if ((caddr_t)new > vm->vm_daddr && !kern_break(td, ))
+   td->td_retval[0] = (register_t)new;
else
-   td->td_retval[0] = (long)old;
+   td->td_retval[0] = (register_t)old;
 
return (0);
 }

Modified: head/sys/sys/syscallsubr.h
==
--- head/sys/sys/syscallsubr.h  Wed Jun 27 14:29:13 2018(r335701)
+++ head/sys/sys/syscallsubr.h  Wed Jun 27 14:45:13 2018(r335702)
@@ -76,6 +76,7 @@ int   kern_adjtime(struct thread *td, struct timeval *de
 intkern_alternate_path(struct thread *td, const char *prefix, const char 
*path,
enum uio_seg pathseg, char **pathbuf, int create, int dirfd);
 intkern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa);
+intkern_break(struct thread *td, uintptr_t *addr);
 intkern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds,
size_t ncmds);
 intkern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights);

Modified: head/sys/vm/vm_unix.c
==
--- head/sys/vm/vm_unix.c   Wed Jun 27 14:29:13 2018(r335701)
+++ head/sys/vm/vm_unix.c   Wed Jun 27 14:45:13 2018(r335702)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -69,6 +70,22 @@ int
 sys_break(struct thread *td, struct break_args *uap)
 {
 #if !defined(__aarch64__) && !defined(__riscv__)
+   uintptr_t addr;
+   int error;
+
+   addr = (uintptr_t)uap->nsize;
+   error = kern_break(td, );
+   if (error == 0)
+   td->td_retval[0] = addr;
+   return (error);
+#else /* defined(__aarch64__) || defined(__riscv__) */
+   return (ENOSYS);
+#endif /* defined(__aarch64__) || defined(__riscv__) */
+}
+
+int
+kern_break(struct thread *td, uintptr_t *addr)
+{
struct vmspace *vm = td->td_proc->p_vmspace;
vm_map_t map = >vm_map;
vm_offset_t new, old, base;
@@ -82,7 +99,7 @@ sys_break(struct thread *td, struct break_args *uap)
vmemlim = lim_cur(td, RLIMIT_VMEM);
 
do_map_wirefuture = FALSE;
-   new = round_page((vm_offset_t)uap->nsize);
+   new = round_page(*addr);
vm_map_lock(map);
 
base = round_page((vm_offset_t) vm->vm_daddr);
@@ -226,12 +243,9 @@ done:
VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES);
 
if (error == 0)
-   td->td_retval[0] = new;
+   *addr = new;
 
return (error);
-#else /* defined(__aarch64__) || defined(__riscv__) */
-   return (ENOSYS);
-#endif /* defined(__aarch64__) || defined(__riscv__) */
 }
 
 #ifdef COMPAT_FREEBSD11
___
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: r335701 - head/sys/dev/cxgbe/cxgbei

2018-06-27 Thread Navdeep Parhar
Author: np
Date: Wed Jun 27 14:29:13 2018
New Revision: 335701
URL: https://svnweb.freebsd.org/changeset/base/335701

Log:
  cxgbe/cxgbei: Fix harmful typo in the iSCSI offload driver.
  
  Reported by:  gcc8 (via mmacy@)
  MFC after:3 days
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/cxgbei/cxgbei.c

Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c
==
--- head/sys/dev/cxgbe/cxgbei/cxgbei.c  Wed Jun 27 12:08:12 2018
(r335700)
+++ head/sys/dev/cxgbe/cxgbei/cxgbei.c  Wed Jun 27 14:29:13 2018
(r335701)
@@ -670,7 +670,7 @@ start_worker_threads(void)
i + 1, worker_thread_count, rc);
mtx_destroy(>cwt_lock);
cv_destroy(>cwt_cv);
-   bzero(, sizeof(*cwt));
+   bzero(cwt, sizeof(*cwt));
if (i == 0) {
free(cwt_softc, M_CXGBE);
worker_thread_count = 0;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335681 - head/sbin/veriexecctl

2018-06-27 Thread Cy Schubert
In message <201806271405.w5re5rq0038...@slippy.cwsent.com>, Cy Schubert 
writes:
> In message <201806262319.w5qnjtqd030...@repo.freebsd.org>, "Stephen J. 
> Kiernan"
>  writes:
> > Author: stevek
> > Date: Tue Jun 26 23:19:55 2018
> > New Revision: 335681
> > URL: https://svnweb.freebsd.org/changeset/base/335681
> >
> > Log:
> >   Revert r335402
> >   
> >   While useful as an example, veriexecctl, as it is, has very little practi
> ca
> > l
> >   use, since there is nothing ensuring the integrity of the manifest of has
> he
> > s.
> >   A more appropriate set of utilities will replace it.
> >
> > Deleted:
> >   head/sbin/veriexecctl/
> >
>
> Don't forget ObsoleteFiles.inc.

Nevermind. Looks like it never installed in the first place.


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

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


___
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: r335681 - head/sbin/veriexecctl

2018-06-27 Thread Cy Schubert
In message <201806262319.w5qnjtqd030...@repo.freebsd.org>, "Stephen J. 
Kiernan"
 writes:
> Author: stevek
> Date: Tue Jun 26 23:19:55 2018
> New Revision: 335681
> URL: https://svnweb.freebsd.org/changeset/base/335681
>
> Log:
>   Revert r335402
>   
>   While useful as an example, veriexecctl, as it is, has very little practica
> l
>   use, since there is nothing ensuring the integrity of the manifest of hashe
> s.
>   A more appropriate set of utilities will replace it.
>
> Deleted:
>   head/sbin/veriexecctl/
>

Don't forget ObsoleteFiles.inc.


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

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


___
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: r335690 - head/sys/kern

2018-06-27 Thread Shawn Webb
On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote:
> On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter <
> oliver.pin...@hardenedbsd.org> wrote:
> 
> >
> >
> > On Wednesday, June 27, 2018, Warner Losh  wrote:
> >
> >> Author: imp
> >> Date: Wed Jun 27 04:11:09 2018
> >> New Revision: 335690
> >> URL: https://svnweb.freebsd.org/changeset/base/335690
> >>
> >> Log:
> >>   Fix devctl generation for core files.
> >>
> >>   We have a problem with vn_fullpath_global when the file exists. Work
> >>   around it by printing the full path if the core file name starts with /,
> >>   or current working directory followed by the filename if not.
> >>
> >>   Sponsored by: Netflix
> >>   Differential Review: https://reviews.freebsd.org/D16026
> >>
> >> Modified:
> >>   head/sys/kern/kern_sig.c
> >>
> >> Modified: head/sys/kern/kern_sig.c
> >> 
> >> ==
> >> --- head/sys/kern/kern_sig.cWed Jun 27 04:10:48 2018(r335689)
> >> +++ head/sys/kern/kern_sig.cWed Jun 27 04:11:09 2018(r335690)
> >> @@ -3431,24 +3431,6 @@ out:
> >> return (0);
> >>  }
> >>
> >> -static int
> >> -coredump_sanitise_path(const char *path)
> >> -{
> >> -   size_t i;
> >> -
> >> -   /*
> >> -* Only send a subset of ASCII to devd(8) because it
> >> -* might pass these strings to sh -c.
> >> -*/
> >> -   for (i = 0; path[i]; i++)
> >> -   if (!(isalpha(path[i]) || isdigit(path[i])) &&
> >> -   path[i] != '/' && path[i] != '.' &&
> >> -   path[i] != '-')
> >> -   return (0);
> >
> >
> > This part of code existed to prevent shell code injection via file names.
> > After this commit we lose this.
> >
> 
> It's devd's job to prevent that, not the kernel's.

Has devd been updated? Or is this particular vulnerability manifest
again?

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:+1 443-546-8752
Tor+XMPP+OTR:latt...@is.a.hacker.sx
GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


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

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 7:44 AM, Shawn Webb 
wrote:

> On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote:
> > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter <
> > oliver.pin...@hardenedbsd.org> wrote:
> >
> > >
> > >
> > > On Wednesday, June 27, 2018, Warner Losh  wrote:
> > >
> > >> Author: imp
> > >> Date: Wed Jun 27 04:11:09 2018
> > >> New Revision: 335690
> > >> URL: https://svnweb.freebsd.org/changeset/base/335690
> > >>
> > >> Log:
> > >>   Fix devctl generation for core files.
> > >>
> > >>   We have a problem with vn_fullpath_global when the file exists. Work
> > >>   around it by printing the full path if the core file name starts
> with /,
> > >>   or current working directory followed by the filename if not.
> > >>
> > >>   Sponsored by: Netflix
> > >>   Differential Review: https://reviews.freebsd.org/D16026
> > >>
> > >> Modified:
> > >>   head/sys/kern/kern_sig.c
> > >>
> > >> Modified: head/sys/kern/kern_sig.c
> > >> 
> > >> ==
> > >> --- head/sys/kern/kern_sig.cWed Jun 27 04:10:48 2018
> (r335689)
> > >> +++ head/sys/kern/kern_sig.cWed Jun 27 04:11:09 2018
> (r335690)
> > >> @@ -3431,24 +3431,6 @@ out:
> > >> return (0);
> > >>  }
> > >>
> > >> -static int
> > >> -coredump_sanitise_path(const char *path)
> > >> -{
> > >> -   size_t i;
> > >> -
> > >> -   /*
> > >> -* Only send a subset of ASCII to devd(8) because it
> > >> -* might pass these strings to sh -c.
> > >> -*/
> > >> -   for (i = 0; path[i]; i++)
> > >> -   if (!(isalpha(path[i]) || isdigit(path[i])) &&
> > >> -   path[i] != '/' && path[i] != '.' &&
> > >> -   path[i] != '-')
> > >> -   return (0);
> > >
> > >
> > > This part of code existed to prevent shell code injection via file
> names.
> > > After this commit we lose this.
> > >
> >
> > It's devd's job to prevent that, not the kernel's.
>
> Has devd been updated? Or is this particular vulnerability manifest
> again?
>

devd is fine as far as I know, apart from the default action. I'm fixing
that now.

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: r335690 - head/sys/kern

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 7:42 AM, Warner Losh  wrote:

>
>
> On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter <
> oliver.pin...@hardenedbsd.org> wrote:
>
>>
>>
>> On Wednesday, June 27, 2018, Warner Losh  wrote:
>>
>>> Author: imp
>>> Date: Wed Jun 27 04:11:09 2018
>>> New Revision: 335690
>>> URL: https://svnweb.freebsd.org/changeset/base/335690
>>>
>>> Log:
>>>   Fix devctl generation for core files.
>>>
>>>   We have a problem with vn_fullpath_global when the file exists. Work
>>>   around it by printing the full path if the core file name starts with
>>> /,
>>>   or current working directory followed by the filename if not.
>>>
>>>   Sponsored by: Netflix
>>>   Differential Review: https://reviews.freebsd.org/D16026
>>>
>>> Modified:
>>>   head/sys/kern/kern_sig.c
>>>
>>> Modified: head/sys/kern/kern_sig.c
>>> 
>>> ==
>>> --- head/sys/kern/kern_sig.cWed Jun 27 04:10:48 2018(r335689)
>>> +++ head/sys/kern/kern_sig.cWed Jun 27 04:11:09 2018(r335690)
>>> @@ -3431,24 +3431,6 @@ out:
>>> return (0);
>>>  }
>>>
>>> -static int
>>> -coredump_sanitise_path(const char *path)
>>> -{
>>> -   size_t i;
>>> -
>>> -   /*
>>> -* Only send a subset of ASCII to devd(8) because it
>>> -* might pass these strings to sh -c.
>>> -*/
>>> -   for (i = 0; path[i]; i++)
>>> -   if (!(isalpha(path[i]) || isdigit(path[i])) &&
>>> -   path[i] != '/' && path[i] != '.' &&
>>> -   path[i] != '-')
>>> -   return (0);
>>
>>
>> This part of code existed to prevent shell code injection via file names.
>> After this commit we lose this.
>>
>
> It's devd's job to prevent that, not the kernel's.
>

Though the default action doesn't at the moment...  I'll fix that with
proper quoting.

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: r335690 - head/sys/kern

2018-06-27 Thread Warner Losh
On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter <
oliver.pin...@hardenedbsd.org> wrote:

>
>
> On Wednesday, June 27, 2018, Warner Losh  wrote:
>
>> Author: imp
>> Date: Wed Jun 27 04:11:09 2018
>> New Revision: 335690
>> URL: https://svnweb.freebsd.org/changeset/base/335690
>>
>> Log:
>>   Fix devctl generation for core files.
>>
>>   We have a problem with vn_fullpath_global when the file exists. Work
>>   around it by printing the full path if the core file name starts with /,
>>   or current working directory followed by the filename if not.
>>
>>   Sponsored by: Netflix
>>   Differential Review: https://reviews.freebsd.org/D16026
>>
>> Modified:
>>   head/sys/kern/kern_sig.c
>>
>> Modified: head/sys/kern/kern_sig.c
>> 
>> ==
>> --- head/sys/kern/kern_sig.cWed Jun 27 04:10:48 2018(r335689)
>> +++ head/sys/kern/kern_sig.cWed Jun 27 04:11:09 2018(r335690)
>> @@ -3431,24 +3431,6 @@ out:
>> return (0);
>>  }
>>
>> -static int
>> -coredump_sanitise_path(const char *path)
>> -{
>> -   size_t i;
>> -
>> -   /*
>> -* Only send a subset of ASCII to devd(8) because it
>> -* might pass these strings to sh -c.
>> -*/
>> -   for (i = 0; path[i]; i++)
>> -   if (!(isalpha(path[i]) || isdigit(path[i])) &&
>> -   path[i] != '/' && path[i] != '.' &&
>> -   path[i] != '-')
>> -   return (0);
>
>
> This part of code existed to prevent shell code injection via file names.
> After this commit we lose this.
>

It's devd's job to prevent that, not the kernel's.

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: r335700 - head/sys/dev/usb

2018-06-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jun 27 12:08:12 2018
New Revision: 335700
URL: https://svnweb.freebsd.org/changeset/base/335700

Log:
  Improve the kernel's USB descriptor reading function.
  Some USB devices does not allow a partial descriptor readout.
  
  Found by: bz@
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/usb/usb_request.c

Modified: head/sys/dev/usb/usb_request.c
==
--- head/sys/dev/usb/usb_request.c  Wed Jun 27 07:24:07 2018
(r335699)
+++ head/sys/dev/usb/usb_request.c  Wed Jun 27 12:08:12 2018
(r335700)
@@ -990,7 +990,7 @@ usbd_req_get_desc(struct usb_device *udev,
 uint8_t retries)
 {
struct usb_device_request req;
-   uint8_t *buf;
+   uint8_t *buf = desc;
usb_error_t err;
 
DPRINTFN(4, "id=%d, type=%d, index=%d, max_len=%d\n",
@@ -1012,6 +1012,32 @@ usbd_req_get_desc(struct usb_device *udev,
err = usbd_do_request_flags(udev, mtx, ,
desc, 0, NULL, 500 /* ms */);
 
+   if (err != 0 && err != USB_ERR_TIMEOUT &&
+   min_len != max_len) {
+   /* clear descriptor data */
+   memset(desc, 0, max_len);
+
+   /* try to read full descriptor length */
+   USETW(req.wLength, max_len);
+
+   err = usbd_do_request_flags(udev, mtx, ,
+   desc, USB_SHORT_XFER_OK, NULL, 500 /* ms */);
+
+   if (err == 0) {
+   /* verify length */
+   if (buf[0] > max_len)
+   buf[0] = max_len;
+   else if (buf[0] < 2)
+   err = USB_ERR_INVAL;
+
+   min_len = buf[0];
+
+   /* enforce descriptor type */
+   buf[1] = type;
+   goto done;
+   }
+   }
+
if (err) {
if (!retries) {
goto done;
@@ -1022,7 +1048,6 @@ usbd_req_get_desc(struct usb_device *udev,
 
continue;
}
-   buf = desc;
 
if (min_len == max_len) {
 
___
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: r335699 - in stable/11/sys: kern sys

2018-06-27 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jun 27 07:24:07 2018
New Revision: 335699
URL: https://svnweb.freebsd.org/changeset/base/335699

Log:
  MFC r335461:
  Permit the kernel environment to set an array of numeric values for a single
  sysctl(9) node.
  
  Reviewed by:  kib@, imp@, jhb@
  Differential Revision:https://reviews.freebsd.org/D15802
  Sponsored by: Mellanox Technologies

Modified:
  stable/11/sys/kern/kern_environment.c
  stable/11/sys/kern/kern_sysctl.c
  stable/11/sys/sys/systm.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_environment.c
==
--- stable/11/sys/kern/kern_environment.c   Wed Jun 27 07:18:54 2018
(r335698)
+++ stable/11/sys/kern/kern_environment.c   Wed Jun 27 07:24:07 2018
(r335699)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -512,6 +513,141 @@ getenv_string(const char *name, char *data, int size)
strlcpy(data, cp, size);
}
return (cp != NULL);
+}
+
+/*
+ * Return an array of integers at the given type size and signedness.
+ */
+int
+getenv_array(const char *name, void *pdata, int size, int *psize,
+int type_size, bool allow_signed)
+{
+   char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1];
+   uint8_t shift;
+   int64_t value;
+   int64_t old;
+   char *end;
+   char *ptr;
+   int n;
+
+   if (getenv_string(name, buf, sizeof(buf)) == 0)
+   return (0);
+
+   /* get maximum number of elements */
+   size /= type_size;
+
+   n = 0;
+
+   for (ptr = buf; *ptr != 0; ) {
+
+   value = strtoq(ptr, , 0);
+
+   /* check if signed numbers are allowed */
+   if (value < 0 && !allow_signed)
+   goto error;
+
+   /* check for invalid value */
+   if (ptr == end)
+   goto error;
+   
+   /* check for valid suffix */
+   switch (*end) {
+   case 't':
+   case 'T':
+   shift = 40;
+   end++;
+   break;
+   case 'g':
+   case 'G':
+   shift = 30;
+   end++;
+   break;
+   case 'm':
+   case 'M':
+   shift = 20;
+   end++;
+   break;
+   case 'k':
+   case 'K':
+   shift = 10;
+   end++;
+   break;
+   case ' ':
+   case '\t':
+   case ',':
+   case 0:
+   shift = 0;
+   break;
+   default:
+   /* garbage after numeric value */
+   goto error;
+   }
+
+   /* skip till next value, if any */
+   while (*end == '\t' || *end == ',' || *end == ' ')
+   end++;
+
+   /* update pointer */
+   ptr = end;
+
+   /* apply shift */
+   old = value;
+   value <<= shift;
+
+   /* overflow check */
+   if ((value >> shift) != old)
+   goto error;
+
+   /* check for buffer overflow */
+   if (n >= size)
+   goto error;
+
+   /* store value according to type size */
+   switch (type_size) {
+   case 1:
+   if (allow_signed) {
+   if (value < SCHAR_MIN || value > SCHAR_MAX)
+   goto error;
+   } else {
+   if (value < 0 || value > UCHAR_MAX)
+   goto error;
+   }
+   ((uint8_t *)pdata)[n] = (uint8_t)value;
+   break;
+   case 2:
+   if (allow_signed) {
+   if (value < SHRT_MIN || value > SHRT_MAX)
+   goto error;
+   } else {
+   if (value < 0 || value > USHRT_MAX)
+   goto error;
+   }
+   ((uint16_t *)pdata)[n] = (uint16_t)value;
+   break;
+   case 4:
+   if (allow_signed) {
+   if (value < INT_MIN || value > INT_MAX)
+   goto error;
+   } else {
+   if (value > UINT_MAX)
+   goto error;
+   }
+ 

svn commit: r335698 - stable/11/share/examples/bhyve

2018-06-27 Thread Konstantin Belousov
Author: kib
Date: Wed Jun 27 07:18:54 2018
New Revision: 335698
URL: https://svnweb.freebsd.org/changeset/base/335698

Log:
  MFC r335604:
  bhyve/vmrun.sh: make -L functional.

Modified:
  stable/11/share/examples/bhyve/vmrun.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/examples/bhyve/vmrun.sh
==
--- stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 06:50:24 2018
(r335697)
+++ stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 07:18:54 2018
(r335698)
@@ -132,7 +132,7 @@ vncport=${DEFAULT_VNCPORT}
 vncsize=${DEFAULT_VNCSIZE}
 tablet=""
 
-while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do
+while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do
case $c in
a)
bhyverun_opt="${bhyverun_opt} -a"
___
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: r335690 - head/sys/kern

2018-06-27 Thread Oliver Pinter
On Wednesday, June 27, 2018, Warner Losh  wrote:

> Author: imp
> Date: Wed Jun 27 04:11:09 2018
> New Revision: 335690
> URL: https://svnweb.freebsd.org/changeset/base/335690
>
> Log:
>   Fix devctl generation for core files.
>
>   We have a problem with vn_fullpath_global when the file exists. Work
>   around it by printing the full path if the core file name starts with /,
>   or current working directory followed by the filename if not.
>
>   Sponsored by: Netflix
>   Differential Review: https://reviews.freebsd.org/D16026
>
> Modified:
>   head/sys/kern/kern_sig.c
>
> Modified: head/sys/kern/kern_sig.c
> 
> ==
> --- head/sys/kern/kern_sig.cWed Jun 27 04:10:48 2018(r335689)
> +++ head/sys/kern/kern_sig.cWed Jun 27 04:11:09 2018(r335690)
> @@ -3431,24 +3431,6 @@ out:
> return (0);
>  }
>
> -static int
> -coredump_sanitise_path(const char *path)
> -{
> -   size_t i;
> -
> -   /*
> -* Only send a subset of ASCII to devd(8) because it
> -* might pass these strings to sh -c.
> -*/
> -   for (i = 0; path[i]; i++)
> -   if (!(isalpha(path[i]) || isdigit(path[i])) &&
> -   path[i] != '/' && path[i] != '.' &&
> -   path[i] != '-')
> -   return (0);


This part of code existed to prevent shell code injection via file names.
After this commit we lose this.



> -
> -   return (1);
> -}
> -
>  /*
>   * Dump a process' core.  The main routine does some
>   * policy checking, and creates the name of the coredump;
> @@ -3469,11 +3451,8 @@ coredump(struct thread *td)
> char *name; /* name of corefile */
> void *rl_cookie;
> off_t limit;
> -   char *data = NULL;
> char *fullpath, *freepath = NULL;
> -   size_t len;
> -   static const char comm_name[] = "comm=";
> -   static const char core_name[] = "core=";
> +   struct sbuf *sb;
>
> PROC_LOCK_ASSERT(p, MA_OWNED);
> MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td);
> @@ -3556,23 +3535,35 @@ coredump(struct thread *td)
>  */
> if (error != 0 || coredump_devctl == 0)
> goto out;
> -   len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 +
> -   sizeof(' ') + sizeof(core_name) - 1;
> -   data = malloc(len, M_TEMP, M_WAITOK);
> +   sb = sbuf_new_auto();
> if (vn_fullpath_global(td, p->p_textvp, , ) != 0)
> -   goto out;
> -   if (!coredump_sanitise_path(fullpath))
> -   goto out;
> -   snprintf(data, len, "%s%s ", comm_name, fullpath);
> +   goto out2;
> +   sbuf_printf(sb, "comm=\"");
> +   devctl_safe_quote_sb(sb, fullpath);
> free(freepath, M_TEMP);
> -   freepath = NULL;
> -   if (vn_fullpath_global(td, vp, , ) != 0)
> -   goto out;
> -   if (!coredump_sanitise_path(fullpath))
> -   goto out;
> -   strlcat(data, core_name, len);
> -   strlcat(data, fullpath, len);
> -   devctl_notify("kernel", "signal", "coredump", data);
> +   sbuf_printf(sb, "\" core=\"");
> +
> +   /*
> +* We can't lookup core file vp directly. When we're replacing a
> core, and
> +* other random times, we flush the name cache, so it will fail.
> Instead,
> +* if the path of the core is relative, add the current dir in
> front if it.
> +*/
> +   if (name[0] != '/') {
> +   fullpath = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
> +   if (kern___getcwd(td, fullpath, UIO_SYSSPACE, MAXPATHLEN,
> MAXPATHLEN) != 0) {
> +   free(fullpath, M_TEMP);
> +   goto out2;
> +   }
> +   devctl_safe_quote_sb(sb, fullpath);
> +   free(fullpath, M_TEMP);
> +   sbuf_putc(sb, '/');
> +   }
> +   devctl_safe_quote_sb(sb, name);
> +   sbuf_printf(sb, "\"");
> +   if (sbuf_finish(sb) == 0)
> +   devctl_notify("kernel", "signal", "coredump",
> sbuf_data(sb));
> +out2:
> +   sbuf_delete(sb);
>  out:
> error1 = vn_close(vp, FWRITE, cred, td);
> if (error == 0)
> @@ -3580,8 +3571,6 @@ out:
>  #ifdef AUDIT
> audit_proc_coredump(td, name, error);
>  #endif
> -   free(freepath, M_TEMP);
> -   free(data, M_TEMP);
> free(name, M_TEMP);
> return (error);
>  }
> ___
> 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
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335697 - head/sbin/fsck_msdosfs

2018-06-27 Thread Xin LI
Author: delphij
Date: Wed Jun 27 06:50:24 2018
New Revision: 335697
URL: https://svnweb.freebsd.org/changeset/base/335697

Log:
  Revert Makefile@335696 that sneaked into the commit.
  
  X-MFC with:   335696
  MFC after:2 weeks

Modified:
  head/sbin/fsck_msdosfs/Makefile

Modified: head/sbin/fsck_msdosfs/Makefile
==
--- head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:49:20 2018
(r335696)
+++ head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:50:24 2018
(r335697)
@@ -9,8 +9,6 @@ PROG=   fsck_msdosfs
 MAN=   fsck_msdosfs.8
 SRCS=  main.c check.c boot.c fat.c dir.c fsutil.c
 
-DEBUG_FLAGS+=  -g
-
 CFLAGS+= -I${FSCK}
 
 .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: r335696 - head/sbin/fsck_msdosfs

2018-06-27 Thread Xin LI
Author: delphij
Date: Wed Jun 27 06:49:20 2018
New Revision: 335696
URL: https://svnweb.freebsd.org/changeset/base/335696

Log:
  Detect exFAT filesystems and abort if found and tighten BPB sanity
  check.
  
  Obtained from:Android https://android-review.googlesource.com/61827
  MFC after:2 weeks

Modified:
  head/sbin/fsck_msdosfs/Makefile
  head/sbin/fsck_msdosfs/boot.c

Modified: head/sbin/fsck_msdosfs/Makefile
==
--- head/sbin/fsck_msdosfs/Makefile Wed Jun 27 04:58:39 2018
(r335695)
+++ head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:49:20 2018
(r335696)
@@ -9,6 +9,8 @@ PROG=   fsck_msdosfs
 MAN=   fsck_msdosfs.8
 SRCS=  main.c check.c boot.c fat.c dir.c fsutil.c
 
+DEBUG_FLAGS+=  -g
+
 CFLAGS+= -I${FSCK}
 
 .include 

Modified: head/sbin/fsck_msdosfs/boot.c
==
--- head/sbin/fsck_msdosfs/boot.c   Wed Jun 27 04:58:39 2018
(r335695)
+++ head/sbin/fsck_msdosfs/boot.c   Wed Jun 27 06:49:20 2018
(r335696)
@@ -82,6 +82,11 @@ readboot(int dosfs, struct bootblock *boot)
 
boot->FATsecs = boot->bpbFATsmall;
 
+   if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 ||
+   boot->bpbBytesPerSec / DOSBOOTBLOCKSIZE_REAL == 0) {
+   pfatal("Invalid sector size: %u", boot->bpbBytesPerSec);
+   return FSFATAL;
+   }
if (!boot->bpbRootDirEnts)
boot->flags |= FAT32;
if (boot->flags & FAT32) {
@@ -102,6 +107,22 @@ readboot(int dosfs, struct bootblock *boot)
boot->bpbFSInfo = block[48] + (block[49] << 8);
boot->bpbBackup = block[50] + (block[51] << 8);
 
+   /* If the OEM Name field is EXFAT, it's not FAT32, so bail */
+   if (!memcmp([3], "EXFAT   ", 8)) {
+   pfatal("exFAT filesystem is not supported.");
+   return FSFATAL;
+   }
+
+   /* check basic parameters */
+   if ((boot->bpbFSInfo == 0) || (boot->bpbSecPerClust == 0)) {
+   /*
+* Either the BIOS Parameter Block has been corrupted,
+* or this is not a FAT32 filesystem, most likely an
+* exFAT filesystem.
+*/
+   pfatal("Invalid FAT32 Extended BIOS Parameter Block");
+   return FSFATAL;
+   }
if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec,
SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec
|| read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) {
@@ -178,11 +199,6 @@ readboot(int dosfs, struct bootblock *boot)
/* Check backup bpbFSInfo?  
XXX */
}
 
-   if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 ||
-   boot->bpbBytesPerSec == 0) {
-   pfatal("Invalid sector size: %u", boot->bpbBytesPerSec);
-   return FSFATAL;
-   }
if (boot->bpbSecPerClust == 0) {
pfatal("Invalid cluster size: %u", boot->bpbSecPerClust);
return FSFATAL;
___
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"