svn commit: r306838 - head/sys/powerpc/mpc85xx

2016-10-07 Thread Justin Hibbits
Author: jhibbits
Date: Sat Oct  8 01:18:01 2016
New Revision: 306838
URL: https://svnweb.freebsd.org/changeset/base/306838

Log:
  Adjust copyright date.  No real work was done on it until 2016.

Modified:
  head/sys/powerpc/mpc85xx/fsl_diu.c

Modified: head/sys/powerpc/mpc85xx/fsl_diu.c
==
--- head/sys/powerpc/mpc85xx/fsl_diu.c  Sat Oct  8 01:12:29 2016
(r306837)
+++ head/sys/powerpc/mpc85xx/fsl_diu.c  Sat Oct  8 01:18:01 2016
(r306838)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2015 Justin Hibbits
+ * Copyright (c) 2016 Justin Hibbits
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306837 - in head/sys: dev/iwm dev/otus dev/usb/wlan net80211

2016-10-07 Thread Adrian Chadd
Author: adrian
Date: Sat Oct  8 01:12:29 2016
New Revision: 306837
URL: https://svnweb.freebsd.org/changeset/base/306837

Log:
  [net80211] extend the ieee80211_rx_stats struct to include more information.
  
  There are a variety of more interesting RX statistics that we should
  keep track of but we don't.  This is a starting point for adding more
  information.
  
  Specifically:
  
  * now the RX rate information and some of the packet status is
passed up;
  * The 32 bit or 64 bit TSF is passed up;
  * the PHY mode is passed up;
  * the "I'm decap'ed AMSDU!" state is passed up;
  * number of RX chains is bumped to 4.
  
  This is all mostly a placeholder for getting the data into the RX status
  before we pass it up to net80211 - unfortunately we don't yet enforce
  that drivers provide it, nor do we pass the provided info back up the
  stack so anyone can use the data.
  
  We're going to need to use some of this data moving forward.
  Notably, now that some hardware can do AMSDU decap for us (the intel iwm
  driver can do it when we flip it on; the ath10k port I'm doing does
  it for us) then we need to pass it up through the stack so the duplicate
  RX sequence numbers and crypto/IV details don't cause the packet to
  be dropped and/or counted against a replay counter.
  
  It's also the beginning of being able to do more interesting node
  accounting in net80211.  Specifically, once drivers start populating
  per-packet rate information, AMPDU information, timestamps, etc,
  we can start providing histograms of rate-versus-RSSI, account
  for receive time spent per node and other such interesting things.
  
  (Note: I'm also hoping to include ranging and RTT information for
  future chipset support; and it's likely going to include it in
  this kind of fashion.)

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/net80211/ieee80211_freebsd.h
  head/sys/net80211/ieee80211_input.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Sat Oct  8 01:00:31 2016(r306836)
+++ head/sys/dev/iwm/if_iwm.c   Sat Oct  8 01:12:29 2016(r306837)
@@ -2975,8 +2975,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
}
 
/* rssi is in 1/2db units */
-   rxs.rssi = rssi * 2;
-   rxs.nf = sc->sc_noise;
+   rxs.c_rssi = rssi * 2;
+   rxs.c_nf = sc->sc_noise;
 
