Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Bruce Evans

On Sun, 11 Feb 2018, Warner Losh wrote:


On Feb 11, 2018 7:05 PM, "Conrad Meyer"  wrote:

On Sun, Feb 11, 2018 at 3:46 PM, Rodney W. Grimes
 wrote:

Moving this to /usr creates a cyclic issue in that you then need
/usr to be mounted before devd can start and devd's /etc/rc.d file
says:
# PROVIDE: devd
# REQUIRE: NETWORKING
# BEFORE: mountcritremote
# KEYWORD: nojail

In the diskless and nfs shared /usr worlds devd wants to start
before /usr is mounted.


If devd is needed to mount /usr (???), it seems like just another
demonstration of why separate /usr is a poor idea.


No, it is just another defense against people breaking separate /usr.


No, it's another reason why generated devd files are wrong in the face of
devmatch.


Bruce
___
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: r329154 - in head/etc: defaults devd

2018-02-11 Thread Alexey Dokuchaev
On Sun, Feb 11, 2018 at 10:55:48PM -0800, Cy Schubert wrote:
> In message <201802120651.w1c6pkqf042...@repo.freebsd.org>, Warner Losh
> writes:
> > New Revision: 329154
> > URL: https://svnweb.freebsd.org/changeset/base/329154
> >
> > Log:
> >   Turn devmatch on by default.
> >   
> >   Turn devmatch on by default. However, use 'start' instead of
> >   'onestart' in the devmatch.conf file so the setting of
> >   'devmatch_enable' is honored. Give an example of what to put in
> >   devd.conf if you want to disable just the run-time part of devmatch.
> >   
> > ...
> > @@ -41,7 +41,7 @@ ddb_enable="NO"   # Set to YES to load ddb script
> > s at b
> >  ddb_config="/etc/ddb.conf" # ddb(8) config file.
> >  devd_enable="YES"  # Run devd, to trigger programs on device tree changes.
> >  devd_flags=""  # Additional flags for devd(8).
> > -devmatch_enable="NO"   # Demand load kernel modules based on device 
> > ids.
> > +devmatch_enable="YES"  # Demand load kernel modules based on device id
> > s.
> 
> This assumes that everyone has /usr in /. We might want to consider
> moving devmatch to /sbin, or document that

I was actually surprised to find out it's installed as /usr/sbin/devmatch;
/sbin indeed looks more appropriate.

> /usr and / be merged.

Please don't.

./danfe
___
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: r329154 - in head/etc: defaults devd

2018-02-11 Thread Warner Losh
On Sun, Feb 11, 2018 at 11:55 PM, Cy Schubert 
wrote:

> In message <201802120651.w1c6pkqf042...@repo.freebsd.org>, Warner Losh
> writes:
> > Author: imp
> > Date: Mon Feb 12 06:51:20 2018
> > New Revision: 329154
> > URL: https://svnweb.freebsd.org/changeset/base/329154
> >
> > Log:
> >   Turn devmatch on by default.
> >
> >   Turn devmatch on by default. However, use 'start' instead of
> >   'onestart' in the devmatch.conf file so the setting of
> >   'devmatch_enable' is honored. Give an example of what to put in
> >   devd.conf if you want to disable just the run-time part of devmatch.
> >
> >   Relnotes: yes
> >
> > Modified:
> >   head/etc/defaults/rc.conf
> >   head/etc/devd/devmatch.conf
> >
> > Modified: head/etc/defaults/rc.conf
> > 
> =
> > =
> > --- head/etc/defaults/rc.conf Mon Feb 12 06:42:38 2018(r329153)
> > +++ head/etc/defaults/rc.conf Mon Feb 12 06:51:20 2018(r329154)
> > @@ -41,7 +41,7 @@ ddb_enable="NO" # Set to YES to load ddb
> script
> > s at b
> >  ddb_config="/etc/ddb.conf"   # ddb(8) config file.
> >  devd_enable="YES"# Run devd, to trigger programs on device tree
> changes.
> >  devd_flags=""# Additional flags for devd(8).
> > -devmatch_enable="NO" # Demand load kernel modules based on device ids.
> > +devmatch_enable="YES"# Demand load kernel modules based on
> device id
> > s.
>
> This assumes that everyone has /usr in /. We might want to consider
> moving devmatch to /sbin or document that /usr and / be merged.
>

That's a good point. I think /etc/rc.d is fine, but devd runs before /usr
is mounted, so I think you are right. I'll make the change tomorrow.

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: r329154 - in head/etc: defaults devd

2018-02-11 Thread Cy Schubert
In message <201802120651.w1c6pkqf042...@repo.freebsd.org>, Warner Losh 
writes:
> Author: imp
> Date: Mon Feb 12 06:51:20 2018
> New Revision: 329154
> URL: https://svnweb.freebsd.org/changeset/base/329154
>
> Log:
>   Turn devmatch on by default.
>   
>   Turn devmatch on by default. However, use 'start' instead of
>   'onestart' in the devmatch.conf file so the setting of
>   'devmatch_enable' is honored. Give an example of what to put in
>   devd.conf if you want to disable just the run-time part of devmatch.
>   
>   Relnotes: yes
>
> Modified:
>   head/etc/defaults/rc.conf
>   head/etc/devd/devmatch.conf
>
> Modified: head/etc/defaults/rc.conf
> =
> =
> --- head/etc/defaults/rc.conf Mon Feb 12 06:42:38 2018(r329153)
> +++ head/etc/defaults/rc.conf Mon Feb 12 06:51:20 2018(r329154)
> @@ -41,7 +41,7 @@ ddb_enable="NO" # Set to YES to load ddb script
> s at b
>  ddb_config="/etc/ddb.conf"   # ddb(8) config file.
>  devd_enable="YES"# Run devd, to trigger programs on device tree changes.
>  devd_flags=""# Additional flags for devd(8).
> -devmatch_enable="NO" # Demand load kernel modules based on device ids.
> +devmatch_enable="YES"# Demand load kernel modules based on device id
> s.

This assumes that everyone has /usr in /. We might want to consider 
moving devmatch to /sbin or document that /usr and / be merged.



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


svn commit: r329155 - head/etc/devd

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 06:52:49 2018
New Revision: 329155
URL: https://svnweb.freebsd.org/changeset/base/329155

Log:
  Fix typo

Modified:
  head/etc/devd/devmatch.conf

Modified: head/etc/devd/devmatch.conf
==
--- head/etc/devd/devmatch.conf Mon Feb 12 06:51:20 2018(r329154)
+++ head/etc/devd/devmatch.conf Mon Feb 12 06:52:49 2018(r329155)
@@ -12,7 +12,7 @@ nomatch 100 {
action "service devmatch start"
 };
 
-# Add the following to devd.conf to preent this from running:
+# Add the following to devd.conf to prevent this from running:
 #  nomatch 1000 {
 #  action "true"
 #  };
___
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: r329154 - in head/etc: defaults devd

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 06:51:20 2018
New Revision: 329154
URL: https://svnweb.freebsd.org/changeset/base/329154

Log:
  Turn devmatch on by default.
  
  Turn devmatch on by default. However, use 'start' instead of
  'onestart' in the devmatch.conf file so the setting of
  'devmatch_enable' is honored. Give an example of what to put in
  devd.conf if you want to disable just the run-time part of devmatch.
  
  Relnotes: yes

Modified:
  head/etc/defaults/rc.conf
  head/etc/devd/devmatch.conf

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Mon Feb 12 06:42:38 2018(r329153)
+++ head/etc/defaults/rc.conf   Mon Feb 12 06:51:20 2018(r329154)
@@ -41,7 +41,7 @@ ddb_enable="NO"   # Set to YES to load ddb 
scripts at b
 ddb_config="/etc/ddb.conf" # ddb(8) config file.
 devd_enable="YES"  # Run devd, to trigger programs on device tree changes.
 devd_flags=""  # Additional flags for devd(8).
-devmatch_enable="NO"   # Demand load kernel modules based on device ids.
+devmatch_enable="YES"  # Demand load kernel modules based on device ids.
 #kld_list=""   # Kernel modules to load after local disks are mounted
 kldxref_enable="NO"# Build linker.hints files with kldxref(8).
 kldxref_clobber="NO"   # Overwrite old linker.hints at boot.

Modified: head/etc/devd/devmatch.conf
==
--- head/etc/devd/devmatch.conf Mon Feb 12 06:42:38 2018(r329153)
+++ head/etc/devd/devmatch.conf Mon Feb 12 06:51:20 2018(r329154)
@@ -9,5 +9,12 @@
 #
 # Generic NOMATCH event
 nomatch 100 {
-   action "service devmatch onestart"
+   action "service devmatch start"
 };
+
+# Add the following to devd.conf to preent this from running:
+#  nomatch 1000 {
+#  action "true"
+#  };
+# it replaces the generic event with one of higher priority that
+# does nothing. You can also set 'devmatch_enable=NO' in /etc/rc.conf
___
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: r329153 - in head: . etc/devd

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 06:42:38 2018
New Revision: 329153
URL: https://svnweb.freebsd.org/changeset/base/329153

Log:
  Add usb.conf to ObsoleteFiles.
  Add a note to UPDATING.
  Fix a missing tab.
  
  Relnotes: Yes

Modified:
  head/ObsoleteFiles.inc
  head/UPDATING
  head/etc/devd/Makefile

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Feb 12 05:55:44 2018(r329152)
+++ head/ObsoleteFiles.inc  Mon Feb 12 06:42:38 2018(r329153)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180211: remove usb.conf
+OLD_FILES+=etc/devd/usb.conf
 # 20180208: remove c_rehash(1)
 OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz
 # 20180206: remove gdbtui

Modified: head/UPDATING
==
--- head/UPDATING   Mon Feb 12 05:55:44 2018(r329152)
+++ head/UPDATING   Mon Feb 12 06:42:38 2018(r329153)
@@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+20180211:
+   devmatch functionality has been turned on in devd. It will automatically
+   load drivers for unattached devices. This may cause unexpected drivers 
to
+   be loaded. Please report any problems to current@ and i...@freebsd.org.
+
 20180114:
Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to
6.0.0.  Please see the 20141231 entry below for information about

Modified: head/etc/devd/Makefile
==
--- head/etc/devd/Makefile  Mon Feb 12 05:55:44 2018(r329152)
+++ head/etc/devd/Makefile  Mon Feb 12 06:42:38 2018(r329153)
@@ -12,7 +12,7 @@ FILES+=   apple.conf
 .if ${MK_ACPI} != "no"
 FILES+=asus.conf
 .endif
-FILES+=devmatch.conf
+FILES+=devmatch.conf
 .if ${MK_HYPERV} != "no"
 FILES+=hyperv.conf
 .endif
___
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: r329150 - head/etc/devd

2018-02-11 Thread Allan Jude
On 2018-02-12 00:28, Warner Losh wrote:
> 
> 
> On Sun, Feb 11, 2018 at 10:10 PM, Rodney W. Grimes
> >
> wrote:
> 
> [ Charset UTF-8 unsupported, converting... ]
> > Author: imp
> > Date: Mon Feb 12 04:54:51 2018
> > New Revision: 329150
> > URL: https://svnweb.freebsd.org/changeset/base/329150
> 
> >
> > Log:
> >   Install devmatch.conf, don't install usb.conf
> 
> Doesnt this break devd and anyone depending on it?
> 
> 
> I'm having problems understanding how it would break it?
>  
> 
> Does usb.conf need to go in OBSOLETEFILES now?
> 
> 
> Yes. It should...
>  
> 
> Relnotes y?
> 
> 
> Yes. It's hard to know where in the sequence of on-boarding a new
> function where to put it.
> 

Previously Release Engineering has said they'd rather you mark a few too
many things as Relnotes: Yes, than too few. In cases like this, it might
make sense to flag the entire series of commits, so a year from now re@
stands a better chance of writing a coherent paragraph about what the
change actually is, and how it impacts the user.

> Warner
>  
> 
> 
> > Modified:
> >   head/etc/devd/Makefile
> >
> > Modified: head/etc/devd/Makefile
> > 
> ==
> > --- head/etc/devd/Makefile    Mon Feb 12 04:52:25 2018        (r329149)
> > +++ head/etc/devd/Makefile    Mon Feb 12 04:54:51 2018        (r329150)
> > @@ -12,13 +12,14 @@ FILES+=   apple.conf
> >  .if ${MK_ACPI} != "no"
> >  FILES+=      asus.conf
> >  .endif
> > +FILES+=devmatch.conf
>           ^ missing tab
> 
> >  .if ${MK_HYPERV} != "no"
> >  FILES+=      hyperv.conf
> >  .endif
> >  .endif
> >
> >  .if ${MK_USB} != "no"
> > -FILES+=      uath.conf ulpt.conf usb.conf
> > +FILES+=      uath.conf ulpt.conf
> >  .endif
> >
> >  .if ${MK_ZFS} != "no"
> 
> --
> Rod Grimes                                               
>  rgri...@freebsd.org 
> 
> 


-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Allan Jude
On 2018-02-11 18:46, Rodney W. Grimes wrote:
> [ Charset ISO-8859-1 unsupported, converting... ]
>> On Sun, 2018-02-11 at 10:20 -0800, Conrad Meyer wrote:
>>> On Sun, Feb 11, 2018 at 8:35 AM, Ian Lepore  wrote:

 Author: ian
 Date: Sun Feb 11 16:35:56 2018
 New Revision: 329126
 URL: https://svnweb.freebsd.org/changeset/base/329126

 Log:
 ? Regenerate devd/usb.conf after the recent addition of several new
 device IDs.

 Modified:
 ? head/etc/devd/usb.conf
>>>
>>> If this file is machine generated and not an administrator
>>> configuration file, shouldn't it live in /usr/share instead of /etc,
>>> per hier(7)?
>>>
>>> Best,
>>> Conrad
>>>
>>
>> I wonder if that question would apply to all five files we put in
>> /etc/devd? ?It looks like they could be moved to /usr/share with
>> minimal fuss by adding that directory to the search list in
>> /etc/devd.conf.
> 
> Moving this to /usr creates a cyclic issue in that you then need
> /usr to be mounted before devd can start and devd's /etc/rc.d file
> says:
> # PROVIDE: devd
> # REQUIRE: NETWORKING
> # BEFORE: mountcritremote
> # KEYWORD: nojail
> 
> In the diskless and nfs shared /usr worlds devd wants to start
> before /usr is mounted.
> 
>> I'm agnostic about the value of moving them. ?Users can configure local
>> rules by modifying the existing devd.conf and files in devd/ and
>> dealing with mergemaster on updates, or by adding their own new files
>> in devd/.
> 

Maybe the correct place is /etc/defaults/devd/ then?

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


svn commit: r329152 - stable/11/stand/fdt

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Mon Feb 12 05:55:44 2018
New Revision: 329152
URL: https://svnweb.freebsd.org/changeset/base/329152

Log:
  MFC r328505,r328659: stand/fdt improvements
  
  r328505: stand/fdt: Check /compatible property on overlay if it exists
  
  r328659: stand/fdt: Rip out FDT VA tracking

Modified:
  stable/11/stand/fdt/fdt_loader_cmd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/fdt/fdt_loader_cmd.c
==
--- stable/11/stand/fdt/fdt_loader_cmd.cMon Feb 12 05:28:52 2018
(r329151)
+++ stable/11/stand/fdt/fdt_loader_cmd.cMon Feb 12 05:55:44 2018
(r329152)
@@ -67,13 +67,10 @@ static struct fdt_header *fdt_to_load = NULL;
 static struct fdt_header *fdtp = NULL;
 /* Size of FDT blob */
 static size_t fdtp_size = 0;
-/* Location of FDT in kernel or module. */
-/* This won't be set if FDT is loaded from disk or memory. */
-/* If it is set, we'll update it when fdt_copy() gets called. */
-static vm_offset_t fdtp_va = 0;
 
 static int fdt_load_dtb(vm_offset_t va);
 static void fdt_print_overlay_load_error(int err, const char *filename);
+static int fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt);
 
 static int fdt_cmd_nyi(int argc, char *argv[]);
 static int fdt_load_dtb_overlays_string(const char * filenames);
@@ -220,7 +217,6 @@ fdt_load_dtb(vm_offset_t va)
return (1);
}
 
-   fdtp_va = va;
COPYOUT(va, fdtp, fdtp_size);
debugf("DTB blob found at 0x%jx, size: 0x%jx\n", (uintmax_t)va, 
(uintmax_t)fdtp_size);
 
@@ -247,7 +243,6 @@ fdt_load_dtb_addr(struct fdt_header *header)
return (1);
}
 
-   fdtp_va = 0; // Don't write this back into module or kernel.
bcopy(header, fdtp, fdtp_size);
return (0);
 }
@@ -374,6 +369,62 @@ fdt_load_dtb_overlays_string(const char * filenames)
return (0);
 }
 
