Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Baptiste Daroussin
On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote:
 On Sat, 24 Jan 2015, Baptiste Daroussin wrote:
 
  Log:
   Allow negative numbers in -u and -g options
 
 This is backwards.  ids and gids are non-negative integers that can be
 represented in the type uid_t and gid_t, respectively.  All versions of
 POSIX require this.  Old versions of POSIX allowed uid_t and gid_t to
 be floating point, but didn't allow negative, fractional, infinity or
 NaN values.  Not so old versions of POSIX require uid_t and gid_t to
 be integer types, but still allow them to be sign.  Negative and values
 must not be created.  Unrepresentable values cannot be created of course,
 and should be rejected before they damage the password database.  uid_t
 and gid_t happened to be unsigned in FreeBSD, so negative values are
 unrepresentable so cannot be created.  pw is responsible for creating
 ids, so it should reject negative and other unrepresentable ids.  It
 has garbage code for both.
 
 Negative ids have historical abuses in places like mountd.  mountd still
 hard-codes -2 and -2 for the default uid and gid of an unprivileged user.
 It at least casts these values to uid_t and gid_t before using them.
 This gives the ids the non-random values of UINT32_MAX-1 if uid_t and
 gid_t are uint32_t.  (If uid_t and gid_t were signed, then it would
 leave the values as negative, so invalid.)  These magic values may work
 better than when ids were 16 bits, since there is less risk of them
 conflicting with a normal id.  However, the non-conflict is probably
 a bug.  FreeBSD uses the magic ids of 65534 for user nobody: group
 nobody.  These would have been (id_t)-2 with 16-bit ids.  They no
 longer match, so ls displays (id_t)-2 numerically.  FreeBSD also has
 a group nogroup = 65553 that doesn't match the nfs usage.  However2,
 in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was
 32766. so they didn't match nfs for other reasons.  The 2 non-groups
 now seem to be just a bug -- FreeBSD-1 didn't have group nobody.
 4.4BSD-Lite2 has the same values as FreeBSD-1.
 
Yes I know my patch is dirty, the whole pw(8) deserves a complete rewrite...

It was just a quick and dirty fix to try to solve what looks to me like an
abuse of bugs in pw(8) but it seems some people have scripts relying on it.
Which is why I was committed this given I broke the usage of this abuse.

I'll be more than happy to revert this fix.

I added Devin in the CC as he maintains bsdconfig which rely on pw(8) accepting
negative numbers. And he seems to have a strong feeling about having this
behaviour in pw(8).

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196514

Best regards,
Bapt


pgpHtjrq5EU_Z.pgp
Description: PGP signature


svn commit: r277692 - stable/10/sys/dev/acpica

2015-01-25 Thread Colin Percival
Author: cperciva
Date: Sun Jan 25 08:16:51 2015
New Revision: 277692
URL: https://svnweb.freebsd.org/changeset/base/277692

Log:
  MFC r277318:
When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't
accidentally enable non-existent states.
  
This bug was triggered if ACPI advertises the presence of a C2 state
which we fail to parse via acpi_PkgGas due to our lack of support for
FFixedHW resources, and causes an immediate panic when an attempt is
made to enter the (NULL) state.
  
One affected platform is the EC2 c4.8xlarge VM instance type; there
may be others.

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

Modified: stable/10/sys/dev/acpica/acpi_cpu.c
==
--- stable/10/sys/dev/acpica/acpi_cpu.c Sun Jan 25 06:05:55 2015
(r277691)
+++ stable/10/sys/dev/acpica/acpi_cpu.c Sun Jan 25 08:16:51 2015
(r277692)
@@ -872,7 +872,7 @@ acpi_cpu_startup(void *arg)
for (i = 0; i  cpu_ndevices; i++) {
sc = device_get_softc(cpu_devices[i]);
if (cpu_quirks  CPU_QUIRK_NO_C3) {
-   sc-cpu_cx_count = sc-cpu_non_c3 + 1;
+   sc-cpu_cx_count = min(sc-cpu_cx_count, sc-cpu_non_c3 + 1);
}
AcpiInstallNotifyHandler(sc-cpu_handle, ACPI_DEVICE_NOTIFY,
acpi_cpu_notify, sc);
___
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: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Bruce Evans

On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote:


On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote:


Negative ids have historical abuses in places like mountd.  mountd still
hard-codes -2 and -2 for the default uid and gid of an unprivileged user.
It at least casts these values to uid_t and gid_t before using them.
This gives the ids the non-random values of UINT32_MAX-1 if uid_t and
gid_t are uint32_t.  (If uid_t and gid_t were signed, then it would
leave the values as negative, so invalid.)  These magic values may work
better than when ids were 16 bits, since there is less risk of them
conflicting with a normal id.  However, the non-conflict is probably
a bug.  FreeBSD uses the magic ids of 65534 for user nobody: group
nobody.  These would have been (id_t)-2 with 16-bit ids.  They no
longer match, so ls displays (id_t)-2 numerically.  FreeBSD also has
a group nogroup = 65553 that doesn't match the nfs usage.  However2,
in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was
32766. so they didn't match nfs for other reasons.  The 2 non-groups
now seem to be just a bug -- FreeBSD-1 didn't have group nobody.
4.4BSD-Lite2 has the same values as FreeBSD-1.


This is not full true for ZFS case.
On ZFS nobody is 2^32-2.


File systems don't get to decide this.  zfs actually uses 2^16-2.  It
claims to use the standard POSIX id for the user nobody, but there are
no such thing in POSIX (except (*id_t)-1 means no value for some
syscalls) so it must not be used otherwise).  zfs actually uses the
FreeBSD values UID_NOBODY and GID_NOBODY, so it is at least consistent
with the default /etc/passwd and /etc/group, unlike nfs.  I added the
hard-coded UID_* and GID_* as quick fixes for devfs in 1996, since
parsing the password database to get them in the correct way is too
hard.  This hack is still used today :-(.  Except, I didn't add the
NOBODY ids.  These are not used by any file system.  They are hacks
for devfs alone, mislayered into a devfs (device-specific) header.
The sysadmin can easily break all these hard-coded values by editing
the password database, but shouldn't.

Googling POSIX uid nobody finds no early POSIX hits, but some warnings
that the magic ids are non-POSIX.  Wikipedia gives the following magic
ids:
  0: normally the superuser.  This is probably still hard-coded in many
 places in FreeBSD, though many places were fixed in the conversion
 from suser() to priv_check().
  (uid_t)-1: POSIX standard for omitted arg
  -2: historical nobody
  32767: another historical nobody, still used by OpenBSD
  65534: another nobody, now used by many Linux distributions for
 compatibilty betwen 16-bit and 32-bit ids.  Default Linux
 return value for the id returned by 16-bit syscalls when
 the value is too large.  [Linux switched to 32-bit ids much
 later than FreeBSD, so it has to be more careful with
 compatibility.  The Linux emulator in FreeBSD is both
 incompatible and insecure here -- it doesn't return 65534,
 but truncates using blind assignment.]
  99: statically allocate 0-99 for system use and use the last value
  in the range for nobody.

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


Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote:

 On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote:
 
  On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote:
 
  Negative ids have historical abuses in places like mountd.  mountd still
  hard-codes -2 and -2 for the default uid and gid of an unprivileged user.
  It at least casts these values to uid_t and gid_t before using them.
  This gives the ids the non-random values of UINT32_MAX-1 if uid_t and
  gid_t are uint32_t.  (If uid_t and gid_t were signed, then it would
  leave the values as negative, so invalid.)  These magic values may work
  better than when ids were 16 bits, since there is less risk of them
  conflicting with a normal id.  However, the non-conflict is probably
  a bug.  FreeBSD uses the magic ids of 65534 for user nobody: group
  nobody.  These would have been (id_t)-2 with 16-bit ids.  They no
  longer match, so ls displays (id_t)-2 numerically.  FreeBSD also has
  a group nogroup = 65553 that doesn't match the nfs usage.  However2,
  in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was
  32766. so they didn't match nfs for other reasons.  The 2 non-groups
  now seem to be just a bug -- FreeBSD-1 didn't have group nobody.
  4.4BSD-Lite2 has the same values as FreeBSD-1.
 
  This is not full true for ZFS case.
  On ZFS nobody is 2^32-2.
 
 File systems don't get to decide this.  zfs actually uses 2^16-2.  It

ls -l /usr/ports/packages32/lang
total 2
lrwxr-xr-x  1 4294967294  wheel  33 Mar 17  2012 perl-threaded-5.12.4_4.tbz - 
../All/perl-threaded-5.12.4_4.tbz
lrwxr-xr-x  1 4294967294  wheel  27 Mar 17  2012 python27-2.7.2_4.tbz - 
../All/python27-2.7.2_4.tbz
lrwxr-xr-x  1 4294967294  wheel  21 Mar 17  2012 tcl-8.5.11.tbz - 
../All/tcl-8.5.11.tbz
lrwxr-xr-x  1 4294967294  wheel  29 Mar 17  2012 tcl-modules-8.5.11.tbz - 
../All/tcl-modules-8.5.11.tbz

Same in solaris, as i know.

___
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: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64

2015-01-25 Thread Konstantin Belousov
On Sun, Jan 25, 2015 at 10:07:00AM -0700, Warner Losh wrote:
 
  On Jan 24, 2015, at 8:51 AM, Konstantin Belousov kostik...@gmail.com 
  wrote:
  
  On Sat, Jan 24, 2015 at 05:42:40PM +0200, Konstantin Belousov wrote:
  On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote:
  On Sat, 2015-01-24 at 12:51 +, Konstantin Belousov wrote:
  Author: kib
  Date: Sat Jan 24 12:51:15 2015
  New Revision: 277643
  URL: https://svnweb.freebsd.org/changeset/base/277643
  
  Log:
   Remove Giant from /dev/mem and /dev/kmem.  It is definitely not needed
   for i386, and from the code inspection, nothing in the
   arm/mips/sparc64 implementations depends on it.
  
  
  I'm not sure I agree with that.  On arm the memrw() implementation uses
  a single statically-allocated page of kva space into which it maps each
  physical page in turn in the main loop.  What prevents preemption or
  multicore access to /dev/mem from trying to use that single page for
  multiple operations at once?
  
  I see, thank you for noting this.
  
  But, I do not think that Giant is a solution for the problem. uiomove()
  call accesses userspace, which may fault and cause sleep. If the
  thread sleeps, the Giant is automatically dropped, so there is no real
  protection.
  
  I think dump exclusive sx around whole memrw() should be enough.
  
  I can revert the commit for now, or I can leave it as is while
  writing the patch with sx and waiting for somebody review.  What
  would you prefer ?
  
  P.S. mips uses uiomove_fromphys(), avoiding transient mapping,
  and sparc allocates KVA when needed.
  
  Like this.
 
 So why a sx lock and not a mutex?
I explained this above.  uiomove() needs to sleep on fault.
___
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: r277706 - head/etc/rc.d

2015-01-25 Thread Dag-Erling Smørgrav
Author: des
Date: Sun Jan 25 15:44:46 2015
New Revision: 277706
URL: https://svnweb.freebsd.org/changeset/base/277706

Log:
  Allow the user to specify the location of control.conf.

Modified:
  head/etc/rc.d/local_unbound

Modified: head/etc/rc.d/local_unbound
==
--- head/etc/rc.d/local_unbound Sun Jan 25 15:09:52 2015(r277705)
+++ head/etc/rc.d/local_unbound Sun Jan 25 15:44:46 2015(r277706)
@@ -26,6 +26,7 @@ pidfile=/var/run/${name}.pid
 : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf}
 : ${local_unbound_flags:=-c${local_unbound_config}}
 : ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf}
+: ${local_unbound_controlconf:=${local_unbound_workdir}/control.conf}
 : ${local_unbound_anchor:=${local_unbound_workdir}/root.key}
 : ${local_unbound_forwarders:=}
 
@@ -66,6 +67,7 @@ local_unbound_setup()
-w ${local_unbound_workdir} \
-c ${local_unbound_config} \
-f ${local_unbound_forwardconf} \
+   -o ${local_unbound_controlconf} \
-a ${local_unbound_anchor} \
${local_unbound_forwarders}
 }
___
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: r277707 - stable/10/sys/net

2015-01-25 Thread Andrey V. Elsukov
Author: ae
Date: Sun Jan 25 16:35:03 2015
New Revision: 277707
URL: https://svnweb.freebsd.org/changeset/base/277707

Log:
  MFC r277295:
Fix condition and really sort ports. Also add comment describing
the intent of this code.

Modified:
  stable/10/sys/net/if_lagg.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/if_lagg.c
==
--- stable/10/sys/net/if_lagg.c Sun Jan 25 15:44:46 2015(r277706)
+++ stable/10/sys/net/if_lagg.c Sun Jan 25 16:35:03 2015(r277707)
@@ -666,11 +666,16 @@ lagg_port_create(struct lagg_softc *sc, 
lagg_port_lladdr(lp, IF_LLADDR(sc-sc_ifp));
}
 
-   /* Insert into the list of ports. Keep ports sorted by if_index. */
+   /*
+* Insert into the list of ports.
+* Keep ports sorted by if_index. It is handy, when configuration
+* is predictable and `ifconfig laggN create ...` command
+* will lead to the same result each time.
+*/
SLIST_FOREACH(tlp, sc-sc_ports, lp_entries) {
if (tlp-lp_ifp-if_index  ifp-if_index  (
SLIST_NEXT(tlp, lp_entries) == NULL ||
-   SLIST_NEXT(tlp, lp_entries)-lp_ifp-if_index 
+   SLIST_NEXT(tlp, lp_entries)-lp_ifp-if_index 
ifp-if_index))
break;
}
___
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: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64

