svn commit: r226283 - head/share/misc

2011-10-12 Thread Edwin Groothuis
Author: edwin
Date: Wed Oct 12 07:00:50 2011
New Revision: 226283
URL: http://svn.freebsd.org/changeset/base/226283

Log:
  Updates from Newsletter VI-9 and VI-10:
  
  Newsletter VI-9 2011-06-12
  Name changes for Fiji and Myanmar as well as other minor corrections
  
  Newsletter VI-10 2011-08-09
  Code elements for South Sudan.
  
  Reviewed by:  http://www.iso.org/iso/country_codes.html

Modified:
  head/share/misc/iso3166

Modified: head/share/misc/iso3166
==
--- head/share/misc/iso3166 Wed Oct 12 06:40:49 2011(r226282)
+++ head/share/misc/iso3166 Wed Oct 12 07:00:50 2011(r226283)
@@ -46,7 +46,7 @@ BJBEN 204 Benin
 BM BMU 060 Bermuda
 BT BTN 064 Bhutan
 BO BOL 068 Bolivia, Plurinational State of
-BQ BES 535 Bonaire, Saint Eustatius and Saba
+BQ BES 535 Bonaire, Sint Eustatius and Saba
 BA BIH 070 Bosnia and Herzegovina
 BW BWA 072 Botswana
 BV BVT 074 Bouvet Island
@@ -224,11 +224,12 @@ SBSLB 090 Solomon Islands
 SO SOM 706 Somalia
 ZA ZAF 710 South Africa
 GS SGS 239 South Georgia and the South Sandwich Islands
+SS SSD 728 South Sudan
 ES ESP 724 Spain
 LK LKA 144 Sri Lanka
 SH SHN 654 Saint Helena, Ascension and Tristan da Cunha
 PM SPM 666 Saint Pierre and Miquelon
-SD SDN 736 Sudan
+SD SDN 729 Sudan
 SR SUR 740 Suriname
 SJ SJM 744 Svalbard and Jan Mayen
 SZ SWZ 748 Swaziland
@@ -547,3 +548,10 @@ ZW ZWE 716 Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226046 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/usr.sbin/sshd

2011-10-12 Thread Bjoern A. Zeeb

On 5. Oct 2011, at 22:08 , Dag-Erling Smorgrav wrote:

 Author: des
 Date: Wed Oct  5 22:08:17 2011
 New Revision: 226046
 URL: http://svn.freebsd.org/changeset/base/226046
 
 Log:
  Upgrade to OpenSSH 5.9p1.
 
  MFC after:   3 months

Mergemaster brought up this change:

+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys


This will break setups that have authorized_keys2 files (only) and needs to
be reverted I think?

-- 
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.

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


svn commit: r226289 - head/contrib/tzdata

2011-10-12 Thread Edwin Groothuis
Author: edwin
Date: Wed Oct 12 09:13:16 2011
New Revision: 226289
URL: http://svn.freebsd.org/changeset/base/226289

Log:
  MFV of tzdata2011l, r226279
  
  Changes in 2011i:
  
  Africa
  - Added South Sudan: Africa/Juba
  
  Australasia:
  - Samoa will go forward 24 hours at 30 December 2011 to better match
the day of the week with its neighbours.
  
  Europe:
  - Europe/Kaliningrad will have the timezone KALT.
  
  North America:
  - Updates to Metlakatla historical data
  - Newfoundland, Labrador and Resolute will do something which I
can't figure out.
  
  iso3166tab;
  - Add SS for South Sudan.
  
  Changes in 2011j:
  
  - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
  - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
  - Gaza / West Bank goes back to standard time on 02 August 2011.
  - West Bank went bac kto DST on 30 August 2011.
  - Lots of changes in Minsk (GMT+3 without DST) and other Russian