+/*
+ * fdt_check_overlay_compatible - check that the overlay_fdt is compatible with
+ * base_fdt before we attempt to apply it. It will need to re-calculate offsets
+ * in the base every time, rather than trying to cache them earlier in the
+ * process, because the overlay application process can/will invalidate a lot 
of
+ * offsets.
+ */
+static int
+fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt)
+{
+   const char *compat;
+   int compat_len, ocompat_len;
+   int oroot_offset, root_offset;
+   int slidx, sllen;
+
+   oroot_offset = fdt_path_offset(overlay_fdt, "/");
+   if (oroot_offset < 0)
+   return (oroot_offset);
+   /*
+* If /compatible in the overlay does not exist or if it is empty, then
+* we're automatically compatible. We do this for the sake of rapid
+* overlay development for overlays that aren't intended to be deployed.
+* The user assumes the risk of using an overlay without /compatible.
+*/
+   if (fdt_get_property(overlay_fdt, oroot_offset, "compatible",
+   _len) == NULL || ocompat_len == 0)
+   return (0);
+   root_offset = fdt_path_offset(base_fdt, "/");
+   if (root_offset < 0)
+   return (root_offset);
+   /*
+* However, an empty or missing /compatible on the base is an error,
+* because allowing this offers no advantages.
+*/
+   if (fdt_get_property(base_fdt, root_offset, "compatible",
+   _len) == NULL)
+   return (compat_len);
+   else if(compat_len == 0)
+   return (1);
+
+   slidx = 0;
+   compat = fdt_stringlist_get(overlay_fdt, oroot_offset, "compatible",
+   slidx, );
+   while (compat != NULL) {
+   if (fdt_stringlist_search(base_fdt, root_offset, "compatible",
+   compat) >= 0)
+   return (0);
+   ++slidx;
+   compat = fdt_stringlist_get(overlay_fdt, oroot_offset,
+   "compatible", slidx, );
+   };
+
+   /* We've exhausted the overlay's /compatible property... no match */
+   return (1);
+}
+
 void
 fdt_apply_overlays()
 {
@@ -406,6 +457,13 @@ fdt_apply_overlays()
current_fdtp = fdtp;
current_fdtp_size = fdtp_size;
for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) {
+   COPYOUT(fp->f_addr, overlay, fp->f_size);
+   /* Check compatible first to avoid unnecessary allocation */
+   rv = fdt_check_overlay_compatible(current_fdtp, overlay);
+   if (rv != 0) {
+   printf("DTB overlay '%s' not compatible\n", fp->f_name);
+   continue;
+   }
printf("applying DTB overlay '%s'\n", fp->f_name);
next_fdtp_size = current_fdtp_size + fp->f_size;
next_fdtp = malloc(next_fdtp_size);
@@ -423,7 +481,6 @@ fdt_apply_overlays()
  

svn commit: r329151 - stable/11

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Mon Feb 12 05:28:52 2018
New Revision: 329151
URL: https://svnweb.freebsd.org/changeset/base/329151

Log:
  Record-only merge of r326857 and r326888
  
  These are equal and opposite commits*; one to flip GELI support off by
  default and another to flip it back on. They were made to circumvent some
  GELI breakage in head that didn't apply to stable/11.
  
  The former commit shows up when looking at MFC candidates for stand/, hence
  the desire for this record.
  
  * Equal and opposite except in that r326857 added a comment to zfsldr.S that
  likely should not have been added at that time.

Modified:
Directory Properties:
  stable/11/   (props changed)
___
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: r329150 - head/etc/devd

2018-02-11 Thread Warner Losh
On Sun, Feb 11, 2018 at 10:10 PM, Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> [ Charset UTF-8 unsupported, converting... ]
> > Author: imp
> > Date: Mon Feb 12 04:54:51 2018
> > New Revision: 329150
> > URL: https://svnweb.freebsd.org/changeset/base/329150
> >
> > Log:
> >   Install devmatch.conf, don't install usb.conf
>
> Doesnt this break devd and anyone depending on it?
>

I'm having problems understanding how it would break it?


> Does usb.conf need to go in OBSOLETEFILES now?
>

Yes. It should...


> Relnotes y?


Yes. It's hard to know where in the sequence of on-boarding a new function
where to put it.

Warner


>
> > Modified:
> >   head/etc/devd/Makefile
> >
> > Modified: head/etc/devd/Makefile
> > 
> ==
> > --- head/etc/devd/MakefileMon Feb 12 04:52:25 2018(r329149)
> > +++ head/etc/devd/MakefileMon Feb 12 04:54:51 2018(r329150)
> > @@ -12,13 +12,14 @@ FILES+=   apple.conf
> >  .if ${MK_ACPI} != "no"
> >  FILES+=  asus.conf
> >  .endif
> > +FILES+=devmatch.conf
>   ^ missing tab
>
> >  .if ${MK_HYPERV} != "no"
> >  FILES+=  hyperv.conf
> >  .endif
> >  .endif
> >
> >  .if ${MK_USB} != "no"
> > -FILES+=  uath.conf ulpt.conf usb.conf
> > +FILES+=  uath.conf ulpt.conf
> >  .endif
> >
> >  .if ${MK_ZFS} != "no"
>
> --
> Rod Grimes
> rgri...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329148 - head/etc/devd

2018-02-11 Thread Warner Losh
On Feb 11, 2018 10:08 PM, "Rodney W. Grimes" 
wrote:

> Author: imp
> Date: Mon Feb 12 04:45:26 2018
> New Revision: 329148
> URL: https://svnweb.freebsd.org/changeset/base/329148
>
> Log:
>   Switch to using devmatch to autoload drivers. Remove usb.conf
>   as obsolete because devmatch gets its information from the same
>   place as the genration scripts.
>
> Added:
>   head/etc/devd/devmatch.conf   (contents, props changed)
> Deleted:
>   head/etc/devd/usb.conf

I know you did this in a hurry and as you said while angry,
perhaps take a day and step back?  I think this was rather
hap hazzard, and now devmatch is stucking files in devd that
is to be obsoleted, is this really how we want this nice
clean solution to start its new life?



No time like the present.


> Added: head/etc/devd/devmatch.conf

Shouldnt this gone to head/etc/devmatch?


No.

Warner

> 
==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/etc/devd/devmatch.conf   Mon Feb 12 04:45:26 2018
(r329148)
> @@ -0,0 +1,13 @@
> +#
> +# $FreeBSD$
> +#
> +
> +#
> +# Example devd configuration file for automatically
> +# loading what modules we can based on nomatch
> +# events.
> +#
> +# Generic NOMATCH event
> +nomatch 100 {
> + action "service devmatch onestart"
> +};
>
>

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


Re: svn commit: r329150 - head/etc/devd

2018-02-11 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: imp
> Date: Mon Feb 12 04:54:51 2018
> New Revision: 329150
> URL: https://svnweb.freebsd.org/changeset/base/329150
> 
> Log:
>   Install devmatch.conf, don't install usb.conf

Doesnt this break devd and anyone depending on it?
Does usb.conf need to go in OBSOLETEFILES now?

Relnotes y?

> Modified:
>   head/etc/devd/Makefile
> 
> Modified: head/etc/devd/Makefile
> ==
> --- head/etc/devd/MakefileMon Feb 12 04:52:25 2018(r329149)
> +++ head/etc/devd/MakefileMon Feb 12 04:54:51 2018(r329150)
> @@ -12,13 +12,14 @@ FILES+=   apple.conf
>  .if ${MK_ACPI} != "no"
>  FILES+=  asus.conf
>  .endif
> +FILES+=devmatch.conf
  ^ missing tab

>  .if ${MK_HYPERV} != "no"
>  FILES+=  hyperv.conf
>  .endif
>  .endif
>  
>  .if ${MK_USB} != "no"
> -FILES+=  uath.conf ulpt.conf usb.conf
> +FILES+=  uath.conf ulpt.conf
>  .endif
>  
>  .if ${MK_ZFS} != "no"

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


Re: svn commit: r329148 - head/etc/devd

2018-02-11 Thread Rodney W. Grimes
> Author: imp
> Date: Mon Feb 12 04:45:26 2018
> New Revision: 329148
> URL: https://svnweb.freebsd.org/changeset/base/329148
> 
> Log:
>   Switch to using devmatch to autoload drivers. Remove usb.conf
>   as obsolete because devmatch gets its information from the same
>   place as the genration scripts.
> 
> Added:
>   head/etc/devd/devmatch.conf   (contents, props changed)
> Deleted:
>   head/etc/devd/usb.conf

I know you did this in a hurry and as you said while angry,
perhaps take a day and step back?  I think this was rather
hap hazzard, and now devmatch is stucking files in devd that
is to be obsoleted, is this really how we want this nice
clean solution to start its new life?


> Added: head/etc/devd/devmatch.conf

Shouldnt this gone to head/etc/devmatch?

> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/etc/devd/devmatch.conf   Mon Feb 12 04:45:26 2018
> (r329148)
> @@ -0,0 +1,13 @@
> +#
> +# $FreeBSD$
> +#
> +
> +#
> +# Example devd configuration file for automatically
> +# loading what modules we can based on nomatch
> +# events.
> +#
> +# Generic NOMATCH event
> +nomatch 100 {
> + action "service devmatch onestart"
> +};
> 
> 

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


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Conrad Meyer
As usual, I'll believe it when I see it.  If it's so easy, seems like
you could just commit it today.  And if it's not so easy, maybe the
integration isn't so trivial.

On Sun, Feb 11, 2018 at 8:27 PM, Warner Losh  wrote:
>
>
> On Sun, Feb 11, 2018 at 8:54 PM, Conrad Meyer  wrote:
>>
>> On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
>> > No, it's another reason why generated devd files are wrong in the face
>> > of
>> > devmatch.
>>
>> Devmatch is both vaporware and orthogonal to the placement of
>> pre-devmatch static system databases.
>
>
> kldload $(devmatch | uniq) would do the trick.
>
> I take exception to the vaporware comment. At worst it's incompletely
> integrated. The point is that these generated things are at worst a
> transient thing that aren't worth moving or even arguing about where they
> should have gone were they not set for deletion soon.
>
> 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: r329126 - head/etc/devd

2018-02-11 Thread Warner Losh
OK. I guess I shouldn't push when angry to try to prove a point. That never
works out well...

So, I needed r329149 and 329150 as well to tweak a couple of things.

Warner



On Sun, Feb 11, 2018 at 9:45 PM, Warner Losh  wrote:

> Sigh. r329147, r329148.
>
> Trivial.
>
> Warner
>
>
> On Sun, Feb 11, 2018 at 9:41 PM, Conrad Meyer  wrote:
>
>> As usual, I'll believe it when I see it.  If it's so easy, seems like
>> you could just commit it today.  And if it's not so easy, maybe the
>> integration isn't so trivial.
>>
>> On Sun, Feb 11, 2018 at 8:27 PM, Warner Losh  wrote:
>> >
>> >
>> > On Sun, Feb 11, 2018 at 8:54 PM, Conrad Meyer  wrote:
>> >>
>> >> On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
>> >> > No, it's another reason why generated devd files are wrong in the
>> face
>> >> > of
>> >> > devmatch.
>> >>
>> >> Devmatch is both vaporware and orthogonal to the placement of
>> >> pre-devmatch static system databases.
>> >
>> >
>> > kldload $(devmatch | uniq) would do the trick.
>> >
>> > I take exception to the vaporware comment. At worst it's incompletely
>> > integrated. The point is that these generated things are at worst a
>> > transient thing that aren't worth moving or even arguing about where
>> they
>> > should have gone were they not set for deletion soon.
>> >
>> > 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: r329126 - head/etc/devd

2018-02-11 Thread Conrad Meyer
I am happy with this outcome, thanks.

On Sun, Feb 11, 2018 at 8:45 PM, Warner Losh  wrote:
> Sigh. r329147, r329148.
>
> Trivial.
>
> Warner
>
>
> On Sun, Feb 11, 2018 at 9:41 PM, Conrad Meyer  wrote:
>>
>> As usual, I'll believe it when I see it.  If it's so easy, seems like
>> you could just commit it today.  And if it's not so easy, maybe the
>> integration isn't so trivial.
>>
>> On Sun, Feb 11, 2018 at 8:27 PM, Warner Losh  wrote:
>> >
>> >
>> > On Sun, Feb 11, 2018 at 8:54 PM, Conrad Meyer  wrote:
>> >>
>> >> On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
>> >> > No, it's another reason why generated devd files are wrong in the
>> >> > face
>> >> > of
>> >> > devmatch.
>> >>
>> >> Devmatch is both vaporware and orthogonal to the placement of
>> >> pre-devmatch static system databases.
>> >
>> >
>> > kldload $(devmatch | uniq) would do the trick.
>> >
>> > I take exception to the vaporware comment. At worst it's incompletely
>> > integrated. The point is that these generated things are at worst a
>> > transient thing that aren't worth moving or even arguing about where
>> > they
>> > should have gone were they not set for deletion soon.
>> >
>> > 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: r329150 - head/etc/devd

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 04:54:51 2018
New Revision: 329150
URL: https://svnweb.freebsd.org/changeset/base/329150

Log:
  Install devmatch.conf, don't install usb.conf

Modified:
  head/etc/devd/Makefile

Modified: head/etc/devd/Makefile
==
--- head/etc/devd/Makefile  Mon Feb 12 04:52:25 2018(r329149)
+++ head/etc/devd/Makefile  Mon Feb 12 04:54:51 2018(r329150)
@@ -12,13 +12,14 @@ FILES+= apple.conf
 .if ${MK_ACPI} != "no"
 FILES+=asus.conf
 .endif
+FILES+=devmatch.conf
 .if ${MK_HYPERV} != "no"
 FILES+=hyperv.conf
 .endif
 .endif
 
 .if ${MK_USB} != "no"
-FILES+=uath.conf ulpt.conf usb.conf
+FILES+=uath.conf ulpt.conf
 .endif
 
 .if ${MK_ZFS} != "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: r329149 - head/etc/rc.d

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 04:52:25 2018
New Revision: 329149
URL: https://svnweb.freebsd.org/changeset/base/329149

Log:
  Install devmatch int /etc/rc.d and echo modules being installed.

Modified:
  head/etc/rc.d/Makefile
  head/etc/rc.d/devmatch

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Mon Feb 12 04:45:26 2018(r329148)
+++ head/etc/rc.d/Makefile  Mon Feb 12 04:52:25 2018(r329149)
@@ -29,6 +29,7 @@ FILES=DAEMON \
defaultroute \
devd \
devfs \
+   devmatch \
dhclient \
dmesg \
dumpon \

Modified: head/etc/rc.d/devmatch
==
--- head/etc/rc.d/devmatch  Mon Feb 12 04:45:26 2018(r329148)
+++ head/etc/rc.d/devmatch  Mon Feb 12 04:52:25 2018(r329149)
@@ -33,7 +33,7 @@
 . /etc/rc.subr
 
 name="devmatch"
-desc="Use devmatch(8) to load kernel modules
+desc="Use devmatch(8) to load kernel modules"
 
 start_cmd="${name}_start"
 stop_cmd=':'
@@ -46,7 +46,7 @@ devmatch_start()
 
[ -n "$x" ] || return
 
-   echo "Autoloading modules"
+   echo "Autoloading modules: ${x}"
kldload ${x}
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Warner Losh
Sigh. r329147, r329148.

Trivial.

Warner

On Sun, Feb 11, 2018 at 9:41 PM, Conrad Meyer  wrote:

> As usual, I'll believe it when I see it.  If it's so easy, seems like
> you could just commit it today.  And if it's not so easy, maybe the
> integration isn't so trivial.
>
> On Sun, Feb 11, 2018 at 8:27 PM, Warner Losh  wrote:
> >
> >
> > On Sun, Feb 11, 2018 at 8:54 PM, Conrad Meyer  wrote:
> >>
> >> On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
> >> > No, it's another reason why generated devd files are wrong in the face
> >> > of
> >> > devmatch.
> >>
> >> Devmatch is both vaporware and orthogonal to the placement of
> >> pre-devmatch static system databases.
> >
> >
> > kldload $(devmatch | uniq) would do the trick.
> >
> > I take exception to the vaporware comment. At worst it's incompletely
> > integrated. The point is that these generated things are at worst a
> > transient thing that aren't worth moving or even arguing about where they
> > should have gone were they not set for deletion soon.
> >
> > 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: r329148 - head/etc/devd

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 04:45:26 2018
New Revision: 329148
URL: https://svnweb.freebsd.org/changeset/base/329148

Log:
  Switch to using devmatch to autoload drivers. Remove usb.conf
  as obsolete because devmatch gets its information from the same
  place as the genration scripts.

Added:
  head/etc/devd/devmatch.conf   (contents, props changed)
Deleted:
  head/etc/devd/usb.conf

Added: head/etc/devd/devmatch.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/devd/devmatch.conf Mon Feb 12 04:45:26 2018(r329148)
@@ -0,0 +1,13 @@
+#
+# $FreeBSD$
+#
+
+#
+# Example devd configuration file for automatically
+# loading what modules we can based on nomatch
+# events.
+#
+# Generic NOMATCH event
+nomatch 100 {
+   action "service devmatch onestart"
+};
___
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: r329147 - in head/etc: defaults rc.d

2018-02-11 Thread Warner Losh
Author: imp
Date: Mon Feb 12 04:45:17 2018
New Revision: 329147
URL: https://svnweb.freebsd.org/changeset/base/329147

Log:
  Add devmatch rc.d integration
  
  Create simple script to load modules on demand based on the device
  identifying information.
  
  Sponsored by: Netflix

Added:
  head/etc/rc.d/devmatch   (contents, props changed)
Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Mon Feb 12 01:17:06 2018(r329146)
+++ head/etc/defaults/rc.conf   Mon Feb 12 04:45:17 2018(r329147)
@@ -41,6 +41,7 @@ ddb_enable="NO"   # Set to YES to load ddb 
scripts at b
 ddb_config="/etc/ddb.conf" # ddb(8) config file.
 devd_enable="YES"  # Run devd, to trigger programs on device tree changes.
 devd_flags=""  # Additional flags for devd(8).
+devmatch_enable="NO"   # Demand load kernel modules based on device ids.
 #kld_list=""   # Kernel modules to load after local disks are mounted
 kldxref_enable="NO"# Build linker.hints files with kldxref(8).
 kldxref_clobber="NO"   # Overwrite old linker.hints at boot.

Added: head/etc/rc.d/devmatch
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/rc.d/devmatch  Mon Feb 12 04:45:17 2018(r329147)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Copyright (c) 2018 Warner Losh
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+# PROVIDE: devmatch
+# REQUIRE: kldxref
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="devmatch"
+desc="Use devmatch(8) to load kernel modules
+
+start_cmd="${name}_start"
+stop_cmd=':'
+
+devmatch_start()
+{
+   local x
+
+   x=$(devmatch | sort -u)
+
+   [ -n "$x" ] || return
+
+   echo "Autoloading modules"
+   kldload ${x}
+}
+
+load_rc_config $name
+run_rc_command "$1"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Warner Losh
On Sun, Feb 11, 2018 at 8:54 PM, Conrad Meyer  wrote:

> On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
> > No, it's another reason why generated devd files are wrong in the face of
> > devmatch.
>
> Devmatch is both vaporware and orthogonal to the placement of
> pre-devmatch static system databases.
>

kldload $(devmatch | uniq) would do the trick.

I take exception to the vaporware comment. At worst it's incompletely
integrated. The point is that these generated things are at worst a
transient thing that aren't worth moving or even arguing about where they
should have gone were they not set for deletion soon.

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: r329126 - head/etc/devd

2018-02-11 Thread Conrad Meyer
On Sun, Feb 11, 2018 at 6:58 PM, Warner Losh  wrote:
> No, it's another reason why generated devd files are wrong in the face of
> devmatch.

Devmatch is both vaporware and orthogonal to the placement of
pre-devmatch static system databases.

I'm on board with the glorious devmatch-autoloads-usb-devices future.
But someone has to actually write the logic that incorporates it with
devd and remove these databases before it matters.
___
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: r329126 - head/etc/devd

2018-02-11 Thread Warner Losh
On Feb 11, 2018 7:05 PM, "Conrad Meyer"  wrote:

On Sun, Feb 11, 2018 at 3:46 PM, Rodney W. Grimes
 wrote:
> Moving this to /usr creates a cyclic issue in that you then need
> /usr to be mounted before devd can start and devd's /etc/rc.d file
> says:
> # PROVIDE: devd
> # REQUIRE: NETWORKING
> # BEFORE: mountcritremote
> # KEYWORD: nojail
>
> In the diskless and nfs shared /usr worlds devd wants to start
> before /usr is mounted.

If devd is needed to mount /usr (???), it seems like just another
demonstration of why separate /usr is a poor idea.


No, it's another reason why generated devd files are wrong in the face of
devmatch.

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: r329126 - head/etc/devd

2018-02-11 Thread Conrad Meyer
On Sun, Feb 11, 2018 at 3:46 PM, Rodney W. Grimes
 wrote:
> Moving this to /usr creates a cyclic issue in that you then need
> /usr to be mounted before devd can start and devd's /etc/rc.d file
> says:
> # PROVIDE: devd
> # REQUIRE: NETWORKING
> # BEFORE: mountcritremote
> # KEYWORD: nojail
>
> In the diskless and nfs shared /usr worlds devd wants to start
> before /usr is mounted.

If devd is needed to mount /usr (???), it seems like just another
demonstration of why separate /usr is a poor idea.
___
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: r329127 - head/sys/sys

2018-02-11 Thread Warner Losh
On Sun, Feb 11, 2018 at 5:55 PM, Bruce Evans  wrote:

> On Sun, 11 Feb 2018, Warner Losh wrote:
>
> Log:
>>  Consistent macro indentation is the hobgoblin of small minds
>>
>>  Line up the macro definitions and names here like the machine/stdarg.h
>>  files that this replaced. This is easier to read and also makes it
>>  easier to match up with other includes. Also two space indent va_end
>>  to match the rest of the surrounding if block.
>>
>
> Any chance of using KNF style?
>
> The 2-column indent for cpp things is easier to read than the KNF 0-column
> indent for cpp things, but is inconsistent with the KNF 8-column indent for
> C things, and is harder to write and maintain.
>
> Modified: head/sys/sys/_stdarg.h
>> 
>> ==
>> --- head/sys/sys/_stdarg.h  Sun Feb 11 16:35:56 2018(r329126)
>> +++ head/sys/sys/_stdarg.h  Sun Feb 11 17:45:38 2018(r329127)
>> @@ -43,13 +43,13 @@
>> #endif
>>
>> #ifdef __GNUCLIKE_BUILTIN_STDARG
>> -  #define va_start(ap, last) __builtin_va_start((ap), (last))
>> -  #define va_arg(ap, type) __builtin_va_arg((ap), type)
>> -  #define __va_copy(dest, src) __builtin_va_copy((dest), (src))
>> +  #define  va_start(ap, last)  __builtin_va_start((ap), (last))
>> +  #define  va_arg(ap, type)__builtin_va_arg((ap), type)
>> +  #define  __va_copy(dest, src)__builtin_va_copy((dest), (src))
>>
>
> In KNF, '#define' is not indented, and the tab after '#define' puts the
> name in column 8.  Here, '#define is indented by 2 columns, and the space
> after #define used to put the name in column 2+7+1 = 10; now it puts the
> name in column 16 which is too far to the right.
>
>   #if __ISO_C_VISIBLE >= 1999
>> -#define va_copy(dest, src) __va_copy(dest, src)
>> +#defineva_copy(dest, src)  __va_copy(dest, src)
>>
>
> Deeper nesting causes further problems.  Now the '#define's are indented
> by 2+2 columns.  The names used to be indented to match, but they are
> now indented uniformly to 16 (except for unconverted ones), so their
> indentation no longer reflects the nesting.  For 5 levels of nesting,
> the #define's would be in column 10 and the tab would indent the names
> to column 24.
>
>   #endif
>> -#define va_end(ap) __builtin_va_end(ap)
>> +  #define  va_end(ap)  __builtin_va_end(ap)
>>
>
> This like was actually in KNF style.


Right, but it didn't match the rest of the file :)


>
> #endif
>>
>> #if defined(lint) && !defined(va_start)
>>
>
> There are many unchanged misformattings before and after the ones modified
> in the patch.  These are now more inconsistent than before:
> before:
> - space instead of tab after #define for idempotency ifdef
> - space instead of tab after #define for _VA_LIST_DECLARED
> after:
> - no tabs in the lint section (4 #define's).  One of these is long and
>   would blow out to 92 columns with tabs instead of spaces.  After fixing
>   the indentation of #define, it still takes 83 columns.
>
> Other style bugs in this file:
> - _VA_LIST_DECLARED is declared before va_list is actually declared.  This
>   is illogical, and its bad style is not used for older #define's of this
>   type
> - space after ! in comment on #endif for idempotency ifdef
> - garbage newline before EOF.
>
> This file scores 67% on knfom(1) after this commit, down from 68% before.
> Most of the errors detected are for the 2-column indentation of almost
> everything.  After fixing this, the score is 95%.  IIRC, indent(1) never
> reformats cpp directives.  knfom(1) uses indent(1) so it doesn't notice
> bugs in cpp expressions.  The score is only 95% because of bugs in
> indent(1).  indent(1) fixes the cpp indentation and the garbage before EOF,
> but adds the following bugs:
> - change the tab in tyhe typedef to a space
> - indent the comment on the #endif for the idempotency ifdef.


what's knfom? Google gives me garbage when I search for that.

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: r329146 - in stable/11/stand: . arm/uboot efi efi/fdt fdt i386 i386/gptzfsboot i386/libi386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/k...

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Mon Feb 12 01:17:06 2018
New Revision: 329146
URL: https://svnweb.freebsd.org/changeset/base/329146

Log:
  MFC r326038,r326069,r326072: More stand simplification and fixes
  
  r326038: Move some more common stuff up to Makefile.inc.
  
  r326069: Fix gptzfsboot for cases with GELI.
  
  r326072: Unbreak riscv build in universe.

Modified:
  stable/11/stand/Makefile.inc
  stable/11/stand/arm/uboot/Makefile
  stable/11/stand/efi/Makefile.inc
  stable/11/stand/efi/fdt/Makefile
  stable/11/stand/fdt/Makefile
  stable/11/stand/i386/Makefile.inc
  stable/11/stand/i386/gptzfsboot/Makefile
  stable/11/stand/i386/libi386/Makefile
  stable/11/stand/mips/beri/Makefile.inc
  stable/11/stand/mips/beri/boot2/Makefile
  stable/11/stand/mips/beri/loader/Makefile
  stable/11/stand/mips/uboot/Makefile
  stable/11/stand/ofw/libofw/Makefile
  stable/11/stand/powerpc/boot1.chrp/Makefile
  stable/11/stand/powerpc/kboot/Makefile
  stable/11/stand/powerpc/ofw/Makefile
  stable/11/stand/powerpc/ps3/Makefile
  stable/11/stand/powerpc/uboot/Makefile
  stable/11/stand/sparc64/Makefile.inc
  stable/11/stand/uboot/fdt/Makefile
  stable/11/stand/uboot/lib/Makefile
  stable/11/stand/usb/Makefile
  stable/11/stand/usb/Makefile.test
  stable/11/stand/userboot/userboot/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/Makefile.inc
==
--- stable/11/stand/Makefile.incMon Feb 12 01:08:44 2018
(r329145)
+++ stable/11/stand/Makefile.incMon Feb 12 01:17:06 2018
(r329146)
@@ -9,6 +9,22 @@ CFLAGS+=-I${SASRC}
 
 SSP_CFLAGS=
 
+# Add in the no float / no SIMD stuff and announce we're freestanding
+# aarch64 and riscv don't have -msoft-float, but all others do. riscv
+# currently has no /boot/loader, but may soon.
+CFLAGS+=   -ffreestanding ${CFLAGS_NO_SIMD}
+.if ${MACHINE_CPUARCH} == "aarch64"
+CFLAGS+=   -mgeneral-regs-only
+.elif ${MACHINE_CPUARCH} != "riscv"
+CFLAGS+=   -msoft-float
+.endif
+
+.if ${MACHINE_CPUARCH} == "i386" || (${MACHINE_CPUARCH} == "amd64" && 
${DO32:U0} == 1)
+CFLAGS+=   -march=i386
+CFLAGS.gcc+=   -mpreferred-stack-boundary=2
+.endif
+
+
 .if ${MACHINE_CPUARCH} == "arm"
 # Do not generate movt/movw, because the relocation fixup for them does not
 # translate to the -Bsymbolic -pie format required by self_reloc() in 
loader(8).

Modified: stable/11/stand/arm/uboot/Makefile
==
--- stable/11/stand/arm/uboot/Makefile  Mon Feb 12 01:08:44 2018
(r329145)
+++ stable/11/stand/arm/uboot/Makefile  Mon Feb 12 01:17:06 2018
(r329146)
@@ -33,8 +33,6 @@ HELP_FILES+=   help.uboot ${BOOTSRC}/fdt/help.fdt
 # Always add MI sources
 .include   "${BOOTSRC}/loader.mk"
 
-CFLAGS+=   -ffreestanding -msoft-float
-
 LDFLAGS=   -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
 LDFLAGS+=  -Wl,-znotext
 

Modified: stable/11/stand/efi/Makefile.inc
==
--- stable/11/stand/efi/Makefile.incMon Feb 12 01:08:44 2018
(r329145)
+++ stable/11/stand/efi/Makefile.incMon Feb 12 01:17:06 2018
(r329146)
@@ -1,23 +1,13 @@
 # $FreeBSD$
 
-.if ${MACHINE_CPUARCH} == "i386"
-CFLAGS+=-march=i386
-CFLAGS+=   -mno-aes
-.endif
-
 # Options used when building app-specific efi components
 # See conf/kern.mk for the correct set of these
-CFLAGS+=   -ffreestanding -Wformat ${CFLAGS_NO_SIMD}
+CFLAGS+=   -Wformat
 LDFLAGS+=  -nostdlib
 
-.if ${MACHINE_CPUARCH} != "aarch64"
-CFLAGS+=   -msoft-float
-.endif
-
 .if ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=   -fshort-wchar
 CFLAGS+=   -mno-red-zone
-CFLAGS+=   -mno-aes
 .endif
 
 .if ${MACHINE_CPUARCH} == "aarch64"

Modified: stable/11/stand/efi/fdt/Makefile
==
--- stable/11/stand/efi/fdt/MakefileMon Feb 12 01:08:44 2018
(r329145)
+++ stable/11/stand/efi/fdt/MakefileMon Feb 12 01:17:06 2018
(r329146)
@@ -10,13 +10,6 @@ WARNS?=  6
 
 SRCS=  efi_fdt.c
 
-CFLAGS+=   -ffreestanding
-.if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+=   -mgeneral-regs-only
-.else
-CFLAGS+=   -msoft-float
-.endif
-
 # EFI library headers
 CFLAGS+=   -I${EFISRC}/include
 CFLAGS+=   -I${EFISRC}/include/${MACHINE}

Modified: stable/11/stand/fdt/Makefile
==
--- stable/11/stand/fdt/MakefileMon Feb 12 01:08:44 2018
(r329145)
+++ stable/11/stand/fdt/MakefileMon Feb 12 01:17:06 2018
(r329146)
@@ -16,12 +16,6 @@ SRCS+=   fdt_loader_cmd.c
 
 CFLAGS+=   -I${SYSDIR}/contrib/libfdt/ -I${LDRSRC}
 
-CFLAGS+=   -ffreestanding
-
-.if ${MACHINE_CPUARCH} == "powerpc" || 

Re: svn commit: r329127 - head/sys/sys

2018-02-11 Thread Bruce Evans

On Sun, 11 Feb 2018, Warner Losh wrote:


Log:
 Consistent macro indentation is the hobgoblin of small minds

 Line up the macro definitions and names here like the machine/stdarg.h
 files that this replaced. This is easier to read and also makes it
 easier to match up with other includes. Also two space indent va_end
 to match the rest of the surrounding if block.


Any chance of using KNF style?

The 2-column indent for cpp things is easier to read than the KNF 0-column
indent for cpp things, but is inconsistent with the KNF 8-column indent for
C things, and is harder to write and maintain.


Modified: head/sys/sys/_stdarg.h
==
--- head/sys/sys/_stdarg.h  Sun Feb 11 16:35:56 2018(r329126)
+++ head/sys/sys/_stdarg.h  Sun Feb 11 17:45:38 2018(r329127)
@@ -43,13 +43,13 @@
#endif

#ifdef __GNUCLIKE_BUILTIN_STDARG
-  #define va_start(ap, last) __builtin_va_start((ap), (last))
-  #define va_arg(ap, type) __builtin_va_arg((ap), type)
-  #define __va_copy(dest, src) __builtin_va_copy((dest), (src))
+  #define  va_start(ap, last)  __builtin_va_start((ap), (last))
+  #define  va_arg(ap, type)__builtin_va_arg((ap), type)
+  #define  __va_copy(dest, src)__builtin_va_copy((dest), (src))


In KNF, '#define' is not indented, and the tab after '#define' puts the
name in column 8.  Here, '#define is indented by 2 columns, and the space
after #define used to put the name in column 2+7+1 = 10; now it puts the
name in column 16 which is too far to the right.


  #if __ISO_C_VISIBLE >= 1999
-#define va_copy(dest, src) __va_copy(dest, src)
+#defineva_copy(dest, src)  __va_copy(dest, src)


Deeper nesting causes further problems.  Now the '#define's are indented
by 2+2 columns.  The names used to be indented to match, but they are
now indented uniformly to 16 (except for unconverted ones), so their
indentation no longer reflects the nesting.  For 5 levels of nesting,
the #define's would be in column 10 and the tab would indent the names
to column 24.


  #endif
-#define va_end(ap) __builtin_va_end(ap)
+  #define  va_end(ap)  __builtin_va_end(ap)


This like was actually in KNF style.


#endif

#if defined(lint) && !defined(va_start)


There are many unchanged misformattings before and after the ones modified
in the patch.  These are now more inconsistent than before:
before:
- space instead of tab after #define for idempotency ifdef
- space instead of tab after #define for _VA_LIST_DECLARED
after:
- no tabs in the lint section (4 #define's).  One of these is long and
  would blow out to 92 columns with tabs instead of spaces.  After fixing
  the indentation of #define, it still takes 83 columns.

Other style bugs in this file:
- _VA_LIST_DECLARED is declared before va_list is actually declared.  This
  is illogical, and its bad style is not used for older #define's of this
  type
- space after ! in comment on #endif for idempotency ifdef
- garbage newline before EOF.

This file scores 67% on knfom(1) after this commit, down from 68% before.
Most of the errors detected are for the 2-column indentation of almost
everything.  After fixing this, the score is 95%.  IIRC, indent(1) never
reformats cpp directives.  knfom(1) uses indent(1) so it doesn't notice
bugs in cpp expressions.  The score is only 95% because of bugs in
indent(1).  indent(1) fixes the cpp indentation and the garbage before EOF,
but adds the following bugs:
- change the tab in tyhe typedef to a space
- indent the comment on the #endif for the idempotency ifdef.

Bruce
___
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: r329145 - in stable/11: . lib/libefivar release/powerpc release/tools share/examples/bootforth share/examples/etc share/man/man5 share/man/man7 share/man/man8 stand stand/arm stand/arm6...

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Mon Feb 12 01:08:44 2018
New Revision: 329145
URL: https://svnweb.freebsd.org/changeset/base/329145

Log:
  MFC r325834,r325997,326502: Move sys/boot to stand/
  
  This is effectively a direct commit to stable/11, due to differences between
  stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often
  accompanied by kernel changes. Many of these were also risc-v updates that
  likely had many more dependencies to MFC.
  
  Because of this, sys/boot/fdt/dts remains as-is while everything else in
  sys/boot relocates to stand/.
  
  r325834: Move sys/boot to stand. Fix all references to new location
  
  r325997: Remove empty directories.
  
  r326502: Document the sys/boot -> stand move in hier.7 and the top-level 
README.

Added:
  stable/11/stand/
  stable/11/stand/Makefile
 - copied unchanged from r329144, stable/11/sys/boot/Makefile
  stable/11/stand/Makefile.amd64
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.amd64
  stable/11/stand/Makefile.arm
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.arm
  stable/11/stand/Makefile.arm64
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.arm64
  stable/11/stand/Makefile.i386
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.i386
  stable/11/stand/Makefile.inc
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.inc
  stable/11/stand/Makefile.mips
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.mips
  stable/11/stand/Makefile.pc98
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.pc98
  stable/11/stand/Makefile.powerpc
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.powerpc
  stable/11/stand/Makefile.sparc64
 - copied unchanged from r329144, stable/11/sys/boot/Makefile.sparc64
  stable/11/stand/arm/
 - copied from r329144, stable/11/sys/boot/arm/
  stable/11/stand/arm64/
 - copied from r329144, stable/11/sys/boot/arm64/
  stable/11/stand/common/
 - copied from r329144, stable/11/sys/boot/common/
  stable/11/stand/defs.mk
 - copied, changed from r329144, stable/11/sys/boot/defs.mk
  stable/11/stand/efi/
 - copied from r329144, stable/11/sys/boot/efi/
  stable/11/stand/fdt/
  stable/11/stand/fdt.mk
 - copied unchanged from r329144, stable/11/sys/boot/fdt.mk
  stable/11/stand/fdt/Makefile
 - copied unchanged from r329144, stable/11/sys/boot/fdt/Makefile
  stable/11/stand/fdt/Makefile.depend
 - copied unchanged from r329144, stable/11/sys/boot/fdt/Makefile.depend
  stable/11/stand/fdt/fdt_loader_cmd.c
 - copied unchanged from r329144, stable/11/sys/boot/fdt/fdt_loader_cmd.c
  stable/11/stand/fdt/fdt_platform.h
 - copied unchanged from r329144, stable/11/sys/boot/fdt/fdt_platform.h
  stable/11/stand/fdt/help.fdt
 - copied unchanged from r329144, stable/11/sys/boot/fdt/help.fdt
  stable/11/stand/ficl/
 - copied from r329144, stable/11/sys/boot/ficl/
  stable/11/stand/ficl.mk
 - copied unchanged from r329144, stable/11/sys/boot/ficl.mk
  stable/11/stand/ficl32/
 - copied from r329144, stable/11/sys/boot/ficl32/
  stable/11/stand/forth/
 - copied from r329144, stable/11/sys/boot/forth/
  stable/11/stand/geli/
 - copied from r329144, stable/11/sys/boot/geli/
  stable/11/stand/i386/
 - copied from r329144, stable/11/sys/boot/i386/
  stable/11/stand/kshim/
 - copied from r329144, stable/11/sys/boot/kshim/
  stable/11/stand/libsa/
 - copied from r329144, stable/11/sys/boot/libsa/
  stable/11/stand/libsa32/
 - copied from r329144, stable/11/sys/boot/libsa32/
  stable/11/stand/loader.mk
 - copied unchanged from r329144, stable/11/sys/boot/loader.mk
  stable/11/stand/man/
 - copied from r329144, stable/11/sys/boot/man/
  stable/11/stand/mips/
 - copied from r329144, stable/11/sys/boot/mips/
  stable/11/stand/ofw/
 - copied from r329144, stable/11/sys/boot/ofw/
  stable/11/stand/pc98/
 - copied from r329144, stable/11/sys/boot/pc98/
  stable/11/stand/powerpc/
 - copied from r329144, stable/11/sys/boot/powerpc/
  stable/11/stand/sparc64/
 - copied from r329144, stable/11/sys/boot/sparc64/
  stable/11/stand/uboot/
 - copied from r329144, stable/11/sys/boot/uboot/
  stable/11/stand/uboot.mk
 - copied unchanged from r329144, stable/11/sys/boot/uboot.mk
  stable/11/stand/usb/
 - copied from r329144, stable/11/sys/boot/usb/
  stable/11/stand/userboot/
 - copied from r329144, stable/11/sys/boot/userboot/
  stable/11/stand/zfs/
 - copied from r329144, stable/11/sys/boot/zfs/
  stable/11/stand/zfs32/
 - copied from r329144, stable/11/sys/boot/zfs32/
Deleted:
  stable/11/stand/userboot/ficl/
  stable/11/stand/userboot/libstand/
  stable/11/stand/userboot/zfs/
  stable/11/sys/boot/Makefile
  stable/11/sys/boot/Makefile.amd64
  stable/11/sys/boot/Makefile.arm
  stable/11/sys/boot/Makefile.arm64
  stable/11/sys/boot/Makefile.i386
  stable/11/sys/boot/Makefile.inc
  

Re: svn commit: r329137 - in head/sys/dev: mpr mps

2018-02-11 Thread Ian Lepore
On Sun, 2018-02-11 at 20:15 +, Scott Long wrote:
> Author: scottl
> Date: Sun Feb 11 20:15:47 2018
> New Revision: 329137
> URL: https://svnweb.freebsd.org/changeset/base/329137
> 
> Log:
>   Print out the shared memory queues during initialization
>   
>   Sponsored by:   Netflix
> 
> Modified:
>   head/sys/dev/mpr/mpr.c
>   head/sys/dev/mps/mps.c
> 

FYI, I'm getting several errors like this building for i386...

/b/staging/freebsd/head/src/sys/dev/mps/mps.c:1317:6: error: format
specifies type 'unsigned long' but the argument has type 'bus_addr_t'
(aka 'unsigned int') [-Werror,-Wformat]
sc->free_busaddr, fqsize);
^~~~
/b/staging/freebsd/head/src/sys/dev/mps/mpsvar.h:664:39: note: expanded
from macro 'mps_dprint'
device_printf((sc)->mps_dev, msg, ##args);  \
^~~~

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


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Rodney W. Grimes
[ Charset ISO-8859-1 unsupported, converting... ]
> On Sun, 2018-02-11 at 10:20 -0800, Conrad Meyer wrote:
> > On Sun, Feb 11, 2018 at 8:35 AM, Ian Lepore  wrote:
> > > 
> > > Author: ian
> > > Date: Sun Feb 11 16:35:56 2018
> > > New Revision: 329126
> > > URL: https://svnweb.freebsd.org/changeset/base/329126
> > > 
> > > Log:
> > > ? Regenerate devd/usb.conf after the recent addition of several new
> > > device IDs.
> > > 
> > > Modified:
> > > ? head/etc/devd/usb.conf
> > 
> > If this file is machine generated and not an administrator
> > configuration file, shouldn't it live in /usr/share instead of /etc,
> > per hier(7)?
> > 
> > Best,
> > Conrad
> > 
> 
> I wonder if that question would apply to all five files we put in
> /etc/devd? ?It looks like they could be moved to /usr/share with
> minimal fuss by adding that directory to the search list in
> /etc/devd.conf.

Moving this to /usr creates a cyclic issue in that you then need
/usr to be mounted before devd can start and devd's /etc/rc.d file
says:
# PROVIDE: devd
# REQUIRE: NETWORKING
# BEFORE: mountcritremote
# KEYWORD: nojail

In the diskless and nfs shared /usr worlds devd wants to start
before /usr is mounted.

> I'm agnostic about the value of moving them. ?Users can configure local
> rules by modifying the existing devd.conf and files in devd/ and
> dealing with mergemaster on updates, or by adding their own new files
> in devd/.

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


svn commit: r329144 - stable/11/sys/boot

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 22:38:16 2018
New Revision: 329144
URL: https://svnweb.freebsd.org/changeset/base/329144

Log:
  Re-sync loader.mk and ficl.mk to where they should be
  
  This is a direct commit to stable/11 due to changes lost during an MFC of a
  move.

Modified:
  stable/11/sys/boot/ficl.mk
  stable/11/sys/boot/loader.mk

Modified: stable/11/sys/boot/ficl.mk
==
--- stable/11/sys/boot/ficl.mk  Sun Feb 11 22:16:24 2018(r329143)
+++ stable/11/sys/boot/ficl.mk  Sun Feb 11 22:38:16 2018(r329144)
@@ -6,7 +6,7 @@
 
 .if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1
 FICL_CPUARCH=  i386
-.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+.elif ${MACHINE_ARCH:Mmips64*} != ""
 FICL_CPUARCH=  mips64
 .else
 FICL_CPUARCH=  ${MACHINE_CPUARCH}

Modified: stable/11/sys/boot/loader.mk
==
--- stable/11/sys/boot/loader.mkSun Feb 11 22:16:24 2018
(r329143)
+++ stable/11/sys/boot/loader.mkSun Feb 11 22:38:16 2018
(r329144)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${SRCTOP}/sys/boot/common ${SRCTOP}/sys/boot/libsa
+.include "defs.mk"
 
 .PATH: ${LDRSRC} ${BOOTSRC}/libsa
 
@@ -24,29 +24,19 @@ SRCS+=  load_elf32.c reloc_elf32.c
 SRCS+= load_elf64.c reloc_elf64.c
 .elif ${MACHINE_CPUARCH} == "sparc64"
 SRCS+= load_elf64.c reloc_elf64.c
-.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+.elif ${MACHINE_ARCH:Mmips64*} != ""
 SRCS+= load_elf64.c reloc_elf64.c
 .elif ${MACHINE} == "mips"
 SRCS+= load_elf32.c reloc_elf32.c
 .endif
 
-.if defined(LOADER_NET_SUPPORT)
-SRCS+= dev_net.c
+.if ${LOADER_DISK_SUPPORT:Uyes} == "yes"
+SRCS+= disk.c part.c
 .endif
 
-.if !defined(LOADER_NO_DISK_SUPPORT)
-SRCS+= disk.c part.c
-CFLAGS+= -DLOADER_DISK_SUPPORT
-.if !defined(LOADER_NO_GPT_SUPPORT)
-CFLAGS+= -DLOADER_GPT_SUPPORT
+.if ${LOADER_NET_SUPPORT:Uno} == "yes"
+SRCS+= dev_net.c
 .endif
-.if !defined(LOADER_NO_MBR_SUPPORT)
-CFLAGS+= -DLOADER_MBR_SUPPORT
-.endif
-.endif
-.if !defined(LOADER_NO_GELI_SUPPORT)
-CFLAGS+= -DLOADER_GELI_SUPPORT
-.endif
 
 .if defined(HAVE_BCACHE)
 SRCS+=  bcache.c
@@ -68,7 +58,7 @@ SRCS+=pnp.c
 .endif
 
 # Forth interpreter
-.if defined(MK_FORTH)
+.if ${MK_FORTH} != "no"
 SRCS+= interp_forth.c
 .include "${BOOTSRC}/ficl.mk"
 .endif
___
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: r329143 - stable/11/sys/boot

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 22:16:24 2018
New Revision: 329143
URL: https://svnweb.freebsd.org/changeset/base/329143

Log:
  Correct check: BOOT_FORTH is MK_FORTH in makefiles.
  
  This is a direct commit to stable/11.

Modified:
  stable/11/sys/boot/loader.mk

Modified: stable/11/sys/boot/loader.mk
==
--- stable/11/sys/boot/loader.mkSun Feb 11 22:09:07 2018
(r329142)
+++ stable/11/sys/boot/loader.mkSun Feb 11 22:16:24 2018
(r329143)
@@ -68,7 +68,7 @@ SRCS+=pnp.c
 .endif
 
 # Forth interpreter
-.if defined(BOOT_FORTH)
+.if defined(MK_FORTH)
 SRCS+= interp_forth.c
 .include "${BOOTSRC}/ficl.mk"
 .endif
___
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: r329142 - head/share/man/man9

2018-02-11 Thread Conrad Meyer
Author: cem
Date: Sun Feb 11 22:09:07 2018
New Revision: 329142
URL: https://svnweb.freebsd.org/changeset/base/329142

Log:
  device_add_child.9: reference logical opposite, device_delete_child(9)

Modified:
  head/share/man/man9/device_add_child.9

Modified: head/share/man/man9/device_add_child.9
==
--- head/share/man/man9/device_add_child.9  Sun Feb 11 21:09:00 2018
(r329141)
+++ head/share/man/man9/device_add_child.9  Sun Feb 11 22:09:07 2018
(r329142)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 15, 2017
+.Dd February 11, 2018
 .Dt DEVICE_ADD_CHILD 9
 .Os
 .Sh NAME
@@ -126,6 +126,7 @@ The new device if successful, NULL otherwise.
 .Sh SEE ALSO
 .Xr BUS_ADD_CHILD 9 ,
 .Xr device 9 ,
+.Xr device_delete_child 9 ,
 .Xr device_find_child 9 ,
 .Xr DEVICE_IDENTIFY 9
 .Sh AUTHORS
___
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: r329140 - in stable/11: . share/mk sys/arm/include sys/arm64/include sys/boot sys/boot/arm/at91 sys/boot/arm/at91/boot0 sys/boot/arm/at91/boot0iic sys/boot/arm/at91/boot0spi sys/boot/a

2018-02-11 Thread Kyle Evans
On Sun, Feb 11, 2018 at 2:58 PM, Kyle Evans  wrote:
> Author: kevans
> Date: Sun Feb 11 20:58:00 2018
> New Revision: 329140
> URL: https://svnweb.freebsd.org/changeset/base/329140
>
> Log:
>   MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654,
>   r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845,
>   r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980,
>   r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171,
>   r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332,
>   r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479,
>   r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685,
>   r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694,
>   r325743,r325744,r325748,r325775,r325779,r325780
>

Apologies for all of the breakage/cutting teeth in the last couple
hours of this process... A lot of things got moved around, and svn's
handling of merging commits that moved things isn't great considering
'svn mv' does a 'copy + delete old'. All of the cherry-picking that
we've done came back to haunt us as it tried to wipe out the
cherry-picked bits in the process.

We can now begin our downhill descent, as the next step is to move
everything from sys/boot to stand/ except for sys/boot/fdt/dts and
things should be easygoing from there.
___
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: r329140 - in stable/11: . share/mk sys/arm/include sys/arm64/include sys/boot sys/boot/arm/at91 sys/boot/arm/at91/boot0 sys/boot/arm/at91/boot0iic sys/boot/arm/at91/boot0spi sys/boot/ar...

2018-02-11 Thread Kyle Evans
 changed)

Modified: stable/11/UPDATING
==
--- stable/11/UPDATING  Sun Feb 11 20:47:38 2018(r329139)
+++ stable/11/UPDATING  Sun Feb 11 20:58:00 2018(r329140)
@@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20180211:
+   The LOADER_FIREWIRE_SUPPORT build variable as been renamed to
+   WITH/OUT_LOADER_FIREWIRE. LOADER_{NO_,}GELI_SUPPORT has been renamed
+   to WITH/OUT_LOADER_GELI.
+
 20180210:
The geli password typed at boot is now hidden.  To restore the previous
behavior, see geli(8) for configuration options.

Modified: stable/11/share/mk/src.opts.mk
==
--- stable/11/share/mk/src.opts.mk  Sun Feb 11 20:47:38 2018
(r329139)
+++ stable/11/share/mk/src.opts.mk  Sun Feb 11 20:58:00 2018
(r329140)
@@ -123,6 +123,7 @@ __DEFAULT_YES_OPTIONS = \
 LIB32 \
 LIBPTHREAD \
 LIBTHR \
+LOADER_GELI \
 LOCALES \
 LOCATE \
 LPR \
@@ -188,6 +189,7 @@ __DEFAULT_NO_OPTIONS = \
 HESIOD \
 LIBSOFT \
 LINT \
+LOADER_FIREWIRE \
 LOADER_FORCE_LE \
 NAND \
 OFED \

Modified: stable/11/sys/arm/include/metadata.h
==
--- stable/11/sys/arm/include/metadata.hSun Feb 11 20:47:38 2018
(r329139)
+++ stable/11/sys/arm/include/metadata.hSun Feb 11 20:58:00 2018
(r329140)
@@ -39,4 +39,19 @@ struct efi_map_header {
uint32_tdescriptor_version;
 };
 
+/*
+ * Placeholder for now
+ */
+struct efi_fb {
+   uint64_tfb_addr;
+   uint64_tfb_size;
+   uint32_tfb_height;
+   uint32_tfb_width;
+   uint32_tfb_stride;
+   uint32_tfb_mask_red;
+   uint32_tfb_mask_green;
+   uint32_tfb_mask_blue;
+   uint32_tfb_mask_reserved;
+};
+
 #endif /* !_MACHINE_METADATA_H_ */

Modified: stable/11/sys/arm64/include/metadata.h
==
--- stable/11/sys/arm64/include/metadata.h  Sun Feb 11 20:47:38 2018
(r329139)
+++ stable/11/sys/arm64/include/metadata.h  Sun Feb 11 20:58:00 2018
(r329140)
@@ -31,11 +31,24 @@
 
 #defineMODINFOMD_EFI_MAP   0x1001
 #defineMODINFOMD_DTBP  0x1002
+#defineMODINFOMD_EFI_FB0x1003
 
 struct efi_map_header {
size_t  memory_size;
size_t  descriptor_size;
uint32_tdescriptor_version;
+};
+
+struct efi_fb {
+   uint64_tfb_addr;
+   uint64_tfb_size;
+   uint32_tfb_height;
+   uint32_tfb_width;
+   uint32_tfb_stride;
+   uint32_tfb_mask_red;
+   uint32_tfb_mask_green;
+   uint32_tfb_mask_blue;
+   uint32_tfb_mask_reserved;
 };
 
 #endif /* !_MACHINE_METADATA_H_ */

Modified: stable/11/sys/boot/Makefile
==
--- stable/11/sys/boot/Makefile Sun Feb 11 20:47:38 2018(r329139)
+++ stable/11/sys/boot/Makefile Sun Feb 11 20:58:00 2018(r329140)
@@ -13,10 +13,8 @@ SUBDIR+= man
 
 .include 
 
-# Pick the machine-dependent subdir based on the target architecture.
-ADIR=  ${MACHINE:S/powerpc64/powerpc/}
-.if exists(${.CURDIR}/${ADIR}/.)
-SUBDIR+=   ${ADIR}
+.if exists(${.CURDIR}/${MACHINE}/.)
+SUBDIR+=   ${MACHINE}
 .endif
 
 .include 

Modified: stable/11/sys/boot/Makefile.amd64
==
--- stable/11/sys/boot/Makefile.amd64   Sun Feb 11 20:47:38 2018
(r329139)
+++ stable/11/sys/boot/Makefile.amd64   Sun Feb 11 20:58:00 2018
(r329140)
@@ -1,16 +1,18 @@
 # $FreeBSD$
 
-SUBDIR+=   efi
 SUBDIR+=   libsa32
-SUBDIR+=   zfs
-SUBDIR+=   userboot
-
-.if !defined(LOADER_NO_GELI_SUPPORT)
-SUBDIR+=   geli
+.if ${MK_ZFS} != "no"
+SUBDIR+=   zfs zfs32
 .endif
-
 .if ${MK_FORTH} != "no"
 SUBDIR+=   ficl32
+.endif
+
+SUBDIR+=   efi
+SUBDIR+=   userboot
+
+.if ${LOADER_GELI_SUPPORT:Uyes} == "yes"
+SUBDIR+=   geli
 .endif
 
 SUBDIR+=   i386

Modified: stable/11/sys/boot/Makefile.arm
==
--- stable/11/sys/boot/Makefile.arm Sun Feb 11 20:47:38 2018
(r329139)
+++ stable/11/sys/boot/Makefile.arm Sun Feb 11 20:58:00 2018
(r329140)
@@ -3,5 +3,8 @@
 .if ${MK_FDT} != "no"
 SUBDIR+=  

svn commit: r329138 - stable/11/sys/boot/libsa

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 20:35:14 2018
New Revision: 329138
URL: https://svnweb.freebsd.org/changeset/base/329138

Log:
  Fix paths after r329132
  
  This is a direct commit to stable/11 due to svn's handling of merging this
  move being less than ideal.

Modified:
  stable/11/sys/boot/libsa/Makefile

Modified: stable/11/sys/boot/libsa/Makefile
==
--- stable/11/sys/boot/libsa/Makefile   Sun Feb 11 20:15:47 2018
(r329137)
+++ stable/11/sys/boot/libsa/Makefile   Sun Feb 11 20:35:14 2018
(r329138)
@@ -14,13 +14,10 @@ MK_SSP= no
 
 LIBSTAND_SRC?= ${.CURDIR}
 LIBSTAND_CPUARCH?=${MACHINE_CPUARCH}
-LIBC_SRC=  ${LIBSTAND_SRC}/../libc
+LIBC_SRC=  ${SRCTOP_LIBC}/../libc
 
 LIB?=  sa
 NO_PIC=
-INCS?= stand.h
-MAN?=  libstand.3
-
 WARNS?=0
 
 CFLAGS+= -I${LIBSTAND_SRC}
@@ -58,14 +55,14 @@ CFLAGS.clang+=  -mno-movt
 CFLAGS.clang+= -mfpu=none
 
 # Compiler support functions
-.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/
+.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/
 # __clzsi2 and ctzsi2 for various builtin functions
 SRCS+= clzsi2.c ctzsi2.c
 # Divide and modulus functions called by the compiler
 SRCS+=  divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
 SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
 
-.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/
+.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm/
 SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
 SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
 .endif
@@ -91,7 +88,7 @@ SRCS+=_setjmp.S
 # decompression functionality from libbz2
 # NOTE: to actually test this functionality after libbz2 upgrade compile
 # loader(8) with LOADER_BZIP2_SUPPORT defined
-.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2
+.PATH: ${SRCTOP}/contrib/bzip2
 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
 SRCS+= libstand_bzlib_private.h
 
@@ -110,7 +107,7 @@ libstand_bzlib_private.h: bzlib_private.h
${.ALLSRC} > ${.TARGET}
 
 # decompression functionality from zlib
-.PATH: ${LIBSTAND_SRC}/../../contrib/zlib
+.PATH: ${SRCTOP}/contrib/zlib
 CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../../contrib/zlib
 SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h
 
___
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: r329137 - in head/sys/dev: mpr mps

2018-02-11 Thread Scott Long
Author: scottl
Date: Sun Feb 11 20:15:47 2018
New Revision: 329137
URL: https://svnweb.freebsd.org/changeset/base/329137

Log:
  Print out the shared memory queues during initialization
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/mpr/mpr.c
  head/sys/dev/mps/mps.c

Modified: head/sys/dev/mpr/mpr.c
==
--- head/sys/dev/mpr/mpr.c  Sun Feb 11 20:06:36 2018(r329136)
+++ head/sys/dev/mpr/mpr.c  Sun Feb 11 20:15:47 2018(r329137)
@@ -1356,6 +1356,10 @@ mpr_alloc_hw_queues(struct mpr_softc *sc)
sc->free_busaddr = queues_busaddr;
sc->post_queue = (MPI2_REPLY_DESCRIPTORS_UNION *)(queues + fqsize);
sc->post_busaddr = queues_busaddr + fqsize;
+   mpr_dprint(sc, MPR_INIT, "free queue busaddr= %#016lx size= %d\n",
+   sc->free_busaddr, fqsize);
+   mpr_dprint(sc, MPR_INIT, "reply queue busaddr= %#016lx size= %d\n",
+   sc->post_busaddr, pqsize);
 
return (0);
 }
@@ -1398,6 +1402,8 @@ mpr_alloc_replies(struct mpr_softc *sc)
 bzero(sc->reply_frames, rsize);
 bus_dmamap_load(sc->reply_dmat, sc->reply_map, sc->reply_frames, rsize,
mpr_memaddr_cb, >reply_busaddr, 0);
+   mpr_dprint(sc, MPR_INIT, "reply frames busaddr= %#016lx size= %d\n",
+   sc->reply_busaddr, rsize);
 
return (0);
 }
