Re: svn commit: r258041 - head/lib/libc/posix1e

2013-11-14 Thread Robert Watson

On Tue, 12 Nov 2013, Edward Tomasz Napierala wrote:


 Mention acl_get_brand_np(3).

 MFC after: 2 weeks
 Sponsored by:  The FreeBSD Foundation


Doing some writing recently, I did wonder if acl(3) and some of the other ACL 
API man pages might need a bit more updating to be clear about support for 
NFSv4 ACLs.  The user-facing man pages (getfacl(1), setfacl(1)) appear fully 
updated, but not much mention of NFSv4 in the programmer documentation.


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


svn commit: r258120 - stable/10/sys/dev/ipmi

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:11:54 2013
New Revision: 258120
URL: http://svnweb.freebsd.org/changeset/base/258120

Log:
  Merge r257421 from head:
  
Provide a crutch that prevents watchdog to interrupt dumping
on a box with IPMI enabled.
  
  Approved by:  re (kib)

Modified:
  stable/10/sys/dev/ipmi/ipmi.c
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/dev/ipmi/ipmi.c
==
--- stable/10/sys/dev/ipmi/ipmi.c   Thu Nov 14 07:41:52 2013
(r258119)
+++ stable/10/sys/dev/ipmi/ipmi.c   Thu Nov 14 09:11:54 2013
(r258120)
@@ -647,6 +647,9 @@ ipmi_wd_event(void *arg, unsigned int cm
unsigned int timeout;
int e;
 
+   if (dumping)
+   return;
+
cmd = WD_INTERVAL;
if (cmd  0  cmd = 63) {
timeout = ((uint64_t)1  cmd) / 10;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258121 - in stable/10/etc: . defaults namedb periodic/daily rc.d

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:14:33 2013
New Revision: 258121
URL: http://svnweb.freebsd.org/changeset/base/258121

Log:
  Merge r257694 from head:
  
Remove remnants of BIND from /etc, since there is no BIND in base now.
  
Sorry, that would break users running head and BIND from ports, since
ports rely on these scripts. The ports will be fixed soon.
  
  Approved by:  re (kib)

Deleted:
  stable/10/etc/namedb/
  stable/10/etc/periodic/daily/470.status-named
  stable/10/etc/rc.d/named
Modified:
  stable/10/etc/defaults/periodic.conf
  stable/10/etc/defaults/rc.conf
  stable/10/etc/freebsd-update.conf
  stable/10/etc/rc.d/Makefile
  stable/10/etc/rc.d/ntpdate
  stable/10/etc/rc.d/rpcbind
  stable/10/etc/rc.d/syslogd
Directory Properties:
  stable/10/etc/   (props changed)
  stable/10/etc/rc.d/   (props changed)

Modified: stable/10/etc/defaults/periodic.conf
==
--- stable/10/etc/defaults/periodic.confThu Nov 14 09:11:54 2013
(r258120)
+++ stable/10/etc/defaults/periodic.confThu Nov 14 09:14:33 2013
(r258121)
@@ -137,10 +137,6 @@ daily_status_mail_rejects_enable=YES 
 daily_status_mail_rejects_logs=3   # How many logs to check
 daily_status_mail_rejects_shorten=NO # Shorten output
 
-# 470.status-named
-daily_status_named_enable=YES
-daily_status_named_usedns=YES# DNS lookups 
are ok
-
 # 480.status-ntpd
 daily_status_ntpd_enable=NO  # Check NTP status
 

Modified: stable/10/etc/defaults/rc.conf
==
--- stable/10/etc/defaults/rc.conf  Thu Nov 14 09:11:54 2013
(r258120)
+++ stable/10/etc/defaults/rc.conf  Thu Nov 14 09:14:33 2013
(r258121)
@@ -260,6 +260,7 @@ hostapd_enable=NO # Run hostap daemon
 syslogd_enable=YES   # Run syslog daemon (or NO).
 syslogd_program=/usr/sbin/syslogd # path to syslogd, if you want a different 
one.
 syslogd_flags=-s # Flags to syslogd (if enabled).
+altlog_proglist= # List of chrooted applicatioins in /var
 inetd_enable=NO  # Run the network daemon dispatcher (YES/NO).
 inetd_program=/usr/sbin/inetd# path to inetd, if you want a 
different one.
 inetd_flags=-wW -C 60# Optional flags to inetd
@@ -271,23 +272,6 @@ hastd_program=/sbin/hastd# path to ha
 hastd_flags= # Optional flags to hastd.
 ctld_enable=NO   # CAM Target Layer / iSCSI target daemon.
 local_unbound_enable=NO  # local caching resolver
-#
-# named.  It may be possible to run named in a sandbox, man security for
-# details.
-#
-named_enable=NO  # Run named, the DNS server (or NO).
-named_program=/usr/sbin/named # Path to named, if you want a different one.
-named_conf=/etc/namedb/named.conf# Path to the configuration file
-#named_flags=# Use this for flags OTHER than -u and 
-c
-named_uid=bind   # User to run named as
-named_chrootdir=/var/named   # Chroot directory (or  not to auto-chroot it)
-named_chroot_autoupdate=YES  # Automatically install/update chrooted
-   # components of named. See /etc/rc.d/named.
-named_symlink_enable=YES # Symlink the chrooted pid file
-named_wait=NO# Wait for working name service before exiting
-named_wait_host=localhost# Hostname to check if named_wait is enabled
-named_auto_forward=NO# Set up forwarders from /etc/resolv.conf
-named_auto_forward_only=NO   # Do forward only instead of forward first
 
 #
 # kerberos. Do not run the admin daemons on slave servers

Modified: stable/10/etc/freebsd-update.conf
==
--- stable/10/etc/freebsd-update.conf   Thu Nov 14 09:11:54 2013
(r258120)
+++ stable/10/etc/freebsd-update.conf   Thu Nov 14 09:14:33 2013
(r258121)
@@ -35,7 +35,7 @@ UpdateIfUnmodified /etc/ /var/ /root/ /.
 
 # When upgrading to a new FreeBSD release, files which match MergeChanges
 # will have any local changes merged into the version from the new release.
-MergeChanges /etc/ /var/named/etc/ /boot/device.hints
+MergeChanges /etc/ /boot/device.hints
 
 ### Default configuration options:
 

Modified: stable/10/etc/rc.d/Makefile
==
--- stable/10/etc/rc.d/Makefile Thu Nov 14 09:11:54 2013(r258120)
+++ stable/10/etc/rc.d/Makefile Thu Nov 14 09:14:33 2013(r258121)
@@ -90,7 +90,6 @@ FILES=DAEMON \
mroute6d \
mrouted \
msgs \
-   named \
natd \
netif \
netoptions \

Modified: stable/10/etc/rc.d/ntpdate
==
--- 

svn commit: r258123 - stable/10/sys/netsmb

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:19:50 2013
New Revision: 258123
URL: http://svnweb.freebsd.org/changeset/base/258123

Log:
  Merge r257841 from head:
  
Catch up with sb_timeo type change in r255138. This fixes
smbfs operation.
  
  PR:   kern/182963
  Approved by:  re (kib)

Modified:
  stable/10/sys/netsmb/smb_trantcp.c
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/netsmb/smb_trantcp.c
==
--- stable/10/sys/netsmb/smb_trantcp.c  Thu Nov 14 09:17:27 2013
(r258122)
+++ stable/10/sys/netsmb/smb_trantcp.c  Thu Nov 14 09:19:50 2013
(r258123)
@@ -155,8 +155,8 @@ nb_connect_in(struct nbpcb *nbp, struct 
SOCKBUF_LOCK(so-so_rcv);
soupcall_set(so, SO_RCV, nb_upcall, nbp);
SOCKBUF_UNLOCK(so-so_rcv);
-   so-so_rcv.sb_timeo = (5 * hz);
-   so-so_snd.sb_timeo = (5 * hz);
+   so-so_rcv.sb_timeo = (5 * SBT_1S);
+   so-so_snd.sb_timeo = (5 * SBT_1S);
error = soreserve(so, nbp-nbp_sndbuf, nbp-nbp_rcvbuf);
if (error)
goto bad;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2013-11-14 Thread Colin Percival
Author: cperciva
Date: Thu Nov 14 09:22:32 2013
New Revision: 258124
URL: http://svnweb.freebsd.org/changeset/base/258124

Log:
  When verifying that files we need are present, also check that they don't
  have zero length.  Filesystem corruption will tend to truncate files, and
  since these are short that's likely to result in them becoming empty.
  
  Suggested by: Richard Clayton
  Convinced by: rwatson
  MFC after:3 weeks

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

Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh
==
--- head/usr.sbin/portsnap/portsnap/portsnap.sh Thu Nov 14 09:19:50 2013
(r258123)
+++ head/usr.sbin/portsnap/portsnap/portsnap.sh Thu Nov 14 09:22:32 2013
(r258124)
@@ -952,7 +952,7 @@ extract_run() {
cat ${WORKDIR}/INDEX
fi | while read FILE HASH; do
echo ${PORTSDIR}/${FILE}
-   if ! [ -r ${WORKDIR}/files/${HASH}.gz ]; then
+   if ! [ -s ${WORKDIR}/files/${HASH}.gz ]; then
echo files/${HASH}.gz not found -- snapshot corrupt.
return 1
fi
@@ -996,7 +996,7 @@ update_run_extract() {
comm -13 ${PORTSDIR}/.portsnap.INDEX - |
while read FILE HASH; do
echo ${PORTSDIR}/${FILE}
-   if ! [ -r ${WORKDIR}/files/${HASH}.gz ]; then
+   if ! [ -s ${WORKDIR}/files/${HASH}.gz ]; then
echo files/${HASH}.gz not found -- snapshot corrupt.
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258125 - in stable/10: contrib/smbfs/lib/smb lib/libsmb usr.sbin/mount_smbfs

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:25:29 2013
New Revision: 258125
URL: http://svnweb.freebsd.org/changeset/base/258125

Log:
  Merge r257888, r258049 from head:
  
- Use system libiconv, instead of trying to dlopen() it.
- Just disable recoding support in libsmb if built WITHOUT_ICONV.
  
  PR:   183153
  Approved by:  re (kib)

Modified:
  stable/10/contrib/smbfs/lib/smb/nls.c
  stable/10/lib/libsmb/Makefile
  stable/10/usr.sbin/mount_smbfs/Makefile
Directory Properties:
  stable/10/contrib/smbfs/   (props changed)
  stable/10/lib/libsmb/   (props changed)
  stable/10/usr.sbin/mount_smbfs/   (props changed)

Modified: stable/10/contrib/smbfs/lib/smb/nls.c
==
--- stable/10/contrib/smbfs/lib/smb/nls.c   Thu Nov 14 09:22:32 2013
(r258124)
+++ stable/10/contrib/smbfs/lib/smb/nls.c   Thu Nov 14 09:25:29 2013
(r258125)
@@ -36,12 +36,8 @@
 __FBSDID($FreeBSD$);
 
 #include sys/types.h
-#include sys/iconv.h
 #include sys/sysctl.h
 #include ctype.h
-#ifndef APPLE
-#include dlfcn.h
-#endif
 #include errno.h
 #include stdio.h
 #include string.h
@@ -50,21 +46,16 @@ __FBSDID($FreeBSD$);
 #include err.h
 #include netsmb/smb_lib.h
 
-/*
- * prototype iconv* functions
- */
-typedef void *iconv_t;
-
-static iconv_t (*my_iconv_open)(const char *, const char *);
-static size_t(*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *);
-static int(*my_iconv_close)(iconv_t);
+#ifdef HAVE_ICONV
+#include iconv.h
+#endif
 
 u_char nls_lower[256];
 u_char nls_upper[256];
 
+#ifdef HAVE_ICONV
 static iconv_t nls_toext, nls_toloc;
-static int iconv_loaded;
-static void *iconv_lib;
+#endif
 
 int
 nls_setlocale(const char *name)
@@ -85,117 +76,107 @@ nls_setlocale(const char *name)
 int
 nls_setrecode(const char *local, const char *external)
 {
-#ifdef APPLE
-   return ENOENT;
-#else
+#ifdef HAVE_ICONV
iconv_t icd;
 
-   if (iconv_loaded == 2)
-   return ENOENT;
-   else if (iconv_loaded == 0) {
-   iconv_loaded++;
-   iconv_lib = dlopen(libiconv.so, RTLD_LAZY | RTLD_GLOBAL);
-   if (iconv_lib == NULL) {
-   warn(Unable to load iconv library: %s\n, dlerror());
-   iconv_loaded++;
-   return ENOENT;
-   }
-   my_iconv_open = dlsym(iconv_lib, iconv_open);
-   my_iconv = dlsym(iconv_lib, iconv);
-   my_iconv_close = dlsym(iconv_lib, iconv_close);
-   }
if (nls_toext)
-   my_iconv_close(nls_toext);
+   iconv_close(nls_toext);
if (nls_toloc)
-   my_iconv_close(nls_toloc);
+   iconv_close(nls_toloc);
nls_toext = nls_toloc = (iconv_t)0;
-   icd = my_iconv_open(external, local);
+   icd = iconv_open(external, local);
if (icd == (iconv_t)-1)
return errno;
nls_toext = icd;
-   icd = my_iconv_open(local, external);
+   icd = iconv_open(local, external);
if (icd == (iconv_t)-1) {
-   my_iconv_close(nls_toext);
+   iconv_close(nls_toext);
nls_toext = (iconv_t)0;
return errno;
}
nls_toloc = icd;
return 0;
+#else
+   return ENOENT;
 #endif
 }
 
 char *
 nls_str_toloc(char *dst, const char *src)
 {
+#ifdef HAVE_ICONV
char *p = dst;
size_t inlen, outlen;
 
-   if (!iconv_loaded)
-   return strcpy(dst, src);
-
if (nls_toloc == (iconv_t)0)
return strcpy(dst, src);
inlen = outlen = strlen(src);
-   my_iconv(nls_toloc, NULL, NULL, p, outlen);
-   while (my_iconv(nls_toloc, src, inlen, p, outlen) == -1) {
+   iconv(nls_toloc, NULL, NULL, p, outlen);
+   while (iconv(nls_toloc, src, inlen, p, outlen) == -1) {
*p++ = *src++;
inlen--;
outlen--;
}
*p = 0;
return dst;
+#else
+   return strcpy(dst, src);
+#endif
 }
 
 char *
 nls_str_toext(char *dst, const char *src)
 {
+#ifdef HAVE_ICONV
char *p = dst;
size_t inlen, outlen;
 
-   if (!iconv_loaded)
-   return strcpy(dst, src);
-
if (nls_toext == (iconv_t)0)
return strcpy(dst, src);
inlen = outlen = strlen(src);
-   my_iconv(nls_toext, NULL, NULL, p, outlen);
-   while (my_iconv(nls_toext, src, inlen, p, outlen) == -1) {
+   iconv(nls_toext, NULL, NULL, p, outlen);
+   while (iconv(nls_toext, src, inlen, p, outlen) == -1) {
*p++ = *src++;
inlen--;
outlen--;
}
*p = 0;
return dst;
+#else
+   return strcpy(dst, src);
+#endif
 }
 
 void *
 nls_mem_toloc(void *dst, const void *src, int size)
 {
+#ifdef HAVE_ICONV
char *p = dst;
const char *s = src;
size_t inlen, outlen;
 
-  

svn commit: r258126 - stable/10/usr.sbin/pkg

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:26:52 2013
New Revision: 258126
URL: http://svnweb.freebsd.org/changeset/base/258126

Log:
  Merge r257945 from head:
  
Do not use just freed memory.
  
  Approved by:  re (kib)

Modified:
  stable/10/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/10/usr.sbin/pkg/   (props changed)

Modified: stable/10/usr.sbin/pkg/pkg.c
==
--- stable/10/usr.sbin/pkg/pkg.cThu Nov 14 09:25:29 2013
(r258125)
+++ stable/10/usr.sbin/pkg/pkg.cThu Nov 14 09:26:52 2013
(r258126)
@@ -326,9 +326,9 @@ parse_fingerprint(yaml_document_t *doc, 
 static void
 free_fingerprint_list(struct fingerprint_list* list)
 {
-   struct fingerprint* fingerprint;
+   struct fingerprint *fingerprint, *tmp;
 
-   STAILQ_FOREACH(fingerprint, list, next) {
+   STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) {
if (fingerprint-name)
free(fingerprint-name);
free(fingerprint);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258127 - in stable/10/sys: kern sys

2013-11-14 Thread Sergey Kandaurov
Author: pluknet
Date: Thu Nov 14 09:33:54 2013
New Revision: 258127
URL: http://svnweb.freebsd.org/changeset/base/258127

Log:
  Merge r257996,r258001,r258069 from head: fixes for HyperV guest.
  
  - Set description string for VM_GUEST_HV (HyperV guest).
  - Add a brief comment about VM_GUEST and vm_guest_sysctl_names relationship.
  - CTASSERT that vm_guest range is covered by vm_guest_sysctl_names.
  
  Approved by:  re (glebius)

Modified:
  stable/10/sys/kern/subr_param.c
  stable/10/sys/sys/systm.h
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/kern/subr_param.c
==
--- stable/10/sys/kern/subr_param.c Thu Nov 14 09:26:52 2013
(r258126)
+++ stable/10/sys/kern/subr_param.c Thu Nov 14 09:33:54 2013
(r258127)
@@ -153,8 +153,10 @@ static const char *const vm_guest_sysctl
none,
generic,
xen,
+   hv,
NULL
 };
+CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST);
 
 #ifndef XEN
 static const char *const vm_bnames[] = {

Modified: stable/10/sys/sys/systm.h
==
--- stable/10/sys/sys/systm.h   Thu Nov 14 09:26:52 2013(r258126)
+++ stable/10/sys/sys/systm.h   Thu Nov 14 09:33:54 2013(r258127)
@@ -70,8 +70,10 @@ extern int vm_guest; /* Running as virt
  * Detected virtual machine guest types. The intention is to expand
  * and/or add to the VM_GUEST_VM type if specific VM functionality is
  * ever implemented (e.g. vendor-specific paravirtualization features).
+ * Keep in sync with vm_guest_sysctl_names[].
  */
-enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV };
+enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV,
+   VM_LAST };
 
 #if defined(WITNESS) || defined(INVARIANTS)
 void   kassert_panic(const char *fmt, ...)  __printflike(1, 2);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258128 - head/sys/kern

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 09:45:33 2013
New Revision: 258128
URL: http://svnweb.freebsd.org/changeset/base/258128

Log:
  Fix a very bad typo from r248887.
  
  Submitted by: art

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu Nov 14 09:33:54 2013(r258127)
+++ head/sys/kern/uipc_mbuf.c   Thu Nov 14 09:45:33 2013(r258128)
@@ -1196,6 +1196,7 @@ m_split(struct mbuf *m0, int len0, int w
remain = m-m_len - len;
if (m0-m_flags  M_PKTHDR  remain == 0) {
n = m_gethdr(wait, m0-m_type);
+   if (n == NULL)
return (NULL);
n-m_next = m-m_next;
m-m_next = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r258124 - head/usr.sbin/portsnap/portsnap

2013-11-14 Thread Robert Watson

On Thu, 14 Nov 2013, Colin Percival wrote:


Log:
 When verifying that files we need are present, also check that they don't
 have zero length.  Filesystem corruption will tend to truncate files, and
 since these are short that's likely to result in them becoming empty.

 Suggested by:  Richard Clayton
 Convinced by:  rwatson
 MFC after: 3 weeks


I think I'd probably express this slightly differently: the filesystem isn't 
corrupted, it just doesn't contain the data you expect.  As filesystems don't 
guarantee data is there until fsync() has returned, it is actually meeting all 
its promises -- e.g., vs corrupted inode contents due to a filesystem bug.


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


Re: svn commit: r258124 - head/usr.sbin/portsnap/portsnap

2013-11-14 Thread Colin Percival
On 11/14/13 01:47, Robert Watson wrote:
 On Thu, 14 Nov 2013, Colin Percival wrote:
  When verifying that files we need are present, also check that they don't
  have zero length.  Filesystem corruption will tend to truncate files, and
  since these are short that's likely to result in them becoming empty.
 
 I think I'd probably express this slightly differently: the filesystem isn't
 corrupted, it just doesn't contain the data you expect.  As filesystems don't
 guarantee data is there until fsync() has returned, it is actually meeting all
 its promises -- e.g., vs corrupted inode contents due to a filesystem bug.

True, I should have written crashes resulting in data loss.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

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


Re: svn commit: r258041 - head/lib/libc/posix1e

2013-11-14 Thread Edward Tomasz Napierała
Wiadomość napisana przez Robert Watson w dniu 14 lis 2013, o godz. 09:07:
 On Tue, 12 Nov 2013, Edward Tomasz Napierala wrote:
 
 Mention acl_get_brand_np(3).
 
 MFC after:   2 weeks
 Sponsored by:The FreeBSD Foundation
 
 Doing some writing recently, I did wonder if acl(3) and some of the other ACL 
 API man pages might need a bit more updating to be clear about support for 
 NFSv4 ACLs.  The user-facing man pages (getfacl(1), setfacl(1)) appear fully 
 updated, but not much mention of NFSv4 in the programmer documentation.

Hm, it should be already documented - from updated list of constants
in acl_add_perm(3) or acl_set_tag_type(3), to new functions, such as
acl_add_flag_np(3) or acl_set_entry_type_np(3).

-- 
If you cut off my head, what would I say?  Me and my head, or me and my body?

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


Re: svn commit: r258041 - head/lib/libc/posix1e

2013-11-14 Thread Robert N. M. Watson

On 14 Nov 2013, at 11:06, Edward Tomasz Napierała tr...@freebsd.org wrote:

 Wiadomość napisana przez Robert Watson w dniu 14 lis 2013, o godz. 09:07:
 On Tue, 12 Nov 2013, Edward Tomasz Napierala wrote:
 
 Mention acl_get_brand_np(3).
 
 MFC after:  2 weeks
 Sponsored by:   The FreeBSD Foundation
 
 Doing some writing recently, I did wonder if acl(3) and some of the other 
 ACL API man pages might need a bit more updating to be clear about support 
 for NFSv4 ACLs.  The user-facing man pages (getfacl(1), setfacl(1)) appear 
 fully updated, but not much mention of NFSv4 in the programmer documentation.
 
 Hm, it should be already documented - from updated list of constants
 in acl_add_perm(3) or acl_set_tag_type(3), to new functions, such as
 acl_add_flag_np(3) or acl_set_entry_type_np(3).

Less a question of missing documentation than missing advertising. For example, 
acl(5) makes it really obvious that POSIX.1e semantics are supported, and the 
first mention of NFSv4 is in a long list of other unsupported types. We might 
want to begin simply by saying .Fx supports POSIX.1e and NFSv4 ACLs and 
expand a bit on the differences.

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


svn commit: r258129 - stable/10/usr.sbin/ctld

2013-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Nov 14 12:14:27 2013
New Revision: 258129
URL: http://svnweb.freebsd.org/changeset/base/258129

Log:
  Fix typo.
  
  Approved by:  re (gjb)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/ctld/ctl.conf.5
Directory Properties:
  stable/10/usr.sbin/ctld/   (props changed)

Modified: stable/10/usr.sbin/ctld/ctl.conf.5
==
--- stable/10/usr.sbin/ctld/ctl.conf.5  Thu Nov 14 09:45:33 2013
(r258128)
+++ stable/10/usr.sbin/ctld/ctl.conf.5  Thu Nov 14 12:14:27 2013
(r258129)
@@ -27,7 +27,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd April 24, 2013
+.Dd November 10, 2013
 .Dt CTL.CONF 5
 .Os
 .Sh NAME
@@ -98,7 +98,7 @@ will be forcibly terminated.
 The default is 60.
 Setting it to 0 disables the timeout.
 .El
-.Ss auth-grup level
+.Ss auth-group level
 The following statements are available at the auth-group level:
 .Bl -tag -width indent
 .It Ic chap Ao Ar user Ac Aq Ar secret
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258131 - stable/10/usr.bin/iscsictl

2013-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Nov 14 13:33:22 2013
New Revision: 258131
URL: http://svnweb.freebsd.org/changeset/base/258131

Log:
  MFC r257917:
  
  Fix typo in iscsictl -v.
  
  Approved by:  re (gjb)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/usr.bin/iscsictl/iscsictl.c
Directory Properties:
  stable/10/usr.bin/iscsictl/   (props changed)

Modified: stable/10/usr.bin/iscsictl/iscsictl.c
==
--- stable/10/usr.bin/iscsictl/iscsictl.c   Thu Nov 14 13:25:47 2013
(r258130)
+++ stable/10/usr.bin/iscsictl/iscsictl.c   Thu Nov 14 13:33:22 2013
(r258131)
@@ -425,7 +425,7 @@ kernel_list(int iscsi_fd, const struct t
printf(Secret:   %s\n, conf-isc_secret);
printf(Mutual user:  %s\n,
conf-isc_mutual_user);
-   printf(Mutual secret :   %s\n,
+   printf(Mutual secret:%s\n,
conf-isc_mutual_secret);
printf(Session type: %s\n,
conf-isc_discovery ? Discovery : Normal);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258132 - head/sys/rpc

2013-11-14 Thread Alexander Motin
Author: mav
Date: Thu Nov 14 13:51:53 2013
New Revision: 258132
URL: http://svnweb.freebsd.org/changeset/base/258132

Log:
  Some minor tuning to rpc/svc.c:
   - close cosmetic race in svc_exit();
   - do not set wait timeout for idle threads if we have no use for wakeups;
   - create new requested thread sooner, not only after some another thread
  wakeup, that may happen later under constant load.

Modified:
  head/sys/rpc/svc.c

Modified: head/sys/rpc/svc.c
==
--- head/sys/rpc/svc.c  Thu Nov 14 13:33:22 2013(r258131)
+++ head/sys/rpc/svc.c  Thu Nov 14 13:51:53 2013(r258132)
@@ -1011,6 +1011,18 @@ svc_run_internal(SVCPOOL *pool, bool_t i
 
while (pool-sp_state != SVCPOOL_CLOSING) {
/*
+* Create new thread if requested.
+*/
+   if (pool-sp_state == SVCPOOL_THREADWANTED) {
+   pool-sp_state = SVCPOOL_THREADSTARTING;
+   pool-sp_lastcreatetime = time_uptime;
+   mtx_unlock(pool-sp_lock);
+   svc_new_thread(pool);
+   mtx_lock(pool-sp_lock);
+   continue;
+   }
+
+   /*
 * Check for idle transports once per second.
 */
if (time_uptime  pool-sp_lastidlecheck) {
@@ -1046,8 +1058,13 @@ svc_run_internal(SVCPOOL *pool, bool_t i
continue;
 
LIST_INSERT_HEAD(pool-sp_idlethreads, st, st_ilink);
-   error = cv_timedwait_sig(st-st_cond, pool-sp_lock,
-   5 * hz);
+   if (ismaster || (!ismaster 
+   pool-sp_threadcount  pool-sp_minthreads))
+   error = cv_timedwait_sig(st-st_cond,
+   pool-sp_lock, 5 * hz);
+   else
+   error = cv_wait_sig(st-st_cond,
+   pool-sp_lock);
LIST_REMOVE(st, st_ilink);
 
/*
@@ -1060,24 +1077,11 @@ svc_run_internal(SVCPOOL *pool, bool_t i
 !st-st_xprt
 STAILQ_EMPTY(st-st_reqs))
break;
-   }
-   if (error == EWOULDBLOCK)
-   continue;
-   if (error) {
-   if (pool-sp_state != SVCPOOL_CLOSING) {
-   mtx_unlock(pool-sp_lock);
-   svc_exit(pool);
-   mtx_lock(pool-sp_lock);
-   }
-   break;
-   }
-
-   if (pool-sp_state == SVCPOOL_THREADWANTED) {
-   pool-sp_state = SVCPOOL_THREADSTARTING;
-   pool-sp_lastcreatetime = time_uptime;
+   } else if (error) {
mtx_unlock(pool-sp_lock);
-   svc_new_thread(pool);
+   svc_exit(pool);
mtx_lock(pool-sp_lock);
+   break;
}
continue;
}
@@ -1245,9 +1249,11 @@ svc_exit(SVCPOOL *pool)
 
mtx_lock(pool-sp_lock);
 
-   pool-sp_state = SVCPOOL_CLOSING;
-   LIST_FOREACH(st, pool-sp_idlethreads, st_ilink)
-   cv_signal(st-st_cond);
+   if (pool-sp_state != SVCPOOL_CLOSING) {
+   pool-sp_state = SVCPOOL_CLOSING;
+   LIST_FOREACH(st, pool-sp_idlethreads, st_ilink)
+   cv_signal(st-st_cond);
+   }
 
mtx_unlock(pool-sp_lock);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258133 - head/sys/netpfil/pf

2013-11-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 14 14:20:35 2013
New Revision: 258133
URL: http://svnweb.freebsd.org/changeset/base/258133

Log:
  Some fixups to pf_get_sport after r257223:
  
  - Do not return blindly if proto isn't ICMP.
  - The dport is in network order, so fix comparisons.
  - Remove ridiculous htonl(arc4random()).
  - Push local variable to a narrower block.

Modified:
  head/sys/netpfil/pf/pf_lb.c

Modified: head/sys/netpfil/pf/pf_lb.c
==
--- head/sys/netpfil/pf/pf_lb.c Thu Nov 14 13:51:53 2013(r258132)
+++ head/sys/netpfil/pf/pf_lb.c Thu Nov 14 14:20:35 2013(r258133)
@@ -227,7 +227,6 @@ pf_get_sport(sa_family_t af, u_int8_t pr
 {
struct pf_state_key_cmp key;
struct pf_addr  init_addr;
-   uint16_tcut;
 
bzero(init_addr, sizeof(init_addr));
if (pf_map_addr(af, r, saddr, naddr, init_addr, sn))
@@ -235,21 +234,19 @@ pf_get_sport(sa_family_t af, u_int8_t pr
 
switch (proto) {
case IPPROTO_ICMP:
-   if (dport != ICMP_ECHO)
+   if (dport != htons(ICMP_ECHO))
return (0);
low = 1;
high = 65535;
break;
 #ifdef INET6
case IPPROTO_ICMPV6:
-   if (dport != ICMP_ECHO)
+   if (dport != htons(ICMP6_ECHO_REQUEST))
return (0);
low = 1;
high = 65535;
break;
 #endif
-   default:
-   return (0); /* Don't try to modify non-echo ICMP */
}
 
bzero(key, sizeof(key));
@@ -283,7 +280,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr
return (0);
}
} else {
-   uint16_t tmp;
+   uint16_t tmp, cut;
 
if (low  high) {
tmp = low;
@@ -291,7 +288,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr
high = tmp;
}
/* low  high */
-   cut = htonl(arc4random()) % (1 + high - low) + low;
+   cut = arc4random() % (1 + high - low) + low;
/* low = cut = high */
for (tmp = cut; tmp = high; ++(tmp)) {
key.port[1] = htons(tmp);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258135 - in head/sys: amd64/amd64 amd64/ia32 amd64/linux32 i386/i386 i386/include i386/linux pc98/pc98 x86/include

2013-11-14 Thread Ed Maste
Author: emaste
Date: Thu Nov 14 15:37:20 2013
New Revision: 258135
URL: http://svnweb.freebsd.org/changeset/base/258135

Log:
  x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
  
  Debuggers may need to change PSL_RF.  Note that tf_eflags is already stored
  in the signal context during signal handling and PSL_RF previously could be
  modified via sigreturn, so this change should not provide any new ability
  to userspace.
  
  For background see the thread at:
  http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html
  
  Reviewed by:  jhb, kib
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/i386/i386/machdep.c
  head/sys/i386/include/vm86.h
  head/sys/i386/linux/linux_sysvec.c
  head/sys/pc98/pc98/machdep.c
  head/sys/x86/include/psl.h

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Thu Nov 14 15:14:27 2013
(r258134)
+++ head/sys/amd64/amd64/machdep.c  Thu Nov 14 15:37:20 2013
(r258135)
@@ -486,17 +486,7 @@ sys_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_rflags for faults.  Debuggers
-* should sometimes set it there too.  tf_rflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(rflags  ~PSL_RF, regs-tf_rflags  ~PSL_RF)) {
+   if (!EFL_SECURE(rflags, regs-tf_rflags)) {
uprintf(pid %d (%s): sigreturn rflags = 0x%lx\n, p-p_pid,
td-td_name, rflags);
return (EINVAL);

Modified: head/sys/amd64/ia32/ia32_signal.c
==
--- head/sys/amd64/ia32/ia32_signal.c   Thu Nov 14 15:14:27 2013
(r258134)
+++ head/sys/amd64/ia32/ia32_signal.c   Thu Nov 14 15:37:20 2013
(r258135)
@@ -719,7 +719,7 @@ ofreebsd32_sigreturn(struct thread *td, 
return (error);
scp = sc;
eflags = scp-sc_eflags;
-   if (!EFL_SECURE(eflags  ~PSL_RF, regs-tf_rflags  ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs-tf_rflags)) {
return (EINVAL);
}
if (!CS_SECURE(scp-sc_cs)) {
@@ -787,17 +787,7 @@ freebsd4_freebsd32_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_eflags for faults.  Debuggers
-* should sometimes set it there too.  tf_eflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(eflags  ~PSL_RF, regs-tf_rflags  ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs-tf_rflags)) {
uprintf(pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 
0x%x\n,
td-td_proc-p_pid, td-td_name, eflags);
return (EINVAL);
@@ -873,17 +863,7 @@ freebsd32_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_eflags for faults.  Debuggers
-* should sometimes set it there too.  tf_eflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(eflags  ~PSL_RF, regs-tf_rflags  ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs-tf_rflags)) {
uprintf(pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n,
td-td_proc-p_pid, td-td_name, eflags);
return (EINVAL);

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Thu Nov 14 15:14:27 2013
(r258134)
+++ 

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

2013-11-14 Thread Alexander Motin
Author: mav
Date: Thu Nov 14 15:54:54 2013
New Revision: 258137
URL: http://svnweb.freebsd.org/changeset/base/258137

Log:
  Introduce allocation cache to store LZ4 compression contexts without kicking
  VM subsystem twice for every written record.
  
  Tests on 24-core system show double reduction of CPU time spent on copying
  single large well-compressed file.
  
  This patch is not really needed on illumos (while not harm either) since
  their memory allocator by default uses caching for all requests up to 128K.
  
  Reviewed by:  Saso Kiselkov skiselkov...@gmail.com

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c   Thu Nov 14 
15:44:22 2013(r258136)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c   Thu Nov 14 
15:54:54 2013(r258137)
@@ -44,6 +44,8 @@ static int LZ4_compressCtx(void *ctx, co
 static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest,
 int isize, int osize);
 
+static kmem_cache_t *lz4_ctx_cache;
+
 /*ARGSUSED*/
 size_t
 lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
@@ -840,7 +842,7 @@ static int
 real_LZ4_compress(const char *source, char *dest, int isize, int osize)
 {
 #if HEAPMODE
-   void *ctx = kmem_zalloc(sizeof (struct refTables), KM_NOSLEEP);
+   void *ctx = kmem_cache_alloc(lz4_ctx_cache, KM_NOSLEEP);
int result;
 
/*
@@ -850,12 +852,13 @@ real_LZ4_compress(const char *source, ch
if (ctx == NULL)
return (0);
 
+   bzero(ctx, sizeof(struct refTables));
if (isize  LZ4_64KLIMIT)
result = LZ4_compress64kCtx(ctx, source, dest, isize, osize);
else
result = LZ4_compressCtx(ctx, source, dest, isize, osize);
 
-   kmem_free(ctx, sizeof (struct refTables));
+   kmem_cache_free(lz4_ctx_cache, ctx);
return (result);
 #else
if (isize  (int)LZ4_64KLIMIT)
@@ -1001,3 +1004,22 @@ LZ4_uncompress_unknownOutputSize(const c
_output_error:
return (int)(-(((char *)ip) - source));
 }
+
+extern void
+lz4_init(void)
+{
+
+#if HEAPMODE
+   lz4_ctx_cache = kmem_cache_create(lz4_ctx, sizeof(struct refTables),
+   0, NULL, NULL, NULL, NULL, NULL, 0);
+#endif
+}
+
+extern void
+lz4_fini(void)
+{
+
+#if HEAPMODE
+   kmem_cache_destroy(lz4_ctx_cache);
+#endif
+}

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Thu Nov 
14 15:44:22 2013(r258136)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Thu Nov 
14 15:54:54 2013(r258137)
@@ -1739,6 +1739,7 @@ spa_init(int mode)
unique_init();
space_map_init();
zio_init();
+   lz4_init();
dmu_init();
zil_init();
vdev_cache_stat_init();
@@ -1764,6 +1765,7 @@ spa_fini(void)
vdev_cache_stat_fini();
zil_fini();
dmu_fini();
+   lz4_fini();
zio_fini();
space_map_fini();
unique_fini();

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h  
Thu Nov 14 15:44:22 2013(r258136)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h  
Thu Nov 14 15:54:54 2013(r258137)
@@ -70,6 +70,8 @@ extern size_t zle_compress(void *src, vo
 int level);
 extern int zle_decompress(void *src, void *dst, size_t s_len, size_t d_len,
 int level);
+extern void lz4_init(void);
+extern void lz4_fini(void);
 extern size_t lz4_compress(void *src, void *dst, size_t s_len, size_t d_len,
 int level);
 extern int lz4_decompress(void *src, void *dst, size_t s_len, size_t d_len,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258138 - in head/contrib/gcc: . config/rs6000

2013-11-14 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Nov 14 16:10:21 2013
New Revision: 258138
URL: http://svnweb.freebsd.org/changeset/base/258138

Log:
  gcc: merge rs6000 change from FSF pre-gcc43
  
  config/rs6000/rs6000.c
  http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01551.html
  Don't set MASK_PPC_GFXOPT for 8540 or 8548.
  
  Obtained from:gcc 4.3 (rev. 124381; GPLv2)
  MFC after:3 weeks
  Reviewed by:  nathan

Modified:
  head/contrib/gcc/ChangeLog.gcc43
  head/contrib/gcc/config/rs6000/rs6000.c

Modified: head/contrib/gcc/ChangeLog.gcc43
==
--- head/contrib/gcc/ChangeLog.gcc43Thu Nov 14 15:54:54 2013
(r258137)
+++ head/contrib/gcc/ChangeLog.gcc43Thu Nov 14 16:10:21 2013
(r258138)
@@ -4,6 +4,11 @@
* doc/extend.texi: Document the 0b-prefixed binary integer
constant extension.

+2007-05-03  Ian Lance Taylor  i...@google.com (r124381)
+
+   * config/rs6000/rs6000.c (rs6000_override_options): Don't set
+   MASK_PPC_GFXOPT for 8540 or 8548.
+
 2007-05-01  Dwarakanath Rajagopal dwarak.rajago...@amd.com (r124341)
 
* doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of 

Modified: head/contrib/gcc/config/rs6000/rs6000.c
==
--- head/contrib/gcc/config/rs6000/rs6000.c Thu Nov 14 15:54:54 2013
(r258137)
+++ head/contrib/gcc/config/rs6000/rs6000.c Thu Nov 14 16:10:21 2013
(r258138)
@@ -1171,11 +1171,9 @@ rs6000_override_options (const char *def
 {801, PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
 {821, PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
 {823, PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
-{8540, PROCESSOR_PPC8540,
- POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
+{8540, PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
 /* 8548 has a dummy entry for now.  */
-{8548, PROCESSOR_PPC8540,
- POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
+{8548, PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
 {860, PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
 {970, PROCESSOR_POWER4,
  POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258139 - head/contrib/gperf/src

2013-11-14 Thread Sean Bruno
Author: sbruno
Date: Thu Nov 14 18:41:58 2013
New Revision: 258139
URL: http://svnweb.freebsd.org/changeset/base/258139

Log:
  Repair build after svn r258115
  
  options.get_size_type() appears to return a const char *, so assume that
  its a string as oppose to *nothing*.  I have no idea what apple's code is
  trying to do here:
  
  http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch

Modified:
  head/contrib/gperf/src/output.cc

Modified: head/contrib/gperf/src/output.cc
==
--- head/contrib/gperf/src/output.ccThu Nov 14 16:10:21 2013
(r258138)
+++ head/contrib/gperf/src/output.ccThu Nov 14 18:41:58 2013
(r258139)
@@ -779,7 +779,7 @@ Output::output_hash_function () const
  register %s len;\n :
   option[ANSIC] | option[CPLUSPLUS] ?
  (register const char *str, register %s len)\n :
-  , option.get_size_type());
+  %s, option.get_size_type());
 
   /* Note that when the hash function is called, it has already been verified
  that  min_key_len = len = max_key_len.  */
@@ -1907,7 +1907,7 @@ Output::output_lookup_function () const
  register %s len;\n :
   option[ANSIC] | option[CPLUSPLUS] ?
  (register const char *str, register %s len)\n :
-  , option.get_size_type());
+  %s, option.get_size_type());
 
   /* Output the function's body.  */
   printf ({\n);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258140 - head/sys/dev/oce

2013-11-14 Thread Xin LI
Author: delphij
Date: Thu Nov 14 18:53:17 2013
New Revision: 258140
URL: http://svnweb.freebsd.org/changeset/base/258140

Log:
  The previous code makes a memory allocation in size of
  struct mbx_common_read_write_flashrom plus 32KB and caps the actual
  transfer size at 32KB.  This is harmless as it is but may confuse
  static code analyzer, so allocate a full 32KB instead.
  
  Reported by:  Coverity via mjacob
  Submitted by: Venkata Duvvuru VenkatKumar.Duvvuru Emulex Com
  Coverity CID: 1125820

Modified:
  head/sys/dev/oce/oce_hw.h
  head/sys/dev/oce/oce_sysctl.c

Modified: head/sys/dev/oce/oce_hw.h
==
--- head/sys/dev/oce/oce_hw.h   Thu Nov 14 18:41:58 2013(r258139)
+++ head/sys/dev/oce/oce_hw.h   Thu Nov 14 18:53:17 2013(r258140)
@@ -1577,7 +1577,8 @@ struct mbx_common_read_write_flashrom {
uint32_t flash_op_type;
uint32_t data_buffer_size;
uint32_t data_offset;
-   uint8_t  data_buffer[4];/* + IMAGE_TRANSFER_SIZE */
+   uint8_t  data_buffer[32768];/* + IMAGE_TRANSFER_SIZE */
+   uint8_t  rsvd[4];
 };
 
 struct oce_phy_info {

Modified: head/sys/dev/oce/oce_sysctl.c
==
--- head/sys/dev/oce/oce_sysctl.c   Thu Nov 14 18:41:58 2013
(r258139)
+++ head/sys/dev/oce/oce_sysctl.c   Thu Nov 14 18:53:17 2013
(r258140)
@@ -381,8 +381,8 @@ oce_sh_be3_flashdata(POCE_SOFTC sc, cons
return EINVAL;
}
 
-   rc = oce_dma_alloc(sc, sizeof(struct mbx_common_read_write_flashrom)
-   + 32*1024, dma_mem, 0);
+   rc = oce_dma_alloc(sc, sizeof(struct mbx_common_read_write_flashrom),
+   dma_mem, 0);
if (rc) {
device_printf(sc-dev,
Memory allocation failure while flashing\n);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r258139 - head/contrib/gperf/src

2013-11-14 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-11-14 13:41:58 -0500, Sean Bruno wrote:
 Author: sbruno Date: Thu Nov 14 18:41:58 2013 New Revision: 258139 
 URL: http://svnweb.freebsd.org/changeset/base/258139
 
 Log: Repair build after svn r258115
 
 options.get_size_type() appears to return a const char *, so assume
 that its a string as oppose to *nothing*.  I have no idea what
 apple's code is trying to do here:
 
 http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch

It
 
looks like the code is in fact unreachable, i.e., the language
option must be KRC, C, ANSIC, or CPLUSPLUS.  Therefore, the last test,
option[ANSIC] | option[CPLUSPLUS] is actually redundant.

I believe your correction is sufficient for now.

Jung-uk Kim
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJShR8wAAoJEHyflib82/FGTlMH/3c6WrX6VPWJ1Xu9sF1wcT8n
S9VZG8RTY4KLc75oIAsvgc+970h7EWOhqNyNpI0JmayeW7OrG6Fqq7uT6EqtAU3i
iiYUXIW1tg5066G2VnnJW34z38Jv2V8DkjD7iF9ZdXnCMxS3tUdQiQMFCr2FKrJd
cT5+7z2+XvRq3QCT36hrSK65l3XDuUr08AVXxE9dJsReQoZMit9iHIctoJmGTqng
TaAuBiyKU7BG6Hr4hSbAni9XvzG7NRDOSU5Njc0QffRS3ZnyQZlEUAmD1f6uPUd6
ftPFIMZEk0hdCncWhKtT5HCxUyaw6RQPHF7ZRz3EmuDrxDu26qKIGAcmhizbwVg=
=tFjA
-END PGP SIGNATURE-
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258141 - head/sys/net

2013-11-14 Thread George V. Neville-Neil
Author: gnn
Date: Thu Nov 14 19:53:35 2013
New Revision: 258141
URL: http://svnweb.freebsd.org/changeset/base/258141

Log:
  The FreeBSD Project now has its own, Ogranizationally Unique Identifier,
  assigned by the IEEE.  This file includes documentation on how developers
  must carve up the space as well as an initial allocation for bhyve.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/sys/net/ieee_oui.h   (contents, props changed)

Added: head/sys/net/ieee_oui.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/net/ieee_oui.h Thu Nov 14 19:53:35 2013(r258141)
@@ -0,0 +1,66 @@
+/* 
+ * Copyright (c) 2013 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials provided
+ *with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ * Author: George V. Neville-Neil
+ *
+ */
+
+/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */
+#define OUI_FREEBSD 0x589cfc
+
+/* 
+ * OUIs are most often used to uniquely identify network interfaces
+ * and occupy the first 3 bytes of both destination and source MAC
+ * addresses.  The following allocations exist so that various
+ * software systems associated with FreeBSD can have unique IDs in the
+ * absence of hardware.  The use of OUIs for this purpose is not fully
+ * fleshed out but is now in common use in virtualization technology.
+ * 
+ * Allocations from this range are expected to be made using COMMON
+ * SENSE by developers.  Do NOT take a large range just because
+ * they're currently wide open.  Take the smallest useful range for
+ * your system.  We have (2^24 - 2) available addresses (see Reserved
+ * Values below) but that is far from infinite.
+ *
+ * In the event of a conflict arbitration of allocation in this file
+ * is subject to core@ approval
+ * 
+ * Applications are differentiated based on the high order bit(s) of
+ * the remaining three bytes.  Our first allocation has all 0s, the
+ * next allocation has the highest bit set.  Allocating in this way
+ * gives us 254 allocations of 64K addresses.  Address blocks can be
+ * concatenated if necessary.
+ *
+ * Reserved Values: 0x00 and 0xff are reserved and MUST NOT BE
+ * allocated for any reason.
+ */
+
+/* Allocate 64K to bhyve */
+#define OUI_FREEBSD_BHYVE_LOW  OUI_FREEBSD + 0x01
+#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD + 0x00
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258142 - head/sys/net

2013-11-14 Thread George V. Neville-Neil
Author: gnn
Date: Thu Nov 14 20:07:17 2013
New Revision: 258142
URL: http://svnweb.freebsd.org/changeset/base/258142

Log:
  Shift our OUI correctly.
  
  Pointed out by: emaste

Modified:
  head/sys/net/ieee_oui.h

Modified: head/sys/net/ieee_oui.h
==
--- head/sys/net/ieee_oui.h Thu Nov 14 19:53:35 2013(r258141)
+++ head/sys/net/ieee_oui.h Thu Nov 14 20:07:17 2013(r258142)
@@ -62,5 +62,5 @@
  */
 
 /* Allocate 64K to bhyve */
-#define OUI_FREEBSD_BHYVE_LOW  OUI_FREEBSD + 0x01
-#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD + 0x00
+#define OUI_FREEBSD_BHYVE_LOW  ((OUI_FREEBSD  3) + 0x01)
+#define OUI_FREEBSD_BHYVE_HIGH ((OUI_FREEBSD  3) + 0x00)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258143 - head/contrib/gcc

2013-11-14 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Nov 14 20:21:05 2013
New Revision: 258143
URL: http://svnweb.freebsd.org/changeset/base/258143

Log:
  Merge vrp-tree fix from gcc-4.3
  
  Fix missed conversion from / to  (GCC PR32521)
  
  Note that vrp-tree is currently disabled by default in
  FreeBSD's gcc due many bugs.
  
  While here fix a revision number in the 4.3 Changelog.
  
  Obtained from:gcc 4.3 (rev. 122831 - partial; GPLv2)
  MFC after:3 weeks

Modified:
  head/contrib/gcc/ChangeLog.gcc43
  head/contrib/gcc/tree-vrp.c

Modified: head/contrib/gcc/ChangeLog.gcc43
==
--- head/contrib/gcc/ChangeLog.gcc43Thu Nov 14 20:07:17 2013
(r258142)
+++ head/contrib/gcc/ChangeLog.gcc43Thu Nov 14 20:21:05 2013
(r258143)
@@ -1,4 +1,4 @@
-2007-06-05  Joerg Wunsch  j@uriah.heep.sax.de (r23479)
+2007-06-05  Joerg Wunsch  j@uriah.heep.sax.de (r125346)
 
PR preprocessor/23479
* doc/extend.texi: Document the 0b-prefixed binary integer
@@ -49,6 +49,11 @@
* config/i386/i386.c (override_options): Likewise.
* doc/invoke.texi: Likewise.
 
+2007-03-11  Ian Lance Taylor  i...@google.com (r122831 - partial)
+
+   * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
+   the *_DIV_EXPR codes correctly with overflow infinities.
+
 2007-02-09  Dwarakanath Rajagopal dwarak.rajago...@amd.com (r121763)
 
* config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10.

Modified: head/contrib/gcc/tree-vrp.c
==
--- head/contrib/gcc/tree-vrp.c Thu Nov 14 20:07:17 2013(r258142)
+++ head/contrib/gcc/tree-vrp.c Thu Nov 14 20:21:05 2013(r258143)
@@ -4914,7 +4914,7 @@ simplify_div_or_mod_using_ranges (tree s
 {
   bool sop = false;
 
-  val = compare_range_with_value (GT_EXPR, vr, integer_zero_node, sop);
+  val = compare_range_with_value (GE_EXPR, vr, integer_zero_node, sop);
 
   if (val
   sop
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r258142 - head/sys/net

2013-11-14 Thread Sergey Kandaurov
On 15 November 2013 00:07, George V. Neville-Neil g...@freebsd.org wrote:
 Author: gnn
 Date: Thu Nov 14 20:07:17 2013
 New Revision: 258142
 URL: http://svnweb.freebsd.org/changeset/base/258142

 Log:
   Shift our OUI correctly.

   Pointed out by: emaste

 Modified:
   head/sys/net/ieee_oui.h

 Modified: head/sys/net/ieee_oui.h
 ==
 --- head/sys/net/ieee_oui.h Thu Nov 14 19:53:35 2013(r258141)
 +++ head/sys/net/ieee_oui.h Thu Nov 14 20:07:17 2013(r258142)
 @@ -62,5 +62,5 @@
   */

  /* Allocate 64K to bhyve */
 -#define OUI_FREEBSD_BHYVE_LOW  OUI_FREEBSD + 0x01
 -#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD + 0x00
 +#define OUI_FREEBSD_BHYVE_LOW  ((OUI_FREEBSD  3) + 0x01)
 +#define OUI_FREEBSD_BHYVE_HIGH ((OUI_FREEBSD  3) + 0x00)

Shouldn't it be rather shifted with 24 (3 x 8bits)?

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


svn commit: r258145 - stable/8/sys/vm

2013-11-14 Thread John Baldwin
Author: jhb
Date: Thu Nov 14 21:27:19 2013
New Revision: 258145
URL: http://svnweb.freebsd.org/changeset/base/258145

Log:
  MFC 255497:
  Fix an off-by-one error when populating mincore(2) entries for
  skipped entries.  lastvecindex references the last valid byte,
  so the new bytes should come after it.

Modified:
  stable/8/sys/vm/vm_mmap.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/vm/   (props changed)

Modified: stable/8/sys/vm/vm_mmap.c
==
--- stable/8/sys/vm/vm_mmap.c   Thu Nov 14 21:27:13 2013(r258144)
+++ stable/8/sys/vm/vm_mmap.c   Thu Nov 14 21:27:19 2013(r258145)
@@ -878,12 +878,12 @@ RestartScan:
 * the byte vector is zeroed for those skipped entries.
 */
while ((lastvecindex + 1)  vecindex) {
+   ++lastvecindex;
error = subyte(vec + lastvecindex, 0);
if (error) {
error = EFAULT;
goto done2;
}
-   ++lastvecindex;
}
 
/*
@@ -919,12 +919,12 @@ RestartScan:
 */
vecindex = OFF_TO_IDX(end - first_addr);
while ((lastvecindex + 1)  vecindex) {
+   ++lastvecindex;
error = subyte(vec + lastvecindex, 0);
if (error) {
error = EFAULT;
goto done2;
}
-   ++lastvecindex;
}
 
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258144 - stable/9/sys/vm

2013-11-14 Thread John Baldwin
Author: jhb
Date: Thu Nov 14 21:27:13 2013
New Revision: 258144
URL: http://svnweb.freebsd.org/changeset/base/258144

Log:
  MFC 255497:
  Fix an off-by-one error when populating mincore(2) entries for
  skipped entries.  lastvecindex references the last valid byte,
  so the new bytes should come after it.

Modified:
  stable/9/sys/vm/vm_mmap.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/vm/vm_mmap.c
==
--- stable/9/sys/vm/vm_mmap.c   Thu Nov 14 20:21:05 2013(r258143)
+++ stable/9/sys/vm/vm_mmap.c   Thu Nov 14 21:27:13 2013(r258144)
@@ -963,12 +963,12 @@ RestartScan:
 * the byte vector is zeroed for those skipped entries.
 */
while ((lastvecindex + 1)  vecindex) {
+   ++lastvecindex;
error = subyte(vec + lastvecindex, 0);
if (error) {
error = EFAULT;
goto done2;
}
-   ++lastvecindex;
}
 
/*
@@ -1004,12 +1004,12 @@ RestartScan:
 */
vecindex = OFF_TO_IDX(end - first_addr);
while ((lastvecindex + 1)  vecindex) {
+   ++lastvecindex;
error = subyte(vec + lastvecindex, 0);
if (error) {
error = EFAULT;
goto done2;
}
-   ++lastvecindex;
}
 
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258146 - stable/9/share/man/man9

2013-11-14 Thread John Baldwin
Author: jhb
Date: Thu Nov 14 21:31:58 2013
New Revision: 258146
URL: http://svnweb.freebsd.org/changeset/base/258146

Log:
  MFC 255498:
  - Document the UQUAD sysctl variants.
  - Clarify that exactly one of the access flags is required and
list the optional flags in a separate list.  Prefer bundling
CTLFLAG_TUN into the access flag by not documenting it as an
optional flag to set.

Modified:
  stable/9/share/man/man9/Makefile
  stable/9/share/man/man9/sysctl.9
  stable/9/share/man/man9/sysctl_add_oid.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/Makefile
==
--- stable/9/share/man/man9/MakefileThu Nov 14 21:27:19 2013
(r258145)
+++ stable/9/share/man/man9/MakefileThu Nov 14 21:31:58 2013
(r258146)
@@ -1273,22 +1273,24 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \
sysctl.9 SYSCTL_NODE.9 \
sysctl.9 SYSCTL_OPAQUE.9 \
sysctl.9 SYSCTL_PROC.9 \
+   sysctl.9 SYSCTL_QUAD.9 \
sysctl.9 SYSCTL_STRING.9 \
sysctl.9 SYSCTL_STRUCT.9 \
sysctl.9 SYSCTL_UINT.9 \
sysctl.9 SYSCTL_ULONG.9 \
-   sysctl.9 SYSCTL_QUAD.9
+   sysctl.9 SYSCTL_UQUAD.9
 MLINKS+=sysctl_add_oid.9 SYSCTL_ADD_INT.9 \
sysctl_add_oid.9 SYSCTL_ADD_LONG.9 \
sysctl_add_oid.9 SYSCTL_ADD_NODE.9 \
sysctl_add_oid.9 SYSCTL_ADD_OID.9 \
sysctl_add_oid.9 SYSCTL_ADD_OPAQUE.9 \
sysctl_add_oid.9 SYSCTL_ADD_PROC.9 \
+   sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \
sysctl_add_oid.9 SYSCTL_ADD_STRING.9 \
sysctl_add_oid.9 SYSCTL_ADD_STRUCT.9 \
sysctl_add_oid.9 SYSCTL_ADD_UINT.9 \
sysctl_add_oid.9 SYSCTL_ADD_ULONG.9 \
-   sysctl_add_oid.9 SYSCTL_ADD_QUAD.9 \
+   sysctl_add_oid.9 SYSCTL_ADD_UQUAD.9 \
sysctl_add_oid.9 SYSCTL_CHILDREN.9 \
sysctl_add_oid.9 sysctl_move_oid.9 \
sysctl_add_oid.9 sysctl_remove_oid.9 \

Modified: stable/9/share/man/man9/sysctl.9
==
--- stable/9/share/man/man9/sysctl.9Thu Nov 14 21:27:19 2013
(r258145)
+++ stable/9/share/man/man9/sysctl.9Thu Nov 14 21:31:58 2013
(r258146)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 16, 2010
+.Dd September 12, 2013
 .Dt SYSCTL 9
 .Os
 .Sh NAME
@@ -35,11 +35,12 @@
 .Nm SYSCTL_NODE ,
 .Nm SYSCTL_OPAQUE ,
 .Nm SYSCTL_PROC ,
+.Nm SYSCTL_QUAD ,
 .Nm SYSCTL_STRING ,
 .Nm SYSCTL_STRUCT ,
 .Nm SYSCTL_UINT ,
 .Nm SYSCTL_ULONG ,
-.Nm SYSCTL_QUAD
+.Nm SYSCTL_UQUAD
 .Nd Static sysctl declaration functions
 .Sh SYNOPSIS
 .In sys/types.h
@@ -50,11 +51,12 @@
 .Fn SYSCTL_NODE parent nbr name access handler descr
 .Fn SYSCTL_OPAQUE parent nbr name access ptr len fmt descr
 .Fn SYSCTL_PROC parent nbr name access ptr arg handler fmt descr
+.Fn SYSCTL_QUAD parent nbr name access ptr val descr
 .Fn SYSCTL_STRING parent nbr name access arg len descr
 .Fn SYSCTL_STRUCT parent nbr name access ptr type descr
 .Fn SYSCTL_UINT parent nbr name access ptr val descr
 .Fn SYSCTL_ULONG parent nbr name access ptr val descr
-.Fn SYSCTL_QUAD parent nbr name access ptr val descr
+.Fn SYSCTL_UQUAD parent nbr name access ptr val descr
 .Sh DESCRIPTION
 The
 .Nm SYSCTL
@@ -76,12 +78,13 @@ New nodes are declared using one of
 .Fn SYSCTL_NODE ,
 .Fn SYSCTL_OPAQUE ,
 .Fn SYSCTL_PROC ,
+.Fn SYSCTL_QUAD ,
 .Fn SYSCTL_STRING ,
 .Fn SYSCTL_STRUCT ,
 .Fn SYSCTL_UINT ,
 .Fn SYSCTL_ULONG ,
 and
-.Fn SYSCTL_QUAD .
+.Fn SYSCTL_UQUAD .
 Each macro accepts a parent name, as declared using
 .Fn SYSCTL_DECL ,
 an OID number, typically
@@ -118,15 +121,23 @@ This is an unsigned long.
 This is a 64-bit unsigned integer.
 .El
 .Pp
-All sysctl types except for new node declarations require one or more flags
-to be set indicating the read and write disposition of the sysctl:
+All sysctl types except for new node declarations require one of the following
+flags to be set indicating the read and write disposition of the sysctl:
 .Bl -tag -width .Dv CTLFLAG_ANYBODY
 .It Dv CTLFLAG_RD
 This is a read-only sysctl.
+.It Dv CTLFLAG_RDTUN
+This is a read-only sysctl which can be set by a system tunable.
 .It Dv CTLFLAG_WR
 This is a writable sysctl.
 .It Dv CTLFLAG_RW
 This sysctl is readable and writable.
+.It Dv CTLFLAG_RWTUN
+This sysctl is readable and writable and can also be set by a system tunable.
+.El
+.Pp
+Additionally, any of the following optional flags may also be specified:
+.Bl -tag -width .Dv CTLFLAG_ANYBODY
 .It Dv CTLFLAG_ANYBODY
 Any user or process can write to this sysctl.
 .It Dv CTLFLAG_SECURE
@@ -139,9 +150,6 @@ This sysctl can be written to by process
 When iterating the sysctl name space, do not list this sysctl.
 .It Dv CTLFLAG_TUN
 Advisory flag that a system tunable also exists for this variable.
-.It Dv CTLFLAG_RDTUN
-Advisory flag that a system tunable also exists for this variable;
-however, the run-time variable is 

Re: svn commit: r258142 - head/sys/net

2013-11-14 Thread George Neville-Neil

On Nov 14, 2013, at 16:03 , Sergey Kandaurov pluk...@freebsd.org wrote:

 On 15 November 2013 00:07, George V. Neville-Neil g...@freebsd.org wrote:
 Author: gnn
 Date: Thu Nov 14 20:07:17 2013
 New Revision: 258142
 URL: http://svnweb.freebsd.org/changeset/base/258142
 
 Log:
  Shift our OUI correctly.
 
  Pointed out by: emaste
 
 Modified:
  head/sys/net/ieee_oui.h
 
 Modified: head/sys/net/ieee_oui.h
 ==
 --- head/sys/net/ieee_oui.h Thu Nov 14 19:53:35 2013(r258141)
 +++ head/sys/net/ieee_oui.h Thu Nov 14 20:07:17 2013(r258142)
 @@ -62,5 +62,5 @@
  */
 
 /* Allocate 64K to bhyve */
 -#define OUI_FREEBSD_BHYVE_LOW  OUI_FREEBSD + 0x01
 -#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD + 0x00
 +#define OUI_FREEBSD_BHYVE_LOW  ((OUI_FREEBSD  3) + 0x01)
 +#define OUI_FREEBSD_BHYVE_HIGH ((OUI_FREEBSD  3) + 0x00)
 
 Shouldn't it be rather shifted with 24 (3 x 8bits)?

Correct, and it should really be an | not a +.  I’ll commit a fix.

Best,
George



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r258147 - head/sys/net

2013-11-14 Thread George V. Neville-Neil
Author: gnn
Date: Thu Nov 14 21:57:37 2013
New Revision: 258147
URL: http://svnweb.freebsd.org/changeset/base/258147

Log:
  Put in the correct bit shifting and add a type to prevent clang from 
complaining.
  While here fix up a grammar nit.
  
  Pointed out by: Sergey Kandaurov and bz@ respectively.

Modified:
  head/sys/net/ieee_oui.h

Modified: head/sys/net/ieee_oui.h
==
--- head/sys/net/ieee_oui.h Thu Nov 14 21:31:58 2013(r258146)
+++ head/sys/net/ieee_oui.h Thu Nov 14 21:57:37 2013(r258147)
@@ -49,7 +49,7 @@
  * Values below) but that is far from infinite.
  *
  * In the event of a conflict arbitration of allocation in this file
- * is subject to core@ approval
+ * is subject to core@ approval.
  * 
  * Applications are differentiated based on the high order bit(s) of
  * the remaining three bytes.  Our first allocation has all 0s, the
@@ -62,5 +62,5 @@
  */
 
 /* Allocate 64K to bhyve */
-#define OUI_FREEBSD_BHYVE_LOW  ((OUI_FREEBSD  3) + 0x01)
-#define OUI_FREEBSD_BHYVE_HIGH ((OUI_FREEBSD  3) + 0x00)
+#define OUI_FREEBSD_BHYVE_LOW  (((uint64_t)OUI_FREEBSD  24) | 0x01)
+#define OUI_FREEBSD_BHYVE_HIGH (((uint64_t)OUI_FREEBSD  24) | 0x00)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258148 - head/sys/kern

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 22:57:07 2013
New Revision: 258148
URL: http://svnweb.freebsd.org/changeset/base/258148

Log:
  Add a note that this file is compiled as part of the kernel and libc.
  
  Requested by: kib
  MFC after:3 days

Modified:
  head/sys/kern/subr_capability.c

Modified: head/sys/kern/subr_capability.c
==
--- head/sys/kern/subr_capability.c Thu Nov 14 21:57:37 2013
(r258147)
+++ head/sys/kern/subr_capability.c Thu Nov 14 22:57:07 2013
(r258148)
@@ -30,6 +30,10 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
+/*
+ * Note that this file is compiled into the kernel and into libc.
+ */
+
 #ifdef _KERNEL
 #include sys/types.h
 #include sys/capability.h
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258149 - in head/sys: kern sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 22:59:20 2013
New Revision: 258149
URL: http://svnweb.freebsd.org/changeset/base/258149

Log:
  Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
  to the destination cap_rights_t structure.
  
  This already matches manual page.
  
  MFC after:3 days

Modified:
  head/sys/kern/subr_capability.c
  head/sys/sys/capability.h

Modified: head/sys/kern/subr_capability.c
==
--- head/sys/kern/subr_capability.c Thu Nov 14 22:57:07 2013
(r258148)
+++ head/sys/kern/subr_capability.c Thu Nov 14 22:59:20 2013
(r258149)
@@ -168,7 +168,7 @@ __cap_rights_init(int version, cap_right
return (rights);
 }
 
-void
+cap_rights_t *
 __cap_rights_set(cap_rights_t *rights, ...)
 {
va_list ap;
@@ -178,9 +178,11 @@ __cap_rights_set(cap_rights_t *rights, .
va_start(ap, rights);
cap_rights_vset(rights, ap);
va_end(ap);
+
+   return (rights);
 }
 
-void
+cap_rights_t *
 __cap_rights_clear(cap_rights_t *rights, ...)
 {
va_list ap;
@@ -190,6 +192,8 @@ __cap_rights_clear(cap_rights_t *rights,
va_start(ap, rights);
cap_rights_vclear(rights, ap);
va_end(ap);
+
+   return (rights);
 }
 
 bool
@@ -235,7 +239,7 @@ cap_rights_is_valid(const cap_rights_t *
return (true);
 }
 
-void
+cap_rights_t *
 cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src)
 {
unsigned int i, n;
@@ -254,9 +258,11 @@ cap_rights_merge(cap_rights_t *dst, cons
 
assert(cap_rights_is_valid(src));
assert(cap_rights_is_valid(dst));
+
+   return (dst);
 }
 
-void
+cap_rights_t *
 cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src)
 {
unsigned int i, n;
@@ -277,6 +283,8 @@ cap_rights_remove(cap_rights_t *dst, con
 
assert(cap_rights_is_valid(src));
assert(cap_rights_is_valid(dst));
+
+   return (dst);
 }
 
 bool

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 22:57:07 2013(r258148)
+++ head/sys/sys/capability.h   Thu Nov 14 22:59:20 2013(r258149)
@@ -269,8 +269,8 @@ void __cap_rights_clear(cap_rights_t *ri
 bool __cap_rights_is_set(const cap_rights_t *rights, ...);
 
 bool cap_rights_is_valid(const cap_rights_t *rights);
-void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
-void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
+cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
+cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
 bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
 
 #ifdef _KERNEL
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258150 - head/sys/sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 23:02:49 2013
New Revision: 258150
URL: http://svnweb.freebsd.org/changeset/base/258150

Log:
  Sync return value with actual implementation.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 22:59:20 2013(r258149)
+++ head/sys/sys/capability.h   Thu Nov 14 23:02:49 2013(r258150)
@@ -258,11 +258,11 @@ cap_rights_t *__cap_rights_init(int vers
 
 #definecap_rights_set(rights, ...) 
\
__cap_rights_set((rights), __VA_ARGS__, 0ULL)
-void __cap_rights_set(cap_rights_t *rights, ...);
+cap_rights_t *__cap_rights_set(cap_rights_t *rights, ...);
 
 #definecap_rights_clear(rights, ...)   
\
__cap_rights_clear((rights), __VA_ARGS__, 0ULL)
-void __cap_rights_clear(cap_rights_t *rights, ...);
+cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...);
 
 #definecap_rights_is_set(rights, ...)  
\
__cap_rights_is_set((rights), __VA_ARGS__, 0ULL)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258151 - head/sys/sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 23:05:13 2013
New Revision: 258151
URL: http://svnweb.freebsd.org/changeset/base/258151

Log:
  Style.
  
  MFC after:3 days

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 23:02:49 2013(r258150)
+++ head/sys/sys/capability.h   Thu Nov 14 23:05:13 2013(r258151)
@@ -277,7 +277,7 @@ bool cap_rights_contains(const cap_right
 
 #include sys/systm.h
 
-#define IN_CAPABILITY_MODE(td) ((td-td_ucred-cr_flags  CRED_FLAG_CAPMODE) 
!= 0)
+#define IN_CAPABILITY_MODE(td) (((td)-td_ucred-cr_flags  CRED_FLAG_CAPMODE) 
!= 0)
 
 struct filedesc;
 
@@ -328,8 +328,9 @@ int cap_rights_limit(int fd, const cap_r
 /*
  * Returns capability rights for the given descriptor.
  */
-#definecap_rights_get(fd, rights)  
__cap_rights_get(CAP_RIGHTS_VERSION, (fd), (rights))
-int __cap_rights_get(int version, int fd, cap_rights_t *rightsp);
+#definecap_rights_get(fd, rights)  
\
+   __cap_rights_get(CAP_RIGHTS_VERSION, (fd), (rights))
+int __cap_rights_get(int version, int fd, cap_rights_t *rights);
 /*
  * Limits allowed ioctls for the given descriptor.
  */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258152 - head/sys/sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 23:14:25 2013
New Revision: 258152
URL: http://svnweb.freebsd.org/changeset/base/258152

Log:
  Precisely document capability rights here too (they are already documented
  in rights(4)).
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 23:05:13 2013(r258151)
+++ head/sys/sys/capability.h   Thu Nov 14 23:14:25 2013(r258152)
@@ -79,9 +79,12 @@
 #defineCAP_SEEK_TELL   CAPRIGHT(0, 0x0004ULL)
 /* Allows for lseek(2). */
 #defineCAP_SEEK(CAP_SEEK_TELL | 0x0008ULL)
-/* Allows for pread(2), preadv(2). */
+/* Allows for aio_read(2), pread(2), preadv(2). */
 #defineCAP_PREAD   (CAP_SEEK | CAP_READ)
-/* Allows for openat(O_WRONLY) (without O_APPEND), pwrite(2), pwritev(2). */
+/*
+ * Allows for aio_write(2), openat(O_WRONLY) (without O_APPEND), pwrite(2),
+ * pwritev(2).
+ */
 #defineCAP_PWRITE  (CAP_SEEK | CAP_WRITE)
 /* Allows for mmap(PROT_NONE). */
 #defineCAP_MMAPCAPRIGHT(0, 0x0010ULL)
@@ -103,7 +106,7 @@
 #defineCAP_CREATE  CAPRIGHT(0, 0x0040ULL)
 /* Allows for openat(O_EXEC) and fexecve(2) in turn. */
 #defineCAP_FEXECVE CAPRIGHT(0, 0x0080ULL)
-/* Allows for openat(O_SYNC), openat(O_FSYNC), fsync(2). */
+/* Allows for openat(O_SYNC), openat(O_FSYNC), fsync(2), aio_fsync(2). */
 #defineCAP_FSYNC   CAPRIGHT(0, 0x0100ULL)
 /* Allows for openat(O_TRUNC), ftruncate(2). */
 #defineCAP_FTRUNCATE   CAPRIGHT(0, 0x0200ULL)
@@ -112,54 +115,101 @@
 #defineCAP_LOOKUP  CAPRIGHT(0, 0x0400ULL)
 
 /* VFS methods. */
+/* Allows for fchdir(2). */
 #defineCAP_FCHDIR  CAPRIGHT(0, 0x0800ULL)
+/* Allows for fchflags(2). */
 #defineCAP_FCHFLAGSCAPRIGHT(0, 0x1000ULL)
+/* Allows for fchflags(2) and chflagsat(2). */
 #defineCAP_CHFLAGSAT   (CAP_FCHFLAGS | CAP_LOOKUP)
+/* Allows for fchmod(2). */
 #defineCAP_FCHMOD  CAPRIGHT(0, 0x2000ULL)
+/* Allows for fchmod(2) and fchmodat(2). */
 #defineCAP_FCHMODAT(CAP_FCHMOD | CAP_LOOKUP)
+/* Allows for fchown(2). */
 #defineCAP_FCHOWN  CAPRIGHT(0, 0x4000ULL)
+/* Allows for fchown(2) and fchownat(2). */
 #defineCAP_FCHOWNAT(CAP_FCHOWN | CAP_LOOKUP)
+/* Allows for fcntl(2). */
 #defineCAP_FCNTL   CAPRIGHT(0, 0x8000ULL)
+/*
+ * Allows for flock(2), openat(O_SHLOCK), openat(O_EXLOCK),
+ * fcntl(F_SETLK_REMOTE), fcntl(F_SETLKW), fcntl(F_SETLK), fcntl(F_GETLK).
+ */
 #defineCAP_FLOCK   CAPRIGHT(0, 0x0001ULL)
+/* Allows for fpathconf(2). */
 #defineCAP_FPATHCONF   CAPRIGHT(0, 0x0002ULL)
+/* Allows for UFS background-fsck operations. */
 #defineCAP_FSCKCAPRIGHT(0, 0x0004ULL)
+/* Allows for fstat(2). */
 #defineCAP_FSTAT   CAPRIGHT(0, 0x0008ULL)
+/* Allows for fstat(2), fstatat(2) and faccessat(2). */
 #defineCAP_FSTATAT (CAP_FSTAT | CAP_LOOKUP)
+/* Allows for fstatfs(2). */
 #defineCAP_FSTATFS CAPRIGHT(0, 0x0010ULL)
+/* Allows for futimes(2). */
 #defineCAP_FUTIMES CAPRIGHT(0, 0x0020ULL)
+/* Allows for futimes(2) and futimesat(2). */
 #defineCAP_FUTIMESAT   (CAP_FUTIMES | CAP_LOOKUP)
+/* Allows for linkat(2) and renameat(2) (destination directory descriptor). */
 #defineCAP_LINKAT  CAPRIGHT(0, 0x0040ULL)
+/* Allows for mkdirat(2). */
 #defineCAP_MKDIRAT CAPRIGHT(0, 0x0080ULL)
+/* Allows for mkfifoat(2). */
 #defineCAP_MKFIFOATCAPRIGHT(0, 0x0100ULL)
+/* Allows for mknodat(2). */
 #defineCAP_MKNODAT CAPRIGHT(0, 0x0200ULL)
+/* Allows for renameat(2). */
 #defineCAP_RENAMEATCAPRIGHT(0, 0x0400ULL)
+/* Allows for symlinkat(2). */
 #defineCAP_SYMLINKAT   CAPRIGHT(0, 0x0800ULL)
+/*
+ * Allows for unlinkat(2) and renameat(2) if destination object exists and
+ * will be removed.
+ */
 #defineCAP_UNLINKATCAPRIGHT(0, 0x1000ULL)
 
 /* Extended attributes. */
+/* Allows for extattr_delete_fd(2). */
 #defineCAP_EXTATTR_DELETE  CAPRIGHT(0, 0x2000ULL)
+/* Allows for extattr_get_fd(2). */
 #defineCAP_EXTATTR_GET CAPRIGHT(0, 0x4000ULL)
+/* Allows for extattr_list_fd(2). */
 

svn commit: r258153 - head/sys/sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 23:18:32 2013
New Revision: 258153
URL: http://svnweb.freebsd.org/changeset/base/258153

Log:
  The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
  CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
  the CAP_LOOKUP right, so include this rights.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 23:14:25 2013(r258152)
+++ head/sys/sys/capability.h   Thu Nov 14 23:18:32 2013(r258153)
@@ -151,22 +151,22 @@
 /* Allows for futimes(2) and futimesat(2). */
 #defineCAP_FUTIMESAT   (CAP_FUTIMES | CAP_LOOKUP)
 /* Allows for linkat(2) and renameat(2) (destination directory descriptor). */
-#defineCAP_LINKAT  CAPRIGHT(0, 0x0040ULL)
+#defineCAP_LINKAT  (CAP_LOOKUP | 0x0040ULL)
 /* Allows for mkdirat(2). */
-#defineCAP_MKDIRAT CAPRIGHT(0, 0x0080ULL)
+#defineCAP_MKDIRAT (CAP_LOOKUP | 0x0080ULL)
 /* Allows for mkfifoat(2). */
-#defineCAP_MKFIFOATCAPRIGHT(0, 0x0100ULL)
+#defineCAP_MKFIFOAT(CAP_LOOKUP | 0x0100ULL)
 /* Allows for mknodat(2). */
-#defineCAP_MKNODAT CAPRIGHT(0, 0x0200ULL)
+#defineCAP_MKNODAT (CAP_LOOKUP | 0x0200ULL)
 /* Allows for renameat(2). */
-#defineCAP_RENAMEATCAPRIGHT(0, 0x0400ULL)
+#defineCAP_RENAMEAT(CAP_LOOKUP | 0x0400ULL)
 /* Allows for symlinkat(2). */
-#defineCAP_SYMLINKAT   CAPRIGHT(0, 0x0800ULL)
+#defineCAP_SYMLINKAT   (CAP_LOOKUP | 0x0800ULL)
 /*
  * Allows for unlinkat(2) and renameat(2) if destination object exists and
  * will be removed.
  */
-#defineCAP_UNLINKATCAPRIGHT(0, 0x1000ULL)
+#defineCAP_UNLINKAT(CAP_LOOKUP | 0x1000ULL)
 
 /* Extended attributes. */
 /* Allows for extattr_delete_fd(2). */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258154 - head/sys/sys

2013-11-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Nov 14 23:28:28 2013
New Revision: 258154
URL: http://svnweb.freebsd.org/changeset/base/258154

Log:
  - Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
in index 0 for the future.
  - Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
CAP_LOOKUP right in them.
  - Shuffle the bits around so there are no gaps. This is last chance to do
that as all moved rights are not used yet.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==
--- head/sys/sys/capability.h   Thu Nov 14 23:18:32 2013(r258153)
+++ head/sys/sys/capability.h   Thu Nov 14 23:28:28 2013(r258154)
@@ -168,49 +168,34 @@
  */
 #defineCAP_UNLINKAT(CAP_LOOKUP | 0x1000ULL)
 
-/* Extended attributes. */
-/* Allows for extattr_delete_fd(2). */
-#defineCAP_EXTATTR_DELETE  CAPRIGHT(0, 0x2000ULL)
-/* Allows for extattr_get_fd(2). */
-#defineCAP_EXTATTR_GET CAPRIGHT(0, 0x4000ULL)
-/* Allows for extattr_list_fd(2). */
-#defineCAP_EXTATTR_LISTCAPRIGHT(0, 0x8000ULL)
-/* Allows for extattr_set_fd(2). */
-#defineCAP_EXTATTR_SET CAPRIGHT(0, 0x0001ULL)
-
-/* Access Control Lists. */
-/* Allows for acl_valid_fd_np(3). */
-#defineCAP_ACL_CHECK   CAPRIGHT(0, 0x0002ULL)
-/* Allows for acl_delete_fd_np(3). */
-#defineCAP_ACL_DELETE  CAPRIGHT(0, 0x0004ULL)
-/* Allows for acl_get_fd(3) and acl_get_fd_np(3). */
-#defineCAP_ACL_GET CAPRIGHT(0, 0x0008ULL)
-/* Allows for acl_set_fd(3) and acl_set_fd_np(3). */
-#defineCAP_ACL_SET CAPRIGHT(0, 0x0010ULL)
-
 /* Socket operations. */
 /* Allows for accept(2) and accept4(2). */
-#defineCAP_ACCEPT  CAPRIGHT(0, 0x0020ULL)
+#defineCAP_ACCEPT  CAPRIGHT(0, 0x2000ULL)
 /* Allows for bind(2). */
-#defineCAP_BINDCAPRIGHT(0, 0x0040ULL)
+#defineCAP_BINDCAPRIGHT(0, 0x4000ULL)
 /* Allows for connect(2). */
-#defineCAP_CONNECT CAPRIGHT(0, 0x0080ULL)
+#defineCAP_CONNECT CAPRIGHT(0, 0x8000ULL)
 /* Allows for getpeername(2). */
-#defineCAP_GETPEERNAME CAPRIGHT(0, 0x0100ULL)
+#defineCAP_GETPEERNAME CAPRIGHT(0, 0x0001ULL)
 /* Allows for getsockname(2). */
-#defineCAP_GETSOCKNAME CAPRIGHT(0, 0x0200ULL)
+#defineCAP_GETSOCKNAME CAPRIGHT(0, 0x0002ULL)
 /* Allows for getsockopt(2). */
-#defineCAP_GETSOCKOPT  CAPRIGHT(0, 0x0400ULL)
+#defineCAP_GETSOCKOPT  CAPRIGHT(0, 0x0004ULL)
 /* Allows for listen(2). */
-#defineCAP_LISTEN  CAPRIGHT(0, 0x0800ULL)
+#defineCAP_LISTEN  CAPRIGHT(0, 0x0008ULL)
 /* Allows for sctp_peeloff(2). */
-#defineCAP_PEELOFF CAPRIGHT(0, 0x1000ULL)
+#defineCAP_PEELOFF CAPRIGHT(0, 0x0010ULL)
 #defineCAP_RECVCAP_READ
 #defineCAP_SENDCAP_WRITE
 /* Allows for setsockopt(2). */
-#defineCAP_SETSOCKOPT  CAPRIGHT(0, 0x2000ULL)
+#defineCAP_SETSOCKOPT  CAPRIGHT(0, 0x0020ULL)
 /* Allows for shutdown(2). */
-#defineCAP_SHUTDOWNCAPRIGHT(0, 0x4000ULL)
+#defineCAP_SHUTDOWNCAPRIGHT(0, 0x0040ULL)
+
+/* Allows for bindat(2) on a directory descriptor. */
+#defineCAP_BINDAT  (CAP_LOOKUP | 0x0080ULL)
+/* Allows for connectat(2) on a directory descriptor. */
+#defineCAP_CONNECTAT   (CAP_LOOKUP | 0x0100ULL)
 
 #defineCAP_SOCK_CLIENT \
(CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \
@@ -221,10 +206,10 @@
 CAP_SETSOCKOPT | CAP_SHUTDOWN)
 
 /* All used bits for index 0. */
-#defineCAP_ALL0CAPRIGHT(0, 0x7FFFULL)
+#defineCAP_ALL0CAPRIGHT(0, 0x007FULL)
 
 /* Available bits for index 0. */
-#defineCAP_UNUSED0_48  CAPRIGHT(0, 0x8000ULL)
+#defineCAP_UNUSED0_40  CAPRIGHT(0, 0x0080ULL)
 /* ... */
 #defineCAP_UNUSED0_57  CAPRIGHT(0, 0x0100ULL)
 
@@ -258,20 +243,31 @@
 /* Allows for pdkill(2). */
 #defineCAP_PDKILL  CAPRIGHT(1, 0x0800ULL)
 
-/*
- * Rights that allow to use bindat(2) and connectat(2) syscalls on a
- * 

svn commit: r258155 - head/sys/dev/qlxgbe

2013-11-14 Thread David C Somayajulu
Author: davidcs
Date: Fri Nov 15 01:26:24 2013
New Revision: 258155
URL: http://svnweb.freebsd.org/changeset/base/258155

Log:
  ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
  ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP
  
  Submitted by:David C Somayajulu

Modified:
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_hw.h
  head/sys/dev/qlxgbe/ql_ioctl.c

Modified: head/sys/dev/qlxgbe/ql_hw.c
==
--- head/sys/dev/qlxgbe/ql_hw.c Thu Nov 14 23:28:28 2013(r258154)
+++ head/sys/dev/qlxgbe/ql_hw.c Fri Nov 15 01:26:24 2013(r258155)
@@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha)
Number of Rcv Rings Entries to post before updating
 RDS Ring Producer Index);
 
+   ha-hw.min_lro_pkt_size = 512;
+   SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+   SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+   OID_AUTO, min_lro_pkt_size, CTLFLAG_RD, 
ha-hw.min_lro_pkt_size,
+   ha-hw.min_lro_pkt_size, minimum packet size to trigger lro);
+
ha-hw.mdump_active = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
@@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16
 
fw_lro-cntxt_id = cntxt_id;
 
+   if (ha-hw.min_lro_pkt_size) {
+   fw_lro-flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD;
+   fw_lro-low_threshold = ha-hw.min_lro_pkt_size;
+   }
+
if (qla_mbx_cmd(ha, (uint32_t *)fw_lro,
(sizeof (q80_config_fw_lro_t)  2),
ha-hw.mbox, (sizeof (q80_config_fw_lro_rsp_t)  2), 0)) {

Modified: head/sys/dev/qlxgbe/ql_hw.h
==
--- head/sys/dev/qlxgbe/ql_hw.h Thu Nov 14 23:28:28 2013(r258154)
+++ head/sys/dev/qlxgbe/ql_hw.h Fri Nov 15 01:26:24 2013(r258155)
@@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro {
 #define Q8_MBX_FW_LRO_IPV6 0x2
 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK   0x4
 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK   0x8
+#define Q8_MBX_FW_LRO_LOW_THRESHOLD0x10
 
uint8_t rsrvd;
uint16_tcntxt_id;
+
+   uint16_tlow_threshold;
+   uint16_trsrvd0;
 } __packed q80_config_fw_lro_t;
 
 typedef struct _q80_config_fw_lro_rsp {
@@ -1521,6 +1525,7 @@ typedef struct _qla_hw {
uint32_thealth_count;
 
uint32_tmax_tx_segs;
+   uint32_tmin_lro_pkt_size;

/* Flash Descriptor Table */
qla_flash_desc_table_t fdt;

Modified: head/sys/dev/qlxgbe/ql_ioctl.c
==
--- head/sys/dev/qlxgbe/ql_ioctl.c  Thu Nov 14 23:28:28 2013
(r258154)
+++ head/sys/dev/qlxgbe/ql_ioctl.c  Fri Nov 15 01:26:24 2013
(r258155)
@@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
}

fw_dump = (qla_rd_fw_dump_t *)data;
+
+   if ((fw_dump-md_template == NULL) ||
+   (fw_dump-template_size != 
ha-hw.dma_buf.minidump.size)) {
+   rval = EINVAL;
+   break;
+   }
+
if ((rval = copyout(ha-hw.dma_buf.minidump.dma_b,
fw_dump-md_template, fw_dump-template_size)))
rval = ENXIO;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258156 - head/sys/dev/qlxge

2013-11-14 Thread David C Somayajulu
Author: davidcs
Date: Fri Nov 15 01:44:58 2013
New Revision: 258156
URL: http://svnweb.freebsd.org/changeset/base/258156

Log:
  Validate the buffer and its length passed to QLA_MPI_DUMP.
  copyout dump only if qls_mpi_core_dump() is successful.
  (like to credit x90c for pointing the issue)
  Submitted by:David C Somayajulu

Modified:
  head/sys/dev/qlxge/qls_ioctl.c

Modified: head/sys/dev/qlxge/qls_ioctl.c
==
--- head/sys/dev/qlxge/qls_ioctl.c  Fri Nov 15 01:26:24 2013
(r258155)
+++ head/sys/dev/qlxge/qls_ioctl.c  Fri Nov 15 01:44:58 2013
(r258156)
@@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd,
if (mpi_dump-size == 0) {
mpi_dump-size = sizeof (qls_mpi_coredump_t);
} else {
-   if (mpi_dump-size  sizeof (qls_mpi_coredump_t))
+   if ((mpi_dump-size != sizeof (qls_mpi_coredump_t)) ||
+   (mpi_dump-dbuf == NULL))
rval = EINVAL;
else {
-   qls_mpi_core_dump(ha);
-   rval = copyout( ql_mpi_coredump,
-   mpi_dump-dbuf,
-   mpi_dump-size);
+   if (qls_mpi_core_dump(ha) == 0) {
+   rval = copyout(ql_mpi_coredump,
+   mpi_dump-dbuf,
+   mpi_dump-size);
+   } else 
+   rval = ENXIO;
 
if (rval) {
device_printf(ha-pci_dev,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258157 - head/contrib/gcc/cp

2013-11-14 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Nov 15 03:05:33 2013
New Revision: 258157
URL: http://svnweb.freebsd.org/changeset/base/258157

Log:
  gcc: warn about integer overflow in constant expressions in the C++ frontend.
  
  This fixes GCC 28986:
   http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00473.html
  
  Obtained from:gcc 4.3 (rev. 120558; GPLv2)
  MFC after:3 weeks

Modified:
  head/contrib/gcc/cp/typeck.c

Modified: head/contrib/gcc/cp/typeck.c
==
--- head/contrib/gcc/cp/typeck.cFri Nov 15 01:44:58 2013
(r258156)
+++ head/contrib/gcc/cp/typeck.cFri Nov 15 03:05:33 2013
(r258157)
@@ -3773,6 +3773,12 @@ build_binary_op (enum tree_code code, tr
   result = fold_if_not_in_template (result);
   if (final_type != 0)
 result = cp_convert (final_type, result);
+
+  if (TREE_OVERFLOW_P (result) 
+   !TREE_OVERFLOW_P (op0) 
+   !TREE_OVERFLOW_P (op1))
+overflow_warning (result);
+
   return result;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r258139 - head/contrib/gperf/src

2013-11-14 Thread Bruce Evans

On Thu, 14 Nov 2013, Sean Bruno wrote:


Log:
 Repair build after svn r258115

 options.get_size_type() appears to return a const char *, so assume that
 its a string as oppose to *nothing*.  I have no idea what apple's code is
 trying to do here:

 http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch


It is trying to add an arg to a printf, while retaining the old behaviour
of printing nothing (now including the new arg) in some cases.  The
compiler doesn't like this, since the new arg is unconditional while
the format is conditional.  I think it is a compiler bug to warn in
this case.

This commit replaces the warning (which is really about the compiler bug)
by a bug in gperf.  But I think the bug is harmless because it is in
unreachable code.  But then why have the unreachable code?  (It is for
a default case which I think is unreacheable because all possible cases
that occur are handled individually.)


Modified: head/contrib/gperf/src/output.cc
==
--- head/contrib/gperf/src/output.ccThu Nov 14 16:10:21 2013
(r258138)
+++ head/contrib/gperf/src/output.ccThu Nov 14 18:41:58 2013
(r258139)
@@ -779,7 +779,7 @@ Output::output_hash_function () const
 register %s len;\n :
  option[ANSIC] | option[CPLUSPLUS] ?
 (register const char *str, register %s len)\n :
-  , option.get_size_type());
+  %s, option.get_size_type());

  /* Note that when the hash function is called, it has already been verified
 that  min_key_len = len = max_key_len.  */
...


The old code hard-coded the type of the integer arg as unsigned int.  This
is now spelled %s with a new arg.  When there is no declaration at all,
then there is no integer arg and the declaration was spelled .  This is
still the correct spelling.  Changing it to %s gives a syntax error like
a bare unsigned int in the output.  However, this case seems to be
unreachable.

The printf() is rather complicated and fancily formatted, with the fancy
format partly destroyed by the svn mail bug of not quoting patches and mail
programs then sometimes removing leading whitespace.  It uses a nice
conditional ladder of the following form:

printf(
case1 ?  decl1 %s len :
case2 ?  decl2 %s len :
case3 ?  decl3 %s len :
/* default (unreachable?) */ , typestr);

where the formatting is much fancier than this (but is perfectly consistent
except for the default case and now for the option at the end (the option
should be on a line by itself and not grouped with the complicated
conditional ladder, especially not with its unreachable part).

The cases are:

case1: KR C
case2: plain C
case3: ANSI (sic) C or C++
default: unreachable?

and the generated code is now:

KR C:register type len'\n
plain C:  register type len;\n
ANSI (sic) C or C++:  register type len;\n
unreachable?: type  /* syntax error */

Before this commit, the generated code was:

KR C:register type len'\n
plain C:  register type len;\n
ANSI (sic) C or C++:  register type len;\n
unreachable?: /* no syntax error */

and a few days ago it was:

KR C:register unsigned len'\n
plain C:  register unsigned len;\n
ANSI (sic) C or C++:  register unsigned len;\n
unreachable?: /* no syntax error */

This particular declaration doesn't even depend on the language.  The
printf() just groups it with another one for a pointer because this used
to be convenient.

The supported languages are sort of documented in the man page.  ANSI C
doesn't exist, and there have been several versions of Standard C since
it existed, but there is no special version-dependent support.  It is
even less clear what plain C is.  It seems to be for a 1980's C that
is not quite as old as KR C -- according to the generated code, plain C
has const but not signed char, while KR C has neither.  I get the lack
of signed char from smallest_integral_type().  smallest_integral_type()
is fundamentally wrong since it uses the host SCHAR_MIN for building
KR and plain C targets that don't have SCHAR_MIN and might even have
a different character size when running on the same hardware as gperf.

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


svn commit: r258158 - stable/10/sys/i386/i386

2013-11-14 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 15 07:09:24 2013
New Revision: 258158
URL: http://svnweb.freebsd.org/changeset/base/258158

Log:
  MFC r257858:
  Fix signal delivery for the iBCS2 binaries.
  
  Approved by:  re (gjb)

Modified:
  stable/10/sys/i386/i386/machdep.c
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/i386/i386/machdep.c
==
--- stable/10/sys/i386/i386/machdep.c   Fri Nov 15 03:05:33 2013
(r258157)
+++ stable/10/sys/i386/i386/machdep.c   Fri Nov 15 07:09:24 2013
(r258158)
@@ -757,6 +757,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 
regs-tf_esp = (int)sfp;
regs-tf_eip = p-p_sysent-sv_sigcode_base;
+   if (regs-tf_eip == 0)
+   regs-tf_eip = p-p_sysent-sv_psstrings - szsigcode;
regs-tf_eflags = ~(PSL_T | PSL_D);
regs-tf_cs = _ucodesel;
regs-tf_ds = _udatasel;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258159 - in stable/10/sys: amd64/amd64 i386/i386 x86/include

2013-11-14 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 15 07:10:42 2013
New Revision: 258159
URL: http://svnweb.freebsd.org/changeset/base/258159

Log:
  MFC r257856:
  Add bits for the AMD features from CPUID function 0x8001 ECX,
  described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf.
  
  Approved by:  re (gjb)

Modified:
  stable/10/sys/amd64/amd64/identcpu.c
  stable/10/sys/i386/i386/identcpu.c
  stable/10/sys/x86/include/specialreg.h
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/amd64/amd64/identcpu.c
==
--- stable/10/sys/amd64/amd64/identcpu.cFri Nov 15 07:09:24 2013
(r258158)
+++ stable/10/sys/amd64/amd64/identcpu.cFri Nov 15 07:10:42 2013
(r258159)
@@ -366,18 +366,18 @@ printcpuinfo(void)
\017b14
\020LWP   /* Lightweight Profiling */
\021FMA4  /* 4-operand FMA instructions */
-   \022b17
+   \022TCE   /* Translation Cache Extension 
*/
\023b18
\024NodeId/* NodeId MSR support */
\025b20
\026TBM   /* Trailing Bit Manipulation */
\027Topology  /* Topology Extensions */
-   \030b23
-   \031b24
+   \030PCXC  /* Core perf count */
+   \031PNXC  /* NB perf count */
\032b25
-   \033b26
-   \034b27
-   \035b28
+   \033DBE   /* Data Breakpoint extension */
+   \034PTSC  /* Performance TSC */
+   \035PL2I  /* L2I perf count */
\036b29
\037b30
\040b31

Modified: stable/10/sys/i386/i386/identcpu.c
==
--- stable/10/sys/i386/i386/identcpu.c  Fri Nov 15 07:09:24 2013
(r258158)
+++ stable/10/sys/i386/i386/identcpu.c  Fri Nov 15 07:10:42 2013
(r258159)
@@ -842,18 +842,18 @@ printcpuinfo(void)
\017b14
\020LWP   /* Lightweight Profiling */
\021FMA4  /* 4-operand FMA instructions */
-   \022b17
+   \022TCE   /* Translation Cache Extension 
*/
\023b18
\024NodeId/* NodeId MSR support */
\025b20
\026TBM   /* Trailing Bit Manipulation */
\027Topology  /* Topology Extensions */
-   \030b23
-   \031b24
+   \030PCXC  /* Core perf count */
+   \031PNXC  /* NB perf count */
\032b25
-   \033b26
-   \034b27
-   \035b28
+   \033DBE   /* Data Breakpoint extension */
+   \034PTSC  /* Performance TSC */
+   \035PL2I  /* L2I perf count */
\036b29
\037b30
\040b31

Modified: stable/10/sys/x86/include/specialreg.h
==
--- stable/10/sys/x86/include/specialreg.h  Fri Nov 15 07:09:24 2013
(r258158)
+++ stable/10/sys/x86/include/specialreg.h  Fri Nov 15 07:10:42 2013
(r258159)
@@ -201,9 +201,15 @@
 #defineAMDID2_WDT  0x2000
 #defineAMDID2_LWP  0x8000
 #defineAMDID2_FMA4 0x0001
+#defineAMDID2_TCE  0x0002
 #defineAMDID2_NODE_ID  0x0008
 #defineAMDID2_TBM  0x0020
 #defineAMDID2_TOPOLOGY 0x0040
+#defineAMDID2_PCXC 0x0080
+#defineAMDID2_PNXC 0x0100
+#defineAMDID2_DBE  0x0400
+#defineAMDID2_PTSC 0x0800
+#defineAMDID2_PTSCEL2I 0x1000
 
 /*
  * CPUID instruction 1 eax info
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258160 - stable/9/sys/i386/i386

2013-11-14 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 15 07:14:01 2013
New Revision: 258160
URL: http://svnweb.freebsd.org/changeset/base/258160

Log:
  MFC r257858:
  Fix signal delivery for the iBCS2 binaries.

Modified:
  stable/9/sys/i386/i386/machdep.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/i386/i386/machdep.c
==
--- stable/9/sys/i386/i386/machdep.cFri Nov 15 07:10:42 2013
(r258159)
+++ stable/9/sys/i386/i386/machdep.cFri Nov 15 07:14:01 2013
(r258160)
@@ -758,6 +758,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 
regs-tf_esp = (int)sfp;
regs-tf_eip = p-p_sysent-sv_sigcode_base;
+   if (regs-tf_eip == 0)
+   regs-tf_eip = p-p_sysent-sv_psstrings - szsigcode;
regs-tf_eflags = ~(PSL_T | PSL_D);
regs-tf_cs = _ucodesel;
regs-tf_ds = _udatasel;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258161 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include

2013-11-14 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 15 07:26:50 2013
New Revision: 258161
URL: http://svnweb.freebsd.org/changeset/base/258161

Log:
  MFC r257856:
  Add bits for the AMD features from CPUID function 0x8001 ECX,
  described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf.

Modified:
  stable/9/sys/amd64/amd64/identcpu.c
  stable/9/sys/amd64/include/specialreg.h
  stable/9/sys/i386/i386/identcpu.c
  stable/9/sys/i386/include/specialreg.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/identcpu.c
==
--- stable/9/sys/amd64/amd64/identcpu.c Fri Nov 15 07:14:01 2013
(r258160)
+++ stable/9/sys/amd64/amd64/identcpu.c Fri Nov 15 07:26:50 2013
(r258161)
@@ -366,18 +366,18 @@ printcpuinfo(void)
\017b14
\020LWP   /* Lightweight Profiling */
\021FMA4  /* 4-operand FMA instructions */
-   \022b17
+   \022TCE   /* Translation Cache Extension 
*/
\023b18
\024NodeId/* NodeId MSR support */
\025b20
\026TBM   /* Trailing Bit Manipulation */
\027Topology  /* Topology Extensions */
-   \030b23
-   \031b24
+   \030PCXC  /* Core perf count */
+   \031PNXC  /* NB perf count */
\032b25
-   \033b26
-   \034b27
-   \035b28
+   \033DBE   /* Data Breakpoint extension */
+   \034PTSC  /* Performance TSC */
+   \035PL2I  /* L2I perf count */
\036b29
\037b30
\040b31

Modified: stable/9/sys/amd64/include/specialreg.h
==
--- stable/9/sys/amd64/include/specialreg.h Fri Nov 15 07:14:01 2013
(r258160)
+++ stable/9/sys/amd64/include/specialreg.h Fri Nov 15 07:26:50 2013
(r258161)
@@ -201,9 +201,15 @@
 #defineAMDID2_WDT  0x2000
 #defineAMDID2_LWP  0x8000
 #defineAMDID2_FMA4 0x0001
+#defineAMDID2_TCE  0x0002
 #defineAMDID2_NODE_ID  0x0008
 #defineAMDID2_TBM  0x0020
 #defineAMDID2_TOPOLOGY 0x0040
+#defineAMDID2_PCXC 0x0080
+#defineAMDID2_PNXC 0x0100
+#defineAMDID2_DBE  0x0400
+#defineAMDID2_PTSC 0x0800
+#defineAMDID2_PTSCEL2I 0x1000
 
 /*
  * CPUID instruction 1 eax info

Modified: stable/9/sys/i386/i386/identcpu.c
==
--- stable/9/sys/i386/i386/identcpu.c   Fri Nov 15 07:14:01 2013
(r258160)
+++ stable/9/sys/i386/i386/identcpu.c   Fri Nov 15 07:26:50 2013
(r258161)
@@ -842,18 +842,18 @@ printcpuinfo(void)
\017b14
\020LWP   /* Lightweight Profiling */
\021FMA4  /* 4-operand FMA instructions */
-   \022b17
+   \022TCE   /* Translation Cache Extension 
*/
\023b18
\024NodeId/* NodeId MSR support */
\025b20
\026TBM   /* Trailing Bit Manipulation */
\027Topology  /* Topology Extensions */
-   \030b23
-   \031b24
+   \030PCXC  /* Core perf count */
+   \031PNXC  /* NB perf count */
\032b25
-   \033b26
-   \034b27
-   \035b28
+   \033DBE   /* Data Breakpoint extension */
+   \034PTSC  /* Performance TSC */
+   \035PL2I  /* L2I perf count */
\036b29
\037b30
\040b31

Modified: stable/9/sys/i386/include/specialreg.h
==
--- stable/9/sys/i386/include/specialreg.h  Fri Nov 15 07:14:01 2013
(r258160)
+++ stable/9/sys/i386/include/specialreg.h  Fri Nov 15 07:26:50 2013