if (ieee80211_radiotap_active_vap(vap)) {
struct iwm_rx_radiotap_header *tap = >sc_rxtap;

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Sat Oct  8 01:00:31 2016(r306836)
+++ head/sys/dev/otus/if_otus.c Sat Oct  8 01:12:29 2016(r306837)
@@ -1710,8 +1710,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui
/* Add RSSI/NF to this mbuf */
bzero(, sizeof(rxs));
rxs.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI;
-   rxs.nf = sc->sc_nf[0];  /* XXX chain 0 != combined rssi/nf */
-   rxs.rssi = tail->rssi;
+   rxs.c_nf = sc->sc_nf[0];/* XXX chain 0 != combined rssi/nf */
+   rxs.c_rssi = tail->rssi;
/* XXX TODO: add MIMO RSSI/NF as well */
ieee80211_add_rx_params(m, );
 

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Oct  8 01:00:31 2016
(r306836)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Oct  8 01:12:29 2016
(r306837)
@@ -1534,8 +1534,8 @@ rsu_event_survey(struct rsu_softc *sc, u
rxs.c_ieee = le32toh(bss->config.dsconfig);
rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ);
/* This is a number from 0..100; so let's just divide it down a bit */
-   rxs.rssi = le32toh(bss->rssi) / 2;
-   rxs.nf = -96;
+   rxs.c_rssi = le32toh(bss->rssi) / 2;
+   rxs.c_nf = -96;
 
/* XXX avoid a LOR */
RSU_UNLOCK(sc);

Modified: head/sys/net80211/ieee80211_freebsd.h
==
--- head/sys/net80211/ieee80211_freebsd.h   Sat Oct  8 01:00:31 2016
(r306836)
+++ head/sys/net80211/ieee80211_freebsd.h   Sat Oct  8 01:12:29 2016
(r306837)
@@ -622,33 +622,82 @@ int   ieee80211_add_xmit_params(struct mbu
 intieee80211_get_xmit_params(struct mbuf *m,
struct ieee80211_bpf_params *);
 
-#defineIEEE80211_MAX_CHAINS3
+/*
+ * Note: this is fine for 3x3 (and 4x4) 11n HT40;
+ * but getting EVM information for VHT80, VHT160
+ * will involve more than 6 EVM pilots.
+ */
+#defineIEEE80211_MAX_CHAINS4
 #defineIEEE80211_MAX_EVM_PILOTS6
 
-#defineIEEE80211_R_NF  0x001   /* global NF value 
valid */
-#defineIEEE80211_R_RSSI  

svn commit: r306836 - head/sbin/ifconfig

2016-10-07 Thread Adrian Chadd
Author: adrian
Date: Sat Oct  8 01:00:31 2016
New Revision: 306836
URL: https://svnweb.freebsd.org/changeset/base/306836

Log:
  [ifconfig] correctly display RSSI.

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cSat Oct  8 00:07:20 2016
(r306835)
+++ head/sbin/ifconfig/ifieee80211.cSat Oct  8 01:00:31 2016
(r306836)
@@ -3290,8 +3290,8 @@ printmimo(const struct ieee80211_mimo_in
/* NB: don't muddy display unless there's something to show */
if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) {
/* XXX ignore EVM for now */
-   printf(" (rssi %d:%d:%d nf %d:%d:%d)",
-   mi->rssi[0], mi->rssi[1], mi->rssi[2],
+   printf(" (rssi %.1f:%.1f:%.1f nf %d:%d:%d)",
+   mi->rssi[0] / 2.0, mi->rssi[1] / 2.0, mi->rssi[2] / 2.0,
mi->noise[0], mi->noise[1], mi->noise[2]);
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Marcel Moolenaar
On October 7, 2016 at 5:13:10 PM, Julian Elischer (jul...@freebsd.org) wrote:
On 7/10/2016 4:29 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 4:18:31 PM, Julian Elischer (jul...@freebsd.org) wrote:
On 7/10/2016 4:12 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 3:18:10 PM, John Baldwin (j...@freebsd.org) wrote:
On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: 
> On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) wrote: 
> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: 
> *snip* 
> 
> > Author: marcel 
> > Date: Fri Oct 7 15:42:20 2016 
> > New Revision: 306811 
> > URL: https://svnweb.freebsd.org/changeset/base/306811 
> > 
> > Added: 
> > head/sys/sys/disk/ 
> > head/sys/sys/disk/apm.h 
> > - copied, changed from r306810, head/sys/sys/apm.h 
> > head/sys/sys/disk/bsd.h 
> > - copied, changed from r306810, head/sys/sys/disklabel.h 
> > head/sys/sys/disk/gpt.h 
> > - copied, changed from r306810, head/sys/sys/gpt.h 
> > head/sys/sys/disk/mbr.h 
> > - copied, changed from r306810, head/sys/sys/diskmbr.h 
> > head/sys/sys/disk/pc98.h 
> > - copied, changed from r306810, head/sys/sys/diskpc98.h 
> > head/sys/sys/disk/vtoc.h 
> > - copied, changed from r306810, head/sys/sys/vtoc.h 
> > Replaced: 
> > head/sys/sys/apm.h (contents, props changed) 
> > head/sys/sys/disklabel.h (contents, props changed) 
> > head/sys/sys/diskmbr.h (contents, props changed) 
> > head/sys/sys/diskpc98.h (contents, props changed) 
> > head/sys/sys/gpt.h (contents, props changed) 
> > head/sys/sys/vtoc.h (contents, props changed) 
> 
> Somehow this destroyed the history on these files. They showed up as 
> deleted and then added instead of modified. If you 'svn log' on them 
> now you only get this commit and none of the previous history. I've 
> no idea if there's a way to recover this? Had you originally done an 
> 'svn mv' in your checkout and then copied the files back over or some 
> such? 
> I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. 
> New files were put where the old files used to be. 
> 
> Should I have done a svn copy? 

I think a copy would have been best. There is content in the sys/foo.h files 
still that has valid history (not all the lines were moved). Even if you had 
moved it all, I think a copy would still be best. I would only use a move 
if you are completely removing the original file. I'm not sure if there's a 
non-unfun way to recover from this. You might be able to copy the files from 
the previous revision, reapply your changes and then commit that. 
Ok. I’ll work on recovering the history of the original files.

Maybe the repo masters can undo/delete the commit easily and I’ll just 
recommit. Avoids polluting the history…



I'll keep an eye out for my svn -> p4 mirror importer exploding in that area in 
the near future.
this sort of thing makes it very ill, especially files going away and coming 
back.
I just asked svnadm@ for advice. I’m sure they can suggest a way that doesn’t 
blow things up downstream consumers. I’m fine with the manual labor if that’s 
preferred...



I run a svn-> P4 imoprter that is importign at 1:1..  so change 30 in SVN 
is 30 in p4.
If we end up making extra or missing revisions, I'll lose that 1:1 feature 
..e.g.  if 35 in svn maps to 350001  or 34 in p4 that's  a lot less 
useful to me..
I’ll keep that in mind. If svnadm@ has no strong opinions, I’ll manually fix it 
up using commits.

Thanks for the info,




signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Julian Elischer

On 7/10/2016 4:29 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 4:18:31 PM, Julian Elischer 
(jul...@freebsd.org ) wrote:

On 7/10/2016 4:12 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 3:18:10 PM, John Baldwin (j...@freebsd.org 
) wrote:

On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:
> On October 7, 2016 at 11:02:44 AM, John Baldwin 
(j...@freebsd.org) wrote:

> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:
> *snip*
>
> > Author: marcel
> > Date: Fri Oct 7 15:42:20 2016
> > New Revision: 306811
> > URL:https://svnweb.freebsd.org/changeset/base/306811
> >
> > Added:
> > head/sys/sys/disk/
> > head/sys/sys/disk/apm.h
> > - copied, changed from r306810, head/sys/sys/apm.h
> > head/sys/sys/disk/bsd.h
> > - copied, changed from r306810, head/sys/sys/disklabel.h
> > head/sys/sys/disk/gpt.h
> > - copied, changed from r306810, head/sys/sys/gpt.h
> > head/sys/sys/disk/mbr.h
> > - copied, changed from r306810, head/sys/sys/diskmbr.h
> > head/sys/sys/disk/pc98.h
> > - copied, changed from r306810, head/sys/sys/diskpc98.h
> > head/sys/sys/disk/vtoc.h
> > - copied, changed from r306810, head/sys/sys/vtoc.h
> > Replaced:
> > head/sys/sys/apm.h (contents, props changed)
> > head/sys/sys/disklabel.h (contents, props changed)
> > head/sys/sys/diskmbr.h (contents, props changed)
> > head/sys/sys/diskpc98.h (contents, props changed)
> > head/sys/sys/gpt.h (contents, props changed)
> > head/sys/sys/vtoc.h (contents, props changed)
>
> Somehow this destroyed the history on these files. They showed 
up as
> deleted and then added instead of modified. If you 'svn log' on 
them

> now you only get this commit and none of the previous history. I've
> no idea if there's a way to recover this? Had you originally 
done an
> 'svn mv' in your checkout and then copied the files back over 
or some

> such?
> I did a move from sys/X.h to sys/disk/X.h. The history moved to 
sys/disk/X.h. New files were put where the old files used to be.

>
> Should I have done a svn copy?

I think a copy would have been best. There is content in the 
sys/foo.h files
still that has valid history (not all the lines were moved). Even 
if you had
moved it all, I think a copy would still be best. I would only 
use a move
if you are completely removing the original file. I'm not sure if 
there's a
non-unfun way to recover from this. You might be able to copy the 
files from

the previous revision, reapply your changes and then commit that.


Ok. I’ll work on recovering the history of the original files.

Maybe the repo masters can undo/delete the commit easily and I’ll 
just recommit. Avoids polluting the history…



I'll keep an eye out for my svn -> p4 mirror importer exploding in 
that area in the near future.
this sort of thing makes it very ill, especially files going away 
and coming back.


I just asked svnadm@ for advice. I’m sure they can suggest a way 
that doesn’t blow things up downstream consumers. I’m fine with the 
manual labor if that’s preferred...



I run a svn-> P4 imoprter that is importign at 1:1..  so change 30 
in SVN is 30 in p4.
If we end up making extra or missing revisions, I'll lose that 1:1 
feature ..e.g.  if 35 in svn maps to 350001  or 34 in p4 
that's  a lot less useful to me..




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

Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Marcel Moolenaar
On October 7, 2016 at 4:18:31 PM, Julian Elischer (jul...@freebsd.org) wrote:
On 7/10/2016 4:12 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 3:18:10 PM, John Baldwin (j...@freebsd.org) wrote:
On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: 
> On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) wrote: 
> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: 
> *snip* 
> 
> > Author: marcel 
> > Date: Fri Oct 7 15:42:20 2016 
> > New Revision: 306811 
> > URL: https://svnweb.freebsd.org/changeset/base/306811 
> > 
> > Added: 
> > head/sys/sys/disk/ 
> > head/sys/sys/disk/apm.h 
> > - copied, changed from r306810, head/sys/sys/apm.h 
> > head/sys/sys/disk/bsd.h 
> > - copied, changed from r306810, head/sys/sys/disklabel.h 
> > head/sys/sys/disk/gpt.h 
> > - copied, changed from r306810, head/sys/sys/gpt.h 
> > head/sys/sys/disk/mbr.h 
> > - copied, changed from r306810, head/sys/sys/diskmbr.h 
> > head/sys/sys/disk/pc98.h 
> > - copied, changed from r306810, head/sys/sys/diskpc98.h 
> > head/sys/sys/disk/vtoc.h 
> > - copied, changed from r306810, head/sys/sys/vtoc.h 
> > Replaced: 
> > head/sys/sys/apm.h (contents, props changed) 
> > head/sys/sys/disklabel.h (contents, props changed) 
> > head/sys/sys/diskmbr.h (contents, props changed) 
> > head/sys/sys/diskpc98.h (contents, props changed) 
> > head/sys/sys/gpt.h (contents, props changed) 
> > head/sys/sys/vtoc.h (contents, props changed) 
> 
> Somehow this destroyed the history on these files. They showed up as 
> deleted and then added instead of modified. If you 'svn log' on them 
> now you only get this commit and none of the previous history. I've 
> no idea if there's a way to recover this? Had you originally done an 
> 'svn mv' in your checkout and then copied the files back over or some 
> such? 
> I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. 
> New files were put where the old files used to be. 
> 
> Should I have done a svn copy? 

I think a copy would have been best. There is content in the sys/foo.h files 
still that has valid history (not all the lines were moved). Even if you had 
moved it all, I think a copy would still be best. I would only use a move 
if you are completely removing the original file. I'm not sure if there's a 
non-unfun way to recover from this. You might be able to copy the files from 
the previous revision, reapply your changes and then commit that. 
Ok. I’ll work on recovering the history of the original files.

Maybe the repo masters can undo/delete the commit easily and I’ll just 
recommit. Avoids polluting the history…



I'll keep an eye out for my svn -> p4 mirror importer exploding in that area in 
the near future.
this sort of thing makes it very ill, especially files going away and coming 
back.
I just asked svnadm@ for advice. I’m sure they can suggest a way that doesn’t 
blow things up downstream consumers. I’m fine with the manual labor if that’s 
preferred...




signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Julian Elischer

On 7/10/2016 4:12 PM, Marcel Moolenaar wrote:
On October 7, 2016 at 3:18:10 PM, John Baldwin (j...@freebsd.org 
) wrote:

On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:
> On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) 
wrote:

> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:
> *snip*
>
> > Author: marcel
> > Date: Fri Oct 7 15:42:20 2016
> > New Revision: 306811
> > URL: https://svnweb.freebsd.org/changeset/base/306811
> >
> > Added:
> > head/sys/sys/disk/
> > head/sys/sys/disk/apm.h
> > - copied, changed from r306810, head/sys/sys/apm.h
> > head/sys/sys/disk/bsd.h
> > - copied, changed from r306810, head/sys/sys/disklabel.h
> > head/sys/sys/disk/gpt.h
> > - copied, changed from r306810, head/sys/sys/gpt.h
> > head/sys/sys/disk/mbr.h
> > - copied, changed from r306810, head/sys/sys/diskmbr.h
> > head/sys/sys/disk/pc98.h
> > - copied, changed from r306810, head/sys/sys/diskpc98.h
> > head/sys/sys/disk/vtoc.h
> > - copied, changed from r306810, head/sys/sys/vtoc.h
> > Replaced:
> > head/sys/sys/apm.h (contents, props changed)
> > head/sys/sys/disklabel.h (contents, props changed)
> > head/sys/sys/diskmbr.h (contents, props changed)
> > head/sys/sys/diskpc98.h (contents, props changed)
> > head/sys/sys/gpt.h (contents, props changed)
> > head/sys/sys/vtoc.h (contents, props changed)
>
> Somehow this destroyed the history on these files. They showed up as
> deleted and then added instead of modified. If you 'svn log' on them
> now you only get this commit and none of the previous history. I've
> no idea if there's a way to recover this? Had you originally done an
> 'svn mv' in your checkout and then copied the files back over or some
> such?
> I did a move from sys/X.h to sys/disk/X.h. The history moved to 
sys/disk/X.h. New files were put where the old files used to be.

>
> Should I have done a svn copy?

I think a copy would have been best. There is content in the 
sys/foo.h files
still that has valid history (not all the lines were moved). Even 
if you had
moved it all, I think a copy would still be best. I would only use 
a move
if you are completely removing the original file. I'm not sure if 
there's a
non-unfun way to recover from this. You might be able to copy the 
files from

the previous revision, reapply your changes and then commit that.


Ok. I’ll work on recovering the history of the original files.

Maybe the repo masters can undo/delete the commit easily and I’ll 
just recommit. Avoids polluting the history…



I'll keep an eye out for my svn -> p4 mirror importer exploding in 
that area in the near future.
this sort of thing makes it very ill, especially files going away and 
coming back.





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

Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Marcel Moolenaar
On October 7, 2016 at 3:18:10 PM, John Baldwin (j...@freebsd.org) wrote:
On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: 
> On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) wrote: 
> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: 
> *snip* 
> 
> > Author: marcel 
> > Date: Fri Oct 7 15:42:20 2016 
> > New Revision: 306811 
> > URL: https://svnweb.freebsd.org/changeset/base/306811 
> > 
> > Added: 
> > head/sys/sys/disk/ 
> > head/sys/sys/disk/apm.h 
> > - copied, changed from r306810, head/sys/sys/apm.h 
> > head/sys/sys/disk/bsd.h 
> > - copied, changed from r306810, head/sys/sys/disklabel.h 
> > head/sys/sys/disk/gpt.h 
> > - copied, changed from r306810, head/sys/sys/gpt.h 
> > head/sys/sys/disk/mbr.h 
> > - copied, changed from r306810, head/sys/sys/diskmbr.h 
> > head/sys/sys/disk/pc98.h 
> > - copied, changed from r306810, head/sys/sys/diskpc98.h 
> > head/sys/sys/disk/vtoc.h 
> > - copied, changed from r306810, head/sys/sys/vtoc.h 
> > Replaced: 
> > head/sys/sys/apm.h (contents, props changed) 
> > head/sys/sys/disklabel.h (contents, props changed) 
> > head/sys/sys/diskmbr.h (contents, props changed) 
> > head/sys/sys/diskpc98.h (contents, props changed) 
> > head/sys/sys/gpt.h (contents, props changed) 
> > head/sys/sys/vtoc.h (contents, props changed) 
> 
> Somehow this destroyed the history on these files. They showed up as 
> deleted and then added instead of modified. If you 'svn log' on them 
> now you only get this commit and none of the previous history. I've 
> no idea if there's a way to recover this? Had you originally done an 
> 'svn mv' in your checkout and then copied the files back over or some 
> such? 
> I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. 
> New files were put where the old files used to be. 
> 
> Should I have done a svn copy? 