2015-01-25 Thread Warner Losh

 On Jan 24, 2015, at 8:51 AM, Konstantin Belousov kostik...@gmail.com wrote:
 
 On Sat, Jan 24, 2015 at 05:42:40PM +0200, Konstantin Belousov wrote:
 On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote:
 On Sat, 2015-01-24 at 12:51 +, Konstantin Belousov wrote:
 Author: kib
 Date: Sat Jan 24 12:51:15 2015
 New Revision: 277643
 URL: https://svnweb.freebsd.org/changeset/base/277643
 
 Log:
  Remove Giant from /dev/mem and /dev/kmem.  It is definitely not needed
  for i386, and from the code inspection, nothing in the
  arm/mips/sparc64 implementations depends on it.
 
 
 I'm not sure I agree with that.  On arm the memrw() implementation uses
 a single statically-allocated page of kva space into which it maps each
 physical page in turn in the main loop.  What prevents preemption or
 multicore access to /dev/mem from trying to use that single page for
 multiple operations at once?
 
 I see, thank you for noting this.
 
 But, I do not think that Giant is a solution for the problem. uiomove()
 call accesses userspace, which may fault and cause sleep. If the
 thread sleeps, the Giant is automatically dropped, so there is no real
 protection.
 
 I think dump exclusive sx around whole memrw() should be enough.
 
 I can revert the commit for now, or I can leave it as is while
 writing the patch with sx and waiting for somebody review.  What
 would you prefer ?
 
 P.S. mips uses uiomove_fromphys(), avoiding transient mapping,
 and sparc allocates KVA when needed.
 
 Like this.

So why a sx lock and not a mutex?