@@ -1432,6 +1438,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
 bzero(sc->req_frames, rsize);
 bus_dmamap_load(sc->req_dmat, sc->req_map, sc->req_frames, rsize,
mpr_memaddr_cb, >req_busaddr, 0);
+   mpr_dprint(sc, MPR_INIT, "request frames busaddr= %#016lx size= %d\n",
+   sc->req_busaddr, rsize);
 
rsize = sc->chain_frame_size * sc->num_chains;
 if (bus_dma_tag_create( sc->mpr_parent_dmat,/* parent */
@@ -1456,6 +1464,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
 bzero(sc->chain_frames, rsize);
 bus_dmamap_load(sc->chain_dmat, sc->chain_map, sc->chain_frames, rsize,
mpr_memaddr_cb, >chain_busaddr, 0);
+   mpr_dprint(sc, MPR_INIT, "chain frames busaddr= %#016lx size= %d\n",
+   sc->chain_busaddr, rsize);
 
rsize = MPR_SENSE_LEN * sc->num_reqs;
if (bus_dma_tag_create( sc->mpr_parent_dmat,/* parent */
@@ -1480,6 +1490,8 @@ mpr_alloc_requests(struct mpr_softc *sc)
 bzero(sc->sense_frames, rsize);
 bus_dmamap_load(sc->sense_dmat, sc->sense_map, sc->sense_frames, rsize,
mpr_memaddr_cb, >sense_busaddr, 0);
+   mpr_dprint(sc, MPR_INIT, "sense frames busaddr= %#016lx size= %d\n",
+   sc->sense_busaddr, rsize);
 
sc->chains = malloc(sizeof(struct mpr_chain) * sc->num_chains, M_MPR,
M_WAITOK | M_ZERO);

Modified: head/sys/dev/mps/mps.c
==
--- head/sys/dev/mps/mps.c  Sun Feb 11 20:06:36 2018(r329136)
+++ head/sys/dev/mps/mps.c  Sun Feb 11 20:15:47 2018(r329137)
@@ -1313,6 +1313,10 @@ mps_alloc_hw_queues(struct mps_softc *sc)
sc->free_busaddr = queues_busaddr;
sc->post_queue = (MPI2_REPLY_DESCRIPTORS_UNION *)(queues + fqsize);
sc->post_busaddr = queues_busaddr + fqsize;
+   mps_dprint(sc, MPS_INIT, "free queue busaddr= %#016lx size= %d\n",
+   sc->free_busaddr, fqsize);
+   mps_dprint(sc, MPS_INIT, "reply queue busaddr= %#016lx size= %d\n",
+   sc->post_busaddr, pqsize);
 
return (0);
 }
@@ -1356,6 +1360,9 @@ mps_alloc_replies(struct mps_softc *sc)
 bus_dmamap_load(sc->reply_dmat, sc->reply_map, sc->reply_frames, rsize,
mps_memaddr_cb, >reply_busaddr, 0);
 
+   mps_dprint(sc, MPS_INIT, "reply frames busaddr= %#016lx size= %d\n",
+   sc->reply_busaddr, rsize);
+
return (0);
 }
 
@@ -1389,6 +1396,8 @@ mps_alloc_requests(struct mps_softc *sc)
 bzero(sc->req_frames, rsize);
 bus_dmamap_load(sc->req_dmat, sc->req_map, sc->req_frames, rsize,
mps_memaddr_cb, >req_busaddr, 0);
+   mps_dprint(sc, MPS_INIT, "request frames busaddr= %#016lx size= %d\n",
+   sc->req_busaddr, rsize);
 
rsize = sc->reqframesz * sc->num_chains;
 if (bus_dma_tag_create( sc->mps_parent_dmat,/* parent */
@@ -1413,6 +1422,8 @@ mps_alloc_requests(struct mps_softc *sc)
 bzero(sc->chain_frames, rsize);
 bus_dmamap_load(sc->chain_dmat, sc->chain_map, sc->chain_frames, rsize,
mps_memaddr_cb, >chain_busaddr, 0);
+   mps_dprint(sc, MPS_INIT, "chain frames busaddr= %#016lx size= %d\n",
+   sc->chain_busaddr, rsize);
 
rsize = MPS_SENSE_LEN * sc->num_reqs;
 if (bus_dma_tag_create( sc->mps_parent_dmat,/* parent */
@@ -1437,6 +1448,8 @@ mps_alloc_requests(struct mps_softc *sc)
 bzero(sc->sense_frames, rsize);
 bus_dmamap_load(sc->sense_dmat, sc->sense_map, sc->sense_frames, rsize,
 

svn commit: r329136 - in stable/11/sys/boot: . common efi/libefi ficl

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 20:06:36 2018
New Revision: 329136
URL: https://svnweb.freebsd.org/changeset/base/329136

Log:
  MFC r324648: Rename top level Makefile.ficl to ficl.mk.

Added:
  stable/11/sys/boot/ficl.mk
 - copied unchanged from r329135, stable/11/sys/boot/Makefile.ficl
Deleted:
  stable/11/sys/boot/Makefile.ficl
Modified:
  stable/11/sys/boot/common/Makefile.inc
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/ficl/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/common/Makefile.inc
==
--- stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 20:04:34 2018
(r329135)
+++ stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 20:06:36 2018
(r329136)
@@ -66,7 +66,7 @@ SRCS+=pnp.c
 # Forth interpreter
 .if defined(BOOT_FORTH)
 SRCS+= interp_forth.c
-.include "${SRCTOP}/sys/boot/Makefile.ficl"
+.include "../ficl.mk"
 .endif
 
 .if defined(BOOT_PROMPT_123)

Modified: stable/11/sys/boot/efi/libefi/Makefile
==
--- stable/11/sys/boot/efi/libefi/Makefile  Sun Feb 11 20:04:34 2018
(r329135)
+++ stable/11/sys/boot/efi/libefi/Makefile  Sun Feb 11 20:06:36 2018
(r329136)
@@ -4,7 +4,7 @@
 
 .if ${MK_FORTH} != "no"
 CFLAGS+= -DBOOT_FORTH
-.include "${.CURDIR}/../../Makefile.ficl"
+.include   "../../ficl.mk"
 .endif
 
 LIB=   efi

Copied: stable/11/sys/boot/ficl.mk (from r329135, 
stable/11/sys/boot/Makefile.ficl)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/11/sys/boot/ficl.mk  Sun Feb 11 20:06:36 2018(r329136, copy 
of r329135, stable/11/sys/boot/Makefile.ficl)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+# Common flags to build FICL related files
+
+FICLDIR?=  ${SRCTOP}/sys/boot/ficl
+
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
+FICL_CPUARCH=  i386
+.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+FICL_CPUARCH=  mips64
+.else
+FICL_CPUARCH=  ${MACHINE_CPUARCH}
+.endif
+
+.PATH: ${FICLDIR} ${FICLDIR}/${FICL_CPUARCH}
+
+.if ${MACHINE_CPUARCH} == "amd64"
+.if defined(FICL32)
+CFLAGS+=   -m32 -I.
+.else
+CFLAGS+=   -fPIC
+.endif
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc64"
+CFLAGS+=   -m32 -mcpu=powerpc -I.
+.endif
+
+CFLAGS+=   -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
+   -I${FICLDIR}/../common
+
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
+.if !exists(machine)
+${SRCS:M*.c:R:S/$/.o/g}: machine
+
+beforedepend ${OBJS}: machine
+.endif
+
+machine: .NOMETA
+   ln -sf ${.CURDIR}/../../i386/include machine
+
+CLEANFILES+=   machine
+.endif

Modified: stable/11/sys/boot/ficl/Makefile
==
--- stable/11/sys/boot/ficl/MakefileSun Feb 11 20:04:34 2018
(r329135)
+++ stable/11/sys/boot/ficl/MakefileSun Feb 11 20:06:36 2018
(r329136)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 #
 
-.include   "${.CURDIR}/../Makefile.ficl"
+.include   "../ficl.mk"
 
 BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
prefix.c search.c stack.c tools.c vm.c words.c
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r329135 - in stable/11/sys/boot: . arm/uboot common efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/i386 libsa man mips/uboot powerpc/ofw powerpc/uboot

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 20:04:34 2018
New Revision: 329135
URL: https://svnweb.freebsd.org/changeset/base/329135

Log:
  MFC Loader Fixes 2017q4p5: r324557,r324558,r324559,r324646,r324647
  
  r324557: Rename exit to efi_exit to avoid clashing with libsa exit
  definition
  
  r324558: Define prototype for exit and ensure references
  
  r324559: Move panic back into libsa. It's documented in libstand(3) to
  belong there.
  
  r324646: Unify boot1 with loader.
  
  r324647: Move orphaned man pages into new man directory from common.

Added:
  stable/11/sys/boot/efi/libefi/efi_main.c
 - copied unchanged from r324646, head/sys/boot/efi/libefi/efi_main.c
  stable/11/sys/boot/libsa/panic.c
 - copied unchanged from r324559, head/sys/boot/libsa/panic.c
  stable/11/sys/boot/man/
 - copied from r324647, head/sys/boot/man/
Deleted:
  stable/11/sys/boot/common/Makefile
  stable/11/sys/boot/common/loader.8
  stable/11/sys/boot/common/panic.c
  stable/11/sys/boot/common/zfsloader.8
  stable/11/sys/boot/efi/boot1/boot_module.h
  stable/11/sys/boot/efi/boot1/ufs_module.c
  stable/11/sys/boot/efi/boot1/zfs_module.c
  stable/11/sys/boot/efi/loader/efi_main.c
Modified:
  stable/11/sys/boot/Makefile
  stable/11/sys/boot/arm/uboot/conf.c
  stable/11/sys/boot/common/Makefile.inc
  stable/11/sys/boot/efi/boot1/Makefile
  stable/11/sys/boot/efi/boot1/boot1.c
  stable/11/sys/boot/efi/include/efilib.h
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/efi/loader/Makefile
  stable/11/sys/boot/efi/loader/arch/i386/exec.c
  stable/11/sys/boot/libsa/Makefile
  stable/11/sys/boot/libsa/stand.h
  stable/11/sys/boot/mips/uboot/conf.c
  stable/11/sys/boot/powerpc/ofw/conf.c
  stable/11/sys/boot/powerpc/uboot/conf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/Makefile
==
--- stable/11/sys/boot/Makefile Sun Feb 11 20:00:26 2018(r329134)
+++ stable/11/sys/boot/Makefile Sun Feb 11 20:04:34 2018(r329135)
@@ -9,7 +9,7 @@ SUBDIR+=ficl
 SUBDIR+=   forth
 .endif
 
-SUBDIR+=   common
+SUBDIR+=   man
 
 .include 
 

Modified: stable/11/sys/boot/arm/uboot/conf.c
==
--- stable/11/sys/boot/arm/uboot/conf.c Sun Feb 11 20:00:26 2018
(r329134)
+++ stable/11/sys/boot/arm/uboot/conf.c Sun Feb 11 20:04:34 2018
(r329135)
@@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$");
 #include "dev_net.h"
 #endif
 
+/* Make sure we have an explicit reference to exit so libsa's panic pulls in 
the MD exit */
+void (*exitfn)(int) = exit;
+
 struct devsw *devsw[] = {
 #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT)
_storage,

Modified: stable/11/sys/boot/common/Makefile.inc
==
--- stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 20:00:26 2018
(r329134)
+++ stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 20:04:34 2018
(r329135)
@@ -4,7 +4,7 @@
 
 SRCS+= boot.c commands.c console.c devopen.c interp.c 
 SRCS+= interp_backslash.c interp_parse.c ls.c misc.c 
-SRCS+= module.c panic.c
+SRCS+= module.c
 
 .if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64"
 SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c

Modified: stable/11/sys/boot/efi/boot1/Makefile
==
--- stable/11/sys/boot/efi/boot1/Makefile   Sun Feb 11 20:00:26 2018
(r329134)
+++ stable/11/sys/boot/efi/boot1/Makefile   Sun Feb 11 20:04:34 2018
(r329135)
@@ -8,8 +8,11 @@ MK_SSP=no
 
 PROG=  boot1.sym
 INTERNALPROG=
-WARNS?=6
+WARNS?=3
 
+# Include bcache code.
+HAVE_BCACHE=yes
+
 # We implement a slightly non-standard %S in that it always takes a
 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
 # seems to matter on arm64 where wchar_t defaults to an int instead
@@ -18,13 +21,15 @@ WARNS?= 6
 CWARNFLAGS.boot1.c+=   -Wno-format
 
 # Disable warnings that are currently incompatible with the zfs boot code
-CWARNFLAGS.zfs_module.c += -Wno-array-bounds
-CWARNFLAGS.zfs_module.c += -Wno-cast-align
-CWARNFLAGS.zfs_module.c += -Wno-cast-qual
-CWARNFLAGS.zfs_module.c += -Wno-missing-prototypes
-CWARNFLAGS.zfs_module.c += -Wno-sign-compare
-CWARNFLAGS.zfs_module.c += -Wno-unused-parameter
-CWARNFLAGS.zfs_module.c += -Wno-unused-function
+CWARNFLAGS.zfs.c += -Wno-incompatible-pointer-types-discards-qualifiers
+CWARNFLAGS.zfs.c += -Wno-missing-variable-declarations
+CWARNFLAGS.zfs.c += -Wno-array-bounds
+CWARNFLAGS.zfs.c += -Wno-cast-align
+CWARNFLAGS.zfs.c += -Wno-cast-qual
+CWARNFLAGS.zfs.c += -Wno-missing-prototypes
+CWARNFLAGS.zfs.c += -Wno-sign-compare
+CWARNFLAGS.zfs.c += -Wno-unused-parameter

svn commit: r329134 - in stable/11/sys/boot: . common efi/boot1 i386/gptboot i386/gptzfsboot i386/zfsboot libsa libsa32 libstand32 powerpc/boot1.chrp sparc64/boot1 uboot/lib userboot userboot/libst...

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 20:00:26 2018
New Revision: 329134
URL: https://svnweb.freebsd.org/changeset/base/329134

Log:
  MFC Loader Fixes 2017q4p4: r324552,r324553,r324554,r324555,r324556
  
  r324552: Kill the userboot copy of libstand.
  
  r324553: Rename libstand.a to libsa.a and libstand32.a to libsa32.a
  
  r324554: Move crc32.c, util.c and gpt.c over to libsa.
  
  r324555: Honor CFLAGS modifications in Makefile.inc by using += here.
  
  r324556: Move ufsread.c

Added:
  stable/11/sys/boot/libsa/crc32.c
 - copied unchanged from r324554, head/sys/boot/libsa/crc32.c
  stable/11/sys/boot/libsa/crc32.h
 - copied unchanged from r324554, head/sys/boot/libsa/crc32.h
  stable/11/sys/boot/libsa/gpt.c
 - copied unchanged from r324554, head/sys/boot/libsa/gpt.c
  stable/11/sys/boot/libsa/gpt.h
 - copied unchanged from r324554, head/sys/boot/libsa/gpt.h
  stable/11/sys/boot/libsa/ufsread.c
 - copied unchanged from r329133, stable/11/sys/boot/common/ufsread.c
  stable/11/sys/boot/libsa/util.c
 - copied unchanged from r324554, head/sys/boot/libsa/util.c
  stable/11/sys/boot/libsa/util.h
 - copied unchanged from r324554, head/sys/boot/libsa/util.h
  stable/11/sys/boot/libsa32/
 - copied from r324553, head/sys/boot/libsa32/
Deleted:
  stable/11/sys/boot/common/crc32.c
  stable/11/sys/boot/common/crc32.h
  stable/11/sys/boot/common/gpt.c
  stable/11/sys/boot/common/gpt.h
  stable/11/sys/boot/common/ufsread.c
  stable/11/sys/boot/common/util.c
  stable/11/sys/boot/common/util.h
  stable/11/sys/boot/libstand32/
  stable/11/sys/boot/userboot/libstand/Makefile
  stable/11/sys/boot/userboot/libstand/Makefile.depend
Modified:
  stable/11/sys/boot/Makefile.amd64
  stable/11/sys/boot/Makefile.i386
  stable/11/sys/boot/Makefile.inc
  stable/11/sys/boot/Makefile.powerpc
  stable/11/sys/boot/common/Makefile.inc
  stable/11/sys/boot/efi/boot1/Makefile
  stable/11/sys/boot/i386/gptboot/Makefile
  stable/11/sys/boot/i386/gptzfsboot/Makefile
  stable/11/sys/boot/i386/zfsboot/Makefile
  stable/11/sys/boot/libsa/Makefile
  stable/11/sys/boot/powerpc/boot1.chrp/Makefile
  stable/11/sys/boot/sparc64/boot1/Makefile
  stable/11/sys/boot/uboot/lib/Makefile
  stable/11/sys/boot/userboot/Makefile
  stable/11/sys/boot/userboot/userboot/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/Makefile.amd64
==
--- stable/11/sys/boot/Makefile.amd64   Sun Feb 11 19:54:21 2018
(r329133)
+++ stable/11/sys/boot/Makefile.amd64   Sun Feb 11 20:00:26 2018
(r329134)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
-SUBDIR+=   libstand32
+SUBDIR+=   libsa32
 SUBDIR+=   zfs
 SUBDIR+=   userboot
 

Modified: stable/11/sys/boot/Makefile.i386
==
--- stable/11/sys/boot/Makefile.i386Sun Feb 11 19:54:21 2018
(r329133)
+++ stable/11/sys/boot/Makefile.i386Sun Feb 11 20:00:26 2018
(r329134)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
-SUBDIR+=   libstand32
+SUBDIR+=   libsa32
 SUBDIR+=   zfs
 
 .if !defined(LOADER_NO_GELI_SUPPORT)

Modified: stable/11/sys/boot/Makefile.inc
==
--- stable/11/sys/boot/Makefile.inc Sun Feb 11 19:54:21 2018
(r329133)
+++ stable/11/sys/boot/Makefile.inc Sun Feb 11 20:00:26 2018
(r329134)
@@ -5,13 +5,11 @@
 .if !defined(__BOOT_MAKEFILE_INC__)
 __BOOT_MAKEFILE_INC__=${MFILE}
 
-SASRC=${SRCTOP}/lib/libstand
-# Normal standalone library
-LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a
+SASRC=${SRCTOP}/sys/boot/libsa
+# Normal Standalone library
+LIBSA=${OBJTOP}/sys/boot/libsa/libsa.a
 # Standalone library compiled for 32-bit version of the processor
-LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
-# Standalone library compiled for userboot
-LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
+LIBSA32=${OBJTOP}/sys/boot/libsa32/libsa32.a
 
 CFLAGS+=-I${SASRC}
 

Modified: stable/11/sys/boot/Makefile.powerpc
==
--- stable/11/sys/boot/Makefile.powerpc Sun Feb 11 19:54:21 2018
(r329133)
+++ stable/11/sys/boot/Makefile.powerpc Sun Feb 11 20:00:26 2018
(r329134)
@@ -4,6 +4,6 @@
 SUBDIR+=   fdt
 .endif
 
-SUBDIR+=   libstand32
+SUBDIR+=   libsa32
 SUBDIR+=   ofw
 SUBDIR+=   uboot

Modified: stable/11/sys/boot/common/Makefile.inc
==
--- stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 19:54:21 2018
(r329133)
+++ stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 20:00:26 2018
(r329134)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.PATH: 

svn commit: r329132 - in stable/11: lib/libstand sys/boot/libsa sys/boot/libsa/amd64 sys/boot/libsa/i386 sys/boot/libsa/mips sys/boot/libsa/powerpc sys/boot/libsa/sparc64

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 19:51:29 2018
New Revision: 329132
URL: https://svnweb.freebsd.org/changeset/base/329132

Log:
  MFC r324551: Move lib/libstand to sys/boot/libsa

Added:
  stable/11/sys/boot/libsa/Makefile.depend
 - copied unchanged from r329131, stable/11/lib/libstand/Makefile.depend
  stable/11/sys/boot/libsa/__main.c
 - copied unchanged from r329131, stable/11/lib/libstand/__main.c
  stable/11/sys/boot/libsa/amd64/
 - copied from r329131, stable/11/lib/libstand/amd64/
  stable/11/sys/boot/libsa/arp.c
 - copied unchanged from r329131, stable/11/lib/libstand/arp.c
  stable/11/sys/boot/libsa/assert.c
 - copied unchanged from r329131, stable/11/lib/libstand/assert.c
  stable/11/sys/boot/libsa/bcd.c
 - copied unchanged from r329131, stable/11/lib/libstand/bcd.c
  stable/11/sys/boot/libsa/bootp.c
 - copied unchanged from r329131, stable/11/lib/libstand/bootp.c
  stable/11/sys/boot/libsa/bootp.h
 - copied unchanged from r329131, stable/11/lib/libstand/bootp.h
  stable/11/sys/boot/libsa/bootparam.c
 - copied unchanged from r329131, stable/11/lib/libstand/bootparam.c
  stable/11/sys/boot/libsa/bootparam.h
 - copied unchanged from r329131, stable/11/lib/libstand/bootparam.h
  stable/11/sys/boot/libsa/bzipfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/bzipfs.c
  stable/11/sys/boot/libsa/cd9660.c
 - copied unchanged from r329131, stable/11/lib/libstand/cd9660.c
  stable/11/sys/boot/libsa/close.c
 - copied unchanged from r329131, stable/11/lib/libstand/close.c
  stable/11/sys/boot/libsa/closeall.c
 - copied unchanged from r329131, stable/11/lib/libstand/closeall.c
  stable/11/sys/boot/libsa/dev.c
 - copied unchanged from r329131, stable/11/lib/libstand/dev.c
  stable/11/sys/boot/libsa/dosfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/dosfs.c
  stable/11/sys/boot/libsa/dosfs.h
 - copied unchanged from r329131, stable/11/lib/libstand/dosfs.h
  stable/11/sys/boot/libsa/environment.c
 - copied unchanged from r329131, stable/11/lib/libstand/environment.c
  stable/11/sys/boot/libsa/ether.c
 - copied unchanged from r329131, stable/11/lib/libstand/ether.c
  stable/11/sys/boot/libsa/ext2fs.c
 - copied unchanged from r329131, stable/11/lib/libstand/ext2fs.c
  stable/11/sys/boot/libsa/fstat.c
 - copied unchanged from r329131, stable/11/lib/libstand/fstat.c
  stable/11/sys/boot/libsa/getopt.c
 - copied unchanged from r329131, stable/11/lib/libstand/getopt.c
  stable/11/sys/boot/libsa/gets.c
 - copied unchanged from r329131, stable/11/lib/libstand/gets.c
  stable/11/sys/boot/libsa/globals.c
 - copied unchanged from r329131, stable/11/lib/libstand/globals.c
  stable/11/sys/boot/libsa/gzipfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/gzipfs.c
  stable/11/sys/boot/libsa/i386/
 - copied from r329131, stable/11/lib/libstand/i386/
  stable/11/sys/boot/libsa/in_cksum.c
 - copied unchanged from r329131, stable/11/lib/libstand/in_cksum.c
  stable/11/sys/boot/libsa/inet_ntoa.c
 - copied unchanged from r329131, stable/11/lib/libstand/inet_ntoa.c
  stable/11/sys/boot/libsa/ioctl.c
 - copied unchanged from r329131, stable/11/lib/libstand/ioctl.c
  stable/11/sys/boot/libsa/iodesc.h
 - copied unchanged from r329131, stable/11/lib/libstand/iodesc.h
  stable/11/sys/boot/libsa/ip.c
 - copied unchanged from r329131, stable/11/lib/libstand/ip.c
  stable/11/sys/boot/libsa/libstand.3
 - copied unchanged from r329131, stable/11/lib/libstand/libstand.3
  stable/11/sys/boot/libsa/lseek.c
 - copied unchanged from r329131, stable/11/lib/libstand/lseek.c
  stable/11/sys/boot/libsa/mips/
 - copied from r329131, stable/11/lib/libstand/mips/
  stable/11/sys/boot/libsa/nandfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/nandfs.c
  stable/11/sys/boot/libsa/net.c
 - copied unchanged from r329131, stable/11/lib/libstand/net.c
  stable/11/sys/boot/libsa/net.h
 - copied unchanged from r329131, stable/11/lib/libstand/net.h
  stable/11/sys/boot/libsa/netif.c
 - copied unchanged from r329131, stable/11/lib/libstand/netif.c
  stable/11/sys/boot/libsa/netif.h
 - copied unchanged from r329131, stable/11/lib/libstand/netif.h
  stable/11/sys/boot/libsa/nfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/nfs.c
  stable/11/sys/boot/libsa/nfsv2.h
 - copied unchanged from r329131, stable/11/lib/libstand/nfsv2.h
  stable/11/sys/boot/libsa/nullfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/nullfs.c
  stable/11/sys/boot/libsa/open.c
 - copied unchanged from r329131, stable/11/lib/libstand/open.c
  stable/11/sys/boot/libsa/pager.c
 - copied unchanged from r329131, stable/11/lib/libstand/pager.c
  stable/11/sys/boot/libsa/pkgfs.c
 - copied unchanged from r329131, stable/11/lib/libstand/pkgfs.c
  stable/11/sys/boot/libsa/powerpc/
 - copied from r329131, stable/11/lib/libstand/powerpc/
  

svn commit: r329131 - in stable/11/sys/boot: . arm/uboot common efi/fdt efi/libefi efi/loader fdt i386/libfirewire i386/libi386 i386/loader mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw po...

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 19:35:42 2018
New Revision: 329131
URL: https://svnweb.freebsd.org/changeset/base/329131

Log:
  MFC Loader Fixes 2017q4p3: r324460,r324471
  
  r324460: Rather than laying whack-a-mole with including the path to stand.h,
  always include it.
  
  r324471: Fix typos: `stand alon{e,g}` should be spelled like `standalone`

Modified:
  stable/11/sys/boot/Makefile.ficl
  stable/11/sys/boot/Makefile.inc
  stable/11/sys/boot/arm/uboot/Makefile
  stable/11/sys/boot/common/Makefile.inc
  stable/11/sys/boot/efi/fdt/Makefile
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/efi/loader/Makefile
  stable/11/sys/boot/fdt/Makefile
  stable/11/sys/boot/i386/libfirewire/Makefile
  stable/11/sys/boot/i386/libi386/Makefile
  stable/11/sys/boot/i386/loader/Makefile
  stable/11/sys/boot/mips/beri/boot2/Makefile
  stable/11/sys/boot/mips/beri/loader/Makefile
  stable/11/sys/boot/mips/uboot/Makefile
  stable/11/sys/boot/ofw/libofw/Makefile
  stable/11/sys/boot/powerpc/kboot/Makefile
  stable/11/sys/boot/powerpc/ofw/Makefile
  stable/11/sys/boot/powerpc/ps3/Makefile
  stable/11/sys/boot/powerpc/uboot/Makefile
  stable/11/sys/boot/sparc64/loader/Makefile
  stable/11/sys/boot/uboot/fdt/Makefile
  stable/11/sys/boot/uboot/lib/Makefile
  stable/11/sys/boot/userboot/userboot/Makefile
  stable/11/sys/boot/zfs/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/Makefile.ficl
==
--- stable/11/sys/boot/Makefile.ficlSun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/Makefile.ficlSun Feb 11 19:35:42 2018
(r329131)
@@ -27,7 +27,7 @@ CFLAGS+=  -m32 -mcpu=powerpc -I.
 .endif
 
 CFLAGS+=   -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
-   -I${FICLDIR}/../common -I${SASRC}
+   -I${FICLDIR}/../common
 
 .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
 .if !exists(machine)

Modified: stable/11/sys/boot/Makefile.inc
==
--- stable/11/sys/boot/Makefile.inc Sun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/Makefile.inc Sun Feb 11 19:35:42 2018
(r329131)
@@ -6,12 +6,14 @@
 __BOOT_MAKEFILE_INC__=${MFILE}
 
 SASRC=${SRCTOP}/lib/libstand
-# Normal stand alone library
+# Normal standalone library
 LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a
-# stand alone library compiled for 32-bit version of the processor
+# Standalone library compiled for 32-bit version of the processor
 LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
-# stand along library compiled for userboot
+# Standalone library compiled for userboot
 LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
+
+CFLAGS+=-I${SASRC}
 
 SSP_CFLAGS=
 

Modified: stable/11/sys/boot/arm/uboot/Makefile
==
--- stable/11/sys/boot/arm/uboot/Makefile   Sun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/arm/uboot/Makefile   Sun Feb 11 19:35:42 2018
(r329131)
@@ -112,8 +112,6 @@ LIBUBOOT=   ${.OBJDIR}/../../uboot/lib/libuboot.a
 CFLAGS+=   -I${.CURDIR}/../../uboot/lib
 CFLAGS+=   -I${.OBJDIR}/../../uboot/lib
 
-CFLAGS+=   -I${SASRC}
-
 CFLAGS+=   -fPIC
 
 # clang doesn't understand %D as a specifier to printf

Modified: stable/11/sys/boot/common/Makefile.inc
==
--- stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/common/Makefile.inc  Sun Feb 11 19:35:42 2018
(r329131)
@@ -74,7 +74,6 @@ CFLAGS+=  -DBOOT_PROMPT_123
 
 .if defined(LOADER_INSTALL_SUPPORT)
 SRCS+= install.c
-CFLAGS+=-I${SASRC}
 .endif
 
 CLEANFILES+=   vers.c

Modified: stable/11/sys/boot/efi/fdt/Makefile
==
--- stable/11/sys/boot/efi/fdt/Makefile Sun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/efi/fdt/Makefile Sun Feb 11 19:35:42 2018
(r329131)
@@ -17,8 +17,6 @@ CFLAGS+=  -mgeneral-regs-only
 CFLAGS+=   -msoft-float
 .endif
 
-CFLAGS+=   -I${SASRC}
-
 # EFI library headers
 CFLAGS+=   -I${.CURDIR}/../include
 CFLAGS+=   -I${.CURDIR}/../include/${MACHINE}

Modified: stable/11/sys/boot/efi/libefi/Makefile
==
--- stable/11/sys/boot/efi/libefi/Makefile  Sun Feb 11 19:33:24 2018
(r329130)
+++ stable/11/sys/boot/efi/libefi/Makefile  Sun Feb 11 19:35:42 2018
(r329131)
@@ -37,7 +37,6 @@ CFLAGS+= -fPIC -mno-red-zone
 .endif
 CFLAGS+= -I${.CURDIR}/../include
 CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
-CFLAGS+= -I${SASRC}
 .if ${MK_ZFS} != "no"
 CFLAGS+=   -I${.CURDIR}/../../zfs
 CFLAGS+=   -I${.CURDIR}/../../../cddl/boot/zfs

Modified: 

svn commit: r329130 - in stable/11: . lib share/mk sys/boot sys/boot/libsa

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 19:33:24 2018
New Revision: 329130
URL: https://svnweb.freebsd.org/changeset/base/329130

Log:
  MFC Loader Fixes 2017q4p2: r324453, r324454
  
  r324453: Create sys/boot/libsa and build libstand.a there
  
  r324454: Disconnect libstand from the build.

Added:
  stable/11/sys/boot/libsa/
 - copied from r324453, head/sys/boot/libsa/
Modified:
  stable/11/ObsoleteFiles.inc
  stable/11/lib/Makefile
  stable/11/share/mk/bsd.libnames.mk
  stable/11/sys/boot/Makefile
  stable/11/sys/boot/Makefile.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/ObsoleteFiles.inc
==
--- stable/11/ObsoleteFiles.inc Sun Feb 11 19:29:58 2018(r329129)
+++ stable/11/ObsoleteFiles.inc Sun Feb 11 19:33:24 2018(r329130)
@@ -38,6 +38,11 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180222: Remove libstand
+OLD_FILES+=usr/lib/libstand.a
+OLD_FILES+=usr/lib/libstand_p.a
+OLD_FILES+=usr/include/stand.h
+OLD_FILES+=usr/share/man/man3/libstand.3
 # 20180202: Convert geli(8) tests to ATF
 OLD_FILES+=tests/sys/geom/class/eli/nokey_test.sh
 OLD_FILES+=tests/sys/geom/class/eli/readonly_test.sh

Modified: stable/11/lib/Makefile
==
--- stable/11/lib/Makefile  Sun Feb 11 19:29:58 2018(r329129)
+++ stable/11/lib/Makefile  Sun Feb 11 19:33:24 2018(r329130)
@@ -98,7 +98,6 @@ SUBDIR=   ${SUBDIR_BOOTSTRAP} \
${_libsmdb} \
${_libsmutil} \
libsqlite3 \
-   libstand \
libstdbuf \
libstdthreads \
libsysdecode \

Modified: stable/11/share/mk/bsd.libnames.mk
==
--- stable/11/share/mk/bsd.libnames.mk  Sun Feb 11 19:29:58 2018
(r329129)
+++ stable/11/share/mk/bsd.libnames.mk  Sun Feb 11 19:33:24 2018
(r329130)
@@ -138,7 +138,6 @@ LIBSDP?=${DESTDIR}${LIBDIR_BASE}/libsdp.a
 LIBSMB?=   ${DESTDIR}${LIBDIR_BASE}/libsmb.a
 LIBSSL?=   ${DESTDIR}${LIBDIR_BASE}/libssl.a
 LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
-LIBSTAND?= ${DESTDIR}${LIBDIR_BASE}/libstand.a
 LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libstdc++.a
 LIBSTDTHREADS?=${DESTDIR}${LIBDIR_BASE}/libstdthreads.a
 LIBSYSDECODE?= ${DESTDIR}${LIBDIR_BASE}/libsysdecode.a

Modified: stable/11/sys/boot/Makefile
==
--- stable/11/sys/boot/Makefile Sun Feb 11 19:29:58 2018(r329129)
+++ stable/11/sys/boot/Makefile Sun Feb 11 19:33:24 2018(r329130)
@@ -2,6 +2,7 @@
 
 .include 
 
+SUBDIR+=   libsa
 .if ${MK_FORTH} != "no"
 # Build the add-in FORTH interpreter.
 SUBDIR+=   ficl

Modified: stable/11/sys/boot/Makefile.inc
==
--- stable/11/sys/boot/Makefile.inc Sun Feb 11 19:29:58 2018
(r329129)
+++ stable/11/sys/boot/Makefile.inc Sun Feb 11 19:33:24 2018
(r329130)
@@ -7,7 +7,7 @@ __BOOT_MAKEFILE_INC__=${MFILE}
 
 SASRC=${SRCTOP}/lib/libstand
 # Normal stand alone library
-LIBSA=${OBJTOP}/lib/libstand/libstand.a
+LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a
 # stand alone library compiled for 32-bit version of the processor
 LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
 # stand along library compiled for userboot
___
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: r329129 - in stable/11/sys/boot: . arm/uboot common efi/boot1 efi/fdt efi/include efi/libefi efi/loader fdt i386/gptboot i386/gptzfsboot i386/libfirewire i386/libi386 i386/loader i386/z...

2018-02-11 Thread Kyle Evans
Author: kevans
Date: Sun Feb 11 19:29:58 2018
New Revision: 329129
URL: https://svnweb.freebsd.org/changeset/base/329129

Log:
  MFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450,
  r324451,r324452
  
  r324321: This README file was quite relevant for FreeBSD 3 or 4. No more.
  
  r324359: Add efi_devpath_is_prefix
  
  r324360: Encapsulate  ZFS preferences into efi_zfs_is_preferred
  
  r324388: Unbreak building efiboot with MK_ZFS == no
  
  r324449: Prefer ${LIBSTAND} to -lstand
  
  r324450: Define SASRC and use it
  
  r324451: Add missing -I${SASRC} in a couple of places so that stand.h
  doesn't accidentally come in via host pollution.
  
  r324452: Define LIBSA* and use them instead of overloaded LIBSTAND

Added:
  stable/11/sys/boot/userboot/Makefile.inc
 - copied unchanged from r324450, head/sys/boot/userboot/Makefile.inc
Deleted:
  stable/11/sys/boot/README
Modified:
  stable/11/sys/boot/Makefile.ficl
  stable/11/sys/boot/Makefile.inc
  stable/11/sys/boot/arm/uboot/Makefile
  stable/11/sys/boot/common/Makefile.inc
  stable/11/sys/boot/efi/boot1/Makefile
  stable/11/sys/boot/efi/fdt/Makefile
  stable/11/sys/boot/efi/include/efilib.h
  stable/11/sys/boot/efi/include/efizfs.h
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/efi/libefi/devpath.c
  stable/11/sys/boot/efi/libefi/efizfs.c
  stable/11/sys/boot/efi/loader/Makefile
  stable/11/sys/boot/efi/loader/main.c
  stable/11/sys/boot/fdt/Makefile
  stable/11/sys/boot/i386/gptboot/Makefile
  stable/11/sys/boot/i386/gptzfsboot/Makefile
  stable/11/sys/boot/i386/libfirewire/Makefile
  stable/11/sys/boot/i386/libi386/Makefile
  stable/11/sys/boot/i386/loader/Makefile
  stable/11/sys/boot/i386/zfsboot/Makefile
  stable/11/sys/boot/libstand32/Makefile
  stable/11/sys/boot/mips/beri/boot2/Makefile
  stable/11/sys/boot/mips/beri/loader/Makefile
  stable/11/sys/boot/mips/uboot/Makefile
  stable/11/sys/boot/ofw/libofw/Makefile
  stable/11/sys/boot/powerpc/kboot/Makefile
  stable/11/sys/boot/powerpc/ofw/Makefile
  stable/11/sys/boot/powerpc/ps3/Makefile
  stable/11/sys/boot/powerpc/uboot/Makefile
  stable/11/sys/boot/sparc64/loader/Makefile
  stable/11/sys/boot/uboot/fdt/Makefile
  stable/11/sys/boot/uboot/lib/Makefile
  stable/11/sys/boot/userboot/libstand/Makefile
  stable/11/sys/boot/userboot/userboot/Makefile
  stable/11/sys/boot/userboot/zfs/Makefile
  stable/11/sys/boot/zfs/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/Makefile.ficl
==
--- stable/11/sys/boot/Makefile.ficlSun Feb 11 18:37:08 2018
(r329128)
+++ stable/11/sys/boot/Makefile.ficlSun Feb 11 19:29:58 2018
(r329129)
@@ -27,7 +27,7 @@ CFLAGS+=  -m32 -mcpu=powerpc -I.
 .endif
 
 CFLAGS+=   -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
-   -I${FICLDIR}/../common
+   -I${FICLDIR}/../common -I${SASRC}
 
 .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
 .if !exists(machine)

Modified: stable/11/sys/boot/Makefile.inc
==
--- stable/11/sys/boot/Makefile.inc Sun Feb 11 18:37:08 2018
(r329128)
+++ stable/11/sys/boot/Makefile.inc Sun Feb 11 19:29:58 2018
(r329129)
@@ -2,6 +2,17 @@
 
 .include 
 
+.if !defined(__BOOT_MAKEFILE_INC__)
+__BOOT_MAKEFILE_INC__=${MFILE}
+
+SASRC=${SRCTOP}/lib/libstand
+# Normal stand alone library
+LIBSA=${OBJTOP}/lib/libstand/libstand.a
+# stand alone library compiled for 32-bit version of the processor
+LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
+# stand along library compiled for userboot
+LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
+
 SSP_CFLAGS=
 
 .if ${MACHINE_CPUARCH} == "arm"
@@ -24,9 +35,9 @@ DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && e
 DD=dd ${DD_NOSTATUS}
 
 .if ${MK_LOADER_FORCE_LE} != "no"
-
 .if ${MACHINE_ARCH} == "powerpc64"
 CFLAGS+=   -mlittle-endian
+.endif
 .endif
 
 .endif

Modified: stable/11/sys/boot/arm/uboot/Makefile
==
--- stable/11/sys/boot/arm/uboot/Makefile   Sun Feb 11 18:37:08 2018
(r329128)
+++ stable/11/sys/boot/arm/uboot/Makefile   Sun Feb 11 19:29:58 2018
(r329129)
@@ -112,16 +112,15 @@ LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
 CFLAGS+=   -I${.CURDIR}/../../uboot/lib
 CFLAGS+=   -I${.OBJDIR}/../../uboot/lib
 
-# where to get libstand from
-CFLAGS+=   -I${.CURDIR}/../../../../lib/libstand/
+CFLAGS+=   -I${SASRC}
 
 CFLAGS+=   -fPIC
 
 # clang doesn't understand %D as a specifier to printf
 NO_WERROR.clang=
 
-DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
-LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} -lstand
+DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
+LDADD= ${LIBFICL} ${LIBUBOOT} 

Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Warner Losh
On Sun, Feb 11, 2018 at 11:42 AM, Ian Lepore  wrote:

> On Sun, 2018-02-11 at 10:20 -0800, Conrad Meyer wrote:
> > On Sun, Feb 11, 2018 at 8:35 AM, Ian Lepore  wrote:
> > >
> > > Author: ian
> > > Date: Sun Feb 11 16:35:56 2018
> > > New Revision: 329126
> > > URL: https://svnweb.freebsd.org/changeset/base/329126
> > >
> > > Log:
> > >   Regenerate devd/usb.conf after the recent addition of several new
> > > device IDs.
> > >
> > > Modified:
> > >   head/etc/devd/usb.conf
> >
> > If this file is machine generated and not an administrator
> > configuration file, shouldn't it live in /usr/share instead of /etc,
> > per hier(7)?
> >
> > Best,
> > Conrad
> >
>
> I wonder if that question would apply to all five files we put in
> /etc/devd?  It looks like they could be moved to /usr/share with
> minimal fuss by adding that directory to the search list in
> /etc/devd.conf.
>
> I'm agnostic about the value of moving them.  Users can configure local
> rules by modifying the existing devd.conf and files in devd/ and
> dealing with mergemaster on updates, or by adding their own new files
> in devd/.
>

It doesn't matter. We're better off throwing the generated stuff away
entirely and migrating this to devmatch.

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: r329126 - head/etc/devd

2018-02-11 Thread Ian Lepore
On Sun, 2018-02-11 at 10:20 -0800, Conrad Meyer wrote:
> On Sun, Feb 11, 2018 at 8:35 AM, Ian Lepore  wrote:
> > 
> > Author: ian
> > Date: Sun Feb 11 16:35:56 2018
> > New Revision: 329126
> > URL: https://svnweb.freebsd.org/changeset/base/329126
> > 
> > Log:
> >   Regenerate devd/usb.conf after the recent addition of several new
> > device IDs.
> > 
> > Modified:
> >   head/etc/devd/usb.conf
> 
> If this file is machine generated and not an administrator
> configuration file, shouldn't it live in /usr/share instead of /etc,
> per hier(7)?
> 
> Best,
> Conrad
> 

I wonder if that question would apply to all five files we put in
/etc/devd?  It looks like they could be moved to /usr/share with
minimal fuss by adding that directory to the search list in
/etc/devd.conf.

I'm agnostic about the value of moving them.  Users can configure local
rules by modifying the existing devd.conf and files in devd/ and
dealing with mergemaster on updates, or by adding their own new files
in devd/.

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


svn commit: r329128 - head/sys/kgssapi

2018-02-11 Thread Brooks Davis
Author: brooks
Date: Sun Feb 11 18:37:08 2018
New Revision: 329128
URL: https://svnweb.freebsd.org/changeset/base/329128

Log:
  Use syscall_helper_register(9) rather than syscall_register().
  
  The usage is simpler, documented, and more common.
  
  Reviewed by:  cem
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14227

Modified:
  head/sys/kgssapi/gss_impl.c

Modified: head/sys/kgssapi/gss_impl.c
==
--- head/sys/kgssapi/gss_impl.c Sun Feb 11 17:45:38 2018(r329127)
+++ head/sys/kgssapi/gss_impl.c Sun Feb 11 18:37:08 2018(r329128)
@@ -56,39 +56,33 @@ MALLOC_DEFINE(M_GSSAPI, "GSS-API", "GSS-API");
 /*
  * Syscall hooks
  */
-static int gssd_syscall_offset = SYS_gssd_syscall;
-static struct sysent gssd_syscall_prev_sysent;
-MAKE_SYSENT(gssd_syscall);
-static bool_t gssd_syscall_registered = FALSE;
+static struct syscall_helper_data gssd_syscalls[] = {
+   SYSCALL_INIT_HELPER(gssd_syscall),
+   SYSCALL_INIT_LAST
+};
 
 struct kgss_mech_list kgss_mechs;
 CLIENT *kgss_gssd_handle;
 struct mtx kgss_gssd_lock;
 
-static void
-kgss_init(void *dummy)
+static int
+kgss_load(void)
 {
int error;
 
LIST_INIT(_mechs);
-   error = syscall_register(_syscall_offset, _syscall_sysent,
-   _syscall_prev_sysent, SY_THR_STATIC_KLD);
-   if (error)
-   printf("Can't register GSSD syscall\n");
-   else
-   gssd_syscall_registered = TRUE;
+   error = syscall_helper_register(gssd_syscalls, SY_THR_STATIC_KLD);
+   if (error != 0)
+   return (error);
+   return (0);
 }
-SYSINIT(kgss_init, SI_SUB_LOCK, SI_ORDER_FIRST, kgss_init, NULL);
 
 static void
-kgss_uninit(void *dummy)
+kgss_unload(void)
 {
 
-   if (gssd_syscall_registered)
-   syscall_deregister(_syscall_offset,
-   _syscall_prev_sysent);
+   syscall_helper_unregister(gssd_syscalls);
 }
-SYSUNINIT(kgss_uninit, SI_SUB_LOCK, SI_ORDER_FIRST, kgss_uninit, NULL);
 
 int
 sys_gssd_syscall(struct thread *td, struct gssd_syscall_args *uap)
@@ -293,6 +287,8 @@ kgssapi_modevent(module_t mod, int type, void *data)
 
switch (type) {
case MOD_LOAD:
+   if (error != 0)
+   return (error);
rpc_gss_entries.rpc_gss_refresh_auth = rpc_gss_refresh_auth;
rpc_gss_entries.rpc_gss_secfind = rpc_gss_secfind;
rpc_gss_entries.rpc_gss_secpurge = rpc_gss_secpurge;
@@ -317,8 +313,11 @@ kgssapi_modevent(module_t mod, int type, void *data)
rpc_gss_entries.rpc_gss_svc_max_data_length =
rpc_gss_svc_max_data_length;
mtx_init(_gssd_lock, "kgss_gssd_lock", NULL, MTX_DEF);
+   error = kgss_load();
break;
case MOD_UNLOAD:
+   kgss_unload();
+   mtx_destroy(_gssd_lock);
/*
 * Unloading of the kgssapi module is not currently supported.
 * If somebody wants this, we would need to keep track of
___
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: r329109 - head/share/man/man9

2018-02-11 Thread Brooks Davis
On Sat, Feb 10, 2018 at 08:34:09PM +, Conrad Meyer wrote:
> Author: cem
> Date: Sat Feb 10 20:34:09 2018
> New Revision: 329109
> URL: https://svnweb.freebsd.org/changeset/base/329109
> 
> Log:
>   Document syscall_helper_register(9), syscall_helper_unregister(9)

Thanks!

We should probably also document the syscall32_helper_register and the
associated macros (which confusingly use an entirely different meaning
for _COMPAT (use the sys_ version)).

-- Brooks


signature.asc
Description: PGP signature


Re: svn commit: r329126 - head/etc/devd

2018-02-11 Thread Conrad Meyer
On Sun, Feb 11, 2018 at 8:35 AM, Ian Lepore  wrote:
> Author: ian
> Date: Sun Feb 11 16:35:56 2018
> New Revision: 329126
> URL: https://svnweb.freebsd.org/changeset/base/329126
>
> Log:
>   Regenerate devd/usb.conf after the recent addition of several new device 
> IDs.
>
> Modified:
>   head/etc/devd/usb.conf


If this file is machine generated and not an administrator
configuration file, shouldn't it live in /usr/share instead of /etc,
per hier(7)?

Best,
Conrad
___
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: r329127 - head/sys/sys

2018-02-11 Thread Warner Losh
Author: imp
Date: Sun Feb 11 17:45:38 2018
New Revision: 329127
URL: https://svnweb.freebsd.org/changeset/base/329127

Log:
  Consistent macro indentation is the hobgoblin of small minds
  
  Line up the macro definitions and names here like the machine/stdarg.h
  files that this replaced. This is easier to read and also makes it
  easier to match up with other includes. Also two space indent va_end
  to match the rest of the surrounding if block.

Modified:
  head/sys/sys/_stdarg.h

Modified: head/sys/sys/_stdarg.h
==
--- head/sys/sys/_stdarg.h  Sun Feb 11 16:35:56 2018(r329126)
+++ head/sys/sys/_stdarg.h  Sun Feb 11 17:45:38 2018(r329127)
@@ -43,13 +43,13 @@
 #endif
 
 #ifdef __GNUCLIKE_BUILTIN_STDARG
-  #define va_start(ap, last) __builtin_va_start((ap), (last))
-  #define va_arg(ap, type) __builtin_va_arg((ap), type)
-  #define __va_copy(dest, src) __builtin_va_copy((dest), (src))
+  #define  va_start(ap, last)  __builtin_va_start((ap), (last))
+  #define  va_arg(ap, type)__builtin_va_arg((ap), type)
+  #define  __va_copy(dest, src)__builtin_va_copy((dest), (src))
   #if __ISO_C_VISIBLE >= 1999
-#define va_copy(dest, src) __va_copy(dest, src)
+#defineva_copy(dest, src)  __va_copy(dest, src)
   #endif
-#define va_end(ap) __builtin_va_end(ap)
+  #define  va_end(ap)  __builtin_va_end(ap)
 #endif
 
 #if defined(lint) && !defined(va_start)
___
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: r328973 - in stable/11: include sys/sys

2018-02-11 Thread Dimitry Andric
On 11 Feb 2018, at 17:54, Pedro Giffuni  wrote:
...
> While the lint mode definition was missing, I didn't merge the attribute uses 
> (r328237) on purpose as I knew they could bring issues. Some rather broken 
> ports like to take the standard headers and "fix" them. In essence, any port 
> that requires an attribute defined in sys/cdefs.h is doing something wrong.
> 
> The most notable offender was GCC but I think that was fixed: in any case, 
> the last time I merged an attribute change I had to wait for the next release 
> to start using it.

The "fixincludes" feature you are referring to was finally removed by
Gerald in r444860 for gcc5, and for other gcc ports in later revisions:

https://svnweb.freebsd.org/ports?view=revision=444860

so both the latest quarterly and the current package collection should
have no more gcc's with mangled system headers.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r328973 - in stable/11: include sys/sys

2018-02-11 Thread Pedro Giffuni

...

On 11/02/2018 05:24, Hans Petter Selasky wrote:

On 02/11/18 11:09, Antoine Brodin wrote:
On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin  
wrote:

On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky
 wrote:

Author: hselasky
Date: Wed Feb  7 15:06:54 2018
New Revision: 328973
URL: https://svnweb.freebsd.org/changeset/base/328973

Log:
   MFC r328237:
   Use the __alloc_size2 attribute where relevant.

   This follows the documented use in GCC. It is basically only 
relevant for

   calloc(3), reallocarray(3) and  mallocarray(9).

   NOTE: Without this change clang 5.0.1 can produce incorrect 
optimisation
   code for static processing of data using the allocated object. 
For example
   this has been seen compiling the mlx4 core module, which 
allocates a

   fixed size array which is then sorted by a fixed order loop. The
   optimised result, -O2, is incorrect unless this patch is in place.

   Suggested by: Mark Millard
   Reference: 
https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4


Modified:
   stable/11/include/stdlib.h
   stable/11/sys/sys/malloc.h
Directory Properties:
   stable/11/   (props changed)


Hi,

Please revert this change.  Lots of ports that used to build fine on
stable/11 are now failing.
/usr/include/stdlib.h:93:7: error: expected function body after
function declarator
  __alloc_size2(1, 2);




Hi Antoine,

I'm sorry for the inconvenience. Probably I should have sent this 
patch for portmgr first, to avoid such breakage. This patch is 
required also for ports, and it is good you are now rebuilding ports 
which use this define, because they might be broken due to the fact 
the __alloc_size2() was incorrectly implemented!


I hope this will be the end of the breakage:

https://svnweb.freebsd.org/changeset/base/329122

Else I will revert both patches and have you test them first.

--HPS

While the lint mode definition was missing, I didn't merge the attribute 
uses (r328237) on purpose as I knew they could bring issues. Some rather 
broken ports like to take the standard headers and "fix" them. In 
essence, any port that requires an attribute defined in sys/cdefs.h is 
doing something wrong.


The most notable offender was GCC but I think that was fixed: in any 
case, the last time I merged an attribute change I had to wait for the 
next release to start using it.


Cheers,

Pedro.

___
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: r329126 - head/etc/devd

2018-02-11 Thread Ian Lepore
Author: ian
Date: Sun Feb 11 16:35:56 2018
New Revision: 329126
URL: https://svnweb.freebsd.org/changeset/base/329126

Log:
  Regenerate devd/usb.conf after the recent addition of several new device IDs.

Modified:
  head/etc/devd/usb.conf

Modified: head/etc/devd/usb.conf
==
--- head/etc/devd/usb.conf  Sun Feb 11 16:35:23 2018(r329125)
+++ head/etc/devd/usb.conf  Sun Feb 11 16:35:56 2018(r329126)
@@ -145,7 +145,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0403";
-   match "product" 
"(0x5259|0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed7
 
4|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0x|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)";
+   match "product" 
"(0x5259|0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x8a98|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed7
 
3|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0x|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)";
action "kldload -n uftdi";
 };
 
@@ -2793,7 +2793,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0bda";
-   match "product" "0x8754";
+   match "product" "(0x8754|0x8812)";
action "kldload -n if_rtwn_usb";
 };
 
@@ -3681,7 +3681,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x10c4";
-   match "product" 
"(0x8066|0x806f|0x807a|0x80c4|0x80ca|0x80dd|0x80ed|0x80f6|0x8115|0x813d|0x813f|0x814a|0x814a|0x814b|0x8156|0x815e|0x815f|0x818b|0x819f|0x81a6|0x81a9|0x81ac|0x81ad|0x81c8|0x81e2|0x81e7|0x81e8|0x81f2|0x8218|0x822b|0x826b|0x8293|0x82f9|0x8341|0x8382|0x83a8|0x83d8|0x8411|0x8418|0x846e|0x8477|0x85ea|0x85eb|0x85f8|0x8664|0x8665|0x88a4|0x88a5|0xea60|0xea61|0xea70|0xea71|0xea80|0xf001|0xf002|0xf003|0xf004)";
+   match "product" 

svn commit: r329125 - in head/sys/dev/usb: . serial

2018-02-11 Thread Ian Lepore
Author: ian
Date: Sun Feb 11 16:35:23 2018
New Revision: 329125
URL: https://svnweb.freebsd.org/changeset/base/329125

Log:
  Add a device ID to uftdi for TIAO USB Multi Protocol Adapter (TUMPA).
  
  PR:   225810

Modified:
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/uftdi.c
==
--- head/sys/dev/usb/serial/uftdi.c Sun Feb 11 16:12:55 2018
(r329124)
+++ head/sys/dev/usb/serial/uftdi.c Sun Feb 11 16:35:23 2018
(r329125)
@@ -522,6 +522,7 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = {
UFTDI_DEV(FTDI, TERATRONIK_D2XX, 0),
UFTDI_DEV(FTDI, TERATRONIK_VCP, 0),
UFTDI_DEV(FTDI, THORLABS, 0),
+   UFTDI_DEV(FTDI, TIAO, 0),
UFTDI_DEV(FTDI, TNC_X, 0),
UFTDI_DEV(FTDI, TTUSB, 0),
UFTDI_DEV(FTDI, TURTELIZER2, UFTDI_JTAG_IFACE(0)),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSun Feb 11 16:12:55 2018(r329124)
+++ head/sys/dev/usb/usbdevsSun Feb 11 16:35:23 2018(r329125)
@@ -2157,6 +2157,7 @@ product FTDI TAVIR_STK500 0xfa33  FTDI compatible adapt
 product FTDI TERATRONIK_D2XX   0xec89  FTDI compatible adapter
 product FTDI TERATRONIK_VCP0xec88  FTDI compatible adapter
 product FTDI THORLABS  0xfaf0  FTDI compatible adapter
+product FTDI TIAO  0x8a98  FTDI compatible adapter
 product FTDI TNC_X 0xebe0  FTDI compatible adapter
 product FTDI TTUSB 0xff20  FTDI compatible adapter
 product FTDI USBX_707  0xf857  FTDI compatible adapter
___
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: r329124 - head/share/misc

2018-02-11 Thread Mark Felder
Author: feld (ports committer)
Date: Sun Feb 11 16:12:55 2018
New Revision: 329124
URL: https://svnweb.freebsd.org/changeset/base/329124

Log:
  Add Thomas Zander to ports-secteam

Modified:
  head/share/misc/organization.dot

Modified: head/share/misc/organization.dot
==
--- head/share/misc/organization.dotSun Feb 11 13:35:31 2018
(r329123)
+++ head/share/misc/organization.dotSun Feb 11 16:12:55 2018
(r329124)
@@ -34,7 +34,7 @@ portmgr [label="Port Management Team\nportmgr@FreeBSD.
 portmgrsecretary [label="Port Management Team 
Secretary\nportmgr-secret...@freebsd.org\nrene"]
 re [label="Primary Release Engineering Team\n...@freebsd.org\ngjb, 
kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius, rwatson"]
 secteam [label="Security Team\nsect...@freebsd.org\ndelphij,\ndes, gavin, 
gjb,\nglebius, remko"]
-portssecteam [label="Ports Security Team\nports-sect...@freebsd.org\ndelphij, 
amdmi3, eadler, feld, jgh, rea, sbz, simon, swills, zi"]
+portssecteam [label="Ports Security Team\nports-sect...@freebsd.org\ndelphij, 
amdmi3, eadler, feld, jgh, rea, riggs, sbz, simon, swills, zi"]
 secteamsecretary [label="Security Team 
Secretary\nsecteam-secret...@freebsd.org\nremko"]
 securityofficer [label="Security Officer 
Team\nsecurity-offi...@freebsd.org\ndelphij, des,\ngavin, gjb,\nglebius, remko"]
 srccommitters [label="Src Committers\nsrc-committ...@freebsd.org"]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r328973 - in stable/11: include sys/sys

2018-02-11 Thread Dimitry Andric
On 11 Feb 2018, at 11:24, Hans Petter Selasky  wrote:
> 
> On 02/11/18 11:09, Antoine Brodin wrote:
>> On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin  wrote:
>>> On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky
>>>  wrote:
 Author: hselasky
 Date: Wed Feb  7 15:06:54 2018
 New Revision: 328973
 URL: https://svnweb.freebsd.org/changeset/base/328973
 
 Log:
   MFC r328237:
   Use the __alloc_size2 attribute where relevant.
 
   This follows the documented use in GCC. It is basically only relevant for
   calloc(3), reallocarray(3) and  mallocarray(9).
 
   NOTE: Without this change clang 5.0.1 can produce incorrect optimisation
   code for static processing of data using the allocated object. For 
 example
   this has been seen compiling the mlx4 core module, which allocates a
   fixed size array which is then sorted by a fixed order loop. The
   optimised result, -O2, is incorrect unless this patch is in place.
 
   Suggested by: Mark Millard
   Reference:
 https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4
 
 Modified:
   stable/11/include/stdlib.h
   stable/11/sys/sys/malloc.h
 Directory Properties:
   stable/11/   (props changed)
>>> 
>>> Hi,
>>> 
>>> Please revert this change.  Lots of ports that used to build fine on
>>> stable/11 are now failing.
>>> /usr/include/stdlib.h:93:7: error: expected function body after
>>> function declarator
>>>  __alloc_size2(1, 2);
> 
> Hi Antoine,
> 
> I'm sorry for the inconvenience. Probably I should have sent this patch for 
> portmgr first, to avoid such breakage. This patch is required also for ports, 
> and it is good you are now rebuilding ports which use this define, because 
> they might be broken due to the fact the __alloc_size2() was incorrectly 
> implemented!
> 
> I hope this will be the end of the breakage:
> 
> https://svnweb.freebsd.org/changeset/base/329122

Hmm, so you add something to the lint path, and that suddenly fixes the builds? 
 How is that possible?  Are all these ports compiled in "lint mode"?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r329123 - head/usr.bin/lock

2018-02-11 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Feb 11 13:35:31 2018
New Revision: 329123
URL: https://svnweb.freebsd.org/changeset/base/329123

Log:
  Make lock(1) use PAM.  This makes the -p option work again.  (Well, kind of,
  because the whole idea of this utility is rather broken.)
  
  This originally come from NetBSD, and was later reworked a bit.
  
  Reviewed by:  des@ (earlier version)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D4981

Modified:
  head/usr.bin/lock/Makefile
  head/usr.bin/lock/lock.c

Modified: head/usr.bin/lock/Makefile
==
--- head/usr.bin/lock/Makefile  Sun Feb 11 10:23:32 2018(r329122)
+++ head/usr.bin/lock/Makefile  Sun Feb 11 13:35:31 2018(r329123)
@@ -5,6 +5,6 @@ PROG=   lock
 BINOWN=root
 BINMODE=4555
 
-LIBADD=crypt
+LIBADD=pam
 
 .include 

Modified: head/usr.bin/lock/lock.c
==
--- head/usr.bin/lock/lock.cSun Feb 11 10:23:32 2018(r329122)
+++ head/usr.bin/lock/lock.cSun Feb 11 13:35:31 2018(r329123)
@@ -73,6 +73,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include   /* for openpam_ttyconv() */
+
 #defineTIMEOUT 15
 
 static void quit(int);
@@ -91,19 +94,23 @@ static int  vtyunlock;  /* Unlock flag 
and code. */
 int
 main(int argc, char **argv)
 {
+   static const struct pam_conv pamc = { _ttyconv, NULL };
+   pam_handle_t *pamh;
struct passwd *pw;
struct itimerval ntimer, otimer;
struct tm *timp;
time_t timval;
-   int ch, failures, sectimeout, usemine, vtylock;
-   char *ap, *cryptpw, *mypw, *ttynam, *tzn;
+   int ch, failures, pam_err, sectimeout, usemine, vtylock;
+   char *ap, *ttynam, *tzn;
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ];
 
openlog("lock", 0, LOG_AUTH);
 
+   pam_err = PAM_SYSTEM_ERR; /* pacify GCC */
+
sectimeout = TIMEOUT;
+   pamh = NULL;
pw = NULL;
-   mypw = NULL;
usemine = 0;
no_timeout = 0;
vtylock = 0;
@@ -117,7 +124,6 @@ main(int argc, char **argv)
usemine = 1;
if (!(pw = getpwuid(getuid(
errx(1, "unknown uid %d", getuid());
-   mypw = strdup(pw->pw_passwd);
break;
case 'n':
no_timeout = 1;
@@ -131,9 +137,11 @@ main(int argc, char **argv)
}
timeout.tv_sec = sectimeout * 60;
 
-   /* discard privs */
-   if (setuid(getuid()) != 0)
-   errx(1, "setuid failed");
+   if (!usemine) { /* -p with PAM or S/key needs privs */
+   /* discard privs */
+   if (setuid(getuid()) != 0)
+   errx(1, "setuid failed");
+   }
 
if (tcgetattr(0, )) /* get information for header */
exit(1);
@@ -153,7 +161,11 @@ main(int argc, char **argv)
ntty = tty; ntty.c_lflag &= ~ECHO;
(void)tcsetattr(0, TCSADRAIN|TCSASOFT, );
 
-   if (!mypw) {
+   if (usemine) {
+   pam_err = pam_start("lock", pw->pw_name, , );
+   if (pam_err != PAM_SUCCESS)
+   err(1, "pam_start: %s", pam_strerror(NULL, pam_err));
+   } else {
/* get key and check again */
(void)printf("Key: ");
if (!fgets(s, sizeof(s), stdin) || *s == '\n')
@@ -171,7 +183,6 @@ main(int argc, char **argv)
exit(1);
}
s[0] = '\0';
-   mypw = s1;
}
 
/* set signal handlers */
@@ -216,19 +227,27 @@ main(int argc, char **argv)
failures = 0;
 
for (;;) {
+   if (usemine) {
+   pam_err = pam_authenticate(pamh, 0);
+   if (pam_err == PAM_SUCCESS)
+   break;
+
+   if (pam_err != PAM_AUTH_ERR &&
+   pam_err != PAM_USER_UNKNOWN &&
+   pam_err != PAM_MAXTRIES) {
+   syslog(LOG_ERR, "pam_authenticate: %s",
+   pam_strerror(pamh, pam_err));
+   }
+   
+   goto tryagain;
+   }
(void)printf("Key: ");
if (!fgets(s, sizeof(s), stdin)) {
clearerr(stdin);
hi(0);
goto tryagain;
}
-   if (usemine) {
-   s[strlen(s) - 1] = '\0';
-   cryptpw = crypt(s, mypw);
-   if (cryptpw != NULL && !strcmp(mypw, cryptpw))
-   break;
-   }
-  

Re: svn commit: r328973 - in stable/11: include sys/sys

2018-02-11 Thread Hans Petter Selasky

On 02/11/18 11:09, Antoine Brodin wrote:

On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin  wrote:

On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky
 wrote:

Author: hselasky
Date: Wed Feb  7 15:06:54 2018
New Revision: 328973
URL: https://svnweb.freebsd.org/changeset/base/328973

Log:
   MFC r328237:
   Use the __alloc_size2 attribute where relevant.

   This follows the documented use in GCC. It is basically only relevant for
   calloc(3), reallocarray(3) and  mallocarray(9).

   NOTE: Without this change clang 5.0.1 can produce incorrect optimisation
   code for static processing of data using the allocated object. For example
   this has been seen compiling the mlx4 core module, which allocates a
   fixed size array which is then sorted by a fixed order loop. The
   optimised result, -O2, is incorrect unless this patch is in place.

   Suggested by: Mark Millard
   Reference:
https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4

Modified:
   stable/11/include/stdlib.h
   stable/11/sys/sys/malloc.h
Directory Properties:
   stable/11/   (props changed)


Hi,

Please revert this change.  Lots of ports that used to build fine on
stable/11 are now failing.
/usr/include/stdlib.h:93:7: error: expected function body after
function declarator
  __alloc_size2(1, 2);




Hi Antoine,

I'm sorry for the inconvenience. Probably I should have sent this patch 
for portmgr first, to avoid such breakage. This patch is required also 
for ports, and it is good you are now rebuilding ports which use this 
define, because they might be broken due to the fact the __alloc_size2() 
was incorrectly implemented!


I hope this will be the end of the breakage:

https://svnweb.freebsd.org/changeset/base/329122

Else I will revert both patches and have you test them first.

--HPS


Something like this may be needed on stable/11:

Index: 11/sys/sys/cdefs.h
===
--- 11/sys/sys/cdefs.h  (revision 329121)
+++ 11/sys/sys/cdefs.h  (working copy)
@@ -213,6 +213,7 @@
  #define__aligned(x)
  #define__alloc_align(x)
  #define__alloc_size(x)
+#define__alloc_size2(n, x)
  #define__section(x)
  #define__weak_symbol
  #else

Antoine




___
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: r329122 - stable/11/sys/sys

2018-02-11 Thread Hans Petter Selasky
Author: hselasky
Date: Sun Feb 11 10:23:32 2018
New Revision: 329122
URL: https://svnweb.freebsd.org/changeset/base/329122

Log:
  Fix regression issue after r328973:
  
  The lint target does no longer exist in FreeBSD head
  and the __alloc_size2() support for lint was missing
  when r328973 was MFCed. Add support for __alloc_size2() to
  the lint target.
  
  This is a direct commit.
  
  Found by: antoine@
  Pointy hat:   hselasky@
  Sponsored by: Mellanox Technologies

Modified:
  stable/11/sys/sys/cdefs.h

Modified: stable/11/sys/sys/cdefs.h
==
--- stable/11/sys/sys/cdefs.h   Sun Feb 11 07:04:48 2018(r329121)
+++ stable/11/sys/sys/cdefs.h   Sun Feb 11 10:23:32 2018(r329122)
@@ -213,6 +213,7 @@
 #define__aligned(x)
 #define__alloc_align(x)
 #define__alloc_size(x)
+#define__alloc_size2(n, x)
 #define__section(x)
 #define__weak_symbol
 #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: r328973 - in stable/11: include sys/sys

2018-02-11 Thread Antoine Brodin
On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin  wrote:
> On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky
>  wrote:
>> Author: hselasky
>> Date: Wed Feb  7 15:06:54 2018
>> New Revision: 328973
>> URL: https://svnweb.freebsd.org/changeset/base/328973
>>
>> Log:
>>   MFC r328237:
>>   Use the __alloc_size2 attribute where relevant.
>>
>>   This follows the documented use in GCC. It is basically only relevant for
>>   calloc(3), reallocarray(3) and  mallocarray(9).
>>
>>   NOTE: Without this change clang 5.0.1 can produce incorrect optimisation
>>   code for static processing of data using the allocated object. For example
>>   this has been seen compiling the mlx4 core module, which allocates a
>>   fixed size array which is then sorted by a fixed order loop. The
>>   optimised result, -O2, is incorrect unless this patch is in place.
>>
>>   Suggested by: Mark Millard
>>   Reference:
>> https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4
>>
>> Modified:
>>   stable/11/include/stdlib.h
>>   stable/11/sys/sys/malloc.h
>> Directory Properties:
>>   stable/11/   (props changed)
>
> Hi,
>
> Please revert this change.  Lots of ports that used to build fine on
> stable/11 are now failing.
> /usr/include/stdlib.h:93:7: error: expected function body after
> function declarator
>  __alloc_size2(1, 2);

Something like this may be needed on stable/11:

Index: 11/sys/sys/cdefs.h
===
--- 11/sys/sys/cdefs.h  (revision 329121)
+++ 11/sys/sys/cdefs.h  (working copy)
@@ -213,6 +213,7 @@
 #define__aligned(x)
 #define__alloc_align(x)
 #define__alloc_size(x)
+#define__alloc_size2(n, x)
 #define__section(x)
 #define__weak_symbol
 #else

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