I think a copy would have been best. There is content in the sys/foo.h files 
still that has valid history (not all the lines were moved). Even if you had 
moved it all, I think a copy would still be best. I would only use a move 
if you are completely removing the original file. I'm not sure if there's a 
non-unfun way to recover from this. You might be able to copy the files from 
the previous revision, reapply your changes and then commit that. 
Ok. I’ll work on recovering the history of the original files.

Maybe the repo masters can undo/delete the commit easily and I’ll just 
recommit. Avoids polluting the history…




signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread John Baldwin
On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:
> On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) wrote:
> On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: 
> *snip*
> 
> > Author: marcel 
> > Date: Fri Oct 7 15:42:20 2016 
> > New Revision: 306811 
> > URL: https://svnweb.freebsd.org/changeset/base/306811 
> > 
> > Added: 
> > head/sys/sys/disk/ 
> > head/sys/sys/disk/apm.h 
> > - copied, changed from r306810, head/sys/sys/apm.h 
> > head/sys/sys/disk/bsd.h 
> > - copied, changed from r306810, head/sys/sys/disklabel.h 
> > head/sys/sys/disk/gpt.h 
> > - copied, changed from r306810, head/sys/sys/gpt.h 
> > head/sys/sys/disk/mbr.h 
> > - copied, changed from r306810, head/sys/sys/diskmbr.h 
> > head/sys/sys/disk/pc98.h 
> > - copied, changed from r306810, head/sys/sys/diskpc98.h 
> > head/sys/sys/disk/vtoc.h 
> > - copied, changed from r306810, head/sys/sys/vtoc.h 
> > Replaced: 
> > head/sys/sys/apm.h (contents, props changed) 
> > head/sys/sys/disklabel.h (contents, props changed) 
> > head/sys/sys/diskmbr.h (contents, props changed) 
> > head/sys/sys/diskpc98.h (contents, props changed) 
> > head/sys/sys/gpt.h (contents, props changed) 
> > head/sys/sys/vtoc.h (contents, props changed) 
> 
> Somehow this destroyed the history on these files. They showed up as 
> deleted and then added instead of modified. If you 'svn log' on them 
> now you only get this commit and none of the previous history. I've 
> no idea if there's a way to recover this? Had you originally done an 
> 'svn mv' in your checkout and then copied the files back over or some 
> such? 
> I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. 
> New files were put where the old files used to be.
> 
> Should I have done a svn copy?

I think a copy would have been best.  There is content in the sys/foo.h files
still that has valid history (not all the lines were moved).  Even if you had
moved it all, I think a copy would still be best.  I would only use a move
if you are completely removing the original file.  I'm not sure if there's a
non-unfun way to recover from this.  You might be able to copy the files from
the previous revision, reapply your changes and then commit that.

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


svn commit: r306830 - head/usr.sbin/arp

2016-10-07 Thread Eric van Gyzen
Author: vangyzen
Date: Fri Oct  7 22:17:25 2016
New Revision: 306830
URL: https://svnweb.freebsd.org/changeset/base/306830

Log:
  Additional cleanup of the arp(4) man page after r306652
  
  Submitted by: David A. Bright 
  Requested by: wblock
  Reviewed by:  wblock
  MFC after:23 days
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D8183

Modified:
  head/usr.sbin/arp/arp.4

Modified: head/usr.sbin/arp/arp.4
==
--- head/usr.sbin/arp/arp.4 Fri Oct  7 21:10:53 2016(r306829)
+++ head/usr.sbin/arp/arp.4 Fri Oct  7 22:17:25 2016(r306830)
@@ -28,7 +28,7 @@
 .\"@(#)arp4.4  6.5 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd October 3, 2016
+.Dd October 7, 2016
 .Dt ARP 4
 .Os
 .Sh NAME
@@ -121,67 +121,65 @@ of the
 MIB.
 .Bl -tag -width "log_arp_permanent_modify"
 .It Va allow_multicast
-Should the kernel install ARP entries with multicast bit set in
-the hardware address.
-Installing such entries is RFC 1812 violation, but some prorietary
-load balancing techniques require routers on network to do so.
+Install ARP entries with the multicast bit set in the hardware address.
+Installing such entries is an RFC 1812 violation, but some proprietary load
+balancing techniques require routers to do so.
 Turned off by default.
 .It Va garp_rexmit_count
-Should the kernel retransmit gratuitous ARP (GARP) packets when an IPv4 address
-is added to an interface.
+Retransmit gratuitous ARP (GARP) packets when an IPv4 address is added to an
+interface.
 A GARP is always transmitted when an IPv4 address is added to an interface.
-A non-zero value of this sysctl will cause the GARP packet to be retransmitted
-the stated number of times.
+A non-zero value causes the GARP packet to be retransmitted the stated number
+of times.
 The interval between retransmissions is doubled each time, so the
 retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds).
 The default value of zero means only the initial GARP is sent; no
 additional GARP packets are retransmitted.
 The maximum value is sixteen.
 .Pp
-Although a single GARP packet (the default behavior) is usually sufficient, in
-some circumstances, such as when a shared address is passed between cluster
-nodes, this single GARP may be dropped or lost.
-This can lead to neighbors on the network link working with a stale ARP cache
-and sending packets destined for that address to the node that previously owned
-the address, which may not respond.
+The default behavior of a single GARP packet is usually sufficient.
+However, a single GARP might be dropped or lost in some circumstances.
+This is particularly harmful when a shared address is passed between cluster
+nodes.
+Neighbors on the network link might then work with a stale ARP cache and send
+packets destined for that address to the node that previously owned the
+address, which might not respond.
 .It Va log_arp_movements
-Should the kernel log movements of IP addresses from one hardware
-address to an other.
+Log movements of IP addresses from one hardware address to another.
 See
 .Sx DIAGNOSTICS
 below.
 Turned on by default.
 .It Va log_arp_permanent_modify
-Should the kernel log attempts of remote host on network to modify a
-permanent ARP entry.
+Log attempts by a remote host to modify a permanent ARP entry.
 See
 .Sx DIAGNOSTICS
 below.
 Turned on by default.
 .It Va log_arp_wrong_iface
-Should the kernel log attempts to insert an ARP entry on an interface
-when the IP network the address belongs to is connected to an other
-interface.
+Log attempts to insert an ARP entry on an interface when the IP network to
+which the address belongs is connected to another interface.
 See
 .Sx DIAGNOSTICS
 below.
 Turned on by default.
 .It Va max_log_per_second
-Limit number of remotely triggered logging events to a configured value
-per second.
+Limit the number of remotely triggered logging events to a configured value per
+second.
 Default is 1 log message per second.
 .It Va max_age
 How long an ARP entry is held in the cache until it needs to be refreshed.
 Default is 1200 seconds.
 .It Va maxhold
-How many packets hold in the per-entry output queue while the entry
+How many packets to hold in the per-entry output queue while the entry
 is being resolved.
 Default is one packet.
 .It Va maxtries
-Number of retransmits before host is considered down and error is returned.
+Number of retransmits before a host is considered down and an error is
+returned.
 Default is 5 tries.
 .It Va proxyall
-Enables ARP proxying for all hosts on net.
+Enables ARP proxying.
 Turned off by default.
 .It Va wait
 Lifetime of an incomplete ARP entry.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306829 - in head/sys: netinet netinet6

2016-10-07 Thread Mark Johnston
Author: markj
Date: Fri Oct  7 21:10:53 2016
New Revision: 306829
URL: https://svnweb.freebsd.org/changeset/base/306829

Log:
  Lock the ND prefix list and add refcounting for prefixes.
  
  This change extends the nd6 lock to protect the ND prefix list as well
  as the list of advertising routers associated with each prefix. To handle
  cases where the nd6 lock must be dropped while iterating over either the
  prefix or default router lists, a generation counter is used to track
  modifications to the lists. Additionally, a new mutex is used to serialize
  prefix on-link/off-link transitions. This mutex must be acquired before
  the nd6 lock and is held while updating the routing table in
  nd6_prefix_onlink() and nd6_prefix_offlink().
  
  Reviewed by:  ae, tuexen (SCTP bits)
  Tested by:Jason Wolfe ,
Larry Rosenman 
  MFC after:2 months
  Differential Revision:https://reviews.freebsd.org/D8125

Modified:
  head/sys/netinet/sctp_output.c
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_ifattach.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Fri Oct  7 21:03:18 2016
(r306828)
+++ head/sys/netinet/sctp_output.c  Fri Oct  7 21:10:53 2016
(r306829)
@@ -13747,6 +13747,7 @@ sctp_v6src_match_nexthop(struct sockaddr
return (0);
 
/* get prefix entry of address */
+   ND6_RLOCK();
LIST_FOREACH(pfx, _GLOBAL(nd_prefix), ndpr_entry) {
if (pfx->ndpr_stateflags & NDPRF_DETACHED)
continue;
@@ -13756,6 +13757,7 @@ sctp_v6src_match_nexthop(struct sockaddr
}
/* no prefix entry in the prefix list */
if (pfx == NULL) {
+   ND6_RUNLOCK();
SCTPDBG(SCTP_DEBUG_OUTPUT2, "No prefix entry for ");
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6);
return (0);
@@ -13777,9 +13779,11 @@ sctp_v6src_match_nexthop(struct sockaddr
if (sctp_cmpaddr((struct sockaddr *),
ro->ro_rt->rt_gateway)) {
SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is installed\n");
+   ND6_RUNLOCK();
return (1);
}
}
+   ND6_RUNLOCK();
SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is not installed\n");
return (0);
 }

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Fri Oct  7 21:03:18 2016(r306828)
+++ head/sys/netinet6/in6.c Fri Oct  7 21:10:53 2016(r306829)
@@ -647,6 +647,7 @@ in6_control(struct socket *so, u_long cm
}
}
}
+   nd6_prefix_rele(pr);
 
/*
 * this might affect the status of autoconfigured addresses,
@@ -694,8 +695,12 @@ aifaddr_out:
 */
pr = ia->ia6_ndpr;
in6_purgeaddr(>ia_ifa);
-   if (pr && pr->ndpr_addrcnt == 0)
-   prelist_remove(pr);
+   if (pr != NULL && pr->ndpr_addrcnt == 0) {
+   ND6_WLOCK();
+   nd6_prefix_unlink(pr, NULL);
+   ND6_WUNLOCK();
+   nd6_prefix_del(pr);
+   }
EVENTHANDLER_INVOKE(ifaddr_event, ifp);
break;
}