Warner

 diff --git a/sys/arm/arm/mem.c b/sys/arm/arm/mem.c
 index 30d4b1d..58b0d25 100644
 --- a/sys/arm/arm/mem.c
 +++ b/sys/arm/arm/mem.c
 @@ -55,6 +55,7 @@ __FBSDID($FreeBSD$);
 #include sys/mutex.h
 #include sys/proc.h
 #include sys/signalvar.h
 +#include sys/sx.h
 #include sys/systm.h
 #include sys/uio.h
 
 @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, memdesc, memory range 
 descriptors);
 
 struct mem_range_softc mem_range_softc;
 
 +static struct sx tmppt_lock;
 +SX_SYSINIT(tmppt, tmppt_lock, mem4map);
 +
 /* ARGSUSED */
 int
 memrw(struct cdev *dev, struct uio *uio, int flags)
 @@ -107,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
   }
   if (!address_valid)
   return (EINVAL);
 + sx_xlock(tmppt_lock);
   pmap_kenter((vm_offset_t)_tmppt, v);
   o = (int)uio-uio_offset  PAGE_MASK;
   c = (u_int)(PAGE_SIZE - ((int)iov-iov_base  
 PAGE_MASK));
 @@ -114,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
   c = min(c, (u_int)iov-iov_len);
   error = uiomove((caddr_t)_tmppt[o], (int)c, uio);
   pmap_qremove((vm_offset_t)_tmppt, 1);
 + sx_xunlock(tmppt_lock);
   continue;
   }
   else if (dev2unit(dev) == CDEV_MINOR_KMEM) {
 

___
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: r277694 - head/sys/amd64/conf

2015-01-25 Thread Konstantin Belousov
On Sun, Jan 25, 2015 at 03:49:27PM +0100, Dag-Erling Sm??rgrav wrote:
 Sergey Kandaurov pluk...@freebsd.org writes:
  Dag-Erling Sm??rgrav d...@freebsd.org writes:
   Log:
 Remove ISA NICs.  Anyone still using these on amd64 can build their
 own kernel.
  If so, what about i386? (I'd rather not pc98)
 
 There's a greater chance of ISA devices still being in use on i386
 hardware than on amd64 hardware.  I've never even heard of amd64
 hardware with ISA slots, but I guess there is a remote chance that
The ISA slots where almost mandatory in the Pentium IV era chipsets,
and latest Pentium IV CPUs were capable to run in long mode.  For Core2
times, all CPUs were amd64, and ISA slots were on almost all m/b of
that time, but not all.

 someone may try to use something like an ep(4) PCCARD on a modern laptop
 (which is a bad example, since ep(4) is loadable, but you get the idea).
 
  What about device isa in DEFAULTS?
 
 It's still required for atkbdc.
Device ISA is required for attachment of many unavoidable platform
devices, like legacy atpic, RTC, old timers, and so on. Currently the
physical lines used are provided by chipset emulation of the serial LPC
bus.  So even if there is no physical ISA or LPC bus, ISA as the logical
construct is there.  Most, if not all, monitoring chips are LPC-connected.

On i386, there are even more rudiments, e.g. FPU is attached as the ISA
device to still detect IRQ13-style of interrupts mis-reporting.
___
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: r277694 - head/sys/amd64/conf

2015-01-25 Thread Sergey Kandaurov
On 25 January 2015 at 15:02, Dag-Erling Smørgrav d...@freebsd.org wrote:
 Author: des
 Date: Sun Jan 25 12:02:38 2015
 New Revision: 277694
 URL: https://svnweb.freebsd.org/changeset/base/277694

 Log:
   Remove ISA NICs.  Anyone still using these on amd64 can build their
   own kernel.

 Modified:
   head/sys/amd64/conf/GENERIC


If so, what about i386? (I'd rather not pc98)
What about device isa in DEFAULTS?

 Modified: head/sys/amd64/conf/GENERIC
 ==
 --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015(r277693)
 +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015(r277694)
 @@ -260,16 +260,6 @@ device vr  # VIA Rhine, 
 Rhine II
  device wb  # Winbond W89C840F
  device xl  # 3Com 3c90x (``Boomerang'', 
 ``Cyclone'')

 -# ISA Ethernet NICs.  pccard NICs included.
 -device cs  # Crystal Semiconductor CS89x0 NIC
 -# 'device ed' requires 'device miibus'
 -device ed  # NE[12]000, SMC Ultra, 3c503, DS8390 
 cards
 -device ex  # Intel EtherExpress Pro/10 and 
 Pro/10+
 -device ep  # Etherlink III based cards
 -device fe  # Fujitsu MB8696x based cards
 -device sn  # SMC's 9000 series of Ethernet chips
 -device xe  # Xircom pccard Ethernet
 -
  # Wireless NIC cards
  device wlan# 802.11 support
  optionsIEEE80211_DEBUG # enable debug msgs


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


Re: svn commit: r277694 - head/sys/amd64/conf

2015-01-25 Thread Garrett Cooper

 On Jan 25, 2015, at 04:43, Sergey Kandaurov pluk...@freebsd.org wrote:
 
 On 25 January 2015 at 15:02, Dag-Erling Smørgrav d...@freebsd.org wrote:
 Author: des
 Date: Sun Jan 25 12:02:38 2015
 New Revision: 277694
 URL: https://svnweb.freebsd.org/changeset/base/277694
 
 Log:
  Remove ISA NICs.  Anyone still using these on amd64 can build their
  own kernel.
 
 Modified:
  head/sys/amd64/conf/GENERIC
 
 If so, what about i386? (I'd rather not pc98)
 What about device isa in DEFAULTS?

isa is still needed in some scenarios. I just don't remember the full details 
offhand (something about internal buses iirc... And IPMI for starters...)

 Modified: head/sys/amd64/conf/GENERIC
 ==
 --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015(r277693)
 +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015(r277694)
 @@ -260,16 +260,6 @@ device vr  # VIA Rhine, 
 Rhine II
 device wb  # Winbond W89C840F
 device xl  # 3Com 3c90x (``Boomerang'', 
 ``Cyclone'')
 
 -# ISA Ethernet NICs.  pccard NICs included.
 -device cs  # Crystal Semiconductor CS89x0 NIC
 -# 'device ed' requires 'device miibus'
 -device ed  # NE[12]000, SMC Ultra, 3c503, 
 DS8390 cards
 -device ex  # Intel EtherExpress Pro/10 and 
 Pro/10+
 -device ep  # Etherlink III based cards
 -device fe  # Fujitsu MB8696x based cards
 -device sn  # SMC's 9000 series of Ethernet chips
 -device xe  # Xircom pccard Ethernet
 -
 # Wireless NIC cards
 device wlan# 802.11 support
 optionsIEEE80211_DEBUG # enable debug msgs
 
 -- 
 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: r277717 - head/sys/dev/mps

2015-01-25 Thread Scott Long
Author: scottl
Date: Sun Jan 25 22:29:23 2015
New Revision: 277717
URL: https://svnweb.freebsd.org/changeset/base/277717

Log:
  Fix the ioctl interface to properly support fetching the header of regular
  and extended config pages.
  
  Obtained from:Netflix, Inc.
  MFC after:3 days

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

Modified: head/sys/dev/mps/mps.c
==
--- head/sys/dev/mps/mps.c  Sun Jan 25 22:08:36 2015(r277716)
+++ head/sys/dev/mps/mps.c  Sun Jan 25 22:29:23 2015(r277717)
@@ -2621,9 +2621,12 @@ mps_read_config_page(struct mps_softc *s
 
cm-cm_data = params-buffer;
cm-cm_length = params-length;
-   cm-cm_sge = req-PageBufferSGE;
-   cm-cm_sglsize = sizeof(MPI2_SGE_IO_UNION);
-   cm-cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN;
+   if (cm-cm_data != NULL) {
+   cm-cm_sge = req-PageBufferSGE;
+   cm-cm_sglsize = sizeof(MPI2_SGE_IO_UNION);
+   cm-cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN;
+   } else
+   cm-cm_sge = NULL;
cm-cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE;
 
cm-cm_complete_data = params;
@@ -2680,9 +2683,12 @@ mps_config_complete(struct mps_softc *sc
goto done;
}
params-status = reply-IOCStatus;
-   if (params-hdr.Ext.ExtPageType != 0) {
+   if (params-hdr.Struct.PageType == MPI2_CONFIG_PAGETYPE_EXTENDED) {
params-hdr.Ext.ExtPageType = reply-ExtPageType;
params-hdr.Ext.ExtPageLength = reply-ExtPageLength;
+   params-hdr.Ext.PageType = reply-Header.PageType;
+   params-hdr.Ext.PageNumber = reply-Header.PageNumber;
+   params-hdr.Ext.PageVersion = reply-Header.PageVersion;
} else {
params-hdr.Struct.PageType = reply-Header.PageType;
params-hdr.Struct.PageNumber = reply-Header.PageNumber;

Modified: head/sys/dev/mps/mps_user.c
==
--- head/sys/dev/mps/mps_user.c Sun Jan 25 22:08:36 2015(r277716)
+++ head/sys/dev/mps/mps_user.c Sun Jan 25 22:29:23 2015(r277717)
@@ -309,6 +309,10 @@ mps_user_read_extcfg_header(struct mps_s
hdr-PageNumber = ext_page_req-header.PageNumber;
hdr-ExtPageType = ext_page_req-header.ExtPageType;
params.page_address = le32toh(ext_page_req-page_address);
+   params.buffer = NULL;
+   params.length = 0;
+   params.callback = NULL;
+
if ((error = mps_read_config_page(sc, params)) != 0) {
/*
 * Leave the request. Without resetting the chip, it's
___
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: r277725 - in head: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options

2015-01-25 Thread Garrett Cooper
Author: ngie
Date: Mon Jan 26 06:27:07 2015
New Revision: 277725
URL: https://svnweb.freebsd.org/changeset/base/277725

Log:
  Add MK_HAST knob for building and installing hastd(8), et al
  
  MFC after: 2 weeks
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/tools/build/options/WITHOUT_HAST   (contents, props changed)
Modified:
  head/etc/rc.d/Makefile
  head/sbin/Makefile
  head/share/examples/Makefile
  head/share/mk/src.opts.mk
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Mon Jan 26 05:56:27 2015(r277724)
+++ head/etc/rc.d/Makefile  Mon Jan 26 06:27:07 2015(r277725)
@@ -48,7 +48,6 @@ FILES=DAEMON \
gptboot \
growfs \
gssd \
-   hastd \
${_hcsecd} \
hostapd \
hostid \
@@ -178,6 +177,10 @@ _casperd=  casperd
 FILES+=ccd
 .endif
 
+.if ${MK_HAST} != no
+FILES+=hastd
+.endif
+
 .if ${MK_ISCSI} != no
 FILES+=iscsictl
 FILES+=iscsid

Modified: head/sbin/Makefile
==
--- head/sbin/Makefile  Mon Jan 26 05:56:27 2015(r277724)
+++ head/sbin/Makefile  Mon Jan 26 06:27:07 2015(r277725)
@@ -30,8 +30,6 @@ SUBDIR=adjkerntz \
ggate \
growfs \
gvinum \
-   hastctl \
-   hastd \
ifconfig \
init \
kldconfig \
@@ -88,6 +86,11 @@ SUBDIR+= ccdconfig
 SUBDIR+=   devd
 .endif
 
+.if ${MK_HAST} != no
+SUBDIR+=   hastctl
+SUBDIR+=   hastd
+.endif
+
 .if ${MK_IPFILTER} != no
 SUBDIR+=   ipf
 .endif

Modified: head/share/examples/Makefile
==
--- head/share/examples/MakefileMon Jan 26 05:56:27 2015
(r277724)
+++ head/share/examples/MakefileMon Jan 26 06:27:07 2015
(r277725)
@@ -14,7 +14,6 @@ LDIRS=BSD_daemon \
drivers \
etc \
find_interface \
-   hast \
ibcs2 \
indent \
ipfw \
@@ -64,11 +63,6 @@ XFILES=  BSD_daemon/FreeBSD.pfa \
find_interface/Makefile \
find_interface/README \
find_interface/find_interface.c \
-   hast/ucarp.sh \
-   hast/ucarp_down.sh \
-   hast/ucarp_up.sh \
-   hast/vip-down.sh \
-   hast/vip-up.sh \
ibcs2/README \
ibcs2/hello.uu \
indent/indent.pro \
@@ -202,6 +196,15 @@ BINDIR= ${SHAREDIR}/examples
 
 NO_OBJ=
 
+.if ${MK_HAST} != no
+LDIRS+=hast
+XFILES+=   hast/ucarp.sh \
+   hast/ucarp_down.sh \
+   hast/ucarp_up.sh \
+   hast/vip-down.sh \
+   hast/vip-up.sh
+.endif
+
 # Define SHARED to indicate whether you want symbolic links to the system
 # source (``symlinks''), or a separate copy (``copies''); (latter useful
 # in environments where it's not possible to keep /sys publicly readable)

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Jan 26 05:56:27 2015(r277724)
+++ head/share/mk/src.opts.mk   Mon Jan 26 06:27:07 2015(r277725)
@@ -92,6 +92,7 @@ __DEFAULT_YES_OPTIONS = \
 GPIO \
 GPL_DTC \
 GROFF \
+HAST \
 HTML \
 HYPERV \
 ICONV \

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 05:56:27 
2015(r277724)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 06:27:07 
2015(r277725)
@@ -2144,6 +2144,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz
 OLD_FILES+=usr/share/man/man8/gssd.8.gz
 .endif
 
+.if ${MK_HAST} == no
+OLD_FILES+=sbin/hastctl
+OLD_FILES+=sbin/hastd
+OLD_FILES+=usr/share/examples/hast/ucarp.sh
+OLD_FILES+=usr/share/examples/hast/ucarp_down.sh
+OLD_FILES+=usr/share/examples/hast/ucarp_up.sh
+OLD_FILES+=usr/share/examples/hast/vip-down.sh
+OLD_FILES+=usr/share/examples/hast/vip-up.sh
+OLD_FILES+=usr/share/man/man5/hast.conf.5.gz
+OLD_FILES+=usr/share/man/man8/hastctl.8.gz
+OLD_FILES+=usr/share/man/man8/hastd.8.gz
+OLD_DIRS+=usr/share/examples/hast
+.endif
+
 .if ${MK_HESIOD} == no
 OLD_FILES+=usr/bin/hesinfo
 OLD_FILES+=usr/include/hesiod.h

Added: head/tools/build/options/WITHOUT_HAST
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_HAST   Mon Jan 26 06:27:07 2015
(r277725)
@@ -0,0 +1,4 @@
+.\ $FreeBSD$
+Set to not build
+.Xr hastd 8
+and related utilities.
___
svn-src-all@freebsd.org mailing list

svn commit: r277727 - in head: lib share/examples share/man/man4 share/mk sys/conf sys/modules tools/build/mk tools/build/options usr.sbin

2015-01-25 Thread Garrett Cooper
Author: ngie
Date: Mon Jan 26 06:44:48 2015
New Revision: 277727
URL: https://svnweb.freebsd.org/changeset/base/277727

Log:
  Add MK_BHYVE knob for building and installing bhyve(4), et al
  
  MFC after: 2 weeks
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/tools/build/options/WITHOUT_BHYVE   (contents, props changed)
Modified:
  head/lib/Makefile
  head/share/examples/Makefile
  head/share/man/man4/Makefile
  head/share/mk/src.opts.mk
  head/sys/conf/kern.opts.mk
  head/sys/modules/Makefile
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.sbin/Makefile.amd64

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Mon Jan 26 06:29:07 2015(r277726)
+++ head/lib/Makefile   Mon Jan 26 06:44:48 2015(r277727)
@@ -258,8 +258,10 @@ _librtld_db=   librtld_db
 .endif
 
 .if ${MACHINE_CPUARCH} == amd64
+.if ${MK_BHYVE} != no
 _libvmmapi=libvmmapi
 .endif
+.endif
 
 .if ${MACHINE_CPUARCH} == mips
 _libproc=  libproc

Modified: head/share/examples/Makefile
==
--- head/share/examples/MakefileMon Jan 26 06:29:07 2015
(r277726)
+++ head/share/examples/MakefileMon Jan 26 06:44:48 2015
(r277727)
@@ -7,7 +7,6 @@
 LDIRS= BSD_daemon \
FreeBSD_version \
IPv6 \
-   bhyve \
bootforth \
csh \
diskless \
@@ -41,7 +40,6 @@ XFILES=   BSD_daemon/FreeBSD.pfa \
FreeBSD_version/Makefile \
FreeBSD_version/README \
IPv6/USAGE \
-   bhyve/vmrun.sh \
bootforth/README \
bootforth/boot.4th \
bootforth/frames.4th \
@@ -205,6 +203,13 @@ XFILES+=   hast/ucarp.sh \
hast/vip-up.sh
 .endif
 
+.if ${MACHINE_CPUARCH} == amd64
+.if ${MK_BHYVE} != no
+LDIRS+=bhyve
+XFILES+=   bhyve/vmrun.sh
+.endif
+.endif
+
 # Define SHARED to indicate whether you want symbolic links to the system
 # source (``symlinks''), or a separate copy (``copies''); (latter useful
 # in environments where it's not possible to keep /sys publicly readable)

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileMon Jan 26 06:29:07 2015
(r277726)
+++ head/share/man/man4/MakefileMon Jan 26 06:44:48 2015
(r277727)
@@ -835,7 +835,6 @@ _xnb.4= xnb.4
 .endif
 
 .if ${MACHINE_CPUARCH} == amd64
-_bhyve.4=  bhyve.4
 _if_ntb.4= if_ntb.4
 _ntb.4=ntb.4
 _ntb_hw.4= ntb_hw.4
@@ -848,6 +847,10 @@ MLINKS+=qlxge.4 if_qlxge.4
 MLINKS+=qlxgb.4 if_qlxgb.4
 MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4
+
+.if ${MK_BHYVE} != no
+_bhyve.4=  bhyve.4
+.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == mips

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Jan 26 06:29:07 2015(r277726)
+++ head/share/mk/src.opts.mk   Mon Jan 26 06:44:48 2015(r277727)
@@ -52,6 +52,7 @@ __DEFAULT_YES_OPTIONS = \
 ATM \
 AUDIT \
 AUTHPF \
+BHYVE \
 BINUTILS \
 BINUTILS_BOOTSTRAP \
 BLUETOOTH \

Modified: head/sys/conf/kern.opts.mk
==
--- head/sys/conf/kern.opts.mk  Mon Jan 26 06:29:07 2015(r277726)
+++ head/sys/conf/kern.opts.mk  Mon Jan 26 06:44:48 2015(r277727)
@@ -23,6 +23,7 @@
 # src tree.
 
 __DEFAULT_YES_OPTIONS = \
+BHYVE \
 BLUETOOTH \
 CCD \
 CDDL \

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Jan 26 06:29:07 2015(r277726)
+++ head/sys/modules/Makefile   Mon Jan 26 06:44:48 2015(r277727)
@@ -620,8 +620,11 @@ _qlxge=qlxge
 _qlxgb=qlxgb
 _qlxgbe=   qlxgbe
 _sfxge=sfxge
+
+.if ${MK_BHYVE} != no || defined(ALL_MODULES)
 _vmm=  vmm
 .endif
+.endif
 
 .if ${MACHINE_CPUARCH} == i386
 # XXX some of these can move to the general case when de-i386'ed

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 06:29:07 
2015(r277726)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 06:44:48 
2015(r277727)
@@ -144,6 +144,16 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g
 OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz
 .endif
 
+.if ${MK_BHYVE} == no
+OLD_FILES+=usr/sbin/bhyve
+OLD_FILES+=usr/sbin/bhyvectl
+OLD_FILES+=usr/sbin/bhyveload
+OLD_FILES+=usr/share/examples/bhyve/vmrun.sh
+OLD_FILES+=usr/share/man/man8/bhyve.8.gz
+OLD_FILES+=usr/share/man/man8/bhyveload.8.gz

svn commit: r277728 - in head: etc etc/rc.d share/man/man5 share/mk sys/conf sys/modules tools/build/mk tools/build/options usr.sbin

2015-01-25 Thread Garrett Cooper
Author: ngie
Date: Mon Jan 26 07:15:49 2015
New Revision: 277728
URL: https://svnweb.freebsd.org/changeset/base/277728

Log:
  Add MK_AUTOFS knob for building and installing autofs(4), et al
  
  MFC after: 2 weeks
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/tools/build/options/WITHOUT_AUTOFS   (contents, props changed)
Modified:
  head/etc/Makefile
  head/etc/rc.d/Makefile
  head/share/man/man5/Makefile
  head/share/mk/src.opts.mk
  head/sys/conf/kern.opts.mk
  head/sys/modules/Makefile
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.sbin/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Mon Jan 26 06:44:48 2015(r277727)
+++ head/etc/Makefile   Mon Jan 26 07:15:49 2015(r277728)
@@ -14,8 +14,7 @@ SUBDIR+=sendmail
 SUBDIR+=tests
 .endif
 
-BIN1=  auto_master \
-   crontab \
+BIN1=  crontab \
devd.conf \
devfs.conf \
ddb.conf \
@@ -90,6 +89,10 @@ BIN1+= amd.map
 BIN1+= apmd.conf
 .endif
 
+.if ${MK_AUTOFS} != no
+BIN1+= auto_master
+.endif
+
 .if ${MK_BSNMP} != no
 BIN1+= snmpd.config
 .endif
@@ -229,7 +232,9 @@ distribution:
echo ./etc/spwd.db type=file mode=0600 uname=root 
gname=wheel; \
) | ${METALOG.add}
 .endif
+.if ${MK_AUTOFS} != no
${_+_}cd ${.CURDIR}/autofs; ${MAKE} install
+.endif
 .if ${MK_BLUETOOTH} != no
${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Mon Jan 26 06:44:48 2015(r277727)
+++ head/etc/rc.d/Makefile  Mon Jan 26 07:15:49 2015(r277728)
@@ -20,9 +20,6 @@ FILES=DAEMON \
atm3 \
auditd \
auditdistd \
-   automount \
-   automountd \
-   autounmountd \
bgfsck \
${_bluetooth} \
bootparams \
@@ -158,6 +155,12 @@ FILES= DAEMON \
zfs \
zvol
 
+.if ${MK_AUTOFS} != no
+FILES+=automount
+FILES+=automountd
+FILES+=autounmountd
+.endif
+
 .if ${MK_BLUETOOTH} != no
 _bluetooth=bluetooth
 _bthidd=   bthidd

Modified: head/share/man/man5/Makefile
==
--- head/share/man/man5/MakefileMon Jan 26 06:44:48 2015
(r277727)
+++ head/share/man/man5/MakefileMon Jan 26 07:15:49 2015
(r277728)
@@ -7,7 +7,6 @@
 MAN=   acct.5 \
ar.5 \
a.out.5 \
-   autofs.5 \
bluetooth.device.conf.5 \
bluetooth.hosts.5 \
bluetooth.protocols.5 \
@@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5
 MLINKS+=rc.conf.5 rc.conf.local.5
 MLINKS+=resolver.5 resolv.conf.5
 
+.if ${MK_AUTOFS} != no
+MAN+=  autofs.5
+.endif
+
 .if ${MK_FREEBSD_UPDATE} != no
 MAN+=  freebsd-update.conf.5
 .endif

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Jan 26 06:44:48 2015(r277727)
+++ head/share/mk/src.opts.mk   Mon Jan 26 07:15:49 2015(r277728)
@@ -52,6 +52,7 @@ __DEFAULT_YES_OPTIONS = \
 ATM \
 AUDIT \
 AUTHPF \
+AUTOFS \
 BHYVE \
 BINUTILS \
 BINUTILS_BOOTSTRAP \

Modified: head/sys/conf/kern.opts.mk
==
--- head/sys/conf/kern.opts.mk  Mon Jan 26 06:44:48 2015(r277727)
+++ head/sys/conf/kern.opts.mk  Mon Jan 26 07:15:49 2015(r277728)
@@ -23,6 +23,7 @@
 # src tree.
 
 __DEFAULT_YES_OPTIONS = \
+AUTOFS \
 BHYVE \
 BLUETOOTH \
 CCD \

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Jan 26 06:44:48 2015(r277727)
+++ head/sys/modules/Makefile   Mon Jan 26 07:15:49 2015(r277728)
@@ -47,7 +47,7 @@ SUBDIR=   \
ata \
ath \
ath_pci \
-   autofs \
+   ${_autofs} \
${_auxio} \
${_bce} \
bfe \
@@ -382,6 +382,10 @@ SUBDIR=\
${_zfs} \
zlib
 
+.if ${MK_AUTOFS} != no || defined(ALL_MODULES)
+_autofs=   autofs
+.endif
+
 .if ${MK_CRYPT} != no || defined(ALL_MODULES)
 .if exists(${.CURDIR}/../opencrypto)
 _crypto=   crypto

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 06:44:48 
2015(r277727)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Mon Jan 26 07:15:49 
2015(r277728)
@@ -144,6 +144,26 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g
 OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz
 .endif
 
+.if ${MK_AUTOFS} == no
+OLD_FILES+=etc/autofs/include_ldap

Re: svn commit: r277694 - head/sys/amd64/conf

2015-01-25 Thread Warner Losh

 On Jan 25, 2015, at 5:43 AM, Sergey Kandaurov pluk...@freebsd.org wrote:
 
 On 25 January 2015 at 15:02, Dag-Erling Smørgrav d...@freebsd.org wrote:
 Author: des
 Date: Sun Jan 25 12:02:38 2015
 New Revision: 277694
 URL: https://svnweb.freebsd.org/changeset/base/277694
 
 Log:
  Remove ISA NICs.  Anyone still using these on amd64 can build their
  own kernel.

This does take out PC Cards as well, but all these devices are loadable
modules.

I would like to request, however, that we hold off on too much more
GENERIC pruning until my only add what’s needed in MINIMAL and
load the rest automatically work is declared to have failed.

 Modified:
  head/sys/amd64/conf/GENERIC
 
 
 If so, what about i386? (I'd rather not pc98)

pc98 shouldn’t be messed with: those systems have the hardware
they have, and eliminating CBUS devices there would be far too
disruptive.

i386 we might be able to get away with it, but given the wide range
of i386 hardware we still run on, this may be a bit too disruptive.

 What about device isa in DEFAULTS?

isa can never be removed from DEFAULTS. It is not the ISA
expansion bus support, but rather the default system bus
support. As such, it can never be removed without significant
work that’s mostly just rearranging the deck chairs...

Warner

 Modified: head/sys/amd64/conf/GENERIC
 ==
 --- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015(r277693)
 +++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015(r277694)
 @@ -260,16 +260,6 @@ device vr  # VIA Rhine, 
 Rhine II
 device wb  # Winbond W89C840F
 device xl  # 3Com 3c90x (``Boomerang'', 
 ``Cyclone'')
 
 -# ISA Ethernet NICs.  pccard NICs included.
 -device cs  # Crystal Semiconductor CS89x0 NIC
 -# 'device ed' requires 'device miibus'
 -device ed  # NE[12]000, SMC Ultra, 3c503, 
 DS8390 cards
 -device ex  # Intel EtherExpress Pro/10 and 
 Pro/10+
 -device ep  # Etherlink III based cards
 -device fe  # Fujitsu MB8696x based cards
 -device sn  # SMC's 9000 series of Ethernet chips
 -device xe  # Xircom pccard Ethernet
 -
 # Wireless NIC cards
 device wlan# 802.11 support
 optionsIEEE80211_DEBUG # enable debug msgs
 
 
 -- 
 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


Re: svn commit: r277681 - in head/sys: conf modules

2015-01-25 Thread Warner Losh
The number of MK_foo opts that are intruding into the kernel module builds is
starting to get out of hand. :( Especially since they are duplicative of the
MODULES_OVERRIDE functionality and are very unevenly applied.

Warner

 On Jan 24, 2015, at 10:13 PM, Garrett Cooper n...@freebsd.org wrote:
 
 Author: ngie
 Date: Sun Jan 25 05:13:15 2015
 New Revision: 277681
 URL: https://svnweb.freebsd.org/changeset/base/277681
 
 Log:
  Build cuse(4) if MK_CUSE != no
 
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division
 
 Modified:
  head/sys/conf/kern.opts.mk
  head/sys/modules/Makefile
 
 Modified: head/sys/conf/kern.opts.mk
 ==
 --- head/sys/conf/kern.opts.mkSun Jan 25 04:58:41 2015
 (r277680)
 +++ head/sys/conf/kern.opts.mkSun Jan 25 05:13:15 2015
 (r277681)
 @@ -27,6 +27,7 @@ __DEFAULT_YES_OPTIONS = \
 CCD \
 CDDL \
 CRYPT \
 +CUSE \
 FORMAT_EXTENSIONS \
 INET \
 INET6 \
 
 Modified: head/sys/modules/Makefile
 ==
 --- head/sys/modules/Makefile Sun Jan 25 04:58:41 2015(r277680)
 +++ head/sys/modules/Makefile Sun Jan 25 05:13:15 2015(r277681)
 @@ -86,7 +86,6 @@ SUBDIR= \
   ${_ct} \
   ${_ctau} \
   ctl \
 - cuse \
   ${_cxgb} \
   ${_cxgbe} \
   dc \
 @@ -393,6 +392,10 @@ _random= random
 .endif
 .endif
 
 +.if ${MK_CUSE} != no || defined(ALL_MODULES)
 +SUBDIR+= cuse
 +.endif
 +
 .if (${MK_INET_SUPPORT} != no || ${MK_INET6_SUPPORT} != no) || \
   defined(ALL_MODULES)
 _carp=carp
 

___
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: r277694 - head/sys/amd64/conf

2015-01-25 Thread Warner Losh

 On Jan 25, 2015, at 7:54 AM, Garrett Cooper yaneurab...@gmail.com wrote:
 
 
 On Jan 25, 2015, at 04:43, Sergey Kandaurov pluk...@freebsd.org wrote:
 
 On 25 January 2015 at 15:02, Dag-Erling Smørgrav d...@freebsd.org wrote:
 Author: des
 Date: Sun Jan 25 12:02:38 2015
 New Revision: 277694
 URL: https://svnweb.freebsd.org/changeset/base/277694
 
 Log:
 Remove ISA NICs.  Anyone still using these on amd64 can build their
 own kernel.
 
 Modified:
 head/sys/amd64/conf/GENERIC
 
 If so, what about i386? (I'd rather not pc98)
 What about device isa in DEFAULTS?
 
 isa is still needed in some scenarios. I just don't remember the full details 
 offhand (something about internal buses iirc... And IPMI for starters...)

isa” in this context should be read as “mainbus” not as “ISA slots”. You can’t
remove it without some significant work, and even then the interface changes
to long established interfaces isn’t worth the pain.

Warner

___
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: r277708 - svnadmin/conf

2015-01-25 Thread Matthew Seaman
Author: matthew (ports committer)
Date: Sun Jan 25 19:21:37 2015
New Revision: 277708
URL: https://svnweb.freebsd.org/changeset/base/277708

Log:
  Take in mdf's commit bit for safe keeping, at his own request.
  
  Approved by:  core (implicit)

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessSun Jan 25 16:35:03 2015(r277707)
+++ svnadmin/conf/accessSun Jan 25 19:21:37 2015(r277708)
@@ -148,7 +148,6 @@ mav
 maxim
 mckay
 mckusick
-mdf
 melifaro
 mjg
 mm
___
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: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Peter Jeremy
On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov s...@zxy.spb.ru wrote:
On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote:

 On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote:
  This is not full true for ZFS case.
  On ZFS nobody is 2^32-2.

Can you please provide a reference to this in the code.  I can't find
anything in the ZFS code to suggest either '-2' or 4294967294 is used
as a special GID or UID.  The only references I can find are to
UID_NOBODY and GID_NOBODY - both of which are defined as 65534 in
sys/conf.h.

ls -l /usr/ports/packages32/lang
total 2
lrwxr-xr-x  1 4294967294  wheel  33 Mar 17  2012 perl-threaded-5.12.4_4.tbz - 
../All/perl-threaded-5.12.4_4.tbz
lrwxr-xr-x  1 4294967294  wheel  27 Mar 17  2012 python27-2.7.2_4.tbz - 
../All/python27-2.7.2_4.tbz
lrwxr-xr-x  1 4294967294  wheel  21 Mar 17  2012 tcl-8.5.11.tbz - 
../All/tcl-8.5.11.tbz
lrwxr-xr-x  1 4294967294  wheel  29 Mar 17  2012 tcl-modules-8.5.11.tbz - 
../All/tcl-modules-8.5.11.tbz

All this means is that you have some files with that uid.  It's not
clear how they were created.

-- 
Peter Jeremy


pgpFyGSGmlSY_.pgp
Description: PGP signature


Re: svn commit: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 06:21:28AM +1100, Peter Jeremy wrote:

 On 2015-Jan-25 18:36:40 +0300, Slawa Olhovchenkov s...@zxy.spb.ru wrote:
 On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote:
 
  On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote:
   This is not full true for ZFS case.
   On ZFS nobody is 2^32-2.
 
 Can you please provide a reference to this in the code.  I can't find
 anything in the ZFS code to suggest either '-2' or 4294967294 is used
 as a special GID or UID.  The only references I can find are to
 UID_NOBODY and GID_NOBODY - both of which are defined as 65534 in
 sys/conf.h.

I think this is result of convert (signed short) to (signed int).

 ls -l /usr/ports/packages32/lang
 total 2
 lrwxr-xr-x  1 4294967294  wheel  33 Mar 17  2012 perl-threaded-5.12.4_4.tbz 
 - ../All/perl-threaded-5.12.4_4.tbz
 lrwxr-xr-x  1 4294967294  wheel  27 Mar 17  2012 python27-2.7.2_4.tbz - 
 ../All/python27-2.7.2_4.tbz
 lrwxr-xr-x  1 4294967294  wheel  21 Mar 17  2012 tcl-8.5.11.tbz - 
 ../All/tcl-8.5.11.tbz
 lrwxr-xr-x  1 4294967294  wheel  29 Mar 17  2012 tcl-modules-8.5.11.tbz - 
 ../All/tcl-modules-8.5.11.tbz
 
 All this means is that you have some files with that uid.  It's not
 clear how they were created.

nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to
nobody. When this is created -- host 9.1, VM -- 6.x.


___
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: r277693 - head/sys/boot/forth

2015-01-25 Thread Scott Long via svn-src-all
This is completely arbitrary.  Please revert it, or I will revert it in 48 
hours.

Scott

 On Jan 25, 2015, at 4:57 AM, Dag-Erling Sm?rgrav d...@freebsd.org wrote:
 
 Author: des
 Date: Sun Jan 25 11:57:18 2015
 New Revision: 277693
 URL: https://svnweb.freebsd.org/changeset/base/277693
 
 Log:
  Fix the font in the text version.  This has bothered me for a long time...
 
  MFC after:   1 week
 
 Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/brand.4th
 
 Modified: head/sys/boot/forth/beastie.4th
 ==
 --- head/sys/boot/forth/beastie.4th   Sun Jan 25 08:16:51 2015
 (r277692)
 +++ head/sys/boot/forth/beastie.4th   Sun Jan 25 11:57:18 2015
 (r277693)
 @@ -89,7 +89,7 @@ variable logoY
   0 25 at-xy
 ;
 
 -: fbsdbw-logo ( x y -- ) \ FreeBSD logo in B/W (13 rows x 21 columns)
 +: fbsdbw-logo ( x y -- ) \ FreeBSD logo in B/W (12 rows x 21 columns)
 
   \ We used to use the beastie himself as our default... until the
   \ eventual complaint derided his reign of the advanced boot-menu.
 @@ -106,17 +106,16 @@ variable logoY
   5 + swap 6 + swap
 
   2dup at-xy .  __ 1+
 - 2dup at-xy . |  | __ ___  ___  1+
 - 2dup at-xy . | |__ | '__/ _ \/ _ \ 1+
 - 2dup at-xy . |  __|| | |  __/  __/ 1+
 - 2dup at-xy . | |   | | ||| 1+
 + 2dup at-xy . |  | 1+
 + 2dup at-xy . | |__  _ __ ___  ___  1+
 + 2dup at-xy . |  __|| '__/ _ \/ _ \ 1+
 + 2dup at-xy . | |   | | |  __/  __/ 1+
   2dup at-xy . |_|   |_|  \___|\___| 1+
   2dup at-xy .     _ _ 1+
   2dup at-xy . |  _ \ / |  __ \ 1+
   2dup at-xy . | |_) | (___ | |  | | 1+
   2dup at-xy . |  _  \___ \| |  | | 1+
   2dup at-xy . | |_) |) | |__| | 1+
 - 2dup at-xy . | |  |  | 1+
at-xy . |/|_/|_/
 
   \ Put the cursor back at the bottom
 
 Modified: head/sys/boot/forth/brand.4th
 ==
 --- head/sys/boot/forth/brand.4th Sun Jan 25 08:16:51 2015
 (r277692)
 +++ head/sys/boot/forth/brand.4th Sun Jan 25 11:57:18 2015
 (r277693)
 @@ -33,14 +33,13 @@ variable brandY
 2 brandX !
 1 brandY !
 
 -: fbsd-logo ( x y -- ) \ FreeBSD [wide] logo in B/W (7 rows x 42 columns)
 +: fbsd-logo ( x y -- ) \ FreeBSD [wide] logo in B/W (6 rows x 42 columns)
 
   2dup at-xy .  __      _ _   1+
   2dup at-xy . |  | |  _ \ / |  __ \  1+
   2dup at-xy . | |___ _ __ ___  ___ | |_) | (___ | |  | | 1+
   2dup at-xy . |  ___| '__/ _ \/ _ \|  _  \___ \| |  | | 1+
   2dup at-xy . | |   | | |  __/  __/| |_) |) | |__| | 1+
 - 2dup at-xy . | |   | | |||| |  |  | 1+
at-xy . |_|   |_|  \___|\___||/|_/|_/ 
 
   \ Put the cursor back at the bottom
 

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

2015-01-25 Thread Garrett Cooper
Author: ngie
Date: Mon Jan 26 06:29:07 2015
New Revision: 277726
URL: https://svnweb.freebsd.org/changeset/base/277726

Log:
  Build sbin/iscontrol again if MK_ISCSI != no
  
  MFC after: 13 days
  X-MFC with: r277675
  Pointyhat to: me

Modified:
  head/sbin/Makefile

Modified: head/sbin/Makefile
==
--- head/sbin/Makefile  Mon Jan 26 06:27:07 2015(r277725)
+++ head/sbin/Makefile  Mon Jan 26 06:29:07 2015(r277726)
@@ -100,6 +100,10 @@ SUBDIR+=   ipfw
 SUBDIR+=   natd
 .endif
 
+.if ${MK_ISCSI} != no
+SUBDIR+=   iscontrol
+.endif
+
 .if ${MK_NAND} != no
 SUBDIR+=   nandfs
 SUBDIR+=   newfs_nandfs
___
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: r277722 - in stable/10: contrib/libpcap lib/libpcap

2015-01-25 Thread Luigi Rizzo
Author: luigi
Date: Mon Jan 26 03:26:37 2015
New Revision: 277722
URL: https://svnweb.freebsd.org/changeset/base/277722

Log:
  Merge 272659:
  
  Add netmap support to libpcap. Tcpdump and other native pcap clients
  can now run directly on netmap ports using netmap:foo or valeXX:YY
  as device names.
  
  Modifications to existing code are small and trivial,
  the netmap-specific code is all in a new file.
  
  Please be aware that in netmap mode the physical interface is
  disconnected from the host stack, so libpcap will steal the traffic
  not just make a copy.
  
  For the full version of the code (including linux and autotools support) see
https://code.google.com/p/netmap-libpcap/

Added:
  stable/10/lib/libpcap/pcap-netmap.c
 - copied unchanged from r272659, head/lib/libpcap/pcap-netmap.c
Modified:
  stable/10/contrib/libpcap/inet.c
  stable/10/contrib/libpcap/pcap.c
  stable/10/lib/libpcap/Makefile
  stable/10/lib/libpcap/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/libpcap/inet.c
==
--- stable/10/contrib/libpcap/inet.cMon Jan 26 02:58:30 2015
(r277721)
+++ stable/10/contrib/libpcap/inet.cMon Jan 26 03:26:37 2015
(r277722)
@@ -737,6 +737,10 @@ pcap_lookupnet(device, netp, maskp, errb
 #ifdef PCAP_SUPPORT_USB
|| strstr(device, usbmon) != NULL
 #endif
+#ifdef PCAP_SUPPORT_NETMAP
+   || !strncmp(device, netmap:, 7)
+   || !strncmp(device, vale, 4)
+#endif
 #ifdef HAVE_SNF_API
|| strstr(device, snf) != NULL
 #endif

Modified: stable/10/contrib/libpcap/pcap.c
==
--- stable/10/contrib/libpcap/pcap.cMon Jan 26 02:58:30 2015
(r277721)
+++ stable/10/contrib/libpcap/pcap.cMon Jan 26 03:26:37 2015
(r277722)
@@ -106,6 +106,10 @@ static const char rcsid[] _U_ =
 #include pcap-netfilter-linux.h
 #endif
 
+#ifdef PCAP_SUPPORT_NETMAP
+pcap_t* pcap_netmap_create(const char *device, char *ebuf, int *is_ours);
+#endif
+
 int 
 pcap_not_initialized(pcap_t *pcap)
 {
@@ -301,6 +305,9 @@ struct capture_source_type {
int (*findalldevs_op)(pcap_if_t **, char *);
pcap_t *(*create_op)(const char *, char *, int *);
 } capture_source_types[] = {
+#ifdef PCAP_SUPPORT_NETMAP
+   { NULL, pcap_netmap_create },
+#endif
 #ifdef HAVE_DAG_API
{ dag_findalldevs, dag_create },
 #endif

Modified: stable/10/lib/libpcap/Makefile
==
--- stable/10/lib/libpcap/Makefile  Mon Jan 26 02:58:30 2015
(r277721)
+++ stable/10/lib/libpcap/Makefile  Mon Jan 26 03:26:37 2015
(r277722)
@@ -7,6 +7,7 @@ SHLIBDIR?= /lib
 
 LIB=   pcap
 SRCS=  grammar.y tokdefs.h version.h pcap-bpf.c \
+   pcap-netmap.c \
pcap.c pcap-common.c inet.c fad-getad.c gencode.c optimize.c 
nametoaddr.c \
etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c \
scanner.l sf-pcap.c sf-pcap-ng.c version.c

Modified: stable/10/lib/libpcap/config.h
==
--- stable/10/lib/libpcap/config.h  Mon Jan 26 02:58:30 2015
(r277721)
+++ stable/10/lib/libpcap/config.h  Mon Jan 26 03:26:37 2015
(r277722)
@@ -271,6 +271,9 @@
 /* target host supports USB sniffing */
 /* #undef PCAP_SUPPORT_USB */
 
+/* target host supports netmap */
+#define PCAP_SUPPORT_NETMAP 1
+
 /* include ACN support */
 /* #undef SITA */
 

Copied: stable/10/lib/libpcap/pcap-netmap.c (from r272659, 
head/lib/libpcap/pcap-netmap.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/lib/libpcap/pcap-netmap.c Mon Jan 26 03:26:37 2015
(r277722, copy of r272659, head/lib/libpcap/pcap-netmap.c)
@@ -0,0 +1,283 @@
+/*
+ * Copyright (C) 2014 Luigi Rizzo. 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 

svn commit: r277723 - head/sys/kern

2015-01-25 Thread Adrian Chadd
Author: adrian
Date: Mon Jan 26 04:04:57 2015
New Revision: 277723
URL: https://svnweb.freebsd.org/changeset/base/277723

Log:
  Call WITNESS_WARN() in callout_drain() to check whether any locks are
  being held before sleeping.
  
  This has bitten me (in ath(4)) once before and I'd like to see this
  not bite anyone else.
  
  Differential Revision:D1638
  Reviewed by:  jhb, hselasky
  MFC after:1 week

Modified:
  head/sys/kern/kern_timeout.c

Modified: head/sys/kern/kern_timeout.c
==
--- head/sys/kern/kern_timeout.cMon Jan 26 03:26:37 2015
(r277722)
+++ head/sys/kern/kern_timeout.cMon Jan 26 04:04:57 2015
(r277723)
@@ -1096,6 +1096,10 @@ _callout_stop_safe(struct callout *c, in
struct lock_class *class;
int direct, sq_locked, use_lock;
 
+   if (safe)
+   WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c-c_lock,
+   calling %s, __func__);
+
/*
 * Some old subsystems don't hold Giant while running a callout_stop(),
 * so just discard this check for the moment.
___
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: r277729 - head/share/man/man5

2015-01-25 Thread Garrett Cooper
Author: ngie
Date: Mon Jan 26 07:24:18 2015
New Revision: 277729
URL: https://svnweb.freebsd.org/changeset/base/277729

Log:
  Regen src.conf(5)

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

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Jan 26 07:15:49 2015
(r277728)
+++ head/share/man/man5/src.conf.5  Mon Jan 26 07:24:18 2015
(r277729)
@@ -1,7 +1,7 @@
 .\ DO NOT EDIT-- this file is automatically generated.
 .\ from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z 
des
 .\ $FreeBSD$
-.Dd January 24, 2015
+.Dd January 25, 2015
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -121,6 +121,18 @@ Set to not build audit support into syst
 .\ from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 
07:50:50Z ru
 Set to not build
 .Xr authpf 8 .
+.It Va WITHOUT_AUTOFS
+.\ from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 277728 2015-01-26 
07:15:49Z ngie
+Set to not build
+.Xr autofs 4
+related programs, libraries, and kernel modules.
+.It Va WITHOUT_BHYVE
+.\ from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 
06:44:48Z ngie
+Set to not build or install
+.Xr bhyve 8 ,
+associated utilities, and examples.
+.Pp
+This option only affects amd64/amd64.
 .It Va WITHOUT_BINUTILS
 .\ from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 
16:51:45Z brooks
 Set to not build or install binutils (as, c++-filt, gconv,
@@ -543,6 +555,11 @@ You should consider installing the textp
 .It Va WITHOUT_GSSAPI
 .\ from FreeBSD: head/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 
16:39:32Z ru
 Set to not build libgssapi.
+.It Va WITHOUT_HAST
+.\ from FreeBSD: head/tools/build/options/WITHOUT_HAST 277725 2015-01-26 
06:27:07Z ngie
+Set to not build
+.Xr hastd 8
+and related utilities.
 .It Va WITH_HESIOD
 .\ from FreeBSD: head/tools/build/options/WITH_HESIOD 156932 2006-03-21 
07:50:50Z ru
 Set to build Hesiod support.
___
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: r277694 - head/sys/amd64/conf

2015-01-25 Thread Dag-Erling Smørgrav
Author: des
Date: Sun Jan 25 12:02:38 2015
New Revision: 277694
URL: https://svnweb.freebsd.org/changeset/base/277694

Log:
  Remove ISA NICs.  Anyone still using these on amd64 can build their
  own kernel.

Modified:
  head/sys/amd64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Sun Jan 25 11:57:18 2015(r277693)
+++ head/sys/amd64/conf/GENERIC Sun Jan 25 12:02:38 2015(r277694)
@@ -260,16 +260,6 @@ device vr  # VIA Rhine, 
Rhine II
 device wb  # Winbond W89C840F
 device xl  # 3Com 3c90x (``Boomerang'', 
``Cyclone'')
 
-# ISA Ethernet NICs.  pccard NICs included.
-device cs  # Crystal Semiconductor CS89x0 NIC
-# 'device ed' requires 'device miibus'
-device ed  # NE[12]000, SMC Ultra, 3c503, DS8390 
cards
-device ex  # Intel EtherExpress Pro/10 and Pro/10+
-device ep  # Etherlink III based cards
-device fe  # Fujitsu MB8696x based cards
-device sn  # SMC's 9000 series of Ethernet chips
-device xe  # Xircom pccard Ethernet
-
 # Wireless NIC cards
 device wlan# 802.11 support
 optionsIEEE80211_DEBUG # enable debug msgs
___
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: r277698 - in stable/10: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys

2015-01-25 Thread Konstantin Belousov
Author: kib
Date: Sun Jan 25 13:15:12 2015
New Revision: 277698
URL: https://svnweb.freebsd.org/changeset/base/277698

Log:
  MFC r277322:
  Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
  attachment to the process.

Modified:
  stable/10/lib/libc/sys/procctl.2
  stable/10/sys/compat/freebsd32/freebsd32_misc.c
  stable/10/sys/kern/kern_exec.c
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_procctl.c
  stable/10/sys/kern/kern_prot.c
  stable/10/sys/kern/kern_sig.c
  stable/10/sys/sys/priv.h
  stable/10/sys/sys/proc.h
  stable/10/sys/sys/procctl.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sys/procctl.2
==
--- stable/10/lib/libc/sys/procctl.2Sun Jan 25 13:09:53 2015
(r277697)
+++ stable/10/lib/libc/sys/procctl.2Sun Jan 25 13:15:12 2015
(r277698)
@@ -29,7 +29,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd December 16, 2014
+.Dd December 29, 2014
 .Dt PROCCTL 2
 .Os
 .Sh NAME
@@ -275,7 +275,61 @@ delivery failed, e.g. due to the permiss
 If no such process exist, the
 .Fa rk_fpid
 field is set to -1.
+.It Dv PROC_TRACE_CTL
+Enable or disable tracing of the specified process(es), according to the
+value of the integer argument.
+Tracing includes attachment to the process using
+.Xr ptrace 2
+and
+.Xr ktrace 2 ,
+debugging sysctls,
+.Xr hwpmc 4 ,
+.Xr dtrace 1
+and core dumping.
+Possible values for the
+.Fa data
+argument are:
+.Bl -tag -width Dv PROC_TRACE_CTL_DISABLE_EXEC
+.It Dv PROC_TRACE_CTL_ENABLE
+Enable tracing, after it was disabled by
+.Dv PROC_TRACE_CTL_DISABLE .
+Only allowed for self.
+.It Dv PROC_TRACE_CTL_DISABLE
+Disable tracing for the specified process.
+Tracing is re-enabled when the process changes the executing
+program with
+.Xr execve 2
+syscall.
+A child inherits the trace settings from the parent on
+.Xr fork 2 .
+.It Dv PROC_TRACE_CTL_DISABLE_EXEC
+Same as
+.Dv PROC_TRACE_CTL_DISABLE ,
+but the setting persist for the process even after
+.Xr execve 2 .
+.El
+.It Dv PROC_TRACE_STATUS
+Returns the current tracing status for the specified process in
+the integer variable pointed to by
+.Fa data .
+If tracing is disabled,
+.Fa data
+is set to -1.
+If tracing is enabled, but no debugger is attached by
+.Xr ptrace 2
+syscall,
+.Fa data
+is set to 0.
+If a debugger is attached,
+.Fa data
+is set to the pid of the debugger process.
 .El
+.Sh NOTES
+Disabling tracing on a process should not be considered a security
+feature, as it is bypassable both by the kernel and privileged processes,
+and via other system mechanisms.
+As such, it should not be relied on to reliably protect cryptographic
+keying material or other confidential data.
 .Sh RETURN VALUES
 If an error occurs, a value of -1 is returned and
 .Va errno
@@ -343,11 +397,34 @@ The
 .Dv PROC_REAP_ACQUIRE
 request was issued by a process that had already acquired reaper status
 and has not yet released it.
+.It Bq Er EBUSY
+The
+.Dv PROC_TRACE_CTL
+request was issued for a process already being traced.
+.It Bq Er EPERM
+The
+.Dv PROC_TRACE_CTL
+request to re-enable tracing of the process (
+.Dv PROC_TRACE_CTL_ENABLE ) ,
+or to disable persistence of the
+.Dv PROC_TRACE_CTL_DISABLE
+on
+.Xr execve 2
+was issued for a non-current process.
+.It Bq Er EINVAL
+The value of the integer
+.Fa data
+parameter for the
+.Dv PROC_TRACE_CTL
+request is invalid.
 .El
 .Sh SEE ALSO
+.Xr dtrace 1 ,
 .Xr kill 2 ,
+.Xr ktrace 2 ,
 .Xr ptrace 2 ,
 .Xr wait 2 ,
+.Xr hwpmc 4 ,
 .Xr init 8
 .Sh HISTORY
 The

Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 25 13:09:53 
2015(r277697)
+++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 25 13:15:12 
2015(r277698)
@@ -3074,6 +3074,7 @@ freebsd32_procctl(struct thread *td, str
 
switch (uap-com) {
case PROC_SPROTECT:
+   case PROC_TRACE_CTL:
error = copyin(PTRIN(uap-data), flags, sizeof(flags));
if (error != 0)
return (error);
@@ -3102,6 +3103,9 @@ freebsd32_procctl(struct thread *td, str
return (error);
data = x.rk;
break;
+   case PROC_TRACE_STATUS:
+   data = flags;
+   break;
default:
return (EINVAL);
}
@@ -3117,6 +3121,10 @@ freebsd32_procctl(struct thread *td, str
if (error == 0)
error = error1;
break;
+   case PROC_TRACE_STATUS:
+   if (error == 0)
+   error = copyout(flags, uap-data, sizeof(flags));
+   break;
}
return (error);
 }

Modified: stable/10/sys/kern/kern_exec.c
==
--- 

svn commit: r277693 - head/sys/boot/forth

2015-01-25 Thread Dag-Erling Smørgrav
Author: des
Date: Sun Jan 25 11:57:18 2015
New Revision: 277693
URL: https://svnweb.freebsd.org/changeset/base/277693

Log:
  Fix the font in the text version.  This has bothered me for a long time...
  
  MFC after:1 week

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/brand.4th

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Sun Jan 25 08:16:51 2015
(r277692)
+++ head/sys/boot/forth/beastie.4th Sun Jan 25 11:57:18 2015
(r277693)
@@ -89,7 +89,7 @@ variable logoY
0 25 at-xy
 ;
 
-: fbsdbw-logo ( x y -- ) \ FreeBSD logo in B/W (13 rows x 21 columns)
+: fbsdbw-logo ( x y -- ) \ FreeBSD logo in B/W (12 rows x 21 columns)
 
\ We used to use the beastie himself as our default... until the
\ eventual complaint derided his reign of the advanced boot-menu.
@@ -106,17 +106,16 @@ variable logoY
5 + swap 6 + swap
 
2dup at-xy .  __ 1+
-   2dup at-xy . |  | __ ___  ___  1+
-   2dup at-xy . | |__ | '__/ _ \/ _ \ 1+
-   2dup at-xy . |  __|| | |  __/  __/ 1+
-   2dup at-xy . | |   | | ||| 1+
+   2dup at-xy . |  | 1+
+   2dup at-xy . | |__  _ __ ___  ___  1+
+   2dup at-xy . |  __|| '__/ _ \/ _ \ 1+
+   2dup at-xy . | |   | | |  __/  __/ 1+
2dup at-xy . |_|   |_|  \___|\___| 1+
2dup at-xy .     _ _ 1+
2dup at-xy . |  _ \ / |  __ \ 1+
2dup at-xy . | |_) | (___ | |  | | 1+
2dup at-xy . |  _  \___ \| |  | | 1+
2dup at-xy . | |_) |) | |__| | 1+
-   2dup at-xy . | |  |  | 1+
 at-xy . |/|_/|_/
 
\ Put the cursor back at the bottom

Modified: head/sys/boot/forth/brand.4th
==
--- head/sys/boot/forth/brand.4th   Sun Jan 25 08:16:51 2015
(r277692)
+++ head/sys/boot/forth/brand.4th   Sun Jan 25 11:57:18 2015
(r277693)
@@ -33,14 +33,13 @@ variable brandY
 2 brandX !
 1 brandY !
 
-: fbsd-logo ( x y -- ) \ FreeBSD [wide] logo in B/W (7 rows x 42 columns)
+: fbsd-logo ( x y -- ) \ FreeBSD [wide] logo in B/W (6 rows x 42 columns)
 
2dup at-xy .  __      _ _   1+
2dup at-xy . |  | |  _ \ / |  __ \  1+
2dup at-xy . | |___ _ __ ___  ___ | |_) | (___ | |  | | 1+
2dup at-xy . |  ___| '__/ _ \/ _ \|  _  \___ \| |  | | 1+
2dup at-xy . | |   | | |  __/  __/| |_) |) | |__| | 1+
-   2dup at-xy . | |   | | |||| |  |  | 1+
 at-xy . |_|   |_|  \___|\___||/|_/|_/ 
 
\ Put the cursor back at the bottom
___
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: r277699 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-01-25 Thread Alexander Motin
Author: mav
Date: Sun Jan 25 14:25:44 2015
New Revision: 277699
URL: https://svnweb.freebsd.org/changeset/base/277699

Log:
  MFC r276913: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode.
  
  This slightly reduces overhead by avoiding dnode_hold()/dnode_rele() calls.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Jan 
25 13:15:12 2015(r277698)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Jan 
25 14:25:44 2015(r277699)
@@ -1819,7 +1819,7 @@ zvol_read(struct cdev *dev, struct uio *
if (bytes  volsize - uio-uio_loffset)
bytes = volsize - uio-uio_loffset;
 
-   error =  dmu_read_uio(zv-zv_objset, ZVOL_OBJ, uio, bytes);
+   error =  dmu_read_uio_dbuf(zv-zv_dbuf, uio, bytes);
if (error) {
/* convert checksum errors into IO errors */
if (error == ECKSUM)
___
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: r277700 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-01-25 Thread Alexander Motin
Author: mav
Date: Sun Jan 25 14:29:40 2015
New Revision: 277700
URL: https://svnweb.freebsd.org/changeset/base/277700

Log:
  MFC r276952: Add LBA as secondary sort key for synchronous I/O requests.
  
  On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz)
  precision.  It makes primary sort key (timestamp) collision very possible.
  In such situations sorting by secondary key of LBA is much more reasonable
  then by totally meaningless zio pointer value.
  
  With this change on multi-threaded synchronous ZVOL read I've measured 10%
  throughput increase and average latency reduction.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c   
Sun Jan 25 14:25:44 2015(r277699)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c   
Sun Jan 25 14:29:40 2015(r277700)
@@ -313,6 +313,11 @@ vdev_queue_timestamp_compare(const void 
if (z1-io_timestamp  z2-io_timestamp)
return (1);
 
+   if (z1-io_offset  z2-io_offset)
+   return (-1);
+   if (z1-io_offset  z2-io_offset)
+   return (1);
+
if (z1  z2)
return (-1);
if (z1  z2)
___
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: r277695 - in head: libexec/rtld-elf usr.bin/kdump

2015-01-25 Thread Dag-Erling Smørgrav
Author: des
Date: Sun Jan 25 12:11:50 2015
New Revision: 277695
URL: https://svnweb.freebsd.org/changeset/base/277695

Log:
  Allow tracing dlfunc() / dlsym() events.
  
  MFC after:1 week

Modified:
  head/libexec/rtld-elf/rtld.c
  head/usr.bin/kdump/kdump.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cSun Jan 25 12:02:38 2015
(r277694)
+++ head/libexec/rtld-elf/rtld.cSun Jan 25 12:11:50 2015
(r277695)
@@ -266,6 +266,8 @@ bool ld_library_path_rpath = false;
 #defineUTRACE_PRELOAD_FINISHED 8
 #defineUTRACE_INIT_CALL9
 #defineUTRACE_FINI_CALL10
+#defineUTRACE_DLSYM_START  11
+#defineUTRACE_DLSYM_STOP   12
 
 struct utrace_rtld {
char sig[4];/* 'RTLD' */
@@ -3099,6 +3101,7 @@ do_dlsym(void *handle, const char *name,
 SymLook req;
 RtldLockState lockstate;
 tls_index ti;
+void *sym;
 int res;
 
 def = NULL;
@@ -3108,6 +3111,7 @@ do_dlsym(void *handle, const char *name,
 req.flags = flags | SYMLOOK_IN_PLT;
 req.lockstate = lockstate;
 
+LD_UTRACE(UTRACE_DLSYM_START, handle, NULL, 0, 0, name);
 rlock_acquire(rtld_bind_lock, lockstate);
 if (sigsetjmp(lockstate.env, 0) != 0)
lock_upgrade(rtld_bind_lock, lockstate);
@@ -3117,6 +3121,7 @@ do_dlsym(void *handle, const char *name,
if ((obj = obj_from_addr(retaddr)) == NULL) {
_rtld_error(Cannot determine caller's shared object);
lock_release(rtld_bind_lock, lockstate);
+   LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name);
return NULL;
}
if (handle == NULL) {   /* Just the caller's shared object. */
@@ -3164,6 +3169,7 @@ do_dlsym(void *handle, const char *name,
 } else {
if ((obj = dlcheck(handle)) == NULL) {
lock_release(rtld_bind_lock, lockstate);
+   LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name);
return NULL;
}
 
@@ -3207,19 +3213,22 @@ do_dlsym(void *handle, const char *name,
 * symbol.
 */
if (ELF_ST_TYPE(def-st_info) == STT_FUNC)
-   return (make_function_pointer(def, defobj));
+   sym = make_function_pointer(def, defobj);
else if (ELF_ST_TYPE(def-st_info) == STT_GNU_IFUNC)
-   return (rtld_resolve_ifunc(defobj, def));
+   sym = rtld_resolve_ifunc(defobj, def);
else if (ELF_ST_TYPE(def-st_info) == STT_TLS) {
ti.ti_module = defobj-tlsindex;
ti.ti_offset = def-st_value;
-   return (__tls_get_addr(ti));
+   sym = __tls_get_addr(ti);
} else
-   return (defobj-relocbase + def-st_value);
+   sym = defobj-relocbase + def-st_value;
+   LD_UTRACE(UTRACE_DLSYM_STOP, handle, sym, 0, 0, name);
+   return (sym);
 }
 
 _rtld_error(Undefined symbol \%s\, name);
 lock_release(rtld_bind_lock, lockstate);
+LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name);
 return NULL;
 }
 

Modified: head/usr.bin/kdump/kdump.c
==
--- head/usr.bin/kdump/kdump.c  Sun Jan 25 12:02:38 2015(r277694)
+++ head/usr.bin/kdump/kdump.c  Sun Jan 25 12:11:50 2015(r277695)
@@ -1531,6 +1531,8 @@ ktrcsw(struct ktr_csw *cs)
 #defineUTRACE_PRELOAD_FINISHED 8
 #defineUTRACE_INIT_CALL9
 #defineUTRACE_FINI_CALL10
+#defineUTRACE_DLSYM_START  11
+#defineUTRACE_DLSYM_STOP   12
 
 struct utrace_rtld {
char sig[4];/* 'RTLD' */
@@ -1610,6 +1612,13 @@ ktruser_rtld(int len, void *p)
printf(RTLD: fini %p for %p (%s)\n, ut-mapbase, ut-handle,
ut-name);
break;
+   case UTRACE_DLSYM_START:
+   printf(RTLD: dlsym(%p, %s)\n, ut-handle, ut-name);
+   break;
+   case UTRACE_DLSYM_STOP:
+   printf(RTLD: %p = dlsym(%p, %s)\n, ut-mapbase, ut-handle,
+   ut-name);
+   break;
default:
cp = p;
cp += 4;
___
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: r277697 - in stable/10/sys: fs/fifofs kern sys

2015-01-25 Thread Konstantin Belousov
Author: kib
Date: Sun Jan 25 13:09:53 2015
New Revision: 277697
URL: https://svnweb.freebsd.org/changeset/base/277697

Log:
  MFC r277321:
  Make SIGSTOP working for sleeps done while waiting for fifo readers or
  writers in open(2), when the fifo is located on an NFS mount.

Modified:
  stable/10/sys/fs/fifofs/fifo_vnops.c
  stable/10/sys/kern/kern_sig.c
  stable/10/sys/sys/signalvar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/fifofs/fifo_vnops.c
==
--- stable/10/sys/fs/fifofs/fifo_vnops.cSun Jan 25 12:50:26 2015
(r277696)
+++ stable/10/sys/fs/fifofs/fifo_vnops.cSun Jan 25 13:09:53 2015
(r277697)
@@ -137,7 +137,7 @@ fifo_open(ap)
struct thread *td;
struct fifoinfo *fip;
struct pipe *fpipe;
-   int error;
+   int error, stops_deferred;
 
vp = ap-a_vp;
fp = ap-a_fp;
@@ -188,8 +188,11 @@ fifo_open(ap)
if ((ap-a_mode  O_NONBLOCK) == 0) {
if ((ap-a_mode  FREAD)  fip-fi_writers == 0) {
VOP_UNLOCK(vp, 0);
+   stops_deferred = sigallowstop();
error = msleep(fip-fi_readers, PIPE_MTX(fpipe),
PDROP | PCATCH | PSOCK, fifoor, 0);
+   if (stops_deferred)
+   sigdeferstop();
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
fip-fi_readers--;
@@ -212,8 +215,11 @@ fifo_open(ap)
}
if ((ap-a_mode  FWRITE)  fip-fi_readers == 0) {
VOP_UNLOCK(vp, 0);
+   stops_deferred = sigallowstop();
error = msleep(fip-fi_writers, PIPE_MTX(fpipe),
PDROP | PCATCH | PSOCK, fifoow, 0);
+   if (stops_deferred)
+   sigdeferstop();
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
fip-fi_writers--;

Modified: stable/10/sys/kern/kern_sig.c
==
--- stable/10/sys/kern/kern_sig.c   Sun Jan 25 12:50:26 2015
(r277696)
+++ stable/10/sys/kern/kern_sig.c   Sun Jan 25 13:09:53 2015
(r277697)
@@ -2596,15 +2596,18 @@ sigdeferstop(void)
  * not immediately suspend if a stop was posted.  Instead, the thread
  * will suspend either via ast() or a subsequent interruptible sleep.
  */
-void
-sigallowstop()
+int
+sigallowstop(void)
 {
struct thread *td;
+   int prev;
 
td = curthread;
thread_lock(td);
+   prev = (td-td_flags  TDF_SBDRY) != 0;
td-td_flags = ~TDF_SBDRY;
thread_unlock(td);
+   return (prev);
 }
 
 /*

Modified: stable/10/sys/sys/signalvar.h
==
--- stable/10/sys/sys/signalvar.h   Sun Jan 25 12:50:26 2015
(r277696)
+++ stable/10/sys/sys/signalvar.h   Sun Jan 25 13:09:53 2015
(r277697)
@@ -325,7 +325,7 @@ extern struct mtx   sigio_lock;
 
 intcursig(struct thread *td);
 intsigdeferstop(void);
-void   sigallowstop(void);
+intsigallowstop(void);
 void   execsigs(struct proc *p);
 void   gsignal(int pgid, int sig, ksiginfo_t *ksi);
 void   killproc(struct proc *p, char *why);
___
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: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Slawa Olhovchenkov
On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote:

 Negative ids have historical abuses in places like mountd.  mountd still
 hard-codes -2 and -2 for the default uid and gid of an unprivileged user.
 It at least casts these values to uid_t and gid_t before using them.
 This gives the ids the non-random values of UINT32_MAX-1 if uid_t and
 gid_t are uint32_t.  (If uid_t and gid_t were signed, then it would
 leave the values as negative, so invalid.)  These magic values may work
 better than when ids were 16 bits, since there is less risk of them
 conflicting with a normal id.  However, the non-conflict is probably
 a bug.  FreeBSD uses the magic ids of 65534 for user nobody: group
 nobody.  These would have been (id_t)-2 with 16-bit ids.  They no
 longer match, so ls displays (id_t)-2 numerically.  FreeBSD also has
 a group nogroup = 65553 that doesn't match the nfs usage.  However2,
 in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was
 32766. so they didn't match nfs for other reasons.  The 2 non-groups
 now seem to be just a bug -- FreeBSD-1 didn't have group nobody.
 4.4BSD-Lite2 has the same values as FreeBSD-1.

This is not full true for ZFS case.
On ZFS nobody is 2^32-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: r277701 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-01-25 Thread Alexander Motin
Author: mav
Date: Sun Jan 25 14:31:44 2015
New Revision: 277701
URL: https://svnweb.freebsd.org/changeset/base/277701

Log:
  MFC r276983: When aggregating TRIM segments, move the new one to the end.
  
  New segment at the list head may block all TRIM requests until txg of that
  segment can be processed.  On my random I/O tests this change reduce peak
  TRIM list length from 650 to 450 segments.  Hopefully it should reduce TRIM
  burstiness when list processing is unblocked.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 
25 14:29:40 2015(r277700)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 
25 14:31:44 2015(r277701)
@@ -253,17 +253,23 @@ trim_map_segment_add(trim_map_t *tm, uin
ts_after-ts_start = ts_before-ts_start;
ts_after-ts_txg = txg;
ts_after-ts_time = time;
+   list_remove(tm-tm_head, ts_after);
+   list_insert_tail(tm-tm_head, ts_after);
kmem_free(ts_before, sizeof (*ts_before));
} else if (merge_before) {
TRIM_MAP_SINC(tm, end - ts_before-ts_end);
ts_before-ts_end = end;
ts_before-ts_txg = txg;
ts_before-ts_time = time;
+   list_remove(tm-tm_head, ts_before);
+   list_insert_tail(tm-tm_head, ts_before);
} else if (merge_after) {
TRIM_MAP_SINC(tm, ts_after-ts_start - start);
ts_after-ts_start = start;
ts_after-ts_txg = txg;
ts_after-ts_time = time;
+   list_remove(tm-tm_head, ts_after);
+   list_insert_tail(tm-tm_head, ts_after);
} else {
TRIM_MAP_SINC(tm, end - start);
TRIM_MAP_QINC(tm);
___
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: r277694 - head/sys/amd64/conf

2015-01-25 Thread Dag-Erling Smørgrav
Sergey Kandaurov pluk...@freebsd.org writes:
 Dag-Erling Smørgrav d...@freebsd.org writes:
  Log:
Remove ISA NICs.  Anyone still using these on amd64 can build their
own kernel.
 If so, what about i386? (I'd rather not pc98)

There's a greater chance of ISA devices still being in use on i386
hardware than on amd64 hardware.  I've never even heard of amd64
hardware with ISA slots, but I guess there is a remote chance that
someone may try to use something like an ep(4) PCCARD on a modern laptop
(which is a bad example, since ep(4) is loadable, but you get the idea).

 What about device isa in DEFAULTS?

It's still required for atkbdc.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r277716 - head/sys/arm/ti/am335x

2015-01-25 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Jan 25 22:08:36 2015
New Revision: 277716
URL: https://svnweb.freebsd.org/changeset/base/277716

Log:
  Add vt(4) support to AM335x LCDC driver

Modified:
  head/sys/arm/ti/am335x/am335x_lcd.c
  head/sys/arm/ti/am335x/files.am335x

Modified: head/sys/arm/ti/am335x/am335x_lcd.c
==
--- head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 25 21:16:24 2015
(r277715)
+++ head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 25 22:08:36 2015
(r277716)
@@ -27,6 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
+#include opt_syscons.h
 #include sys/param.h
 #include sys/systm.h
 #include sys/kernel.h
@@ -41,8 +42,6 @@ __FBSDID($FreeBSD$);
 #include sys/sysctl.h
 #include vm/vm.h
 #include vm/pmap.h
-
-/* syscons bits */
 #include sys/fbio.h
 #include sys/consio.h
 
@@ -54,7 +53,11 @@ __FBSDID($FreeBSD$);
 #include dev/ofw/ofw_bus_subr.h
 
 #include dev/fb/fbreg.h
+#ifdef DEV_SC
 #include dev/syscons/syscons.h
+#else /* VT */
+#include dev/vt/vt.h
+#endif
 
 #include arm/ti/ti_prcm.h
 #include arm/ti/ti_scm.h
@@ -62,6 +65,8 @@ __FBSDID($FreeBSD$);
 #include am335x_lcd.h
 #include am335x_pwm.h
 
+#include fb_if.h
+
 #defineLCD_PID 0x00
 #defineLCD_CTRL0x04
 #defineCTRL_DIV_MASK   0xff
@@ -178,6 +183,7 @@ __FBSDID($FreeBSD$);
 
 struct am335x_lcd_softc {
device_tsc_dev;
+   struct fb_info  sc_fb_info;
struct resource *sc_mem_res;
struct resource *sc_irq_res;
void*sc_intr_hl;
@@ -410,7 +416,9 @@ done:
 static int
 am335x_lcd_probe(device_t dev)
 {
+#ifdef DEV_SC
int err;
+#endif
 
if (!ofw_bus_status_okay(dev))
return (ENXIO);
@@ -420,10 +428,12 @@ am335x_lcd_probe(device_t dev)
 
device_set_desc(dev, AM335x LCD controller);
 
+#ifdef DEV_SC
err = sc_probe_unit(device_get_unit(dev), 
device_get_flags(dev) | SC_AUTODETECT_KBD);
if (err != 0)
return (err);
+#endif
 
return (BUS_PROBE_DEFAULT);
 }
@@ -670,6 +680,16 @@ am335x_lcd_attach(device_t dev)
PWM_PERIOD, PWM_PERIOD) == 0)
sc-sc_backlight = 100;
 
+   sc-sc_fb_info.fb_name = device_get_nameunit(sc-sc_dev);
+   sc-sc_fb_info.fb_vbase = (intptr_t)sc-sc_fb_base;
+   sc-sc_fb_info.fb_pbase = sc-sc_fb_phys;
+   sc-sc_fb_info.fb_size = sc-sc_fb_size;
+   sc-sc_fb_info.fb_bpp = sc-sc_fb_info.fb_depth = panel.bpp;
+   sc-sc_fb_info.fb_stride = panel.panel_width*panel.bpp / 8;
+   sc-sc_fb_info.fb_width = panel.panel_width;
+   sc-sc_fb_info.fb_height = panel.panel_height;
+
+#ifdef DEV_SC
err = (sc_attach_unit(device_get_unit(dev),
device_get_flags(dev) | SC_AUTODETECT_KBD));
 
@@ -679,6 +699,18 @@ am335x_lcd_attach(device_t dev)
}
 
am335x_lcd_syscons_setup((vm_offset_t)sc-sc_fb_base, sc-sc_fb_phys, 
panel);
+#else /* VT */
+   device_t fbd = device_add_child(dev, fbd,
+   device_get_unit(dev));
+   if (fbd == NULL) {
+   device_printf(dev, Failed to add fbd child\n);
+   goto fail;
+   }
+   if (device_probe_and_attach(fbd) != 0) {
+   device_printf(dev, Failed to attach fbd device\n);
+   goto fail;
+   }
+#endif
 
return (0);
 
@@ -693,16 +725,29 @@ am335x_lcd_detach(device_t dev)
return (EBUSY);
 }
 
+static struct fb_info *
+am335x_lcd_fb_getinfo(device_t dev)
+{
+   struct am335x_lcd_softc *sc;
+
+   sc = device_get_softc(dev);
+
+   return (sc-sc_fb_info);
+}
+
 static device_method_t am335x_lcd_methods[] = {
DEVMETHOD(device_probe, am335x_lcd_probe),
DEVMETHOD(device_attach,am335x_lcd_attach),
DEVMETHOD(device_detach,am335x_lcd_detach),
 
+   /* Framebuffer service methods */
+   DEVMETHOD(fb_getinfo,   am335x_lcd_fb_getinfo),
+
DEVMETHOD_END
 };
 
 static driver_t am335x_lcd_driver = {
-   am335x_lcd,
+   fb,
am335x_lcd_methods,
sizeof(struct am335x_lcd_softc),
 };

Modified: head/sys/arm/ti/am335x/files.am335x
==
--- head/sys/arm/ti/am335x/files.am335x Sun Jan 25 21:16:24 2015
(r277715)
+++ head/sys/arm/ti/am335x/files.am335x Sun Jan 25 22:08:36 2015
(r277716)
@@ -4,7 +4,7 @@ arm/ti/aintc.c  standard
 
 arm/ti/am335x/am335x_dmtimer.c standard
 arm/ti/am335x/am335x_gpio.coptionalgpio
-arm/ti/am335x/am335x_lcd.c optionalsc
+arm/ti/am335x/am335x_lcd.c optionalsc | vt
 arm/ti/am335x/am335x_lcd_syscons.c optionalsc
 arm/ti/am335x/am335x_pmic.coptionalam335x_pmic
 arm/ti/am335x/am335x_prcm.cstandard

svn commit: r277720 - head/sys/arm/ti

2015-01-25 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Jan 25 23:58:34 2015
New Revision: 277720
URL: https://svnweb.freebsd.org/changeset/base/277720

Log:
  - Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes
  1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black)
  - Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control
  I2C bus timeout manually
  - Pass softc instead of device_t to all sysctl handlers

Modified:
  head/sys/arm/ti/ti_i2c.c

Modified: head/sys/arm/ti/ti_i2c.c
==
--- head/sys/arm/ti/ti_i2c.cSun Jan 25 23:43:12 2015(r277719)
+++ head/sys/arm/ti/ti_i2c.cSun Jan 25 23:58:34 2015(r277720)
@@ -95,6 +95,7 @@ struct ti_i2c_softc
int sc_buffer_pos;
int sc_error;
int sc_fifo_trsh;
+   int sc_timeout;
 
uint16_tsc_con_reg;
uint16_tsc_rev;
@@ -442,7 +443,7 @@ ti_i2c_transfer(device_t dev, struct iic
ti_i2c_write_2(sc, I2C_REG_CON, reg);
 
/* Wait for an event. */
-   err = mtx_sleep(sc, sc-sc_mtx, 0, i2ciowait, hz);
+   err = mtx_sleep(sc, sc-sc_mtx, 0, i2ciowait, 
sc-sc_timeout);
if (err == 0)
err = sc-sc_error;
 
@@ -761,12 +762,10 @@ ti_i2c_deactivate(device_t dev)
 static int
 ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS)
 {
-   device_t dev;
int clk, psc, sclh, scll;
struct ti_i2c_softc *sc;
 
-   dev = (device_t)arg1;
-   sc = device_get_softc(dev);
+   sc = arg1;
 
TI_I2C_LOCK(sc);
/* Get the system prescaler value. */
@@ -783,6 +782,34 @@ ti_i2c_sysctl_clk(SYSCTL_HANDLER_ARGS)
 }
 
 static int
+ti_i2c_sysctl_timeout(SYSCTL_HANDLER_ARGS)
+{
+   struct ti_i2c_softc *sc;
+   unsigned int val;
+   int err;
+
+   sc = arg1;
+
+   /* 
+* MTX_DEF lock can't be held while doing uimove in
+* sysctl_handle_int
+*/
+   TI_I2C_LOCK(sc);
+   val = sc-sc_timeout;
+   TI_I2C_UNLOCK(sc);
+
+   err = sysctl_handle_int(oidp, val, 0, req);
+   /* Write request? */
+   if ((err == 0)  (req-newptr != NULL)) {
+   TI_I2C_LOCK(sc);
+   sc-sc_timeout = val;
+   TI_I2C_UNLOCK(sc);
+   }
+
+   return (err);
+}
+
+static int
 ti_i2c_probe(device_t dev)
 {
 
@@ -858,12 +885,19 @@ ti_i2c_attach(device_t dev)
/* Set the FIFO threshold to 5 for now. */
sc-sc_fifo_trsh = 5;
 
+   /* Set I2C bus timeout */
+   sc-sc_timeout = 5*hz;
+
ctx = device_get_sysctl_ctx(dev);
tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, i2c_clock,
-   CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, dev, 0,
+   CTLFLAG_RD | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0,
ti_i2c_sysctl_clk, IU, I2C bus clock);
 
+   SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, i2c_timeout,
+   CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0,
+   ti_i2c_sysctl_timeout, IU, I2C bus timeout (in ticks));
+
/* Activate the interrupt. */
err = bus_setup_intr(dev, sc-sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
NULL, ti_i2c_intr, sc, sc-sc_irq_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: r277709 - head/sys/netinet

2015-01-25 Thread John Baldwin
Author: jhb
Date: Sun Jan 25 19:45:44 2015
New Revision: 277709
URL: https://svnweb.freebsd.org/changeset/base/277709

Log:
  Use an sbuf to generate the output of the net.inet.tcp.hostcache.list
  sysctl to avoid a possible buffer overflow if the cache grows while the
  text is being generated.
  
  PR:   172675
  MFC after:2 weeks

Modified:
  head/sys/netinet/tcp_hostcache.c

Modified: head/sys/netinet/tcp_hostcache.c
==
--- head/sys/netinet/tcp_hostcache.cSun Jan 25 19:21:37 2015
(r277708)
+++ head/sys/netinet/tcp_hostcache.cSun Jan 25 19:45:44 2015
(r277709)
@@ -73,6 +73,7 @@ __FBSDID($FreeBSD$);
 #include sys/lock.h
 #include sys/mutex.h
 #include sys/malloc.h
+#include sys/sbuf.h
 #include sys/socket.h
 #include sys/socketvar.h
 #include sys/sysctl.h
@@ -595,30 +596,27 @@ tcp_hc_update(struct in_conninfo *inc, s
 static int
 sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
 {
-   int bufsize;
int linesize = 128;
-   char *p, *buf;
-   int len, i, error;
+   struct sbuf sb;
+   int i, error;
struct hc_metrics *hc_entry;
 #ifdef INET6
char ip6buf[INET6_ADDRSTRLEN];
 #endif
 
-   bufsize = linesize * (V_tcp_hostcache.cache_count + 1);
+   sbuf_new(sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1),
+   SBUF_FIXEDLEN);
 
-   p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO);
-
-   len = snprintf(p, linesize,
-   \nIP addressMTU  SSTRESH  RTT   RTTVAR BANDWIDTH 
+   sbuf_printf(sb,
+   \nIP addressMTU  SSTRESH  RTT   RTTVAR BANDWIDTH 
CWND SENDPIPE RECVPIPE HITS  UPD  EXP\n);
-   p += len;
 
 #define msec(u) (((u) + 500) / 1000)
for (i = 0; i  V_tcp_hostcache.hashsize; i++) {
THC_LOCK(V_tcp_hostcache.hashbase[i].hch_mtx);
TAILQ_FOREACH(hc_entry, V_tcp_hostcache.hashbase[i].hch_bucket,
  rmx_q) {
-   len = snprintf(p, linesize,
+   sbuf_printf(sb,
%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu 
%4lu %4lu %4i\n,
hc_entry-ip4.s_addr ? inet_ntoa(hc_entry-ip4) :
@@ -640,13 +638,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
hc_entry-rmx_hits,
hc_entry-rmx_updates,
hc_entry-rmx_expire);
-   p += len;
}
THC_UNLOCK(V_tcp_hostcache.hashbase[i].hch_mtx);
}
 #undef msec
-   error = SYSCTL_OUT(req, buf, p - buf);
-   free(buf, M_TEMP);
+   sbuf_finish(sb);
+   error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb));
+   sbuf_delete(sb);
return(error);
 }
 
___
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: r277710 - head/sys/dev/pci

2015-01-25 Thread John Baldwin
Author: jhb
Date: Sun Jan 25 19:53:09 2015
New Revision: 277710
URL: https://svnweb.freebsd.org/changeset/base/277710

Log:
  Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume()
  instead of NULL.
  
  Submitted by: dchagin
  MFC after:2 weeks

Modified:
  head/sys/dev/pci/pci_pci.c

Modified: head/sys/dev/pci/pci_pci.c
==
--- head/sys/dev/pci/pci_pci.c  Sun Jan 25 19:45:44 2015(r277709)
+++ head/sys/dev/pci/pci_pci.c  Sun Jan 25 19:53:09 2015(r277710)
@@ -1114,11 +1114,13 @@ int
 pcib_resume(device_t dev)
 {
device_tpcib;
+   int dstate;
 
if (pci_do_power_resume) {
pcib = device_get_parent(device_get_parent(dev));
-   if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0)
-   pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+   dstate = PCI_POWERSTATE_D0;
+   if (PCIB_POWER_FOR_SLEEP(pcib, dev, dstate) == 0)
+   pci_set_powerstate(dev, dstate);
}
pcib_cfg_restore(device_get_softc(dev));
return (bus_generic_resume(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: r277712 - head/sys/kern

2015-01-25 Thread John Baldwin
Author: jhb
Date: Sun Jan 25 19:56:45 2015
New Revision: 277712
URL: https://svnweb.freebsd.org/changeset/base/277712

Log:
  Change the default VFS timestamp precision from seconds to microseconds.
  
  Discussed on: arch@
  MFC after:2 weeks

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSun Jan 25 19:56:43 2015(r277711)
+++ head/sys/kern/vfs_subr.cSun Jan 25 19:56:45 2015(r277712)
@@ -632,7 +632,7 @@ vfs_getnewfsid(struct mount *mp)
  */
 enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NSEC };
 
-static int timestamp_precision = TSP_SEC;
+static int timestamp_precision = TSP_USEC;
 SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW,
 timestamp_precision, 0, File timestamp precision (0: seconds, 
 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 
___
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: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Peter Jeremy
On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov s...@zxy.spb.ru wrote:
I think this is result of convert (signed short) to (signed int).

 ls -l /usr/ports/packages32/lang
 total 2
 lrwxr-xr-x  1 4294967294  wheel  33 Mar 17  2012 perl-threaded-5.12.4_4.tbz 
 - ../All/perl-threaded-5.12.4_4.tbz
 lrwxr-xr-x  1 4294967294  wheel  27 Mar 17  2012 python27-2.7.2_4.tbz - 
 ../All/python27-2.7.2_4.tbz
 lrwxr-xr-x  1 4294967294  wheel  21 Mar 17  2012 tcl-8.5.11.tbz - 
 ../All/tcl-8.5.11.tbz
 lrwxr-xr-x  1 4294967294  wheel  29 Mar 17  2012 tcl-modules-8.5.11.tbz - 
 ../All/tcl-modules-8.5.11.tbz
 
 All this means is that you have some files with that uid.  It's not
 clear how they were created.

nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to
nobody. When this is created -- host 9.1, VM -- 6.x.

I can reproduce this with FreeBSD 10/r276177 client and server running
NFSv3 using the new NFS code.  It appears to be due to the (broken)
initialisation of def_anon in mountd(8) with '(uid_t)-2' - as noted by
bde.  It's nothing to do with ZFS.

-- 
Peter Jeremy


pgpsRbtrCXkEA.pgp
Description: PGP signature


svn commit: r277713 - head/sys/amd64/amd64

2015-01-25 Thread John Baldwin
Author: jhb
Date: Sun Jan 25 20:16:45 2015
New Revision: 277713
URL: https://svnweb.freebsd.org/changeset/base/277713

Log:
  If the boot-time memory test is enabled, output a dot ('.') for
  each GB of RAM tested so people watching the console can see that
  the machine is making progress and not hung.
  
  PR:   196650
  Submitted by: Ravi Pokala rpok...@panasas.com
  Suggestions from: Eric van Gyzen e...@vangyzen.net
  MFC after:2 weeks

Modified:
  head/sys/amd64/amd64/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Sun Jan 25 19:56:45 2015
(r277712)
+++ head/sys/amd64/amd64/machdep.c  Sun Jan 25 20:16:45 2015
(r277713)
@@ -1557,6 +1557,8 @@ native_parse_memmap(caddr_t kmdp, vm_pad
}
 }
 
+#definePAGES_PER_GB(1024 * 1024 * 1024 / PAGE_SIZE)
+
 /*
  * Populate the (physmap) array with base/bound pairs describing the
  * available physical memory in the system, then test this memory and
@@ -1575,6 +1577,7 @@ getmemsize(caddr_t kmdp, u_int64_t first
u_long physmem_start, physmem_tunable, memtest;
pt_entry_t *pte;
quad_t dcons_addr, dcons_size;
+   int page_counter;
 
bzero(physmap, sizeof(physmap));
basemem = 0;
@@ -1678,6 +1681,9 @@ getmemsize(caddr_t kmdp, u_int64_t first
 * physmap is in bytes, so when converting to page boundaries,
 * round up the start address and round down the end address.
 */
+   page_counter = 0;
+   if (memtest != 0)
+   printf(Testing system memory);
for (i = 0; i = physmap_idx; i += 2) {
vm_paddr_t end;
 
@@ -1708,6 +1714,14 @@ getmemsize(caddr_t kmdp, u_int64_t first
goto skip_memtest;
 
/*
+* Print a . every GB to show we're making
+* progress.
+*/
+   page_counter++;
+   if ((page_counter % PAGES_PER_GB) == 0)
+   printf(.);
+
+   /*
 * map page into kernel: valid, read/write,non-cacheable
 */
*pte = pa | PG_V | PG_RW | PG_NC_PWT | PG_NC_PCD;
@@ -1794,6 +1808,8 @@ do_next:
}
*pte = 0;
invltlb();
+   if (memtest != 0)
+   printf(\n);
 
/*
 * XXX
___
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: r277714 - head/sbin/ipfw

2015-01-25 Thread John Baldwin
Author: jhb
Date: Sun Jan 25 20:37:32 2015
New Revision: 277714
URL: https://svnweb.freebsd.org/changeset/base/277714

Log:
  natd(8) will work with an unconfigured interface and effectively not do
  anything until the interface is assigned an address.  This fixes
  ipfw_nat to do the same by using an IP of INADDR_ANY instead of
  aborting the nat setup if the requested interface is not yet configured.
  
  Differential Revision:https://reviews.freebsd.org/D1539
  Reviewed by:  melifaro, glebius, gnn
  MFC after:1 week

Modified:
  head/sbin/ipfw/nat.c

Modified: head/sbin/ipfw/nat.c
==
--- head/sbin/ipfw/nat.cSun Jan 25 20:16:45 2015(r277713)
+++ head/sbin/ipfw/nat.cSun Jan 25 20:37:32 2015(r277714)
@@ -163,9 +163,9 @@ set_addr_dynamic(const char *ifn, struct
}
}
if (sin == NULL)
-   errx(1, %s: cannot get interface address, ifn);
-
-   n-ip = sin-sin_addr;
+   n-ip.s_addr = htonl(INADDR_ANY);
+   else
+   n-ip = sin-sin_addr;
strncpy(n-if_name, ifn, IF_NAMESIZE);
 
free(buf);
___
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: r277709 - head/sys/netinet

2015-01-25 Thread John Baldwin
On Sunday, January 25, 2015 07:45:44 PM John Baldwin wrote:
 Author: jhb
 Date: Sun Jan 25 19:45:44 2015
 New Revision: 277709
 URL: https://svnweb.freebsd.org/changeset/base/277709
 
 Log:
   Use an sbuf to generate the output of the net.inet.tcp.hostcache.list
   sysctl to avoid a possible buffer overflow if the cache grows while the
   text is being generated.
 
   PR: 172675
   MFC after:  2 weeks

There is an additional bug still in that the 'cache_count' variable is not
protected (it is modified while any one of a number of per-hashbucket locks
are held).  It should probably be changed to be updated via atomic ops, but
this fix should prevent memory corruption and/or panics due to overflowing
the buffer allocated for this.  Of course, I really dislike sysctl nodes that
output raw text.  I would much rather this output a structure and rely on
userland code to convert it to human-readable text.

-- 
John Baldwin
___
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: r277712 - head/sys/kern

2015-01-25 Thread John Baldwin
On Sunday, January 25, 2015 07:56:46 PM John Baldwin wrote:
 Author: jhb
 Date: Sun Jan 25 19:56:45 2015
 New Revision: 277712
 URL: https://svnweb.freebsd.org/changeset/base/277712
 
 Log:
   Change the default VFS timestamp precision from seconds to microseconds.
 
   Discussed on:   arch@
   MFC after:  2 weeks

I want to let this settle in HEAD for a week or so, but given that Jilles 
committed the fixes for mv/cp, I'd like to change HEAD to use nanoseconds 
ultimately.  However, I wanted to test microseconds first so that that can be 
merged to stable.

-- 
John Baldwin
___
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: r277652 - in head/usr.sbin/pw: . tests

2015-01-25 Thread Slawa Olhovchenkov
On Mon, Jan 26, 2015 at 07:50:59AM +1100, Peter Jeremy wrote:

 On 2015-Jan-25 22:29:26 +0300, Slawa Olhovchenkov s...@zxy.spb.ru wrote:
 I think this is result of convert (signed short) to (signed int).
 
  ls -l /usr/ports/packages32/lang
  total 2
  lrwxr-xr-x  1 4294967294  wheel  33 Mar 17  2012 
  perl-threaded-5.12.4_4.tbz - ../All/perl-threaded-5.12.4_4.tbz
  lrwxr-xr-x  1 4294967294  wheel  27 Mar 17  2012 python27-2.7.2_4.tbz - 
  ../All/python27-2.7.2_4.tbz
  lrwxr-xr-x  1 4294967294  wheel  21 Mar 17  2012 tcl-8.5.11.tbz - 
  ../All/tcl-8.5.11.tbz
  lrwxr-xr-x  1 4294967294  wheel  29 Mar 17  2012 tcl-modules-8.5.11.tbz 
  - ../All/tcl-modules-8.5.11.tbz
  
  All this means is that you have some files with that uid.  It's not
  clear how they were created.
 
 nfs3 export ZFS dataset to VM. VM do write as 'root'. root maped to
 nobody. When this is created -- host 9.1, VM -- 6.x.
 
 I can reproduce this with FreeBSD 10/r276177 client and server running
 NFSv3 using the new NFS code.  It appears to be due to the (broken)
 initialisation of def_anon in mountd(8) with '(uid_t)-2' - as noted by
 bde.  It's nothing to do with ZFS.

I don't talk 'this is ZFS bug'.
I don't talk 'this is bug'.
I only talk 'nfs over ZFS produce uid 2^32-2 as nobody' as opposite to
Bruce talks.
Also, I am ask solaris admin to test this setup -- solaris also
produce 4294967294 as nobody.
I am don't know what correctly way. I am just describe actual
behaviour.
___
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