regions. A new timezone has been created for them, FET: Further-eastern
European Time aka GMT+3.
  - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
  - West Bank came out of DST on 30 September 2011.
  - Fiji will g oin DST on 23 October and out of it on 26 Februari
  - State Bahia might go back to DST in 16 October 2011
  
  Due to legal problems, ado and Paul Eggert have to temporary suspend
  their work on the timezone database
  (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
  been continued by volunteers on the tz community and the hosting
  of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/

Modified:
  head/contrib/tzdata/africa
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/europe
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/southamerica
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/africa
==
--- head/contrib/tzdata/africa  Wed Oct 12 08:39:57 2011(r226288)
+++ head/contrib/tzdata/africa  Wed Oct 12 09:13:16 2011(r226289)
@@ -1,5 +1,5 @@
 # pre
-# @(#)africa   8.31
+# @(#)africa   8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #   2:00   WASTWest Africa Summer Time
 #   2:30   BEATBritish East Africa Time (no longer used)
-#   2:44:45 BEAUT  British East Africa Unified Time (no longer used)
+#   2:45   BEAUT   British East Africa Unified Time (no longer used)
 #   3:00   CASTCentral Africa Summer Time (no longer used)
 #   3:00   SASTSouth Africa Summer Time (no longer used)
 #   3:00   EAT East Africa Time
@@ -396,7 +396,7 @@ ZoneAfrica/Bissau   -1:02:20 -  LMT 1911 M
 Zone   Africa/Nairobi  2:27:16 -   LMT 1928 Jul
3:00-   EAT 1930
2:30-   BEAT1940
-   2:44:45 -   BEAUT   1960
+   2:45-   BEAUT   1960
3:00-   EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone   Africa/Khartoum 2:10:08 -   LMT 1931
2:00Sudan   CA%sT   2000 Jan 15 12:00
3:00-   EAT
 
+# South Sudan
+Zone   Africa/Juba 2:06:24 -   LMT 1931
+   2:00Sudan   CA%sT   2000 Jan 15 12:00
+   3:00-   EAT
+
 # Swaziland
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Africa/Mbabane  2:04:24 -   LMT 1903 Mar
@@ -966,7 +971,7 @@ ZoneAfrica/Mbabane  2:04:24 -   LMT 1903 M
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -LMT 1931
3:00-   EAT 1948
-   2:44:45 -   BEAUT   1961
+   2:45-   BEAUT   1961
3:00-   EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone  Africa/Tunis0:40:44 -   LMT 1881 May
 Zone   Africa/Kampala  2:09:40 -   LMT 1928 Jul
3:00-   EAT 1930
2:30-   BEAT1948
-   2:44:45 -   BEAUT   1957
+   2:45-   BEAUT   1957
3:00-   EAT
 
 # Zambia

Modified: head/contrib/tzdata/asia
==
--- head/contrib/tzdata/asiaWed Oct 12 08:39:57 2011(r226288)
+++ head/contrib/tzdata/asiaWed 

svn commit: r226294 - head/sys/kern

2011-10-12 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 12 09:21:02 2011
New Revision: 226294
URL: http://svn.freebsd.org/changeset/base/226294

Log:
  Don't call fixup_filename() on each witness lock call.
  
  This has been irking me for a while. This causes significant
  CPU use on bottlenecked CPUs (eg my older EEEPC w/ an earlier
  Celeron CPU and my MIPS24k boards) when they're passing
  a lot of traffic.
  
  Since the file/line values are only used for printing, this
  should only affect display. It should have no operational
  change on the code, besides reducing CPU use.

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cWed Oct 12 09:19:21 2011
(r226293)
+++ head/sys/kern/subr_witness.cWed Oct 12 09:21:02 2011
(r226294)
@@ -1053,7 +1053,6 @@ witness_checkorder(struct lock_object *l
w = lock-lo_witness;
class = LOCK_CLASS(lock);
td = curthread;
-   file = fixup_filename(file);
 
if (class-lc_flags  LC_SLEEPLOCK) {
 
@@ -1064,7 +1063,8 @@ witness_checkorder(struct lock_object *l
 */
if (td-td_critnest != 0  !kdb_active)
panic(blockable sleep lock (%s) %s @ %s:%d,
-   class-lc_name, lock-lo_name, file, line);
+   class-lc_name, lock-lo_name,
+   fixup_filename(file), line);
 
/*
 * If this is the first lock acquired then just return as
@@ -1102,17 +1102,19 @@ witness_checkorder(struct lock_object *l
if ((lock1-li_flags  LI_EXCLUSIVE) != 0 
(flags  LOP_EXCLUSIVE) == 0) {
printf(shared lock of (%s) %s @ %s:%d\n,
-   class-lc_name, lock-lo_name, file, line);
+   class-lc_name, lock-lo_name,
+   fixup_filename(file), line);
printf(while exclusively locked from %s:%d\n,
-   lock1-li_file, lock1-li_line);
+   fixup_filename(lock1-li_file), lock1-li_line);
panic(share-excl);
}
if ((lock1-li_flags  LI_EXCLUSIVE) == 0 
(flags  LOP_EXCLUSIVE) != 0) {
printf(exclusive lock of (%s) %s @ %s:%d\n,
-   class-lc_name, lock-lo_name, file, line);
+   class-lc_name, lock-lo_name,
+   fixup_filename(file), line);
printf(while share locked from %s:%d\n,
-   lock1-li_file, lock1-li_line);
+   fixup_filename(lock1-li_file), lock1-li_line);
panic(excl-share);
}
return;
@@ -1165,8 +1167,9 @@ witness_checkorder(struct lock_object *l
acquiring duplicate lock of same type: \%s\\n, 
w-w_name);
printf( 1st %s @ %s:%d\n, plock-li_lock-lo_name,
-  plock-li_file, plock-li_line);
-   printf( 2nd %s @ %s:%d\n, lock-lo_name, file, line);
+  fixup_filename(plock-li_file), plock-li_line);
+   printf( 2nd %s @ %s:%d\n, lock-lo_name,
+   fixup_filename(file), line);
witness_debugger(1);
} else
mtx_unlock_spin(w_mtx);
@@ -1307,19 +1310,24 @@ witness_checkorder(struct lock_object *l
if (i  0) {
printf( 1st %p %s (%s) @ %s:%d\n,
lock1-li_lock, lock1-li_lock-lo_name,
-   w1-w_name, lock1-li_file, lock1-li_line);
+   w1-w_name, fixup_filename(lock1-li_file),
+   lock1-li_line);
printf( 2nd %p %s (%s) @ %s:%d\n, lock,
-   lock-lo_name, w-w_name, file, line);
+   lock-lo_name, w-w_name,
+   fixup_filename(file), line);
} else {
printf( 1st %p %s (%s) @ %s:%d\n,
lock2-li_lock, lock2-li_lock-lo_name,
lock2-li_lock-lo_witness-w_name,
-   lock2-li_file, lock2-li_line);
+   fixup_filename(lock2-li_file),
+   lock2-li_line);
printf( 2nd %p %s (%s) @ %s:%d\n,
lock1-li_lock, lock1-li_lock-lo_name,
-   w1-w_name, lock1-li_file, 

svn commit: r226296 - head/sys/net80211

2011-10-12 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 12 10:19:55 2011
New Revision: 226296
URL: http://svn.freebsd.org/changeset/base/226296

Log:
  Fix an unused variable warning/error when invariants isn't enabled.
  
  Reported by:  bz

Modified:
  head/sys/net80211/ieee80211_tdma.c

Modified: head/sys/net80211/ieee80211_tdma.c
==
--- head/sys/net80211/ieee80211_tdma.c  Wed Oct 12 09:28:09 2011
(r226295)
+++ head/sys/net80211/ieee80211_tdma.c  Wed Oct 12 10:19:55 2011
(r226296)
@@ -285,9 +285,8 @@ static void
 tdma_beacon_miss(struct ieee80211vap *vap)
 {
struct ieee80211_tdma_state *ts = vap-iv_tdma;
-   struct ieee80211com *ic = vap-iv_ic;
 
-   IEEE80211_LOCK_ASSERT(ic);
+   IEEE80211_LOCK_ASSERT(vap-iv_ic);
 
KASSERT((vap-iv_ic-ic_flags  IEEE80211_F_SCAN) == 0, (scanning));
KASSERT(vap-iv_state == IEEE80211_S_RUN,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226046 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/usr.sbin/sshd

2011-10-12 Thread Dag-Erling Smørgrav
Bjoern A. Zeeb bzeeb-li...@lists.zabbadoz.net writes:
 Mergemaster brought up this change:

 +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
 +# but this is overridden so installations will only check 
 .ssh/authorized_keys
 +AuthorizedKeysFile .ssh/authorized_keys

 This will break setups that have authorized_keys2 files (only) and needs to
 be reverted I think?

authorized_keys2 has been deprecated for ~10 years now.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226301 - head/sys/kern

2011-10-12 Thread Robert Watson
Author: rwatson
Date: Wed Oct 12 12:08:03 2011
New Revision: 226301
URL: http://svn.freebsd.org/changeset/base/226301

Log:
  Correct a bug in export of capability-related information from the sysctls
  supporting procstat -f: properly provide capability rights information to
  userspace.  The bug resulted from a merge-o during upstreaming (or rather,
  a failure to properly merge FreeBSD-side changed downstream).
  
  Spotted by: des, kibab
  MFC after:  3 days

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cWed Oct 12 11:38:44 2011
(r226300)
+++ head/sys/kern/kern_descrip.cWed Oct 12 12:08:03 2011
(r226301)
@@ -3182,7 +3182,8 @@ CTASSERT(sizeof(struct kinfo_file) == KI
 
 static int
 export_fd_for_sysctl(void *data, int type, int fd, int fflags, int refcnt,
-int64_t offset, struct kinfo_file *kif, struct sysctl_req *req)
+int64_t offset, int fd_is_cap, cap_rights_t fd_cap_rights,
+struct kinfo_file *kif, struct sysctl_req *req)
 {
struct {
int fflag;
@@ -3243,6 +3244,10 @@ export_fd_for_sysctl(void *data, int typ
for (i = 0; i  NFFLAGS; i++)
if (fflags  fflags_table[i].fflag)
kif-kf_flags |=  fflags_table[i].kf_fflag;
+   if (fd_is_cap)
+   kif-kf_flags |= KF_FLAG_CAPABILITY;
+   if (fd_is_cap)
+   kif-kf_cap_rights = fd_cap_rights;
kif-kf_fd = fd;
kif-kf_type = type;
kif-kf_ref_count = refcnt;
@@ -3270,7 +3275,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
int64_t offset;
void *data;
int error, i, *name;
-   int type, refcnt, fflags;
+   int fd_is_cap, type, refcnt, fflags;
+   cap_rights_t fd_cap_rights;
 
name = (int *)arg1;
if ((p = pfind((pid_t)name[0])) == NULL)
@@ -3299,13 +3305,13 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK);
if (tracevp != NULL)
export_fd_for_sysctl(tracevp, KF_TYPE_VNODE, KF_FD_TYPE_TRACE,
-   FREAD | FWRITE, -1, -1, kif, req);
+   FREAD | FWRITE, -1, -1, 0, 0, kif, req);
if (textvp != NULL)
export_fd_for_sysctl(textvp, KF_TYPE_VNODE, KF_FD_TYPE_TEXT,
-   FREAD, -1, -1, kif, req);
+   FREAD, -1, -1, 0, 0, kif, req);
if (cttyvp != NULL)
export_fd_for_sysctl(cttyvp, KF_TYPE_VNODE, KF_FD_TYPE_CTTY,
-   FREAD | FWRITE, -1, -1, kif, req);
+   FREAD | FWRITE, -1, -1, 0, 0, kif, req);
if (fdp == NULL)
goto fail;
FILEDESC_SLOCK(fdp);
@@ -3315,7 +3321,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
data = fdp-fd_cdir;
FILEDESC_SUNLOCK(fdp);
export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_CWD,
-   FREAD, -1, -1, kif, req);
+   FREAD, -1, -1, 0, 0, kif, req);
FILEDESC_SLOCK(fdp);
}
/* root directory */
@@ -3324,7 +3330,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
data = fdp-fd_rdir;
FILEDESC_SUNLOCK(fdp);
export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_ROOT,
-   FREAD, -1, -1, kif, req);
+   FREAD, -1, -1, 0, 0, kif, req);
FILEDESC_SLOCK(fdp);
}
/* jail directory */
@@ -,13 +3339,15 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
data = fdp-fd_jdir;
FILEDESC_SUNLOCK(fdp);
export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_JAIL,
-   FREAD, -1, -1, kif, req);
+   FREAD, -1, -1, 0, 0, kif, req);
FILEDESC_SLOCK(fdp);
}
for (i = 0; i  fdp-fd_nfiles; i++) {
if ((fp = fdp-fd_ofiles[i]) == NULL)
continue;
data = NULL;
+   fd_is_cap = 0;
+   fd_cap_rights = 0;
 
 #ifdef CAPABILITIES
/*
@@ -3348,8 +3356,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 * the capability rights mask.
 */
if (fp-f_type == DTYPE_CAPABILITY) {
-   kif-kf_flags |= KF_FLAG_CAPABILITY;
-   kif-kf_cap_rights = cap_rights(fp);
+   fd_is_cap = 1;
+   fd_cap_rights = cap_rights(fp);
(void)cap_funwrap(fp, 0, fp);
}
 #else /* !CAPABILITIES */
@@ -3428,8 +3436,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
oldidx = req-oldidx;
if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
FILEDESC_SUNLOCK(fdp);
-   error = export_fd_for_sysctl(data, type, i,

svn commit: r226302 - head/sys/dev/acpica

2011-10-12 Thread John Baldwin
Author: jhb
Date: Wed Oct 12 14:13:32 2011
New Revision: 226302
URL: http://svn.freebsd.org/changeset/base/226302

Log:
  If an allocation for a specific resource range fails because it is not in
  a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
  ACPI system resource range.  If that works, permit the resource allocation
  regardless.
  
  MFC after:1 week

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_pcib_acpi.c
  head/sys/dev/acpica/acpivar.h

Modified: head/sys/dev/acpica/acpi.c
==
--- head/sys/dev/acpica/acpi.c  Wed Oct 12 12:08:03 2011(r226301)
+++ head/sys/dev/acpica/acpi.c  Wed Oct 12 14:13:32 2011(r226302)
@@ -1238,7 +1238,6 @@ acpi_alloc_resource(device_t bus, device
 struct resource_list_entry *rle;
 struct resource_list *rl;
 struct resource *res;
-struct rman *rm;
 int isdefault = (start == 0UL  end == ~0UL);
 
 /*
@@ -1291,15 +1290,29 @@ acpi_alloc_resource(device_t bus, device
 } else
res = BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, rid,
start, end, count, flags);
-if (res != NULL || start + count - 1 != end)
-   return (res);
 
 /*
  * If the first attempt failed and this is an allocation of a
  * specific range, try to satisfy the request via a suballocation
- * from our system resource regions.  Note that we only handle
- * memory and I/O port system resources.
+ * from our system resource regions.
  */
+if (res == NULL  start + count - 1 == end)
+   res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+return (res);
+}
+
+/*
+ * Attempt to allocate a specific resource range from the system
+ * resource ranges.  Note that we only handle memory and I/O port
+ * system resources.
+ */
+struct resource *
+acpi_alloc_sysres(device_t child, int type, int *rid, u_long start, u_long end,
+u_long count, u_int flags)
+{
+struct rman *rm;
+struct resource *res;
+
 switch (type) {
 case SYS_RES_IOPORT:
rm = acpi_rman_io;
@@ -1311,6 +1324,7 @@ acpi_alloc_resource(device_t bus, device
return (NULL);
 }
 
+KASSERT(start + count - 1 == end, (wildcard resource range));
 res = rman_reserve_resource(rm, start, end, count, flags  ~RF_ACTIVE,
child);
 if (res == NULL)

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==
--- head/sys/dev/acpica/acpi_pcib_acpi.cWed Oct 12 12:08:03 2011
(r226301)
+++ head/sys/dev/acpica/acpi_pcib_acpi.cWed Oct 12 14:13:32 2011
(r226302)
@@ -501,6 +501,7 @@ acpi_pcib_acpi_alloc_resource(device_t d
 {
 #ifdef NEW_PCIB
 struct acpi_hpcib_softc *sc;
+struct resource *res;
 #endif
 
 #if defined(__i386__) || defined(__amd64__)
@@ -509,8 +510,11 @@ acpi_pcib_acpi_alloc_resource(device_t d
 
 #ifdef NEW_PCIB
 sc = device_get_softc(dev);
-return (pcib_host_res_alloc(sc-ap_host_res, child, type, rid, start, end,
-   count, flags));
+res = pcib_host_res_alloc(sc-ap_host_res, child, type, rid, start, end,
+   count, flags);
+if (res == NULL  start + count - 1 == end)
+   res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+return (res);
 #else
 return (bus_generic_alloc_resource(dev, child, type, rid, start, end,
count, flags));

Modified: head/sys/dev/acpica/acpivar.h
==
--- head/sys/dev/acpica/acpivar.h   Wed Oct 12 12:08:03 2011
(r226301)
+++ head/sys/dev/acpica/acpivar.h   Wed Oct 12 14:13:32 2011
(r226302)
@@ -382,6 +382,8 @@ ACPI_STATUS acpi_lookup_irq_resource(dev
struct resource *res, ACPI_RESOURCE *acpi_res);
 ACPI_STATUSacpi_parse_resources(device_t dev, ACPI_HANDLE handle,
struct acpi_parse_resource_set *set, void *arg);
+struct resource *acpi_alloc_sysres(device_t child, int type, int *rid,
+   u_long start, u_long end, u_long count, u_int flags);
 
 /* ACPI event handling */
 UINT32 acpi_event_power_button_sleep(void *context);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226305 - head/release

2011-10-12 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Oct 12 15:34:25 2011
New Revision: 226305
URL: http://svn.freebsd.org/changeset/base/226305

Log:
  Missed file in r225937 (sysinstall removal).

Deleted:
  head/release/svnbranch.awk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226310 - head/usr.bin/clang/clang

2011-10-12 Thread Dimitry Andric
Author: dim
Date: Wed Oct 12 17:25:49 2011
New Revision: 226310
URL: http://svn.freebsd.org/changeset/base/226310

Log:
  Add manpage symlink for clang++(1).
  
  PR:   docs/149051
  MFC after:3 days

Modified:
  head/usr.bin/clang/clang/Makefile

Modified: head/usr.bin/clang/clang/Makefile
==
--- head/usr.bin/clang/clang/Makefile   Wed Oct 12 15:59:29 2011
(r226309)
+++ head/usr.bin/clang/clang/Makefile   Wed Oct 12 17:25:49 2011
(r226310)
@@ -10,6 +10,7 @@ SRCS= cc1_main.cpp \
driver.cpp
 
 LINKS= ${BINDIR}/clang ${BINDIR}/clang++
+MLINKS=clang.1 clang++.1
 
 TGHDRS=CC1AsOptions \
CC1Options \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226305 - head/release

2011-10-12 Thread Doug Barton
On 10/12/2011 8:34 AM, Nathan Whitehorn wrote:
 Author: nwhitehorn
 Date: Wed Oct 12 15:34:25 2011
 New Revision: 226305
 URL: http://svn.freebsd.org/changeset/base/226305
 
 Log:
   Missed file in r225937 (sysinstall removal).

I, and from my reading others, asked you to revert the removal of
sysinstall. Isn't this moving in the wrong direction? :)


Doug

-- 

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

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


Re: svn commit: r226305 - head/release

2011-10-12 Thread Nathan Whitehorn

On 10/12/11 12:37, Doug Barton wrote:

On 10/12/2011 8:34 AM, Nathan Whitehorn wrote:

Author: nwhitehorn
Date: Wed Oct 12 15:34:25 2011
New Revision: 226305
URL: http://svn.freebsd.org/changeset/base/226305

Log:
   Missed file in r225937 (sysinstall removal).

I, and from my reading others, asked you to revert the removal of
sysinstall. Isn't this moving in the wrong direction? :)



I said I'd be open to it, but thought it wasn't too important since it 
will stay in 9 and removed it in the first place after getting several 
requests to do so. There wasn't any response after that. Are you 
requesting these commits be reverted?

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


svn commit: r226313 - in head/sys: kern vm

2011-10-12 Thread Gleb Smirnoff
Author: glebius
Date: Wed Oct 12 18:08:28 2011
New Revision: 226313
URL: http://svn.freebsd.org/changeset/base/226313

Log:
  Make memguard(9) capable to guard uma(9) allocations.

Modified:
  head/sys/kern/kern_malloc.c
  head/sys/vm/memguard.c
  head/sys/vm/memguard.h
  head/sys/vm/uma.h
  head/sys/vm/uma_core.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Wed Oct 12 17:57:57 2011(r226312)
+++ head/sys/kern/kern_malloc.c Wed Oct 12 18:08:28 2011(r226313)
@@ -458,7 +458,7 @@ malloc(unsigned long size, struct malloc
   (malloc(M_WAITOK) in interrupt context));
 
 #ifdef DEBUG_MEMGUARD
-   if (memguard_cmp(mtp, size)) {
+   if (memguard_cmp_mtp(mtp, size)) {
va = memguard_alloc(size, flags);
if (va != NULL)
return (va);

Modified: head/sys/vm/memguard.c
==
--- head/sys/vm/memguard.c  Wed Oct 12 17:57:57 2011(r226312)
+++ head/sys/vm/memguard.c  Wed Oct 12 18:08:28 2011(r226313)
@@ -56,6 +56,7 @@ __FBSDID($FreeBSD$);
 #include vm/vm_map.h
 #include vm/vm_object.h
 #include vm/vm_extern.h
+#include vm/uma_int.h
 #include vm/memguard.h
 
 SYSCTL_NODE(_vm, OID_AUTO, memguard, CTLFLAG_RW, NULL, MemGuard data);
@@ -125,15 +126,17 @@ SYSCTL_ULONG(_vm_memguard, OID_AUTO, fai
 SYSCTL_ULONG(_vm_memguard, OID_AUTO, fail_pgs, CTLFLAG_RD,
 memguard_fail_pgs, 0, MemGuard failures due to lack of pages);
 
-#define MG_GUARD   0x001
-#define MG_ALLLARGE0x002
-static int memguard_options = MG_GUARD;
+#define MG_GUARD_AROUND0x001
+#define MG_GUARD_ALLLARGE  0x002
+#define MG_GUARD_NOFREE0x004
+static int memguard_options = MG_GUARD_AROUND;
 TUNABLE_INT(vm.memguard.options, memguard_options);
 SYSCTL_INT(_vm_memguard, OID_AUTO, options, CTLFLAG_RW,
 memguard_options, 0,
 MemGuard options:\n
 \t0x001 - add guard pages around each allocation\n
-\t0x002 - always use MemGuard for allocations over a page);
+\t0x002 - always use MemGuard for allocations over a page\n
+\t0x004 - guard uma(9) zones with UMA_ZONE_NOFREE flag);
 
 static u_int memguard_minsize;
 static u_long memguard_minsize_reject;
@@ -282,7 +285,7 @@ memguard_alloc(unsigned long req_size, i
 * value.
 */
size_v = size_p;
-   do_guard = (memguard_options  MG_GUARD) != 0;
+   do_guard = (memguard_options  MG_GUARD_AROUND) != 0;
if (do_guard)
size_v += 2 * PAGE_SIZE;
 
@@ -429,21 +432,32 @@ memguard_realloc(void *addr, unsigned lo
return (newaddr);
 }
 
-int
-memguard_cmp(struct malloc_type *mtp, unsigned long size)
+static int
+memguard_cmp(unsigned long size)
 {
 
if (size  memguard_minsize) {
memguard_minsize_reject++;
return (0);
}
-   if ((memguard_options  MG_ALLLARGE) != 0  size = PAGE_SIZE)
+   if ((memguard_options  MG_GUARD_ALLLARGE) != 0  size = PAGE_SIZE)
return (1);
if (memguard_frequency  0 
(random() % 10)  memguard_frequency) {
memguard_frequency_hits++;
return (1);
}
+
+   return (0);
+}
+
+int
+memguard_cmp_mtp(struct malloc_type *mtp, unsigned long size)
+{
+
+   if (memguard_cmp(size))
+   return(1);
+
 #if 1
/*
 * The safest way of comparsion is to always compare short description
@@ -467,3 +481,21 @@ memguard_cmp(struct malloc_type *mtp, un
return (0);
 #endif
 }
+
+int
+memguard_cmp_zone(uma_zone_t zone)
+{
+
+if ((memguard_options  MG_GUARD_NOFREE) == 0 
+   zone-uz_flags  UMA_ZONE_NOFREE)
+   return (0);
+
+   if (memguard_cmp(zone-uz_size))
+   return (1);
+
+   /*
+* The safest way of comparsion is to always compare zone name,
+* but it is also the slowest way.
+*/
+   return (strcmp(zone-uz_name, vm_memguard_desc) == 0);
+}

Modified: head/sys/vm/memguard.h
==
--- head/sys/vm/memguard.h  Wed Oct 12 17:57:57 2011(r226312)
+++ head/sys/vm/memguard.h  Wed Oct 12 18:08:28 2011(r226313)
@@ -40,7 +40,8 @@ void  memguard_init(struct vm_map *);
 void   *memguard_alloc(unsigned long, int);
 void   *memguard_realloc(void *, unsigned long, struct malloc_type *, int);
 void   memguard_free(void *);
-intmemguard_cmp(struct malloc_type *, unsigned long);
+intmemguard_cmp_mtp(struct malloc_type *, unsigned long);
+intmemguard_cmp_zone(uma_zone_t);
 intis_memguard_addr(void *);
 #else
 #definememguard_fudge(size, xxx)   (size)
@@ -48,7 +49,8 @@ int   is_memguard_addr(void *);
 #definememguard_alloc(size, flags) NULL
 #define

svn commit: r226314 - head/share/man/man9

2011-10-12 Thread Gleb Smirnoff
Author: glebius
Date: Wed Oct 12 18:46:48 2011
New Revision: 226314
URL: http://svn.freebsd.org/changeset/base/226314

Log:
  Document that memguard(9) now can guard uma(9) allocations.

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

Modified: head/share/man/man9/memguard.9
==
--- head/share/man/man9/memguard.9  Wed Oct 12 18:08:28 2011
(r226313)
+++ head/share/man/man9/memguard.9  Wed Oct 12 18:46:48 2011
(r226314)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd August 2, 2010
+.Dd October 12, 2011
 .Dt MEMGUARD 9
 .Os
 .Sh NAME
@@ -39,7 +39,6 @@ to help detect tamper-after-free scenari
 These problems are more and more common and likely with
 multithreaded kernels where race conditions are more prevalent.
 .Pp
-Currently,
 .Nm
 can take over
 .Fn malloc ,
@@ -47,8 +46,19 @@ can take over
 and
 .Fn free
 for a single malloc type.
+Alternatively
 .Nm
-can also guard all allocations larger than
+can take over
+.Fn uma_zalloc ,
+.Fn uma_zalloc_arg
+and
+.Fn uma_free
+for a single
+.Xr uma
+zone.
+Also
+.Nm
+can guard all allocations larger than
 .Dv PAGE_SIZE ,
 and can guard a random fraction of all allocations.
 There is also a knob to prevent allocations smaller than a specified
@@ -72,7 +82,10 @@ sysctl vm.memguard.desc=memory_type
 .Pp
 Where
 .Ar memory_type
-is a short description of the memory type to monitor.
+can be either a short description of the memory type to monitor,
+either name of
+.Xr uma 9
+zone.
 Only allocations from that
 .Ar memory_type
 made after
@@ -86,13 +99,28 @@ will potentially be guarded once the
 .Xr sysctl 8
 is set.
 Existing guarded allocations will still be properly released by
-.Xr free 9 .
+either
+.Xr free 9
+or
+.Xr uma_zfree 9 ,
+depending on what kind of allocation was taken over.
 .Pp
-The short description of a
+To determine short description of a
 .Xr malloc 9
-type is the second argument to
-.Xr MALLOC_DEFINE 9 ,
-so one has to find it in the kernel source.
+type one can either take it from the first column of
+.Xr vmstat 8 Fl m
+output, or to find it in the kernel source.
+It is the second argument to
+.Xr MALLOC_DEFINE 9
+macro.
+To determine name of
+.Xr uma 9
+zone one can either take it from the first column of
+.Xr vmstat 8 Fl z
+output, or to find it in the kernel source.
+It is the first argument to the
+.Xr uma_zcreate 9
+function.
 .Pp
 The
 .Va vm.memguard.divisor
@@ -142,12 +170,24 @@ or larger if
 .Va vm.memguard.options
 has the 2 bit set.
 This option is off by default.
+By default
+.Nm
+doesn't guard those
+.Xr uma 9
+zones that have been initialized with the
+.Dv UMA_ZONE_NOFREE
+flag set, since it can produce false positives on them.
+However, this safety measure can be turned off by setting bit 3
+of the
+.Va vm.memguard.options
+tunable.
 .Sh SEE ALSO
 .Xr sysctl 8 ,
 .Xr vmstat 8 ,
 .Xr contigmalloc 9 ,
 .Xr malloc 9 ,
-.Xr redzone 9
+.Xr redzone 9 ,
+.Xr uma 9
 .Sh HISTORY
 .Nm
 first appeared in
@@ -161,8 +201,6 @@ This manual page was originally written 
 .An Christian Brueffer Aq bruef...@freebsd.org .
 Additions have been made by
 .An Matthew Fleming Aq m...@freebsd.org
+and
+.An Gleb Smirnoff Aq gleb...@freebsd.org
 to both the implementation and the documentation.
-.Sh BUGS
-Currently, it is not possible to override UMA
-.Xr zone 9
-allocations.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226318 - head/sys/netinet

2011-10-12 Thread Navdeep Parhar
Author: np
Date: Wed Oct 12 19:52:23 2011
New Revision: 226318
URL: http://svn.freebsd.org/changeset/base/226318

Log:
  Make sure the inp wasn't dropped when rexmt let go of the inp and
  pcbinfo locks.
  
  Reviewed by:  andre@
  MFC after:7 days

Modified:
  head/sys/netinet/tcp_timer.c

Modified: head/sys/netinet/tcp_timer.c
==
--- head/sys/netinet/tcp_timer.cWed Oct 12 19:25:12 2011
(r226317)
+++ head/sys/netinet/tcp_timer.cWed Oct 12 19:52:23 2011
(r226318)
@@ -495,6 +495,13 @@ tcp_timer_rexmt(void * xtp)
CURVNET_RESTORE();
return;
}
+   if (inp-inp_flags  INP_DROPPED) {
+   INP_WUNLOCK(inp);
+   INP_INFO_WUNLOCK(V_tcbinfo);
+   CURVNET_RESTORE();
+   return;
+   }
+
tp = tcp_drop(tp, tp-t_softerror ?
  tp-t_softerror : ETIMEDOUT);
headlocked = 1;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226320 - in head: share/misc usr.bin/calendar/calendars

2011-10-12 Thread Gleb Kurtsou
Author: gleb
Date: Wed Oct 12 20:18:13 2011
New Revision: 226320
URL: http://svn.freebsd.org/changeset/base/226320

Log:
  Add myself
  
  Approved by:  mdf (mentor)

Modified:
  head/share/misc/committers-src.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Oct 12 20:08:25 2011
(r226319)
+++ head/share/misc/committers-src.dot  Wed Oct 12 20:18:13 2011
(r226320)
@@ -141,6 +141,7 @@ gad [label=Garance A. Drosehn\ngad@Free
 gallatin [label=Andrew Gallatin\ngalla...@freebsd.org\n/??/??]
 gavin [label=Gavin Atkinson\nga...@freebsd.org\n2009/12/07]
 gibbs [label=Justin T. Gibbs\ngi...@freebsd.org\n/??/??]
+gleb [label=Gleb Kurtsou\ng...@freebsd.org\n2011/09/19]
 glebius [label=Gleb Smirnoff\ngleb...@freebsd.org\n2004/07/14]
 gnn [label=George V. Neville-Neil\n...@freebsd.org\n2004/10/11]
 gordon [label=Gordon Tetlow\ngor...@freebsd.org\n2002/05/17]
@@ -464,6 +465,8 @@ markm - sheldonh
 
 mav - ae
 
+mdf - gleb
+
 mdodd - jake
 
 mike - das

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdWed Oct 12 20:08:25 
2011(r226319)
+++ head/usr.bin/calendar/calendars/calendar.freebsdWed Oct 12 20:18:13 
2011(r226320)
@@ -274,6 +274,7 @@
 09/17  Maxim Bolotin m...@freebsd.org born in Rostov-on-Don, Russian 
Federation, 1976
 09/18  Matthew Fleming m...@freebsd.org born in Cleveland, Ohio, United 
States, 1975
 09/20  Kevin Lo ke...@freebsd.org born in Taipei, Taiwan, Republic of China, 
1972
+09/21  Gleb Kurtsou g...@freebsd.org born in Minsk, Belarus, 1984
 09/27  Neil Blakey-Milner n...@freebsd.org born in Port Elizabeth, South 
Africa, 1978
 09/27  Renato Botelho ga...@freebsd.org born in Araras, Sao Paulo, Brazil, 
1979
 09/28  Greg Lehey g...@freebsd.org born in Melbourne, Victoria, Australia, 
1948
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226324 - head/sys/arm/xscale/ixp425

2011-10-12 Thread Andrew Thompson
Author: thompsa
Date: Wed Oct 12 20:57:21 2011
New Revision: 226324
URL: http://svn.freebsd.org/changeset/base/226324

Log:
  Dont just set the pin high when turning on output, use the current value. Also
  let this value be set when in input mode.

Modified:
  head/sys/arm/xscale/ixp425/cambria_gpio.c

Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c
==
--- head/sys/arm/xscale/ixp425/cambria_gpio.c   Wed Oct 12 20:40:25 2011
(r226323)
+++ head/sys/arm/xscale/ixp425/cambria_gpio.c   Wed Oct 12 20:57:21 2011
(r226324)
@@ -84,6 +84,7 @@ struct cambria_gpio_softc {
 struct mtx sc_mtx;
struct gpio_pin sc_pins[GPIO_PINS];
uint8_t sc_latch;
+   uint8_t sc_val;
 };
 
 struct cambria_gpio_pin {
@@ -309,6 +310,9 @@ cambria_gpio_pin_setflags(device_t dev, 
 {
struct cambria_gpio_softc *sc = device_get_softc(dev);
int error;
+   uint8_t mask;
+
+   mask = 1  pin;
 
if (pin = GPIO_PINS)
return (EINVAL);
@@ -325,7 +329,16 @@ cambria_gpio_pin_setflags(device_t dev, 
GPIO_LOCK(sc);
sc-sc_pins[pin].gp_flags = flags;
 
-   sc-sc_latch |= (1  pin);
+   /*
+* Writing a logical one sets the signal high and writing a logical
+* zero sets the signal low. To configure a digital I/O signal as an
+* input, a logical one must first be written to the data bit to
+* three-state the associated output.
+*/
+   if (flags  GPIO_PIN_INPUT || sc-sc_val  mask)
+   sc-sc_latch |= mask; /* input or output  high */
+   else
+   sc-sc_latch = ~mask;
error = cambria_gpio_write(sc);
GPIO_UNLOCK(sc);
 
@@ -337,15 +350,28 @@ cambria_gpio_pin_set(device_t dev, uint3
 {
struct cambria_gpio_softc *sc = device_get_softc(dev);
int error;
+   uint8_t mask;
 
-   if (pin = GPIO_PINS || sc-sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
-   return (EINVAL);
+   mask = 1  pin;
 
+   if (pin = GPIO_PINS)
+   return (EINVAL);
GPIO_LOCK(sc);
if (value)
-   sc-sc_latch |= (1  pin);
+   sc-sc_val |= mask;
else
-   sc-sc_latch = ~(1  pin);
+   sc-sc_val = ~mask;
+
+   if (sc-sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT) {
+   /* just save, altering the latch will disable input */
+   GPIO_UNLOCK(sc);
+   return (0);
+   }
+
+   if (value)
+   sc-sc_latch |= mask;
+   else
+   sc-sc_latch = ~mask;
error = cambria_gpio_write(sc);
GPIO_UNLOCK(sc);
 
@@ -375,14 +401,17 @@ static int
 cambria_gpio_pin_toggle(device_t dev, uint32_t pin)
 {
struct cambria_gpio_softc *sc = device_get_softc(dev);
-   int error;
+   int error = 0;
 
-   if (pin = GPIO_PINS || sc-sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
+   if (pin = GPIO_PINS)
return (EINVAL);
 
GPIO_LOCK(sc);
-   sc-sc_latch ^= (1  pin);
-   error = cambria_gpio_write(sc);
+   sc-sc_val ^= (1  pin);
+   if (sc-sc_pins[pin].gp_flags == GPIO_PIN_OUTPUT) {
+   sc-sc_latch ^= (1  pin);
+   error = cambria_gpio_write(sc);
+   }
GPIO_UNLOCK(sc);
 
return (error);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226325 - head/sys/arm/xscale/ixp425

2011-10-12 Thread Andrew Thompson
Author: thompsa
Date: Wed Oct 12 20:58:54 2011
New Revision: 226325
URL: http://svn.freebsd.org/changeset/base/226325

Log:
  Name these gpio pins better, they are on an external PLD and not the same as
  the cpu wired gpio.

Modified:
  head/sys/arm/xscale/ixp425/cambria_gpio.c

Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c
==
--- head/sys/arm/xscale/ixp425/cambria_gpio.c   Wed Oct 12 20:57:21 2011
(r226324)
+++ head/sys/arm/xscale/ixp425/cambria_gpio.c   Wed Oct 12 20:58:54 2011
(r226325)
@@ -96,11 +96,11 @@ struct cambria_gpio_pin {
 extern struct ixp425_softc *ixp425_softc;
 
 static struct cambria_gpio_pin cambria_gpio_pins[GPIO_PINS] = {
-   { GPIO0, 0, GPIO_PIN_OUTPUT },
-   { GPIO1, 1, GPIO_PIN_OUTPUT },
-   { GPIO2, 2, GPIO_PIN_OUTPUT },
-   { GPIO3, 3, GPIO_PIN_OUTPUT },
-   { GPIO4, 4, GPIO_PIN_OUTPUT },
+   { PLD0, 0, GPIO_PIN_OUTPUT },
+   { PLD1, 1, GPIO_PIN_OUTPUT },
+   { PLD2, 2, GPIO_PIN_OUTPUT },
+   { PLD3, 3, GPIO_PIN_OUTPUT },
+   { PLD4, 4, GPIO_PIN_OUTPUT },
 };
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226329 - head/usr.bin/kdump

2011-10-12 Thread Dag-Erling Smorgrav
Author: des
Date: Wed Oct 12 21:45:12 2011
New Revision: 226329
URL: http://svn.freebsd.org/changeset/base/226329

Log:
  Make kdump compile cleanly at WARNS level 6, with one exception: the
  ipfilter headers contain a duplicated function declaration.  Turn off
  -Werror to allow kdump to compile in spite of this.
  
  It would be neat to be able to turn off -Werror on a file-by-file basis...
  
  PR:   bin/161478
  Submitted by: Garrett Cooper yaneg...@gmail.com

Modified:
  head/usr.bin/kdump/Makefile
  head/usr.bin/kdump/kdump.c
  head/usr.bin/kdump/mkioctls

Modified: head/usr.bin/kdump/Makefile
==
--- head/usr.bin/kdump/Makefile Wed Oct 12 21:38:48 2011(r226328)
+++ head/usr.bin/kdump/Makefile Wed Oct 12 21:45:12 2011(r226329)
@@ -16,9 +16,9 @@ CFLAGS+=  -I${.CURDIR}/../ktrace -I${.CUR
 SRCS+= linux_syscalls.c
 .endif
 
-WARNS?=0
+NO_WERROR?=YES
 
-CLEANFILES=ioctl.c kdump_subr.c linux_syscalls.c
+CLEANFILES=ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
 
 ioctl.c: mkioctls
sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include  ${.TARGET}

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Wed Oct 12 21:38:48 2011(r226328)
+++ head/usr.bin/kdump/kdump.c  Wed Oct 12 21:45:12 2011(r226329)
@@ -95,6 +95,8 @@ void visdump(char *, int, int);
 void ktrgenio(struct ktr_genio *, int);
 void ktrpsig(struct ktr_psig *);
 void ktrcsw(struct ktr_csw *);
+void ktruser_malloc(unsigned char *);
+void ktruser_rtld(int, unsigned char *);
 void ktruser(int, unsigned char *);
 void ktrsockaddr(struct sockaddr *);
 void ktrstat(struct stat *);
@@ -508,7 +510,6 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
(flags == 0 || (flags  SV_ABI_MASK) == SV_ABI_FREEBSD)) {
switch (ktr-ktr_code) {
case SYS_ioctl: {
-   const char *cp;
print_number(ip, narg, c);
putchar(c);
ioctlname(*ip, decimal);
@@ -1334,7 +1335,7 @@ struct utrace_malloc {
 };
 
 void
-ktruser_malloc(int len, unsigned char *p)
+ktruser_malloc(unsigned char *p)
 {
struct utrace_malloc *ut = (struct utrace_malloc *)p;
 
@@ -1358,7 +1359,7 @@ ktruser(int len, unsigned char *p)
}
 
if (len == sizeof(struct utrace_malloc)) {
-   ktruser_malloc(len, p);
+   ktruser_malloc(p);
return;
}
 
@@ -1393,61 +1394,67 @@ ktrsockaddr(struct sockaddr *sa)
printf(, );
 
 #define check_sockaddr_len(n)  \
-   if (sa_##n-s##n##_len  sizeof(struct sockaddr_##n)) { \
+   if (sa_##n.s##n##_len  sizeof(struct sockaddr_##n)) {  \
printf(invalid);  \
break;  \
}
 
switch(sa-sa_family) {
case AF_INET: {
-   struct sockaddr_in  *sa_in;
+   struct sockaddr_in sa_in;
 
-   sa_in = (struct sockaddr_in *)sa;
+   memset(sa_in, 0, sizeof(sa_in));
+   memcpy(sa_in, sa, sizeof(sa));
check_sockaddr_len(in);
-   inet_ntop(AF_INET, sa_in-sin_addr, addr, sizeof addr);
-   printf(%s:%u, addr, ntohs(sa_in-sin_port));
+   inet_ntop(AF_INET, sa_in.sin_addr, addr, sizeof addr);
+   printf(%s:%u, addr, ntohs(sa_in.sin_port));
break;
}
 #ifdef NETATALK
case AF_APPLETALK: {
-   struct sockaddr_at  *sa_at;
+   struct sockaddr_at  sa_at;
struct netrange *nr;
 
-   sa_at = (struct sockaddr_at *)sa;
+   memset(sa_at, 0, sizeof(sa_at));
+   memcpy(sa_at, sa, sizeof(sa));
check_sockaddr_len(at);
-   nr = sa_at-sat_range.r_netrange;
-   printf(%d.%d, %d-%d, %d, ntohs(sa_at-sat_addr.s_net),
-   sa_at-sat_addr.s_node, ntohs(nr-nr_firstnet),
+   nr = sa_at.sat_range.r_netrange;
+   printf(%d.%d, %d-%d, %d, ntohs(sa_at.sat_addr.s_net),
+   sa_at.sat_addr.s_node, ntohs(nr-nr_firstnet),
ntohs(nr-nr_lastnet), nr-nr_phase);
break;
}
 #endif
case AF_INET6: {
-   struct sockaddr_in6 *sa_in6;
+   struct sockaddr_in6 sa_in6;
 
-   sa_in6 = (struct sockaddr_in6 *)sa;
+   memset(sa_in6, 0, sizeof(sa_in6));
+   memcpy(sa_in6, sa, sizeof(sa));
check_sockaddr_len(in6);
-   inet_ntop(AF_INET6, sa_in6-sin6_addr, addr, sizeof addr);
-   printf([%s]:%u,