Modified: head/sys/netinet6/in6_ifattach.c
==
--- head/sys/netinet6/in6_ifattach.cFri Oct  7 21:03:18 2016
(r306828)
+++ head/sys/netinet6/in6_ifattach.cFri Oct  7 21:10:53 2016
(r306829)
@@ -453,6 +453,7 @@ in6_ifattach_linklocal(struct ifnet *ifp
struct in6_ifaddr *ia;
struct in6_aliasreq ifra;
struct nd_prefixctl pr0;
+   struct nd_prefix *pr;
int error;
 
/*
@@ -535,10 +536,11 @@ in6_ifattach_linklocal(struct ifnet *ifp
 * address, and then reconfigure another one, the prefix is still
 * valid with referring to the old link-local address.
 */
-   if (nd6_prefix_lookup() == NULL) {
+   if ((pr = nd6_prefix_lookup()) == NULL) {
if ((error = nd6_prelist_add(, NULL, NULL)) != 0)
return (error);
-   }
+   } else
+   nd6_prefix_rele(pr);
 
return 0;
 }
@@ -778,15 +780,6 @@ _in6_ifdetach(struct ifnet *ifp, int pur
return;
 
/*
-* Remove neighbor management table.
-* Enabling the nd6_purge will panic on vmove for interfaces on VNET
-* teardown as the IPv6 layer is cleaned up already and the locks
-* are 

svn commit: r306828 - head/sys/netinet6

2016-10-07 Thread Mark Johnston
Author: markj
Date: Fri Oct  7 21:03:18 2016
New Revision: 306828
URL: https://svnweb.freebsd.org/changeset/base/306828

Log:
  Reduce the number of conditional statements in nd6_prefix_onlink().
  
  MFC after:1 week

Modified:
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/nd6_rtr.c
==
--- head/sys/netinet6/nd6_rtr.c Fri Oct  7 21:03:12 2016(r306827)
+++ head/sys/netinet6/nd6_rtr.c Fri Oct  7 21:03:18 2016(r306828)
@@ -1734,11 +1734,11 @@ nd6_prefix_onlink(struct nd_prefix *pr)
/* XXX: freebsd does not have ifa_ifwithaf */
IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, >if_addrhead, ifa_link) {
-   if (ifa->ifa_addr->sa_family == AF_INET6)
+   if (ifa->ifa_addr->sa_family == AF_INET6) {
+   ifa_ref(ifa);
break;
+   }
}
-   if (ifa != NULL)
-   ifa_ref(ifa);
IF_ADDR_RUNLOCK(ifp);
/* should we care about ia6_flags? */
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306827 - head/usr.sbin/pmcstat

2016-10-07 Thread Stephen J. Kiernan
Author: stevek
Date: Fri Oct  7 21:03:12 2016
New Revision: 306827
URL: https://svnweb.freebsd.org/changeset/base/306827

Log:
  Just remove freeing memory in pmcstat_cleanup, since we only clean up
  when we are exiting anyway.
  
  Add NULL checks for all malloc and strdup returns.
  
  Reviewed by:  gnn
  Approved by:  sjg (mentor)
  Obtained from:Juniper Networks, Inc.
  Differential Revision:https://reviews.freebsd.org/D8002

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

Modified: head/usr.sbin/pmcstat/pmcstat.c
==
--- head/usr.sbin/pmcstat/pmcstat.c Fri Oct  7 21:02:30 2016
(r306826)
+++ head/usr.sbin/pmcstat/pmcstat.c Fri Oct  7 21:03:12 2016
(r306827)
@@ -133,9 +133,13 @@ pmcstat_clone_event_descriptor(struct pm
ev_clone->ev_flags = ev->ev_flags;
ev_clone->ev_mode  = ev->ev_mode;
ev_clone->ev_name  = strdup(ev->ev_name);
+   if (ev_clone->ev_name == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory");
ev_clone->ev_pmcid = ev->ev_pmcid;
ev_clone->ev_saved = ev->ev_saved;
ev_clone->ev_spec  = strdup(ev->ev_spec);
+   if (ev_clone->ev_spec == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory");
 
STAILQ_INSERT_TAIL(_events, ev_clone, ev_next);
}
@@ -192,22 +196,20 @@ pmcstat_attach_pmcs(void)
 void
 pmcstat_cleanup(void)
 {
-   struct pmcstat_ev *ev, *tmp;
+   struct pmcstat_ev *ev;
 
/* release allocated PMCs. */
-   STAILQ_FOREACH_SAFE(ev, _events, ev_next, tmp)
-   if (ev->ev_pmcid != PMC_ID_INVALID) {
-   if (pmc_stop(ev->ev_pmcid) < 0)
-   err(EX_OSERR, "ERROR: cannot stop pmc 0x%x \"%s\"",
-   ev->ev_pmcid, ev->ev_name);
-   if (pmc_release(ev->ev_pmcid) < 0)
-   err(EX_OSERR, "ERROR: cannot release pmc 0x%x \"%s\"",
-   ev->ev_pmcid, ev->ev_name);
-   free(ev->ev_name);
-   free(ev->ev_spec);
-   STAILQ_REMOVE(_events, ev, pmcstat_ev, ev_next);
-   free(ev);
-   }
+   STAILQ_FOREACH(ev, _events, ev_next)
+   if (ev->ev_pmcid != PMC_ID_INVALID) {
+   if (pmc_stop(ev->ev_pmcid) < 0)
+   err(EX_OSERR,
+   "ERROR: cannot stop pmc 0x%x \"%s\"",
+   ev->ev_pmcid, ev->ev_name);
+   if (pmc_release(ev->ev_pmcid) < 0)
+   err(EX_OSERR,
+   "ERROR: cannot release pmc 0x%x \"%s\"",
+   ev->ev_pmcid, ev->ev_name);
+   }
 
/* de-configure the log file if present. */
if (args.pa_flags & (FLAG_HAS_PIPE | FLAG_HAS_OUTPUT_LOGFILE))
@@ -614,7 +616,9 @@ main(int argc, char **argv)
len = 0;
if (sysctlbyname("kern.bootfile", NULL, , NULL, 0) == -1)
err(EX_OSERR, "ERROR: Cannot determine path of running kernel");
-   args.pa_kernel = malloc(len + 1);
+   args.pa_kernel = malloc(len);
+   if (args.pa_kernel == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory.");
if (sysctlbyname("kern.bootfile", args.pa_kernel, , NULL, 0) == -1)
err(EX_OSERR, "ERROR: Cannot determine path of running kernel");
 
@@ -700,6 +704,8 @@ main(int argc, char **argv)
case 'k':   /* pathname to the kernel */
free(args.pa_kernel);
args.pa_kernel = strdup(optarg);
+   if (args.pa_kernel == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory");
args.pa_required |= FLAG_DO_ANALYSIS;
args.pa_flags|= FLAG_HAS_KERNELPATH;
break;
@@ -767,6 +773,8 @@ main(int argc, char **argv)
args.pa_flags |= FLAG_HAS_SYSTEM_PMCS;
 
ev->ev_spec  = strdup(optarg);
+   if (ev->ev_spec == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory.");
 
if (option == 'S' || option == 'P')
ev->ev_count = current_sampling_count;
@@ -796,6 +804,8 @@ main(int argc, char **argv)
/* extract event name */
c = strcspn(optarg, ", \t");
ev->ev_name = malloc(c + 1);
+   if (ev->ev_name == NULL)
+   errx(EX_SOFTWARE, "ERROR: Out of memory.");
(void) strncpy(ev->ev_name, optarg, c);
*(ev->ev_name + c) = '\0';
 
@@ -1086,6 +1096,8 @@ main(int argc, char 

svn commit: r306826 - head/sys/netinet6

2016-10-07 Thread Mark Johnston
Author: markj
Date: Fri Oct  7 21:02:30 2016
New Revision: 306826
URL: https://svnweb.freebsd.org/changeset/base/306826

Log:
  Combine several checks in nd6_prefix_offlink() into one.
  
  MFC after:1 week

Modified:
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/netinet6/nd6_rtr.c
==
--- head/sys/netinet6/nd6_rtr.c Fri Oct  7 20:01:59 2016(r306825)
+++ head/sys/netinet6/nd6_rtr.c Fri Oct  7 21:02:30 2016(r306826)
@@ -1825,17 +1825,12 @@ nd6_prefix_offlink(struct nd_prefix *pr)
 * interface.
 */
LIST_FOREACH(opr, _nd_prefix, ndpr_entry) {
-   if (opr == pr)
-   continue;
-
-   if ((opr->ndpr_stateflags & NDPRF_ONLINK) != 0)
-   continue;
-
/*
 * KAME specific: detached prefixes should not be
 * on-link.
 */
-   if ((opr->ndpr_stateflags & NDPRF_DETACHED) != 0)
+   if (opr == pr || (opr->ndpr_stateflags &
+   (NDPRF_ONLINK | NDPRF_DETACHED)) != 0)
continue;
 
if (opr->ndpr_plen == pr->ndpr_plen &&
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Marcel Moolenaar
On October 7, 2016 at 11:02:44 AM, John Baldwin (j...@freebsd.org) wrote:
On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: 
*snip*

> Author: marcel 
> Date: Fri Oct 7 15:42:20 2016 
> New Revision: 306811 
> URL: https://svnweb.freebsd.org/changeset/base/306811 
> 
> Added: 
> head/sys/sys/disk/ 
> head/sys/sys/disk/apm.h 
> - copied, changed from r306810, head/sys/sys/apm.h 
> head/sys/sys/disk/bsd.h 
> - copied, changed from r306810, head/sys/sys/disklabel.h 
> head/sys/sys/disk/gpt.h 
> - copied, changed from r306810, head/sys/sys/gpt.h 
> head/sys/sys/disk/mbr.h 
> - copied, changed from r306810, head/sys/sys/diskmbr.h 
> head/sys/sys/disk/pc98.h 
> - copied, changed from r306810, head/sys/sys/diskpc98.h 
> head/sys/sys/disk/vtoc.h 
> - copied, changed from r306810, head/sys/sys/vtoc.h 
> Replaced: 
> head/sys/sys/apm.h (contents, props changed) 
> head/sys/sys/disklabel.h (contents, props changed) 
> head/sys/sys/diskmbr.h (contents, props changed) 
> head/sys/sys/diskpc98.h (contents, props changed) 
> head/sys/sys/gpt.h (contents, props changed) 
> head/sys/sys/vtoc.h (contents, props changed) 

Somehow this destroyed the history on these files. They showed up as 
deleted and then added instead of modified. If you 'svn log' on them 
now you only get this commit and none of the previous history. I've 
no idea if there's a way to recover this? Had you originally done an 
'svn mv' in your checkout and then copied the files back over or some 
such? 
I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. 
New files were put where the old files used to be.

Should I have done a svn copy?




signature.asc
Description: Message signed with OpenPGP using AMPGpg


svn commit: r306825 - head/usr.sbin/portsnap/portsnap

2016-10-07 Thread Ed Maste
Author: emaste
Date: Fri Oct  7 20:01:59 2016
New Revision: 306825
URL: https://svnweb.freebsd.org/changeset/base/306825

Log:
  portsnap: use lam on the known good hash list
  
  This change is equivalent to the approach committed in r306417, but if
  sed has a bug it could be exploited by the untrusted tar file. Instead,
  generate the expected tar content and compare that with find's output.
  
  convert the expected hash list to the expected tar content filesystem
  layout, and compare that with find's output.
  
  Submitted by: cperciva (in review D8052)
  Reviewed by:  oshogbo
  MFC after:2 weeks

Modified:
  head/usr.sbin/portsnap/portsnap/portsnap.sh

Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh
==
--- head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Oct  7 19:28:45 2016
(r306824)
+++ head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Oct  7 20:01:59 2016
(r306825)
@@ -691,8 +691,9 @@ fetch_snapshot() {
fetch_index_sanity || return 1
 # Verify the snapshot contents
cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1
-   cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected
-   find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap
+   cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u |
+   lam -s 'snap/' - -s '.gz' > files.expected
+   find snap -mindepth 1 | sort > files.snap
if ! cmp -s files.expected files.snap; then
echo "unexpected files in snapshot."
return 1
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306823 - head/tools/tools/cxgbetool

2016-10-07 Thread Navdeep Parhar
Author: np
Date: Fri Oct  7 19:13:29 2016
New Revision: 306823
URL: https://svnweb.freebsd.org/changeset/base/306823

Log:
  cxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware
  configuration file to the card.

Modified:
  head/tools/tools/cxgbetool/cxgbetool.8
  head/tools/tools/cxgbetool/cxgbetool.c

Modified: head/tools/tools/cxgbetool/cxgbetool.8
==
--- head/tools/tools/cxgbetool/cxgbetool.8  Fri Oct  7 19:12:15 2016
(r306822)
+++ head/tools/tools/cxgbetool/cxgbetool.8  Fri Oct  7 19:13:29 2016
(r306823)
@@ -56,6 +56,10 @@
 .It
 .Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
 .It
+.Nm Ar nexus Cm loadcfg Ar fw-config.txt
+.It
+.Nm Ar nexus Cm loadcfg clear
+.It
 .Nm Ar nexus Cm loadfw Ar fw-image.bin
 .It
 .Nm Ar nexus Cm memdump Ar addr len
@@ -353,6 +357,15 @@ Delete filter that is at the given index
 .It Cm filter Cm list
 List all filters programmed into the hardware.
 .It Cm i2c Ar port_id devaddr addr Op Ar len
+.It Cm loadcfg Ar fw-config.txt
+Install the firmware configuration file contained in
+.Ar fw-config.txt
+to the card.
+Set hw.cxgbe.config_file="flash" in loader.conf to get
+.Xr cxgbe 4
+to use the on-flash configuration.
+.It Cm loadcfg Cm clear
+Erase configuration file from the card.
 .It Cm loadfw Ar fw-image.bin
 Install the firmware contained in
 .Ar fw-image.bin

Modified: head/tools/tools/cxgbetool/cxgbetool.c
==
--- head/tools/tools/cxgbetool/cxgbetool.c  Fri Oct  7 19:12:15 2016
(r306822)
+++ head/tools/tools/cxgbetool/cxgbetool.c  Fri Oct  7 19:13:29 2016
(r306823)
@@ -95,6 +95,8 @@ usage(FILE *fp)
"\tfilter list list all filters\n"
"\tfilter mode [] ...   get/set global filter mode\n"
"\ti2c[] read from i2c device\n"
+   "\tloadcfg  install configuration file\n"
+   "\tloadcfg clear   remove configuration file\n"
"\tloadfwinstall firmware\n"
"\tmemdump  dump a memory range\n"
"\tmodinfo  [raw]optics/cable information\n"
@@ -1835,6 +1837,49 @@ loadfw(int argc, const char *argv[])
 }
 
 static int
+loadcfg(int argc, const char *argv[])
+{
+   int rc, fd;
+   struct t4_data data = {0};
+   const char *fname = argv[0];
+   struct stat st = {0};
+
+   if (argc != 1) {
+   warnx("loadcfg: incorrect number of arguments.");
+   return (EINVAL);
+   }
+
+   if (strcmp(fname, "clear") == 0)
+   return (doit(CHELSIO_T4_LOAD_CFG, ));
+
+   fd = open(fname, O_RDONLY);
+   if (fd < 0) {
+   warn("open(%s)", fname);
+   return (errno);
+   }
+
+   if (fstat(fd, ) < 0) {
+   warn("fstat");
+   close(fd);
+   return (errno);
+   }
+
+   data.len = st.st_size;
+   data.len &= ~3; /* Clip off to make it a multiple of 4 */
+   data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0);
+   if (data.data == MAP_FAILED) {
+   warn("mmap");
+   close(fd);
+   return (errno);
+   }
+
+   rc = doit(CHELSIO_T4_LOAD_CFG, );
+   munmap(data.data, data.len);
+   close(fd);
+   return (rc);
+}
+
+static int
 read_mem(uint32_t addr, uint32_t len, void (*output)(uint32_t *, uint32_t))
 {
int rc;
@@ -2732,6 +2777,8 @@ run_cmd(int argc, const char *argv[])
rc = sched_class(argc, argv);
else if (!strcmp(cmd, "sched-queue"))
rc = sched_queue(argc, argv);
+   else if (!strcmp(cmd, "loadcfg"))
+   rc = loadcfg(argc, argv);
else {
rc = EINVAL;
warnx("invalid command \"%s\"", cmd);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306822 - head/usr.sbin/makefs

2016-10-07 Thread Ed Maste
Author: emaste
Date: Fri Oct  7 19:12:15 2016
New Revision: 306822
URL: https://svnweb.freebsd.org/changeset/base/306822

Log:
  makefs: diff reduction with NetBSD
  
  Obtained from:NetBSD usr.sbin/makefs/cd9660.c 1.33

Modified:
  head/usr.sbin/makefs/cd9660.c

Modified: head/usr.sbin/makefs/cd9660.c
==
--- head/usr.sbin/makefs/cd9660.c   Fri Oct  7 19:02:39 2016
(r306821)
+++ head/usr.sbin/makefs/cd9660.c   Fri Oct  7 19:12:15 2016
(r306822)
@@ -1622,6 +1622,7 @@ cd9660_level1_convert_filename(const cha
if (diskStructure.archimedes_enabled &&
*oldname == ',' && strlen(oldname) == 4)
break;
+
/* Enforce 12.3 / 8 */
if (namelen == 8 && !found_ext)
break;
@@ -1629,7 +1630,7 @@ cd9660_level1_convert_filename(const cha
if (islower((unsigned char)*oldname))
*newname++ = toupper((unsigned char)*oldname);
else if (isupper((unsigned char)*oldname)
-   || isdigit((unsigned char)*oldname))
+   || isdigit((unsigned char)*oldname))
*newname++ = *oldname;
else
*newname++ = '_';
@@ -1639,7 +1640,7 @@ cd9660_level1_convert_filename(const cha
else
namelen++;
}
-   oldname ++;
+   oldname++;
}
if (is_file) {
if (!found_ext && !diskStructure.omit_trailing_period)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306821 - head/sys/dev/cxgbe

2016-10-07 Thread Navdeep Parhar
Author: np
Date: Fri Oct  7 19:02:39 2016
New Revision: 306821
URL: https://svnweb.freebsd.org/changeset/base/306821

Log:
  cxgbe(4): Add an ioctl to copy a firmware config file to the card's flash.

Modified:
  head/sys/dev/cxgbe/t4_ioctl.h
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_ioctl.h
==
--- head/sys/dev/cxgbe/t4_ioctl.h   Fri Oct  7 19:02:13 2016
(r306820)
+++ head/sys/dev/cxgbe/t4_ioctl.h   Fri Oct  7 19:02:39 2016
(r306821)
@@ -56,6 +56,7 @@ enum {
T4_SET_SCHED_QUEUE, /* set queue class */
T4_GET_TRACER,  /* get information about a tracer */
T4_SET_TRACER,  /* program a tracer */
+   T4_LOAD_CFG,/* copy a config file to card's flash */
 };
 
 struct t4_reg {
@@ -344,4 +345,5 @@ struct t4_tracer {
 struct t4_sched_queue)
 #define CHELSIO_T4_GET_TRACER  _IOWR('f', T4_GET_TRACER, struct t4_tracer)
 #define CHELSIO_T4_SET_TRACER  _IOW('f', T4_SET_TRACER, struct t4_tracer)
+#define CHELSIO_T4_LOAD_CFG_IOW('f', T4_LOAD_CFG, struct t4_data)
 #endif

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cFri Oct  7 19:02:13 2016
(r306820)
+++ head/sys/dev/cxgbe/t4_main.cFri Oct  7 19:02:39 2016
(r306821)
@@ -549,6 +549,7 @@ static int set_tcb_rpl(struct sge_iq *, 
 struct mbuf *);
 static int get_sge_context(struct adapter *, struct t4_sge_context *);
 static int load_fw(struct adapter *, struct t4_data *);
+static int load_cfg(struct adapter *, struct t4_data *);
 static int read_card_mem(struct adapter *, int, struct t4_mem_range *);
 static int read_i2c(struct adapter *, struct t4_i2c_data *);
 #ifdef TCP_OFFLOAD
@@ -8620,6 +8621,38 @@ done:
return (rc);
 }
 
+static int
+load_cfg(struct adapter *sc, struct t4_data *cfg)
+{
+   int rc;
+   uint8_t *cfg_data = NULL;
+
+   rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4ldcf");
+   if (rc)
+   return (rc);
+
+   if (cfg->len == 0) {
+   /* clear */
+   rc = -t4_load_cfg(sc, NULL, 0);
+   goto done;
+   }
+
+   cfg_data = malloc(cfg->len, M_CXGBE, M_WAITOK);
+   if (cfg_data == NULL) {
+   rc = ENOMEM;
+   goto done;
+   }
+
+   rc = copyin(cfg->data, cfg_data, cfg->len);
+   if (rc == 0)
+   rc = -t4_load_cfg(sc, cfg_data, cfg->len);
+
+   free(cfg_data, M_CXGBE);
+done:
+   end_synchronized_op(sc, 0);
+   return (rc);
+}
+
 #define MAX_READ_BUF_SIZE (128 * 1024)
 static int
 read_card_mem(struct adapter *sc, int win, struct t4_mem_range *mr)
@@ -9177,6 +9210,9 @@ t4_ioctl(struct cdev *dev, unsigned long
case CHELSIO_T4_SET_TRACER:
rc = t4_set_tracer(sc, (struct t4_tracer *)data);
break;
+   case CHELSIO_T4_LOAD_CFG:
+   rc = load_cfg(sc, (struct t4_data *)data);
+   break;
default:
rc = ENOTTY;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306820 - head/usr.bin/cmp

2016-10-07 Thread Mariusz Zaborski
Author: oshogbo
Date: Fri Oct  7 19:02:13 2016
New Revision: 306820
URL: https://svnweb.freebsd.org/changeset/base/306820

Log:
  Restrict stdin if it's not in use.
  
  Reviewed by:  emaste, cem
  Differential Revision:https://reviews.freebsd.org/D8184

Modified:
  head/usr.bin/cmp/cmp.c

Modified: head/usr.bin/cmp/cmp.c
==
--- head/usr.bin/cmp/cmp.c  Fri Oct  7 18:56:24 2016(r306819)
+++ head/usr.bin/cmp/cmp.c  Fri Oct  7 19:02:13 2016(r306820)
@@ -164,6 +164,14 @@ main(int argc, char *argv[])
if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS)
err(ERR_EXIT, "unable to limit fcntls for %s", file2);
 
+   if (!special) {
+   cap_rights_init();
+   if (cap_rights_limit(STDIN_FILENO, ) < 0 &&
+   errno != ENOSYS) {
+   err(ERR_EXIT, "unable to limit stdio");
+   }
+   }
+
if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1)
err(ERR_EXIT, "unable to limit stdio");
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread John Baldwin
On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:
> Author: marcel
> Date: Fri Oct  7 15:42:20 2016
> New Revision: 306811
> URL: https://svnweb.freebsd.org/changeset/base/306811
> 
> Log:
>   In order to allow mkimg(1) (and other tools) to become a build tool
>   that can be compiled on various OSes (including on older versions
>   of FreeBSD), make it possible to have it include the partitioning
>   scheme definitions without pulling in FreeBSD specifics.
>   In particular this means:
>o  move the scheme definitions iand related defines to header files
>   under sys/disk,
>o  make them (more) portable by using uint#_t (where applicable)
>   and renaming defines so that they at least have a good prefix,
>o  make the new headers stand-alone so that they don't need FreeBSD
>   definitions, like struct uuid(*)
>o  keep the original headers for compatibility, but rewrite them to
>   get the scheme definitions from .
>   
>   (*) since UUID/GUID type definitions are non-portable and the GPT
>   scheme uses them, make it possible to have the scheme definitions
>   use an external type by allowing consumers of the header to set
>   GPT_UUID_TYPE. When GPT_UUID_TYPE has not been defined, the header
>   will use it's own type definition, which is the same as struct uuid.
>   The gpt_uuid_t typedef is created to abstract the details and allows
>   consumers to refer to a single type.
>   
>   There is not conflict between the partitioning scheme headers and
>   what is defined in them. All headers can be included in the same
>   source files.
>   
>   Note: consumers of the old headers have not been changed yet. Such
>   will be done if and when needed/beneficial.
>   
>   Reviewed by:imp, jhb
>   MFC after:  1 month
>   Sponsored by:   Bracket Computing
> 
> Added:
>   head/sys/sys/disk/
>   head/sys/sys/disk/apm.h
>  - copied, changed from r306810, head/sys/sys/apm.h
>   head/sys/sys/disk/bsd.h
>  - copied, changed from r306810, head/sys/sys/disklabel.h
>   head/sys/sys/disk/gpt.h
>  - copied, changed from r306810, head/sys/sys/gpt.h
>   head/sys/sys/disk/mbr.h
>  - copied, changed from r306810, head/sys/sys/diskmbr.h
>   head/sys/sys/disk/pc98.h
>  - copied, changed from r306810, head/sys/sys/diskpc98.h
>   head/sys/sys/disk/vtoc.h
>  - copied, changed from r306810, head/sys/sys/vtoc.h
> Replaced:
>   head/sys/sys/apm.h   (contents, props changed)
>   head/sys/sys/disklabel.h   (contents, props changed)
>   head/sys/sys/diskmbr.h   (contents, props changed)
>   head/sys/sys/diskpc98.h   (contents, props changed)
>   head/sys/sys/gpt.h   (contents, props changed)
>   head/sys/sys/vtoc.h   (contents, props changed)

Somehow this destroyed the history on these files.  They showed up as
deleted and then added instead of modified.  If you 'svn log' on them
now you only get this commit and none of the previous history.  I've
no idea if there's a way to recover this?  Had you originally done an
'svn mv' in your checkout and then copied the files back over or some
such?

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


svn commit: r306813 - in head/usr.bin: cmp col elfdump kdump tee tr

2016-10-07 Thread Mariusz Zaborski
Author: oshogbo
Date: Fri Oct  7 17:56:57 2016
New Revision: 306813
URL: https://svnweb.freebsd.org/changeset/base/306813

Log:
  Remove the duplicated code using Capsicum helpers.
  
  Reviewed by:  cem, ed, bapt, emaste
  Differential Revision https://reviews.freebsd.org/D8140

Modified:
  head/usr.bin/cmp/cmp.c
  head/usr.bin/col/col.c
  head/usr.bin/elfdump/elfdump.c
  head/usr.bin/kdump/kdump.c
  head/usr.bin/tee/tee.c
  head/usr.bin/tr/tr.c

Modified: head/usr.bin/cmp/cmp.c
==
--- head/usr.bin/cmp/cmp.c  Fri Oct  7 16:17:51 2016(r306812)
+++ head/usr.bin/cmp/cmp.c  Fri Oct  7 17:56:57 2016(r306813)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -53,7 +54,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "extern.h"
@@ -70,7 +70,6 @@ main(int argc, char *argv[])
int ch, fd1, fd2, oflag, special;
const char *file1, *file2;
cap_rights_t rights;
-   unsigned long cmd;
uint32_t fcntls;
 
oflag = O_RDONLY;
@@ -165,20 +164,10 @@ main(int argc, char *argv[])
if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS)
err(ERR_EXIT, "unable to limit fcntls for %s", file2);
 
-   cap_rights_init(, CAP_FSTAT, CAP_WRITE, CAP_IOCTL);
-   if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS)
-   err(ERR_EXIT, "unable to limit rights for stdout");
-
-   /* Required for printf(3) via isatty(3). */
-   cmd = TIOCGETA;
-   if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS)
-   err(ERR_EXIT, "unable to limit ioctls for stdout");
-
-   /*
-* Cache NLS data, for strerror, for err(3), before entering capability
-* mode.
-*/
-   (void)catopen("libc", NL_CAT_LOCALE);
+   if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1)
+   err(ERR_EXIT, "unable to limit stdio");
+
+   caph_cache_catpages();
 
if (cap_enter() < 0 && errno != ENOSYS)
err(ERR_EXIT, "unable to enter capability mode");

Modified: head/usr.bin/col/col.c
==
--- head/usr.bin/col/col.c  Fri Oct  7 16:17:51 2016(r306812)
+++ head/usr.bin/col/col.c  Fri Oct  7 17:56:57 2016(r306813)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -135,20 +136,11 @@ main(int argc, char **argv)
int nflushd_lines;  /* number of lines that were flushed */
int adjust, opt, warned, width;
const char *errstr;
-   cap_rights_t rights;
-   unsigned long cmd;
 
(void)setlocale(LC_CTYPE, "");
 
-   cap_rights_init(, CAP_FSTAT, CAP_READ);
-   if (cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS)
-   err(1, "unable to limit rights for stdin");
-   cap_rights_init(, CAP_FSTAT, CAP_WRITE, CAP_IOCTL);
-   if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS)
-   err(1, "unable to limit rights for stdout");
-   cmd = TIOCGETA; /* required by isatty(3) in printf(3) */
-   if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS)
-   err(1, "unable to limit ioctls for stdout");
+   if (caph_limit_stdio() == -1)
+   err(1, "unable to limit stdio");
 
if (cap_enter() < 0 && errno != ENOSYS)
err(1, "unable to enter capability mode");

Modified: head/usr.bin/elfdump/elfdump.c
==
--- head/usr.bin/elfdump/elfdump.c  Fri Oct  7 16:17:51 2016
(r306812)
+++ head/usr.bin/elfdump/elfdump.c  Fri Oct  7 17:56:57 2016
(r306813)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #defineED_DYN  (1<<0)
@@ -505,7 +505,6 @@ main(int ac, char **av)
u_int64_t name;
u_int64_t type;
struct stat sb;
-   unsigned long cmd;
u_int flags;
Elf32_Ehdr *e;
void *p;
@@ -573,14 +572,11 @@ main(int ac, char **av)
cap_rights_init(, CAP_MMAP_R);
if (cap_rights_limit(fd, ) < 0 && errno != ENOSYS)
err(1, "unable to limit rights for %s", *av);
-   cap_rights_limit(STDIN_FILENO, cap_rights_init());
-   cap_rights_init(, CAP_FSTAT, CAP_IOCTL, CAP_WRITE);
-   cmd = TIOCGETA; /* required by isatty(3) in printf(3) */
-   if ((cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) ||
-   (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) ||
-   (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != 

svn commit: r306812 - head/sys/boot/common

2016-10-07 Thread Andrew Turner
Author: andrew
Date: Fri Oct  7 16:17:51 2016
New Revision: 306812
URL: https://svnweb.freebsd.org/changeset/base/306812

Log:
  The bootloader self relocation code was slightly wrong for the
  R_AARCH64_RELATIVE relocation found on arm64. It would try to add the
  contents of the memory location being relocated to the base address and
  the relocation addend. This worked when the contents was zero, however
  this now seems to be set to the value of the addend so we add this twice.
  Fix this by just setting the memory to the computed value.
  
  Reviewed by:  emaste
  MFC after:1 week
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D8177

Modified:
  head/sys/boot/common/self_reloc.c

Modified: head/sys/boot/common/self_reloc.c
==
--- head/sys/boot/common/self_reloc.c   Fri Oct  7 15:42:20 2016
(r306811)
+++ head/sys/boot/common/self_reloc.c   Fri Oct  7 16:17:51 2016
(r306812)
@@ -108,12 +108,18 @@ self_reloc(Elf_Addr baseaddr, ElfW_Dyn *
break;
 
case RELOC_TYPE_RELATIVE:
-   /* Address relative to the base address. */
newaddr = (Elf_Addr *)(rel->r_offset + baseaddr);
-   *newaddr += baseaddr;
-   /* Add the addend when the ABI uses them */ 
 #ifdef ELF_RELA
-   *newaddr += rel->r_addend;
+   /*
+* For R_AARCH64_RELATIVE we need to calculate the
+* delta between the address we are run from and the
+* address we are linked at. As the latter is 0 we
+* just use the address we are run from for this.
+*/
+   *newaddr = baseaddr + rel->r_addend;
+#else
+   /* Address relative to the base address. */
+   *newaddr += baseaddr;
 #endif
break;
default:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk

2016-10-07 Thread Marcel Moolenaar
Author: marcel
Date: Fri Oct  7 15:42:20 2016
New Revision: 306811
URL: https://svnweb.freebsd.org/changeset/base/306811

Log:
  In order to allow mkimg(1) (and other tools) to become a build tool
  that can be compiled on various OSes (including on older versions
  of FreeBSD), make it possible to have it include the partitioning
  scheme definitions without pulling in FreeBSD specifics.
  In particular this means:
   o  move the scheme definitions iand related defines to header files
  under sys/disk,
   o  make them (more) portable by using uint#_t (where applicable)
  and renaming defines so that they at least have a good prefix,
   o  make the new headers stand-alone so that they don't need FreeBSD
  definitions, like struct uuid(*)
   o  keep the original headers for compatibility, but rewrite them to
  get the scheme definitions from .
  
  (*) since UUID/GUID type definitions are non-portable and the GPT
  scheme uses them, make it possible to have the scheme definitions
  use an external type by allowing consumers of the header to set
  GPT_UUID_TYPE. When GPT_UUID_TYPE has not been defined, the header
  will use it's own type definition, which is the same as struct uuid.
  The gpt_uuid_t typedef is created to abstract the details and allows
  consumers to refer to a single type.
  
  There is not conflict between the partitioning scheme headers and
  what is defined in them. All headers can be included in the same
  source files.
  
  Note: consumers of the old headers have not been changed yet. Such
  will be done if and when needed/beneficial.
  
  Reviewed by:  imp, jhb
  MFC after:1 month
  Sponsored by: Bracket Computing

Added:
  head/sys/sys/disk/
  head/sys/sys/disk/apm.h
 - copied, changed from r306810, head/sys/sys/apm.h
  head/sys/sys/disk/bsd.h
 - copied, changed from r306810, head/sys/sys/disklabel.h
  head/sys/sys/disk/gpt.h
 - copied, changed from r306810, head/sys/sys/gpt.h
  head/sys/sys/disk/mbr.h
 - copied, changed from r306810, head/sys/sys/diskmbr.h
  head/sys/sys/disk/pc98.h
 - copied, changed from r306810, head/sys/sys/diskpc98.h
  head/sys/sys/disk/vtoc.h
 - copied, changed from r306810, head/sys/sys/vtoc.h
Replaced:
  head/sys/sys/apm.h   (contents, props changed)
  head/sys/sys/disklabel.h   (contents, props changed)
  head/sys/sys/diskmbr.h   (contents, props changed)
  head/sys/sys/diskpc98.h   (contents, props changed)
  head/sys/sys/gpt.h   (contents, props changed)
  head/sys/sys/vtoc.h   (contents, props changed)
Modified:
  head/etc/mtree/BSD.include.dist
  head/include/Makefile

Modified: head/etc/mtree/BSD.include.dist
==
--- head/etc/mtree/BSD.include.dist Fri Oct  7 14:54:16 2016
(r306810)
+++ head/etc/mtree/BSD.include.dist Fri Oct  7 15:42:20 2016
(r306811)
@@ -336,6 +336,8 @@
 ssp
 ..
 sys
+disk
+..
 ..
 teken
 ..

Modified: head/include/Makefile
==
--- head/include/Makefile   Fri Oct  7 14:54:16 2016(r306810)
+++ head/include/Makefile   Fri Oct  7 15:42:20 2016(r306811)
@@ -59,6 +59,7 @@ LSUBDIRS= cam/ata cam/nvme cam/scsi \
security/audit \
security/mac_biba security/mac_bsdextended security/mac_lomac \
security/mac_mls security/mac_partition \
+   sys/disk \
ufs/ffs ufs/ufs
 
 LSUBSUBDIRS=   dev/mpt/mpilib

Added: head/sys/sys/apm.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/sys/apm.h  Fri Oct  7 15:42:20 2016(r306811)
@@ -0,0 +1,5 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
+#include 

Copied and modified: head/sys/sys/disk/apm.h (from r306810, head/sys/sys/apm.h)
==
--- head/sys/sys/apm.h  Fri Oct  7 14:54:16 2016(r306810, copy source)
+++ head/sys/sys/disk/apm.h Fri Oct  7 15:42:20 2016(r306811)
@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS_APM_H_
-#define_SYS_APM_H_
+#ifndef _SYS_DISK_APM_H_
+#define_SYS_DISK_APM_H_
 
 /* Driver Descriptor Record. */
 struct apm_ddr {
@@ -66,4 +66,4 @@ struct apm_ent {
 #defineAPM_ENT_TYPE_APPLE_HFS  "Apple_HFS"
 #defineAPM_ENT_TYPE_APPLE_UFS  "Apple_UNIX_SVR2"
 
-#endif /* _SYS_APM_H_ */
+#endif /* _SYS_DISK_APM_H_ */

Copied and modified: head/sys/sys/disk/bsd.h (from r306810, 
head/sys/sys/disklabel.h)
==
--- head/sys/sys/disklabel.hFri Oct  7 14:54:16 2016(r306810, copy 
source)
+++ head/sys/sys/disk/bsd.h Fri Oct  7 15:42:20 2016(r306811)
@@ -30,60 +30,45 @@
  * $FreeBSD$
  */
 
-#ifndef 

svn commit: r306808 - head/sbin/init

2016-10-07 Thread Konstantin Belousov
Author: kib
Date: Fri Oct  7 13:43:38 2016
New Revision: 306808
URL: https://svnweb.freebsd.org/changeset/base/306808

Log:
  Add verbosity around failed reboot(2) call.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks

Modified:
  head/sbin/init/init.c

Modified: head/sbin/init/init.c
==
--- head/sbin/init/init.c   Fri Oct  7 13:41:28 2016(r306807)
+++ head/sbin/init/init.c   Fri Oct  7 13:43:38 2016(r306808)
@@ -885,8 +885,13 @@ single_user(void)
if (Reboot) {
/* Instead of going single user, let's reboot the machine */
sync();
-   reboot(howto);
-   _exit(0);
+   if (reboot(howto) == -1) {
+   emergency("reboot(%#x) failed, %s", howto,
+   strerror(errno));
+   _exit(1); /* panic and reboot */
+   }
+   warning("reboot(%#x) returned", howto);
+   _exit(0); /* panic as well */
}
 
shell = get_shell();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306807 - head/sbin/init

2016-10-07 Thread Konstantin Belousov
Author: kib
Date: Fri Oct  7 13:41:28 2016
New Revision: 306807
URL: https://svnweb.freebsd.org/changeset/base/306807

Log:
  When making a pause after detecting hard kill of the single-user
  shell, ensure that we do sleep for at least the specified time, in
  presence of signals.
  
  Interrupted sleep(3) is followed by _exit(), which might cause 'Going
  nowhere without my init' panic if init(8) exits before the reboot(2)
  really started, or before SIGTSTP stopped init(8) (both events are
  initiated by the parallel reboot(8) operation).
  
  I do not see other calls to sleep(STALL_TIMEOUT) as having the same
  disasterous consequences and kept them as is until the similar change
  is proven required.
  
  Reported and tested by:   Andy Farkas 
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks

Modified:
  head/sbin/init/init.c

Modified: head/sbin/init/init.c
==
--- head/sbin/init/init.c   Fri Oct  7 12:57:35 2016(r306806)
+++ head/sbin/init/init.c   Fri Oct  7 13:41:28 2016(r306807)
@@ -870,6 +870,7 @@ single_user(void)
sigset_t mask;
const char *shell;
char *argv[2];
+   struct timeval tv, tn;
 #ifdef SECURE
struct ttyent *typ;
struct passwd *pp;
@@ -1002,7 +1003,14 @@ single_user(void)
 *  reboot(8) killed shell?
 */
warning("single user shell terminated.");
-   sleep(STALL_TIMEOUT);
+   gettimeofday(, NULL);
+   tn = tv;
+   tv.tv_sec += STALL_TIMEOUT;
+   while (tv.tv_sec > tn.tv_sec || (tv.tv_sec ==
+   tn.tv_sec && tv.tv_usec > tn.tv_usec)) {
+   sleep(1);
+   gettimeofday(, NULL);
+   }
_exit(0);
} else {
warning("single user shell terminated, restarting");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306806 - head/usr.bin/dtc

2016-10-07 Thread Ed Maste
Author: emaste
Date: Fri Oct  7 12:57:35 2016
New Revision: 306806
URL: https://svnweb.freebsd.org/changeset/base/306806

Log:
  Improvements to BSD-licensed DTC.
  
  - Numerous crash and bug fixes
  - Improved warning and error messages
  - Permit multiple labels on nodes and properties
  - Fix node@address references
  - Add support for /delete-node/
  - Consume whitespace after a node
  - Read the next token before the second /memreserve/
  - Fix parsing of whitespace
  - Clean up /delete-node/ and add support for /delete-property/
  - Handle /delete-node/ specifying a unit address
  
  Obtained from:https://github.com/davidchisnall/dtc @df5ede4

Modified:
  head/usr.bin/dtc/checking.cc
  head/usr.bin/dtc/checking.hh
  head/usr.bin/dtc/dtb.cc
  head/usr.bin/dtc/dtb.hh
  head/usr.bin/dtc/dtc.1
  head/usr.bin/dtc/dtc.cc
  head/usr.bin/dtc/fdt.cc
  head/usr.bin/dtc/fdt.hh
  head/usr.bin/dtc/input_buffer.cc
  head/usr.bin/dtc/input_buffer.hh
  head/usr.bin/dtc/string.cc
  head/usr.bin/dtc/util.hh

Modified: head/usr.bin/dtc/checking.cc
==
--- head/usr.bin/dtc/checking.ccFri Oct  7 11:50:59 2016
(r306805)
+++ head/usr.bin/dtc/checking.ccFri Oct  7 12:57:35 2016
(r306806)
@@ -33,7 +33,7 @@
 #include "checking.hh"
 #include 
 
-
+using std::string;
 
 namespace dtc
 {
@@ -44,6 +44,30 @@ namespace checking
 
 namespace
 {
+   struct deleted_node_checker : public checker
+   {
+   deleted_node_checker(const char *name) : checker(name) {}
+   virtual bool check_node(device_tree *, const node_ptr )
+   {
+   auto  = n->deleted_child_nodes();
+   if (deleted.empty())
+   {
+   return true;
+   }
+   bool plural = deleted.size() > 1;
+   string errmsg("Attempts to delete ");
+   errmsg += plural ? "nodes" : "node";
+   errmsg += " that ";
+   errmsg += plural ? "were" : "was";
+   errmsg += " not added in merge: ";
+   for (auto  : deleted)
+   {
+   errmsg += d;
+   }
+   report_error(errmsg.c_str());
+   return false;
+   }
+   };
/**
 * Checker that verifies that every node that has children has
 * #address-cells and #size-cells properties.
@@ -73,16 +97,16 @@ namespace
}
if (found_size && found_address)
{
-   break;
+   break;
}
}
if (!found_address)
{
-   report_error("Missing #address-cells 
property");
+   report_error("Missing #address-cells property");
}
if (!found_size)
{
-   report_error("Missing #size-cells 
property");
+   report_error("Missing #size-cells property");
}
return found_address && found_size;
}
@@ -126,11 +150,11 @@ checker::report_error(const char *errmsg
for (auto  : path)
{
putc('/', stderr);
-   p.first.dump();
+   puts(p.first.c_str());
if (!(p.second.empty()))
{
putc('@', stderr);
-   p.second.dump();
+   puts(p.second.c_str());
}
}
fprintf(stderr, " [-W%s]\n", checker_name);
@@ -167,7 +191,7 @@ property_size_checker::check(device_tree
 
 template
 void
-check_manager::add_property_type_checker(const char *name, string prop)
+check_manager::add_property_type_checker(const char *name, const string )
 {
checkers.insert(std::make_pair(string(name),
new property_type_checker(name, prop)));
@@ -175,7 +199,7 @@ check_manager::add_property_type_checker
 
 void
 check_manager::add_property_size_checker(const char *name,
- string prop,
+ const string ,
  uint32_t size)
 {
checkers.insert(std::make_pair(string(name),
@@ -207,6 +231,8 @@ check_manager::check_manager()
add_property_size_checker("type-phandle", string("phandle"), 4);
disabled_checkers.insert(std::make_pair(string("cells-attributes"),
new address_cells_checker("cells-attributes")));
+   

svn commit: r306803 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs kern sys

2016-10-07 Thread Konstantin Belousov
Author: kib
Date: Fri Oct  7 11:38:28 2016
New Revision: 306803
URL: https://svnweb.freebsd.org/changeset/base/306803

Log:
  Limit scope of the optimization in r306608 to dounmount() caller only.
  Other uses of cache_purgevfs() do rely on the cache purge for correct
  operations, when paths are invalidated without unmount.
  
  Reported and tested by:   jkim
  Discussed with:   mjg
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  head/sys/kern/vfs_cache.c
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_mountroot.c
  head/sys/sys/vnode.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cFri Oct 
 7 10:47:32 2016(r306802)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cFri Oct 
 7 11:38:28 2016(r306803)
@@ -1843,7 +1843,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea
 */
(void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0);
 #ifdef FREEBSD_NAMECACHE
-   cache_purgevfs(zfsvfs->z_parent->z_vfs);
+   cache_purgevfs(zfsvfs->z_parent->z_vfs, true);
 #endif
}
 

Modified: head/sys/kern/vfs_cache.c
==
--- head/sys/kern/vfs_cache.c   Fri Oct  7 10:47:32 2016(r306802)
+++ head/sys/kern/vfs_cache.c   Fri Oct  7 11:38:28 2016(r306803)
@@ -1756,7 +1756,7 @@ cache_purge_negative(struct vnode *vp)
  * Flush all entries referencing a particular filesystem.
  */
 void
-cache_purgevfs(struct mount *mp)
+cache_purgevfs(struct mount *mp, bool force)
 {
TAILQ_HEAD(, namecache) ncps;
struct mtx *vlp1, *vlp2;
@@ -1768,7 +1768,7 @@ cache_purgevfs(struct mount *mp)
 
/* Scan hash tables for applicable entries */
SDT_PROBE1(vfs, namecache, purgevfs, done, mp);
-   if (mp->mnt_nvnodelistsize <= ncpurgeminvnodes)
+   if (!force && mp->mnt_nvnodelistsize <= ncpurgeminvnodes)
return;
TAILQ_INIT();
n_nchash = nchash + 1;

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Fri Oct  7 10:47:32 2016(r306802)
+++ head/sys/kern/vfs_mount.c   Fri Oct  7 11:38:28 2016(r306803)
@@ -1352,7 +1352,7 @@ dounmount(struct mount *mp, int flags, s
mp->mnt_flag &= ~MNT_ASYNC;
mp->mnt_kern_flag &= ~MNTK_ASYNC;
MNT_IUNLOCK(mp);
-   cache_purgevfs(mp); /* remove cache entries for this file sys */
+   cache_purgevfs(mp, false); /* remove cache entries for this file sys */
vfs_deallocate_syncvnode(mp);
/*
 * For forced unmounts, move process cdir/rdir refs on the fs root

Modified: head/sys/kern/vfs_mountroot.c
==
--- head/sys/kern/vfs_mountroot.c   Fri Oct  7 10:47:32 2016
(r306802)
+++ head/sys/kern/vfs_mountroot.c   Fri Oct  7 11:38:28 2016
(r306803)
@@ -298,9 +298,9 @@ vfs_mountroot_shuffle(struct thread *td,
TAILQ_INSERT_TAIL(, mpdevfs, mnt_list);
mtx_unlock(_mtx);
 
-   cache_purgevfs(mporoot);
+   cache_purgevfs(mporoot, true);
if (mporoot != mpdevfs)
-   cache_purgevfs(mpdevfs);
+   cache_purgevfs(mpdevfs, true);
 
VFS_ROOT(mporoot, LK_EXCLUSIVE, );
 
@@ -315,7 +315,7 @@ vfs_mountroot_shuffle(struct thread *td,
/* Set up the new rootvnode, and purge the cache */
mpnroot->mnt_vnodecovered = NULL;
set_rootvnode();
-   cache_purgevfs(rootvnode->v_mount);
+   cache_purgevfs(rootvnode->v_mount, true);
 
if (mporoot != mpdevfs) {
/* Remount old root under /.mount or /mnt */

Modified: head/sys/sys/vnode.h
==
--- head/sys/sys/vnode.hFri Oct  7 10:47:32 2016(r306802)
+++ head/sys/sys/vnode.hFri Oct  7 11:38:28 2016(r306803)
@@ -608,7 +608,7 @@ int cache_lookup(struct vnode *dvp, stru
struct componentname *cnp, struct timespec *tsp, int *ticksp);
 void   cache_purge(struct vnode *vp);
 void   cache_purge_negative(struct vnode *vp);
-void   cache_purgevfs(struct mount *mp);
+void   cache_purgevfs(struct mount *mp, bool force);
 intchange_dir(struct vnode *vp, struct thread *td);
 void   cvtstat(struct stat *st, struct ostat *ost);
 void   cvtnstat(struct stat *sb, struct nstat *nsb);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r306801 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2016-10-07 Thread Andriy Gapon
Author: avg
Date: Fri Oct  7 06:29:24 2016
New Revision: 306801
URL: https://svnweb.freebsd.org/changeset/base/306801

Log:
  implement zfs_vptocnp() using z_parent property
  
  This should allow vn_fullpath() to work even when vfs name cache is
  disabled for zfs, which is the case when zfs properties like
  casesensitivity and normalization are set non-default values.
  
  The new code should be 100% reliable for directories and "mostly"
  reliable for files, that is, when hardlinks across directories are
  not used.
  
  Reported by:  Frederic Chardon 
  Reviewed by:  kib (vfs contract)
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D8146

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Oct 
 7 06:11:15 2016(r306800)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Oct 
 7 06:29:24 2016(r306801)
@@ -355,6 +355,8 @@ extern zil_get_data_t zfs_get_data;
 extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
 extern int zfsfstype;
 
+extern int zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf);
+
 #endif /* _KERNEL */
 
 extern int zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 
 7 06:11:15 2016(r306800)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 
 7 06:29:24 2016(r306801)
@@ -5934,8 +5934,19 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
}
 
if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) {
+   char name[MAXNAMLEN + 1];
+   znode_t *dzp;
+   size_t len;
+
+   error = zfs_znode_parent_and_name(zp, , name);
+   if (error == 0) {
+   len = strlen(name);
+   *ap->a_buflen -= len;
+   bcopy(name, ap->a_buf + *ap->a_buflen, len);
+   *ap->a_vpp = ZTOV(dzp);
+   }
ZFS_EXIT(zfsvfs);
-   return (vop_stdvptocnp(ap));
+   return (error);
}
ZFS_EXIT(zfsvfs);
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Oct 
 7 06:11:15 2016(r306800)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Oct 
 7 06:29:24 2016(r306801)
@@ -1936,7 +1936,6 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
mutex_destroy(>z_hold_mtx[i]);
kmem_free(zfsvfs, sizeof (zfsvfs_t));
 }
-
 #endif /* _KERNEL */
 
 static int
@@ -2192,3 +2191,35 @@ zfs_obj_to_stats(objset_t *osp, uint64_t
zfs_release_sa_handle(hdl, db, FTAG);
return (error);
 }
+
+#ifdef _KERNEL
+int
+zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf)
+{
+   zfsvfs_t *zfsvfs = zp->z_zfsvfs;
+   uint64_t parent;
+   int is_xattrdir;
+   int err;
+
+   /* Extended attributes should not be visible as regular files. */
+   if ((zp->z_pflags & ZFS_XATTR) != 0)
+   return (SET_ERROR(EINVAL));
+
+   err = zfs_obj_to_pobj(zfsvfs->z_os, zp->z_sa_hdl, zfsvfs->z_attr_table,
+   , _xattrdir);
+   if (err != 0)
+   return (err);
+   ASSERT0(is_xattrdir);
+
+   /* No name as this is a root object. */
+   if (parent == zp->z_id)
+   return (SET_ERROR(EINVAL));
+
+   err = zap_value_search(zfsvfs->z_os, parent, zp->z_id,
+   ZFS_DIRENT_OBJ(-1ULL), buf);
+   if (err != 0)
+   return (err);
+   err = zfs_zget(zfsvfs, parent, dzpp);
+   return (err);
+}
+#endif /* _KERNEL */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"