svn commit: r283515 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-05-25 Thread Konstantin Belousov
Author: kib
Date: Mon May 25 09:08:19 2015
New Revision: 283515
URL: https://svnweb.freebsd.org/changeset/base/283515

Log:
  Remove excess Giant acquisition around the dounmount() call.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon May 
25 08:34:55 2015(r283514)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon May 
25 09:08:19 2015(r283515)
@@ -3481,9 +3481,7 @@ zfs_unmount_snap(const char *snapname)
 #ifdef illumos
(void) dounmount(vfsp, MS_FORCE, kcred);
 #else
-   mtx_lock(Giant);   /* dounmount() */
(void) dounmount(vfsp, MS_FORCE, curthread);
-   mtx_unlock(Giant); /* dounmount() */
 #endif
return (0);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283479 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64

2015-05-25 Thread Konstantin Belousov
On Sun, May 24, 2015 at 10:34:48PM +0300, Chagin Dmitry wrote:
 On Sun, May 24, 2015 at 09:25:15PM +0300, Konstantin Belousov wrote:
  On Sun, May 24, 2015 at 05:56:03PM +, Dmitry Chagin wrote:
   Author: dchagin
   Date: Sun May 24 17:56:02 2015
   New Revision: 283479
   URL: https://svnweb.freebsd.org/changeset/base/283479
   
   Log:
 The kernel sends signals to the processes via ABI specific sv_sendsig 
   method.
 Native ABI do not need signal conversion, only emulators may want this. 
   Usually
 emulators implements its own sv_sendsig method. For now only ibcs2 
   emulator does
 not have own sv_sendsig implementation and depends on native sendsig() 
   method.
 So, remove any extra attempts to convert signal numbers from native 
   sendsig()
 methods except from i386 where ibsc2 is living.
   
   Modified:
 head/sys/amd64/amd64/machdep.c
 head/sys/amd64/ia32/ia32_signal.c
 head/sys/arm/arm/machdep.c
 head/sys/i386/i386/machdep.c
 head/sys/mips/mips/freebsd32_machdep.c
 head/sys/mips/mips/pm_machdep.c
 head/sys/powerpc/powerpc/exec_machdep.c
 head/sys/sparc64/sparc64/machdep.c
   
   Modified: head/sys/amd64/amd64/machdep.c
   ==
   --- head/sys/amd64/amd64/machdep.cSun May 24 17:53:48 2015
   (r283478)
   +++ head/sys/amd64/amd64/machdep.cSun May 24 17:56:02 2015
   (r283479)
   @@ -398,10 +398,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 /* Align to 16 bytes. */
 sfp = (struct sigframe *)((unsigned long)sp  ~0xFul);

   - /* Translate the signal if appropriate. */
   - if (p-p_sysent-sv_sigtbl  sig = p-p_sysent-sv_sigsize)
   - sig = p-p_sysent-sv_sigtbl[_SIG_IDX(sig)];
   -
  Does struct sysent still need sv_sigtbl and sv_sigsize members then ?
 ubsc2 share sendsig with i386, so this members still used
You mean, iBCS2 uses current FreeBSD signal frame layout ?

Indeed, and I do not see how this is not broken. The SysV R3 definitely
did not knew about things like SSE or AVX, and I am sure that the layout
of the signal frame for i386 even in its non-extended part on FreeBSD
mutated without looking back to the iBCS2 requirements. But this is a
different issue.

That said, could iBCS2 use a wrapper around some internal variant of the
sendsig() which would take both ksi and translated signal number ?  The
signal number would be used to set sf_signum.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283514 - in head: share/man/man4 sys/conf sys/dev/sfxge sys/dev/sfxge/common sys/modules/sfxge

2015-05-25 Thread Andrew Rybchenko
Author: arybchik
Date: Mon May 25 08:34:55 2015
New Revision: 283514
URL: https://svnweb.freebsd.org/changeset/base/283514

Log:
  sfxge: add 7xxx NICs family support
  
  Support 7xxx adapters including firmware-assisted TSO and VLAN tagging:
  
- Solarflare Flareon Ultra 7000 series 10/40G adapters:
  - Solarflare SFN7042Q QSFP+ Server Adapter
  - Solarflare SFN7142Q QSFP+ Server Adapter
  
- Solarflare Flareon Ultra 7000 series 10G adapters:
  - Solarflare SFN7022F SFP+ Server Adapter
  - Solarflare SFN7122F SFP+ Server Adapter
  - Solarflare SFN7322F Precision Time Synchronization Server Adapter
  
- Solarflare Flareon 7000 series 10G adapters:
  - Solarflare SFN7002F SFP+ Server Adapter
  
  Support utilities to configure adapters and update firmware.
  
  The work is done by Solarflare developers
  (Andy Moreton, Andrew Lee and many others),
  Artem V. Andreev Artem.Andreev at oktetlabs.ru and me.
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 weeks
  Causually read by: gnn
  Differential Revision: https://reviews.freebsd.org/D2618

Added:
  head/sys/dev/sfxge/common/ef10_tlv_layout.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_check.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_crc32.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_hash.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_phy_ids.h   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_ev.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_filter.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_intr.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_mac.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_mcdi.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_nic.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_nvram.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_phy.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_rx.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_sram.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_tx.c   (contents, props changed)
  head/sys/dev/sfxge/common/hunt_vpd.c   (contents, props changed)
  head/sys/dev/sfxge/common/mcdi_mon.c   (contents, props changed)
  head/sys/dev/sfxge/common/mcdi_mon.h   (contents, props changed)
  head/sys/dev/sfxge/common/siena_mcdi.c   (contents, props changed)
  head/sys/dev/sfxge/sfxge_ioc.h   (contents, props changed)
  head/sys/dev/sfxge/sfxge_nvram.c   (contents, props changed)
Deleted:
  head/sys/dev/sfxge/common/siena_mon.c
Modified:
  head/share/man/man4/sfxge.4   (contents, props changed)
  head/sys/conf/files
  head/sys/conf/files.amd64
  head/sys/dev/sfxge/common/efsys.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_bootcfg.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_ev.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_filter.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_intr.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mac.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mcdi.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mcdi.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_mon.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_nic.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_nvram.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_phy.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_port.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_ef10.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_mcdi.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_regs_pci.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_rx.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_sram.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_tx.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_types.h   (contents, props changed)
  head/sys/dev/sfxge/common/efx_vpd.c   (contents, props changed)
  head/sys/dev/sfxge/common/efx_wol.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_flash.h   (contents, props changed)
  head/sys/dev/sfxge/common/siena_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/siena_mac.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_nic.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_nvram.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_phy.c   (contents, props changed)
  head/sys/dev/sfxge/common/siena_sram.c   (contents, props 

svn commit: r283516 - head/sys/x86/xen

2015-05-25 Thread Roger Pau Monné
Author: royger
Date: Mon May 25 09:47:16 2015
New Revision: 283516
URL: https://svnweb.freebsd.org/changeset/base/283516

Log:
  xen: make sure xenpv bus is the last to attach
  
  This is needed so other buses have a chance of attaching a real ISA bus, if
  none is found xenpv will attach it.
  
  Sponsored by: Citrix Systems RD

Modified:
  head/sys/x86/xen/xenpv.c

Modified: head/sys/x86/xen/xenpv.c
==
--- head/sys/x86/xen/xenpv.cMon May 25 09:08:19 2015(r283515)
+++ head/sys/x86/xen/xenpv.cMon May 25 09:47:16 2015(r283516)
@@ -35,6 +35,7 @@ __FBSDID($FreeBSD$);
 #include sys/pcpu.h
 #include sys/rman.h
 #include sys/smp.h
+#include sys/limits.h
 
 #include vm/vm.h
 #include vm/vm_page.h
@@ -72,7 +73,11 @@ xenpv_identify(driver_t *driver, device_
if (devclass_get_device(xenpv_devclass, 0))
return;
 
-   if (BUS_ADD_CHILD(parent, 0, xenpv, 0) == NULL)
+   /*
+* The xenpv bus should be the last to attach in order
+* to properly detect if an ISA bus has already been added.
+*/
+   if (BUS_ADD_CHILD(parent, UINT_MAX, xenpv, 0) == NULL)
panic(Unable to attach xenpv bus.);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283517 - head/gnu/lib

2015-05-25 Thread Mark Murray
Author: markm
Date: Mon May 25 10:51:40 2015
New Revision: 283517
URL: https://svnweb.freebsd.org/changeset/base/283517

Log:
  Unbreak build where WANT_GDB == no', as libreadline is also used by ntpdc.

Modified:
  head/gnu/lib/Makefile

Modified: head/gnu/lib/Makefile
==
--- head/gnu/lib/Makefile   Mon May 25 09:47:16 2015(r283516)
+++ head/gnu/lib/Makefile   Mon May 25 10:51:40 2015(r283517)
@@ -16,7 +16,7 @@ SUBDIR+= libssp
 SUBDIR+= tests
 .endif
 
-.if ${MK_GDB} != no
+.if ${MK_GDB} != no || ${MK_NTP} != no
 SUBDIR+=   libreadline
 .endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283511 - head/sys/opencrypto

2015-05-25 Thread Bjoern A. Zeeb

 On 25 May 2015, at 01:31 , Mark Johnston ma...@freebsd.org wrote:
 
 Author: markj
 Date: Mon May 25 01:31:39 2015
 New Revision: 283511
 URL: https://svnweb.freebsd.org/changeset/base/283511
 
 Log:
  Use the correct number of arguments for the
  opencrypto:deflate:deflate_global:bad DTrace probe, which is defined to
  have

Once upon a time, these expended to exactly the same if my memory doesn’t
fool me.  Thanks for cleaning up though!


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

Re: svn commit: r283469 - head/sys/compat/linux

2015-05-25 Thread John Baldwin
On Sunday, May 24, 2015 05:40:14 PM Dmitry Chagin wrote:
 Author: dchagin
 Date: Sun May 24 17:40:14 2015
 New Revision: 283469
 URL: https://svnweb.freebsd.org/changeset/base/283469
 
 Log:
   As fo_fill_kinfo() does not check fo_fill_kinfo to NULL
   add a fo_fill_kinfo op to eventfdops.

Yes, it is mandatory on purpose. :)

Can you add a new KF_* file type (you can just call it eventfd in case we
decide to grow a native eventfd)?  Can you also add any meaningful data to
the record that is exported to userland (e.g. old POSIX semaphores export
their current count value) and update libprocstat/procstat/fstat to handle
this file type?

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


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

2015-05-25 Thread John Baldwin
On Sunday, May 24, 2015 11:24:15 AM Alexander V. Chernikov wrote:
 Author: melifaro
 Date: Sun May 24 11:24:14 2015
 New Revision: 283364
 URL: https://svnweb.freebsd.org/changeset/base/283364
 
 Log:
   Fix SIOCGI2C structure requirement.
   
   In reality, SIOCGI2C ioctl requires struct ifreq as many other
   ioctls. Doing copyin() on (significantly) larger struct ifstat sometimes
   triggered EFAULT.
   
   Reported by:Olivier Cochard-Labbé olivier at cochard.me
   MFC after:  1 week

Note that this breaks the ABI.  You may wish to add a SIOCGI2C_OLD that
still uses the larger struct so that old programs continue to work.  OTOH,
they were only working by accident before.  If we expect that no code
outside of ifconfig is using this yet, then it is probably ok to let this
slide.

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


Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread John Baldwin
On Saturday, May 23, 2015 10:28:59 PM Andrew Turner wrote:
 Author: andrew
 Date: Sat May 23 22:28:59 2015
 New Revision: 283331
 URL: https://svnweb.freebsd.org/changeset/base/283331
 
 Log:
   Use the wait-for-event instruction to put the core we have just enabled
   to sleep while it waits to start scheduling. The boot core can then use
   the send-event instruction to wake the cores when they should enter the
   scheduler.
   
   MFC after:  1 week
 
 Modified:
   head/sys/arm/arm/mp_machdep.c
 
 Modified: head/sys/arm/arm/mp_machdep.c
 ==
 --- head/sys/arm/arm/mp_machdep.c Sat May 23 21:58:41 2015
 (r283330)
 +++ head/sys/arm/arm/mp_machdep.c Sat May 23 22:28:59 2015
 (r283331)
 @@ -185,8 +185,11 @@ init_secondary(int cpu)
   atomic_add_rel_32(mp_naps, 1);
  
   /* Spin until the BSP releases the APs */
 - while (!aps_ready)
 - ;
 + while (!atomic_load_acq_int(aps_ready)) {
 +#if __ARM_ARCH = 7
 + __asm __volatile(wfe);
 +#endif
 + }

I don't know that this atomic load acquire is really changing
anything here?  Since aps_ready is volatile reading it should
already be atomic on each check around the loop.

   /* Initialize curthread */
   KASSERT(PCPU_GET(idlethread) != NULL, (no idle thread));
 @@ -353,6 +356,10 @@ release_aps(void *dummy __unused)
   arm_unmask_irq(i);
   }
   atomic_store_rel_int(aps_ready, 1);
 + /* Wake the other threads up */
 +#if __ARM_ARCH = 7
 + armv7_sev();
 +#endif

So I'm not at all familiar with these instructions or what they do,
but are the events level triggered?  In particular, is there any
sort of race where the sev might arrive in between the check of
aps_ready and the wfe on an AP?  (For example, if wfe/sev were
similar to using mwait on x86 for wfe and a memory write for sev,
x86 would require a call to monitor before doing a check of
aps_ready to handle the race like so:

while (!aps_ready) {
monitor(aps_ready);
if (!aps_ready)
mwait();
}

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


svn commit: r283524 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-05-25 Thread Andriy Gapon
Author: avg
Date: Mon May 25 11:48:15 2015
New Revision: 283524
URL: https://svnweb.freebsd.org/changeset/base/283524

Log:
  dsl_dataset_promote_check: ensure that shared snaps do not become too long
  
  ... after they are transfered from the old origin to the new one.
  
  See:  https://www.illumos.org/issues/5909
  See:  https://reviews.csiden.org/r/219/
  
  Reviewed by:  mahrens
  MFC after:10 days
  Sponsored by: ClusterHQ

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c   Mon May 
25 11:36:14 2015(r283523)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c   Mon May 
25 11:48:15 2015(r283524)
@@ -2161,12 +2161,14 @@ dsl_dataset_promote_check(void *arg, dmu
int err;
uint64_t unused;
uint64_t ss_mv_cnt;
+   size_t max_snap_len;
 
err = promote_hold(ddpa, dp, FTAG);
if (err != 0)
return (err);
 
hds = ddpa-ddpa_clone;
+   max_snap_len = MAXNAMELEN - strlen(ddpa-ddpa_clonename) - 1;
 
if (dsl_dataset_phys(hds)-ds_flags  DS_FLAG_NOPROMOTE) {
promote_rele(ddpa, FTAG);
@@ -2230,6 +2232,10 @@ dsl_dataset_promote_check(void *arg, dmu
 
/* Check that the snapshot name does not conflict */
VERIFY0(dsl_dataset_get_snapname(ds));
+   if (strlen(ds-ds_snapname) = max_snap_len) {
+   err = SET_ERROR(ENAMETOOLONG);
+   goto out;
+   }
err = dsl_dataset_snap_lookup(hds, ds-ds_snapname, val);
if (err == 0) {
(void) strcpy(ddpa-err_ds, snap-ds-ds_snapname);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet

2015-05-25 Thread George Neville-Neil



On 24 May 2015, at 22:50, Julian Elischer wrote:


On 5/24/15 9:24 PM, George Neville-Neil wrote:


On 23 May 2015, at 17:59, hiren panchasara wrote:


On 04/29/15 at 05:19P, George V. Neville-Neil wrote:

Author: gnn
Date: Wed Apr 29 17:19:55 2015
New Revision: 282240
URL: https://svnweb.freebsd.org/changeset/base/282240

Log:
Brief demo script showing the various values that can be read via
the new SIFTR statically defined tracepoint (SDT).

Differential Revision:  https://reviews.freebsd.org/D2387
Reviewed by:bz, markj

Modified:
head/cddl/lib/libdtrace/tcp.d
head/sys/netinet/in_kdtrace.c
head/sys/netinet/in_kdtrace.h
head/sys/netinet/siftr.c

George,

This seems useful. Can this be MFC'd to 10?

I think it can be.  I'll mark this and do it when I'm back from 
holiday.  Nag me if I forget :-)


Best,
George



George.. check out this script to make MFCs to 10 an absolute snap..

instead of being a worrying operation, it's a few keystrokes...
 http://www.freebsd.org/~julian/MFC-10.sh
credits to Bapt for the original (ports) idea.


Thanks!

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


Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread Andrew Turner
On Mon, 25 May 2015 07:23:28 -0400
John Baldwin j...@freebsd.org wrote:

 On Saturday, May 23, 2015 10:28:59 PM Andrew Turner wrote:
  Author: andrew
  Date: Sat May 23 22:28:59 2015
  New Revision: 283331
  URL: https://svnweb.freebsd.org/changeset/base/283331
  
  Log:
Use the wait-for-event instruction to put the core we have just
  enabled to sleep while it waits to start scheduling. The boot core
  can then use the send-event instruction to wake the cores when they
  should enter the scheduler.

MFC after:1 week
  
  Modified:
head/sys/arm/arm/mp_machdep.c
  
  Modified: head/sys/arm/arm/mp_machdep.c
  ==
  --- head/sys/arm/arm/mp_machdep.c   Sat May 23 21:58:41
  2015(r283330) +++ head/sys/arm/arm/mp_machdep.c Sat
  May 23 22:28:59 2015(r283331) @@ -185,8 +185,11 @@
  init_secondary(int cpu) atomic_add_rel_32(mp_naps, 1);
   
  /* Spin until the BSP releases the APs */
  -   while (!aps_ready)
  -   ;
  +   while (!atomic_load_acq_int(aps_ready)) {
  +#if __ARM_ARCH = 7
  +   __asm __volatile(wfe);
  +#endif
  +   }
 
 I don't know that this atomic load acquire is really changing
 anything here?  Since aps_ready is volatile reading it should
 already be atomic on each check around the loop.

It's also adding acquire semantics to ensure we don't
incorrectly reorder memory operations across the call.

 
  /* Initialize curthread */
  KASSERT(PCPU_GET(idlethread) != NULL, (no idle thread));
  @@ -353,6 +356,10 @@ release_aps(void *dummy __unused)
  arm_unmask_irq(i);
  }
  atomic_store_rel_int(aps_ready, 1);
  +   /* Wake the other threads up */
  +#if __ARM_ARCH = 7
  +   armv7_sev();
  +#endif
 
 So I'm not at all familiar with these instructions or what they do,
 but are the events level triggered?  In particular, is there any
 sort of race where the sev might arrive in between the check of
 aps_ready and the wfe on an AP?  (For example, if wfe/sev were
 similar to using mwait on x86 for wfe and a memory write for sev,
 x86 would require a call to monitor before doing a check of
 aps_ready to handle the race like so:
 
   while (!aps_ready) {
   monitor(aps_ready);
   if (!aps_ready)
   mwait();
   }
 

The armv7_sev function includes a barrier to ensure any previous memory
operations have been flushed to cache before we send the event. The sev
instruction then sets the event register in every processor.

The wfe instruction will check this event register and, if it is unset,
it the processor can then enter a low power mode. From my reading of
the documentation, if an event has been signalled before executing the
wfe then the instruction is a nop so will exit the loop as the new
value of aps_ready will be visible on all processors.

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


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread John Baldwin
On Sunday, May 24, 2015 04:07:12 PM Dmitry Chagin wrote:
 Author: dchagin
 Date: Sun May 24 16:07:11 2015
 New Revision: 283424
 URL: https://svnweb.freebsd.org/changeset/base/283424
 
 Log:
   Add preliminary support for x86-64 Linux binaries.
   
   Differential Revision:  https://reviews.freebsd.org/D1076
 
 Added:
   head/sys/amd64/linux/
   head/sys/amd64/linux/Makefile   (contents, props changed)
   head/sys/amd64/linux/linux.h   (contents, props changed)
   head/sys/amd64/linux/linux_dummy.c   (contents, props changed)
   head/sys/amd64/linux/linux_genassym.c   (contents, props changed)
   head/sys/amd64/linux/linux_ipc64.h   (contents, props changed)
   head/sys/amd64/linux/linux_locore.s   (contents, props changed)
   head/sys/amd64/linux/linux_machdep.c   (contents, props changed)
   head/sys/amd64/linux/linux_support.s   (contents, props changed)
   head/sys/amd64/linux/linux_sysvec.c   (contents, props changed)
   head/sys/amd64/linux/linux_vdso.lds.s   (contents, props changed)
   head/sys/amd64/linux/syscalls.conf   (contents, props changed)
   head/sys/amd64/linux/syscalls.master   (contents, props changed)
   head/sys/modules/linux64/
   head/sys/modules/linux64/Makefile   (contents, props changed)

First, I'm really happy to see this land in HEAD!

Second, __FreeBSD_version bump perhaps?

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


svn commit: r283525 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2015-05-25 Thread Andriy Gapon
Author: avg
Date: Mon May 25 11:56:57 2015
New Revision: 283525
URL: https://svnweb.freebsd.org/changeset/base/283525

Log:
  zfs: fixes for a full stream received into an existing dataset
  
  - this should fail early unless the force flag is set
  - if the force flag is set then any local modifications including
snapshots should be undone
  
  See:  https://www.illumos.org/issues/5912
  See:  https://reviews.csiden.org/r/220/
  
  Reviewed by:  mahrens, Paul Dagnelie p...@delphix.com
  MFC after:15 days
  Sponsored by: ClusterHQ

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Mon May 
25 11:48:15 2015(r283524)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c  Mon May 
25 11:56:57 2015(r283525)
@@ -983,10 +983,12 @@ recv_begin_check_existing_impl(dmu_recv_
 
dsl_dataset_rele(snap, FTAG);
} else {
-   /* if full, most recent snapshot must be $ORIGIN */
-   if (dsl_dataset_phys(ds)-ds_prev_snap_txg = TXG_INITIAL)
-   return (SET_ERROR(ENODEV));
-   drba-drba_snapobj = dsl_dataset_phys(ds)-ds_prev_snap_obj;
+   /* if full, then must be forced */
+   if (!drba-drba_cookie-drc_force)
+   return (SET_ERROR(EEXIST));
+   /* start from $ORIGIN@$ORIGIN, if supported */
+   drba-drba_snapobj = dp-dp_origin_snap != NULL ?
+   dp-dp_origin_snap-ds_object : 0;
}
 
return (0);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283517 - head/gnu/lib

2015-05-25 Thread Ed Maste
On 25 May 2015 at 06:51, Mark Murray ma...@freebsd.org wrote:
 Author: markm
 Date: Mon May 25 10:51:40 2015
 New Revision: 283517
 URL: https://svnweb.freebsd.org/changeset/base/283517

 Log:
   Unbreak build where WANT_GDB == no', as libreadline is also used by ntpdc.

This is fine as a build fix, but ntpdc links against both libedit and
libreadline which seems like a bug. Once that's addressed (dropping
the libreadline dependency) we can revert this change.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeDy...

2015-05-25 Thread Dimitry Andric
/R600ISelLowering.cpp
  head/contrib/llvm/lib/Target/R600/R600Instructions.td
  head/contrib/llvm/lib/Target/R600/SIAnnotateControlFlow.cpp
  head/contrib/llvm/lib/Target/R600/SIDefines.h
  head/contrib/llvm/lib/Target/R600/SIFoldOperands.cpp
  head/contrib/llvm/lib/Target/R600/SIISelLowering.cpp
  head/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp
  head/contrib/llvm/lib/Target/R600/SIInstrFormats.td
  head/contrib/llvm/lib/Target/R600/SIInstrInfo.cpp
  head/contrib/llvm/lib/Target/R600/SIInstrInfo.h
  head/contrib/llvm/lib/Target/R600/SIInstrInfo.td
  head/contrib/llvm/lib/Target/R600/SIInstructions.td
  head/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp
  head/contrib/llvm/lib/Target/R600/SIRegisterInfo.cpp
  head/contrib/llvm/lib/Target/R600/SIRegisterInfo.h
  head/contrib/llvm/lib/Target/R600/SIRegisterInfo.td
  head/contrib/llvm/lib/Target/R600/VIInstrFormats.td
  head/contrib/llvm/lib/Target/R600/VIInstructions.td
  head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
  head/contrib/llvm/lib/Target/X86/X86FrameLowering.h
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm/lib/Target/X86/X86InstrControl.td
  head/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h
  head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp
  head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
  head/contrib/llvm/patches/README.TXT
  head/contrib/llvm/patches/patch-01-freebsd-kprintf.diff
  head/contrib/llvm/patches/patch-07-llvm-r227752-boot2-shrink.diff
  head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
  head/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h
  head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h
  head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h
  head/contrib/llvm/tools/clang/include/clang/Sema/Template.h
  head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp
  head/contrib/llvm/tools/clang/lib/AST/Decl.cpp
  head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp
  head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp
  head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  head/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp
  head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp
  head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
  head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp
  head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp
  head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp
  head/etc/mtree/BSD.debug.dist
  head/etc/mtree/BSD.usr.dist
  head/lib/clang/include/Makefile
  head/lib/clang/include/clang/Basic/Version.inc
  head/lib/clang/include/clang/Config/config.h
  head/lib/clang/include/llvm/Config/config.h
  head/lib/clang/include/llvm/Config/llvm-config.h
  head/lib/libclang_rt/Makefile.inc
  head/sys/sys/param.h
  head/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  head/contrib/llvm/   (props changed)
  head/contrib/llvm/tools/clang/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon May 25 11:56:57 2015(r283525)
+++ head/ObsoleteFiles.inc  Mon May 25 13:43:03 2015(r283526)
@@ -38,6 +38,67 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20150525: new clang import which bumps version from 3.6.0 to 3.6.1.
+OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/altivec.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/cpuid.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/fmaintrin.h

svn commit: r283527 - in head/sys: dev/ath dev/bwi dev/bwn dev/if_ndis dev/ipw dev/iwi dev/iwn dev/malo dev/mwl dev/ral dev/usb/wlan dev/wi dev/wpi dev/wtap dev/wtap/wtap_hal net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 13:51:13 2015
New Revision: 283527
URL: https://svnweb.freebsd.org/changeset/base/283527

Log:
  Make net80211 drivers supply their device name to the net80211 layer, so
  that the latter doesn't need to go through struct ifnet to get their name.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/ral/rt2560.c
  head/sys/dev/ral/rt2661.c
  head/sys/dev/ral/rt2860.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wtap/if_wtap.c
  head/sys/dev/wtap/if_wtapvar.h
  head/sys/dev/wtap/wtap_hal/hal.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/ath/if_ath.c   Mon May 25 13:51:13 2015(r283527)
@@ -592,6 +592,7 @@ ath_attach(u_int16_t devid, struct ath_s
goto bad;
}
ic = ifp-if_l2com;
+   ic-ic_name = device_get_nameunit(sc-sc_dev);
 
/* set these up early for if_printf use */
if_initname(ifp, device_get_name(sc-sc_dev),

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/bwi/if_bwi.c   Mon May 25 13:51:13 2015(r283527)
@@ -507,6 +507,7 @@ bwi_attach(struct bwi_softc *sc)
ieee80211_init_channels(ic, NULL, bands);
 
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(dev);
ic-ic_caps = IEEE80211_C_STA |
  IEEE80211_C_SHSLOT |
  IEEE80211_C_SHPREAMBLE |

Modified: head/sys/dev/bwn/if_bwn.c
==
--- head/sys/dev/bwn/if_bwn.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/bwn/if_bwn.c   Mon May 25 13:51:13 2015(r283527)
@@ -1058,6 +1058,7 @@ bwn_attach_post(struct bwn_softc *sc)
 
ic = ifp-if_l2com;
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(sc-sc_dev);
/* XXX not right but it's not used anywhere important */
ic-ic_phytype = IEEE80211_T_OFDM;
ic-ic_opmode = IEEE80211_M_STA;

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Mon May 25 13:43:03 2015
(r283526)
+++ head/sys/dev/if_ndis/if_ndis.c  Mon May 25 13:51:13 2015
(r283527)
@@ -738,6 +738,7 @@ ndis_attach(dev)
 
ifp-if_ioctl = ndis_ioctl_80211;
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_DS;
ic-ic_caps = IEEE80211_C_8023ENCAP |

Modified: head/sys/dev/ipw/if_ipw.c
==
--- head/sys/dev/ipw/if_ipw.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/ipw/if_ipw.c   Mon May 25 13:51:13 2015(r283527)
@@ -286,6 +286,7 @@ ipw_attach(device_t dev)
IFQ_SET_READY(ifp-if_snd);
 
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_DS;
 

Modified: head/sys/dev/iwi/if_iwi.c
==
--- head/sys/dev/iwi/if_iwi.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/iwi/if_iwi.c   Mon May 25 13:51:13 2015(r283527)
@@ -364,6 +364,7 @@ iwi_attach(device_t dev)
IFQ_SET_READY(ifp-if_snd);
 
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */
 

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon May 25 13:43:03 2015(r283526)
+++ head/sys/dev/iwn/if_iwn.c   Mon May 25 13:51:13 2015(r283527)
@@ -556,6 +556,7 @@ iwn_attach(device_t dev)
 
ic = ifp-if_l2com;
ic-ic_ifp = ifp;
+   ic-ic_name = device_get_nameunit(dev);
ic-ic_phytype = IEEE80211_T_OFDM;  /* not only, but not 

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

2015-05-25 Thread Alexander V . Chernikov
25.05.2015, 14:45, John Baldwin j...@freebsd.org:
 On Sunday, May 24, 2015 11:24:15 AM Alexander V. Chernikov wrote:
  Author: melifaro
  Date: Sun May 24 11:24:14 2015
  New Revision: 283364
  URL: https://svnweb.freebsd.org/changeset/base/283364

  Log:
    Fix SIOCGI2C structure requirement.

    In reality, SIOCGI2C ioctl requires struct ifreq as many other
    ioctls. Doing copyin() on (significantly) larger struct ifstat sometimes
    triggered EFAULT.

    Reported by: Olivier Cochard-Labbé olivier at cochard.me
    MFC after: 1 week

 Note that this breaks the ABI.  You may wish to add a SIOCGI2C_OLD that
In general, yes. Since this was not merged to -stable and I'm mostly sure that 
ifconfig
is the only user - this is most likely OK.
 still uses the larger struct so that old programs continue to work.  OTOH,
 they were only working by accident before.  If we expect that no code
Well, yes. I'm wondering why this worked at all (copyout tried to get 8XX bytes 
instead of 32).
 outside of ifconfig is using this yet, then it is probably ok to let this
 slide.

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

svn commit: r283529 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 14:30:44 2015
New Revision: 283529
URL: https://svnweb.freebsd.org/changeset/base/283529

Log:
  Use name from ieee80211com instead of parent ifnet, in debugging printfs.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_ddb.c
  head/sys/net80211/ieee80211_dfs.c
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_node.c
  head/sys/net80211/ieee80211_proto.c
  head/sys/net80211/ieee80211_radiotap.c
  head/sys/net80211/ieee80211_regdomain.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211.c
==
--- head/sys/net80211/ieee80211.c   Mon May 25 14:12:50 2015
(r283528)
+++ head/sys/net80211/ieee80211.c   Mon May 25 14:30:44 2015
(r283529)
@@ -35,9 +35,10 @@ __FBSDID($FreeBSD$);
 #include sys/param.h
 #include sys/systm.h
 #include sys/kernel.h
-
 #include sys/socket.h
 
+#include machine/stdarg.h
+
 #include net/if.h
 #include net/if_var.h
 #include net/if_dl.h
@@ -267,7 +268,20 @@ static void
 null_update_chw(struct ieee80211com *ic)
 {
 
-   if_printf(ic-ic_ifp, %s: need callback\n, __func__);
+   ic_printf(ic, %s: need callback\n, __func__);
+}
+
+int
+ic_printf(struct ieee80211com *ic, const char * fmt, ...)
+{ 
+   va_list ap;
+   int retval;
+
+   retval = printf(%s: , ic-ic_name);
+   va_start(ap, fmt);
+   retval += vprintf(fmt, ap);
+   va_end(ap);  
+   return (retval);
 }
 
 /*
@@ -284,8 +298,8 @@ ieee80211_ifattach(struct ieee80211com *
 
KASSERT(ifp-if_type == IFT_IEEE80211, (if_type %d, ifp-if_type));
 
-   IEEE80211_LOCK_INIT(ic, ifp-if_xname);
-   IEEE80211_TX_LOCK_INIT(ic, ifp-if_xname);
+   IEEE80211_LOCK_INIT(ic, ic-ic_name);
+   IEEE80211_TX_LOCK_INIT(ic, ic-ic_name);
TAILQ_INIT(ic-ic_vaps);
 
/* Create a taskqueue for all state changes */
@@ -427,7 +441,7 @@ ieee80211_vap_setup(struct ieee80211com 
 
ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
-   if_printf(ic-ic_ifp, %s: unable to allocate ifnet\n,
+   ic_printf(ic, %s: unable to allocate ifnet\n,
__func__);
return ENOMEM;
}
@@ -551,7 +565,7 @@ ieee80211_vap_attach(struct ieee80211vap
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
%s: %s parent %s flags 0x%x flags_ext 0x%x\n,
__func__, ieee80211_opmode_name[vap-iv_opmode],
-   ic-ic_ifp-if_xname, vap-iv_flags, vap-iv_flags_ext);
+   ic-ic_name, vap-iv_flags, vap-iv_flags_ext);
 
/*
 * Do late attach work that cannot happen until after
@@ -608,7 +622,7 @@ ieee80211_vap_detach(struct ieee80211vap
 
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, %s: %s parent %s\n,
__func__, ieee80211_opmode_name[vap-iv_opmode],
-   ic-ic_ifp-if_xname);
+   ic-ic_name);
 
/* NB: bpfdetach is called by ether_ifdetach and claims all taps */
ether_ifdetach(ifp);
@@ -900,7 +914,7 @@ int
 ieee80211_chan2ieee(struct ieee80211com *ic, const struct ieee80211_channel *c)
 {
if (c == NULL) {
-   if_printf(ic-ic_ifp, invalid channel (NULL)\n);
+   ic_printf(ic, invalid channel (NULL)\n);
return 0;   /* XXX */
}
return (c == IEEE80211_CHAN_ANYC ?  IEEE80211_CHAN_ANY : c-ic_ieee);
@@ -1169,7 +1183,6 @@ ieee80211_get_suprates(struct ieee80211c
 void
 ieee80211_announce(struct ieee80211com *ic)
 {
-   struct ifnet *ifp = ic-ic_ifp;
int i, rate, mword;
enum ieee80211_phymode mode;
const struct ieee80211_rateset *rs;
@@ -1178,7 +1191,7 @@ ieee80211_announce(struct ieee80211com *
for (mode = IEEE80211_MODE_AUTO+1; mode  IEEE80211_MODE_11NA; mode++) {
if (isclr(ic-ic_modecaps, mode))
continue;
-   if_printf(ifp, %s rates: , ieee80211_phymode_name[mode]);
+   ic_printf(ic, %s rates: , ieee80211_phymode_name[mode]);
rs = ic-ic_sup_rates[mode];
for (i = 0; i  rs-rs_nrates; i++) {
mword = ieee80211_rate2media(ic, rs-rs_rates[i], mode);

Modified: head/sys/net80211/ieee80211_ddb.c
==
--- head/sys/net80211/ieee80211_ddb.c   Mon May 25 14:12:50 2015
(r283528)
+++ head/sys/net80211/ieee80211_ddb.c   Mon May 25 14:30:44 2015
(r283529)
@@ -521,6 +521,7 @@ _db_show_com(const struct ieee80211com *
db_printf( %s(%p), vap-iv_ifp-if_xname, vap);
db_printf(\n);
db_printf(\tifp %p(%s), ic-ic_ifp, ic-ic_ifp-if_xname);
+   db_printf(\tname %s, ic-ic_name);
db_printf( comlock %p, ic-ic_comlock);
db_printf(\n);

Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread Chagin Dmitry
On Mon, May 25, 2015 at 07:48:49AM -0400, John Baldwin wrote:
 On Sunday, May 24, 2015 04:07:12 PM Dmitry Chagin wrote:
  Author: dchagin
  Date: Sun May 24 16:07:11 2015
  New Revision: 283424
  URL: https://svnweb.freebsd.org/changeset/base/283424
  
  Log:
Add preliminary support for x86-64 Linux binaries.

Differential Revision:https://reviews.freebsd.org/D1076
  
  Added:
head/sys/amd64/linux/
head/sys/amd64/linux/Makefile   (contents, props changed)
head/sys/amd64/linux/linux.h   (contents, props changed)
head/sys/amd64/linux/linux_dummy.c   (contents, props changed)
head/sys/amd64/linux/linux_genassym.c   (contents, props changed)
head/sys/amd64/linux/linux_ipc64.h   (contents, props changed)
head/sys/amd64/linux/linux_locore.s   (contents, props changed)
head/sys/amd64/linux/linux_machdep.c   (contents, props changed)
head/sys/amd64/linux/linux_support.s   (contents, props changed)
head/sys/amd64/linux/linux_sysvec.c   (contents, props changed)
head/sys/amd64/linux/linux_vdso.lds.s   (contents, props changed)
head/sys/amd64/linux/syscalls.conf   (contents, props changed)
head/sys/amd64/linux/syscalls.master   (contents, props changed)
head/sys/modules/linux64/
head/sys/modules/linux64/Makefile   (contents, props changed)
 
 First, I'm really happy to see this land in HEAD!
Thanks!

 
 Second, __FreeBSD_version bump perhaps?
dim@ bumped, is that enough?

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


svn commit: r283531 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 15:08:38 2015
New Revision: 283531
URL: https://svnweb.freebsd.org/changeset/base/283531

Log:
  Add void * member to struct ieee80211com, so that drivers can obtain their
  softc without going through the struct ifnet.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211_var.h
==
--- head/sys/net80211/ieee80211_var.h   Mon May 25 14:54:10 2015
(r283530)
+++ head/sys/net80211/ieee80211_var.h   Mon May 25 15:08:38 2015
(r283531)
@@ -117,6 +117,7 @@ struct ieee80211_frame;
 
 struct ieee80211com {
struct ifnet*ic_ifp;/* associated device */
+   void*ic_softc;  /* driver softc */
const char  *ic_name;   /* usually device name */
ieee80211_com_lock_tic_comlock; /* state update lock */
ieee80211_tx_lock_t ic_txlock;  /* ic/vap TX lock */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283479 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64

2015-05-25 Thread Chagin Dmitry
On Mon, May 25, 2015 at 11:23:02AM +0300, Konstantin Belousov wrote:
 On Sun, May 24, 2015 at 10:34:48PM +0300, Chagin Dmitry wrote:
  On Sun, May 24, 2015 at 09:25:15PM +0300, Konstantin Belousov wrote:
   On Sun, May 24, 2015 at 05:56:03PM +, Dmitry Chagin wrote:
Author: dchagin
Date: Sun May 24 17:56:02 2015
New Revision: 283479
URL: https://svnweb.freebsd.org/changeset/base/283479

Log:
  The kernel sends signals to the processes via ABI specific sv_sendsig 
method.
  Native ABI do not need signal conversion, only emulators may want 
this. Usually
  emulators implements its own sv_sendsig method. For now only ibcs2 
emulator does
  not have own sv_sendsig implementation and depends on native 
sendsig() method.
  So, remove any extra attempts to convert signal numbers from native 
sendsig()
  methods except from i386 where ibsc2 is living.

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/arm/arm/machdep.c
  head/sys/i386/i386/machdep.c
  head/sys/mips/mips/freebsd32_machdep.c
  head/sys/mips/mips/pm_machdep.c
  head/sys/powerpc/powerpc/exec_machdep.c
  head/sys/sparc64/sparc64/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Sun May 24 17:53:48 2015
(r283478)
+++ head/sys/amd64/amd64/machdep.c  Sun May 24 17:56:02 2015
(r283479)
@@ -398,10 +398,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
/* Align to 16 bytes. */
sfp = (struct sigframe *)((unsigned long)sp  ~0xFul);
 
-   /* Translate the signal if appropriate. */
-   if (p-p_sysent-sv_sigtbl  sig = p-p_sysent-sv_sigsize)
-   sig = p-p_sysent-sv_sigtbl[_SIG_IDX(sig)];
-
   Does struct sysent still need sv_sigtbl and sv_sigsize members then ?
  ubsc2 share sendsig with i386, so this members still used
 You mean, iBCS2 uses current FreeBSD signal frame layout ?
no, I mean ibsc2 uses i386 sendsig() method, unfortunatelly
I know nothing  about ibsc2.

 
 Indeed, and I do not see how this is not broken. The SysV R3 definitely
 did not knew about things like SSE or AVX, and I am sure that the layout
 of the signal frame for i386 even in its non-extended part on FreeBSD
 mutated without looking back to the iBCS2 requirements. But this is a
 different issue.
 
 That said, could iBCS2 use a wrapper around some internal variant of the
 sendsig() which would take both ksi and translated signal number ?  The
 signal number would be used to set sf_signum.
hm, ok, I write it

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


Re: svn commit: r283479 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64

2015-05-25 Thread Konstantin Belousov
On Mon, May 25, 2015 at 06:48:17PM +0300, Chagin Dmitry wrote:
 On Mon, May 25, 2015 at 11:23:02AM +0300, Konstantin Belousov wrote:
  On Sun, May 24, 2015 at 10:34:48PM +0300, Chagin Dmitry wrote:
   On Sun, May 24, 2015 at 09:25:15PM +0300, Konstantin Belousov wrote:
On Sun, May 24, 2015 at 05:56:03PM +, Dmitry Chagin wrote:
 Author: dchagin
 Date: Sun May 24 17:56:02 2015
 New Revision: 283479
 URL: https://svnweb.freebsd.org/changeset/base/283479
 
 Log:
   The kernel sends signals to the processes via ABI specific 
 sv_sendsig method.
   Native ABI do not need signal conversion, only emulators may want 
 this. Usually
   emulators implements its own sv_sendsig method. For now only ibcs2 
 emulator does
   not have own sv_sendsig implementation and depends on native 
 sendsig() method.
   So, remove any extra attempts to convert signal numbers from native 
 sendsig()
   methods except from i386 where ibsc2 is living.
 
 Modified:
   head/sys/amd64/amd64/machdep.c
   head/sys/amd64/ia32/ia32_signal.c
   head/sys/arm/arm/machdep.c
   head/sys/i386/i386/machdep.c
   head/sys/mips/mips/freebsd32_machdep.c
   head/sys/mips/mips/pm_machdep.c
   head/sys/powerpc/powerpc/exec_machdep.c
   head/sys/sparc64/sparc64/machdep.c
 
 Modified: head/sys/amd64/amd64/machdep.c
 ==
 --- head/sys/amd64/amd64/machdep.cSun May 24 17:53:48 2015
 (r283478)
 +++ head/sys/amd64/amd64/machdep.cSun May 24 17:56:02 2015
 (r283479)
 @@ -398,10 +398,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
   /* Align to 16 bytes. */
   sfp = (struct sigframe *)((unsigned long)sp  ~0xFul);
  
 - /* Translate the signal if appropriate. */
 - if (p-p_sysent-sv_sigtbl  sig = p-p_sysent-sv_sigsize)
 - sig = p-p_sysent-sv_sigtbl[_SIG_IDX(sig)];
 -
Does struct sysent still need sv_sigtbl and sv_sigsize members then ?
   ubsc2 share sendsig with i386, so this members still used
  You mean, iBCS2 uses current FreeBSD signal frame layout ?
 no, I mean ibsc2 uses i386 sendsig() method, unfortunatelly
What I stated (use of the modern FreeBSD layout for the signal frame
when delivered to iBCS2 process) is the consequence of the usage
of sendsig().

 I know nothing  about ibsc2.
 
  
  Indeed, and I do not see how this is not broken. The SysV R3 definitely
  did not knew about things like SSE or AVX, and I am sure that the layout
  of the signal frame for i386 even in its non-extended part on FreeBSD
  mutated without looking back to the iBCS2 requirements. But this is a
  different issue.
  
  That said, could iBCS2 use a wrapper around some internal variant of the
  sendsig() which would take both ksi and translated signal number ?  The
  signal number would be used to set sf_signum.
 hm, ok, I write it

I am not sure this is would be a fix of anything.  iBCS2 should grow
its own sendsig(), like svr4 and other ABIs.  I tried to find an
information for the frame layout on signal delivery for iBCS2, but
was unable to get anything.

Basically, I need sys/signal.h and machine/sigframe.h from SCO OpenServer,
or whatever the files were called there.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283536 - head/sys/dev/wpi

2015-05-25 Thread Adrian Chadd
Author: adrian
Date: Mon May 25 17:06:52 2015
New Revision: 283536
URL: https://svnweb.freebsd.org/changeset/base/283536

Log:
  Update wpi(4) to use the new mgmt RX API.

Modified:
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wpi/if_wpivar.h

Modified: head/sys/dev/wpi/if_wpi.c
==
--- head/sys/dev/wpi/if_wpi.c   Mon May 25 16:37:41 2015(r283535)
+++ head/sys/dev/wpi/if_wpi.c   Mon May 25 17:06:52 2015(r283536)
@@ -177,8 +177,9 @@ static int  wpi_add_node_entry_adhoc(stru
 static struct ieee80211_node *wpi_node_alloc(struct ieee80211vap *,
const uint8_t mac[IEEE80211_ADDR_LEN]);
 static voidwpi_node_free(struct ieee80211_node *);
-static voidwpi_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, int,
-   int);
+static voidwpi_recv_mgmt(struct ieee80211_node *, struct mbuf *, int,
+   const struct ieee80211_rx_stats *,
+   int, int);
 static voidwpi_restore_node(void *, struct ieee80211_node *);
 static voidwpi_restore_node_table(struct wpi_softc *, struct wpi_vap *);
 static int wpi_newstate(struct ieee80211vap *, enum ieee80211_state, int);
@@ -1693,15 +1694,16 @@ wpi_check_bss_filter(struct wpi_softc *s
 }
 
 static void
-wpi_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, int rssi,
-int nf)
+wpi_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype,
+const struct ieee80211_rx_stats *rxs,
+int rssi, int nf)
 {
struct ieee80211vap *vap = ni-ni_vap;
struct wpi_softc *sc = vap-iv_ic-ic_ifp-if_softc;
struct wpi_vap *wvp = WPI_VAP(vap);
uint64_t ni_tstamp, rx_tstamp;
 
-   wvp-wv_recv_mgmt(ni, m, subtype, rssi, nf);
+   wvp-wv_recv_mgmt(ni, m, subtype, rxs, rssi, nf);
 
if (vap-iv_opmode == IEEE80211_M_IBSS 
vap-iv_state == IEEE80211_S_RUN 

Modified: head/sys/dev/wpi/if_wpivar.h
==
--- head/sys/dev/wpi/if_wpivar.hMon May 25 16:37:41 2015
(r283535)
+++ head/sys/dev/wpi/if_wpivar.hMon May 25 17:06:52 2015
(r283536)
@@ -133,7 +133,9 @@ struct wpi_vap {
int (*wv_newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
void(*wv_recv_mgmt)(struct ieee80211_node *,
-   struct mbuf *, int, int, int);
+   struct mbuf *, int,
+   const struct ieee80211_rx_stats *,
+   int, int);
 };
 #defineWPI_VAP(vap)((struct wpi_vap *)(vap))
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 09:09:26 AM Ian Lepore wrote:
 On Mon, 2015-05-25 at 10:31 -0400, John Baldwin wrote:
  Mmmm, does that mean then that you can (conceivably) lose the race the other
  way where it sees ap_ready's update before it calls wfe and never calls
  wfe to harvest the event from sev?  (In practice I think this is not
  possible during boot as AP's can't get preempted and there is typically
  a long time between AP's being signalled to start and start_aps being
  set.  However, this would be a concern for use of wfe/sev for other use
  cases such as for the cpu_idle hook perhaps?)
  
 
 That's the you must be prepared to handle spurious wakeups part of the
 sev/wfe contract.  The point of WFE is only power-saving, so if your
 loop spins one time due to an unharvested prior event flag still set,
 that's deemed harmless.  (Userland is allowed to issue SEV instructions,
 which always target all cores, so there's no expectation of 1:1 relation
 between sending and waiting.)

Ok, good to know.  Thanks!

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


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 06:13:39 PM Slawa Olhovchenkov wrote:
 On Mon, May 25, 2015 at 10:40:09AM -0400, John Baldwin wrote:
 
  Some other related questions are: can we revive print/acroread now and or
  use a 64-bit flash plugin after these changes?
 
 I am still use print/acroread.
 As I know removing print/acroread irrelevant to linuxator.
 This is will by security reasson.
 I am don't open suspicious pdf from suspicious source and just ignore
 this removing.

I mean more if these updates allow us to update to a newer version of
print/acroread that would no longer be vulnerable (if such a thing exists)
whether 32- or 64-bit.

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


svn commit: r283528 - head/sys/dev/ipw

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 14:12:50 2015
New Revision: 283528
URL: https://svnweb.freebsd.org/changeset/base/283528

Log:
  Don't compare array to NULL.
  
  Found by: clang

Modified:
  head/sys/dev/ipw/if_ipw.c

Modified: head/sys/dev/ipw/if_ipw.c
==
--- head/sys/dev/ipw/if_ipw.c   Mon May 25 13:51:13 2015(r283527)
+++ head/sys/dev/ipw/if_ipw.c   Mon May 25 14:12:50 2015(r283528)
@@ -752,11 +752,8 @@ ipw_release(struct ipw_softc *sc)
}
 
if (sc-tbd_dmat != NULL) {
-   if (sc-stbd_list != NULL) {
-   bus_dmamap_unload(sc-tbd_dmat, sc-tbd_map);
-   bus_dmamem_free(sc-tbd_dmat, sc-tbd_list,
-   sc-tbd_map);
-   }
+   bus_dmamap_unload(sc-tbd_dmat, sc-tbd_map);
+   bus_dmamem_free(sc-tbd_dmat, sc-tbd_list, sc-tbd_map);
bus_dma_tag_destroy(sc-tbd_dmat);
}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread Dimitry Andric
On 25 May 2015, at 16:04, Chagin Dmitry dcha...@freebsd.org wrote:
 
 On Mon, May 25, 2015 at 07:48:49AM -0400, John Baldwin wrote:
 On Sunday, May 24, 2015 04:07:12 PM Dmitry Chagin wrote:
 Author: dchagin
 Date: Sun May 24 16:07:11 2015
 New Revision: 283424
 URL: https://svnweb.freebsd.org/changeset/base/283424
 
 Log:
  Add preliminary support for x86-64 Linux binaries.
...
 Second, __FreeBSD_version bump perhaps?
 dim@ bumped, is that enough?

I've added notes for both r283424 and r283526 to the porter's handbook:

https://svnweb.freebsd.org/doc?view=revisionrevision=46725

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


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

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 04:57:09 PM Alexander V.  Chernikov wrote:
 25.05.2015, 14:45, John Baldwin j...@freebsd.org:
  On Sunday, May 24, 2015 11:24:15 AM Alexander V. Chernikov wrote:
   Author: melifaro
   Date: Sun May 24 11:24:14 2015
   New Revision: 283364
   URL: https://svnweb.freebsd.org/changeset/base/283364
 
   Log:
 Fix SIOCGI2C structure requirement.
 
 In reality, SIOCGI2C ioctl requires struct ifreq as many other
 ioctls. Doing copyin() on (significantly) larger struct ifstat sometimes
 triggered EFAULT.
 
 Reported by: Olivier Cochard-Labbé olivier at cochard.me
 MFC after: 1 week
 
  Note that this breaks the ABI.  You may wish to add a SIOCGI2C_OLD that
 In general, yes. Since this was not merged to -stable and I'm mostly sure 
 that ifconfig
 is the only user - this is most likely OK.

Oh, the MFC after threw me off, I didn't realize it was never merged to
stable.  In that case compat is certainly not needed.

  still uses the larger struct so that old programs continue to work.  OTOH,
  they were only working by accident before.  If we expect that no code
 Well, yes. I'm wondering why this worked at all (copyout tried to get 8XX 
 bytes instead of 32).

Well, if the ifreq was on the stack there was probably space beyond it, so it
was just a buffer overrun (in effect).

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


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 05:04:21 PM Chagin Dmitry wrote:
 On Mon, May 25, 2015 at 07:48:49AM -0400, John Baldwin wrote:
  On Sunday, May 24, 2015 04:07:12 PM Dmitry Chagin wrote:
   Author: dchagin
   Date: Sun May 24 16:07:11 2015
   New Revision: 283424
   URL: https://svnweb.freebsd.org/changeset/base/283424
   
   Log:
 Add preliminary support for x86-64 Linux binaries.
 
 Differential Revision:  https://reviews.freebsd.org/D1076
   
   Added:
 head/sys/amd64/linux/
 head/sys/amd64/linux/Makefile   (contents, props changed)
 head/sys/amd64/linux/linux.h   (contents, props changed)
 head/sys/amd64/linux/linux_dummy.c   (contents, props changed)
 head/sys/amd64/linux/linux_genassym.c   (contents, props changed)
 head/sys/amd64/linux/linux_ipc64.h   (contents, props changed)
 head/sys/amd64/linux/linux_locore.s   (contents, props changed)
 head/sys/amd64/linux/linux_machdep.c   (contents, props changed)
 head/sys/amd64/linux/linux_support.s   (contents, props changed)
 head/sys/amd64/linux/linux_sysvec.c   (contents, props changed)
 head/sys/amd64/linux/linux_vdso.lds.s   (contents, props changed)
 head/sys/amd64/linux/syscalls.conf   (contents, props changed)
 head/sys/amd64/linux/syscalls.master   (contents, props changed)
 head/sys/modules/linux64/
 head/sys/modules/linux64/Makefile   (contents, props changed)
  
  First, I'm really happy to see this land in HEAD!
 Thanks!
 
  
  Second, __FreeBSD_version bump perhaps?
 dim@ bumped, is that enough?

That is fine to reuse, but it should probably be explicitly noted in the
comments for that version that it is both for clang 3.6.1 and for x86-64
Linux support.  I imagine the ports tree will know which versions include
your changes.

Also, I don't read ports commits since src is enough of a firehouse, so I
have a naive question: is the ports tree updated to supply a 64-bit
linux-base?  Maybe a mail to current@ on how to use a 64-bit base, etc.?

Some other related questions are: can we revive print/acroread now and or
use a 64-bit flash plugin after these changes?

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


Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 01:21:48 PM Andrew Turner wrote:
 On Mon, 25 May 2015 07:23:28 -0400
 John Baldwin j...@freebsd.org wrote:
 
  On Saturday, May 23, 2015 10:28:59 PM Andrew Turner wrote:
   Author: andrew
   Date: Sat May 23 22:28:59 2015
   New Revision: 283331
   URL: https://svnweb.freebsd.org/changeset/base/283331
   
   Log:
 Use the wait-for-event instruction to put the core we have just
   enabled to sleep while it waits to start scheduling. The boot core
   can then use the send-event instruction to wake the cores when they
   should enter the scheduler.
 
 MFC after:  1 week
   
   Modified:
 head/sys/arm/arm/mp_machdep.c
   
   Modified: head/sys/arm/arm/mp_machdep.c
   ==
   --- head/sys/arm/arm/mp_machdep.c Sat May 23 21:58:41
   2015  (r283330) +++ head/sys/arm/arm/mp_machdep.c Sat
   May 23 22:28:59 2015  (r283331) @@ -185,8 +185,11 @@
   init_secondary(int cpu) atomic_add_rel_32(mp_naps, 1);

 /* Spin until the BSP releases the APs */
   - while (!aps_ready)
   - ;
   + while (!atomic_load_acq_int(aps_ready)) {
   +#if __ARM_ARCH = 7
   + __asm __volatile(wfe);
   +#endif
   + }
  
  I don't know that this atomic load acquire is really changing
  anything here?  Since aps_ready is volatile reading it should
  already be atomic on each check around the loop.
 
 It's also adding acquire semantics to ensure we don't
 incorrectly reorder memory operations across the call.

I think the _rel barrier on the update to mp_naps above probably
already does that, but ok.
 
 /* Initialize curthread */
 KASSERT(PCPU_GET(idlethread) != NULL, (no idle thread));
   @@ -353,6 +356,10 @@ release_aps(void *dummy __unused)
 arm_unmask_irq(i);
 }
 atomic_store_rel_int(aps_ready, 1);
   + /* Wake the other threads up */
   +#if __ARM_ARCH = 7
   + armv7_sev();
   +#endif
  
  So I'm not at all familiar with these instructions or what they do,
  but are the events level triggered?  In particular, is there any
  sort of race where the sev might arrive in between the check of
  aps_ready and the wfe on an AP?  (For example, if wfe/sev were
  similar to using mwait on x86 for wfe and a memory write for sev,
  x86 would require a call to monitor before doing a check of
  aps_ready to handle the race like so:
  
  while (!aps_ready) {
  monitor(aps_ready);
  if (!aps_ready)
  mwait();
  }
  
 
 The armv7_sev function includes a barrier to ensure any previous memory
 operations have been flushed to cache before we send the event. The sev
 instruction then sets the event register in every processor.
 
 The wfe instruction will check this event register and, if it is unset,
 it the processor can then enter a low power mode. From my reading of
 the documentation, if an event has been signalled before executing the
 wfe then the instruction is a nop so will exit the loop as the new
 value of aps_ready will be visible on all processors.

Mmmm, does that mean then that you can (conceivably) lose the race the other
way where it sees ap_ready's update before it calls wfe and never calls
wfe to harvest the event from sev?  (In practice I think this is not
possible during boot as AP's can't get preempted and there is typically
a long time between AP's being signalled to start and start_aps being
set.  However, this would be a concern for use of wfe/sev for other use
cases such as for the cpu_idle hook perhaps?)

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


svn commit: r283533 - head/sys/dev/iwn

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 15:12:23 2015
New Revision: 283533
URL: https://svnweb.freebsd.org/changeset/base/283533

Log:
  Use ic_printf() instead of if_printf().

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon May 25 15:09:17 2015(r283532)
+++ head/sys/dev/iwn/if_iwn.c   Mon May 25 15:12:23 2015(r283533)
@@ -2536,8 +2536,7 @@ iwn_setregdomain(struct ieee80211com *ic
 
channel = iwn_find_eeprom_channel(sc, c);
if (channel == NULL) {
-   if_printf(ic-ic_ifp,
-   %s: invalid channel %u freq %u/0x%x\n,
+   ic_printf(ic, %s: invalid channel %u freq %u/0x%x\n,
__func__, c-ic_ieee, c-ic_freq, c-ic_flags);
return EINVAL;
}
@@ -4905,7 +4904,7 @@ iwn_watchdog(void *arg)
 
if (sc-sc_tx_timer  0) {
if (--sc-sc_tx_timer == 0) {
-   if_printf(ifp, device timeout\n);
+   ic_printf(ic, device timeout\n);
ieee80211_runtask(ic, sc-sc_reinit_task);
return;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread Ian Lepore
On Mon, 2015-05-25 at 10:31 -0400, John Baldwin wrote:
 On Monday, May 25, 2015 01:21:48 PM Andrew Turner wrote:
  On Mon, 25 May 2015 07:23:28 -0400
  John Baldwin j...@freebsd.org wrote:
  
   On Saturday, May 23, 2015 10:28:59 PM Andrew Turner wrote:
Author: andrew
Date: Sat May 23 22:28:59 2015
New Revision: 283331
URL: https://svnweb.freebsd.org/changeset/base/283331

Log:
  Use the wait-for-event instruction to put the core we have just
enabled to sleep while it waits to start scheduling. The boot core
can then use the send-event instruction to wake the cores when they
should enter the scheduler.
  
  MFC after:1 week

Modified:
  head/sys/arm/arm/mp_machdep.c

Modified: head/sys/arm/arm/mp_machdep.c
==
--- head/sys/arm/arm/mp_machdep.c   Sat May 23 21:58:41
2015(r283330) +++ head/sys/arm/arm/mp_machdep.c Sat
May 23 22:28:59 2015(r283331) @@ -185,8 +185,11 @@
init_secondary(int cpu) atomic_add_rel_32(mp_naps, 1);
 
/* Spin until the BSP releases the APs */
-   while (!aps_ready)
-   ;
+   while (!atomic_load_acq_int(aps_ready)) {
+#if __ARM_ARCH = 7
+   __asm __volatile(wfe);
+#endif
+   }
   
   I don't know that this atomic load acquire is really changing
   anything here?  Since aps_ready is volatile reading it should
   already be atomic on each check around the loop.
  
  It's also adding acquire semantics to ensure we don't
  incorrectly reorder memory operations across the call.
 
 I think the _rel barrier on the update to mp_naps above probably
 already does that, but ok.
  
/* Initialize curthread */
KASSERT(PCPU_GET(idlethread) != NULL, (no idle thread));
@@ -353,6 +356,10 @@ release_aps(void *dummy __unused)
arm_unmask_irq(i);
}
atomic_store_rel_int(aps_ready, 1);
+   /* Wake the other threads up */
+#if __ARM_ARCH = 7
+   armv7_sev();
+#endif
   
   So I'm not at all familiar with these instructions or what they do,
   but are the events level triggered?  In particular, is there any
   sort of race where the sev might arrive in between the check of
   aps_ready and the wfe on an AP?  (For example, if wfe/sev were
   similar to using mwait on x86 for wfe and a memory write for sev,
   x86 would require a call to monitor before doing a check of
   aps_ready to handle the race like so:
   
 while (!aps_ready) {
 monitor(aps_ready);
 if (!aps_ready)
 mwait();
 }
   
  
  The armv7_sev function includes a barrier to ensure any previous memory
  operations have been flushed to cache before we send the event. The sev
  instruction then sets the event register in every processor.
  
  The wfe instruction will check this event register and, if it is unset,
  it the processor can then enter a low power mode. From my reading of
  the documentation, if an event has been signalled before executing the
  wfe then the instruction is a nop so will exit the loop as the new
  value of aps_ready will be visible on all processors.
 
 Mmmm, does that mean then that you can (conceivably) lose the race the other
 way where it sees ap_ready's update before it calls wfe and never calls
 wfe to harvest the event from sev?  (In practice I think this is not
 possible during boot as AP's can't get preempted and there is typically
 a long time between AP's being signalled to start and start_aps being
 set.  However, this would be a concern for use of wfe/sev for other use
 cases such as for the cpu_idle hook perhaps?)
 

That's the you must be prepared to handle spurious wakeups part of the
sev/wfe contract.  The point of WFE is only power-saving, so if your
loop spins one time due to an unharvested prior event flag still set,
that's deemed harmless.  (Userland is allowed to issue SEV instructions,
which always target all cores, so there's no expectation of 1:1 relation
between sending and waiting.)

-- Ian

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


svn commit: r283535 - in head/sys: dev/ath dev/wi net80211

2015-05-25 Thread Adrian Chadd
Author: adrian
Date: Mon May 25 16:37:41 2015
New Revision: 283535
URL: https://svnweb.freebsd.org/changeset/base/283535

Log:
  Begin plumbing ieee80211_rx_stats through the receive path.
  
  Smart NICs with firmware (eg wpi, iwn, the new atheros parts, the intel 7260
  series, etc) support doing a lot of things in firmware.  This includes but
  isn't limited to things like scanning, sending probe requests and receiving
  probe responses.  However, net80211 doesn't know about any of this - it still
  drives the whole scan/probe infrastructure itself.
  
  In order to move towards suppoting smart NICs, the receive path needs to
  know about the channel/details for each received packet.  In at least
  the iwn and 7260 firmware (and I believe wpi, but I haven't tried it yet)
  it will do the scanning, power-save and off-channel buffering for you -
  all you need to do is handle receiving beacons and probe responses on
  channels that aren't what you're currently on.  However the whole receive
  path is peppered with ic-ic_curchan and manual scan/powersave handling.
  The beacon parsing code also checks ic-ic_curchan to determine if the
  received beacon is on the correct channel or not.[1]
  
  So:
  
  * add freq/ieee values to ieee80211_rx_stats;
  * change ieee80211_parse_beacon() to accept the 'current' channel
as an argument;
  * modify the iv_input() and iv_recv_mgmt() methods to include the rx_stats;
  * add a new method - ieee80211_lookup_channel_rxstats() - that looks up
a channel based on the contents of ieee80211_rx_stats;
  * if it exists, use it in the mgmt path to switch the current channel
(which still defaults to ic-ic_curchan) over to something determined
by rx_stats.
  
  This is enough to kick-start scan offload support in the Intel 7260
  driver that Rui/I are working on.  It also is a good start for scan
  offload support for a handful of existing NICs (wpi, iwn, some USB
  parts) and it'll very likely dramatically improve stability/performance
  there.  It's not the whole thing - notably, we don't need to do powersave,
  we should not scan all channels, and we should leave probe request sending
  to the firmware and not do it ourselves.  But, this allows for continued
  development on the above features whilst actually having a somewhat
  working NIC.
  
  TODO:
  
  * Finish tidying up how the net80211 input path works.
Right now ieee80211_input / ieee80211_input_all act as the top-level
that everything feeds into; it should change so the MIMO input routines
are those and the legacy routines are phased out.
  
  * The band selection should be done by the driver, not by the net80211
layer.
  
  * ieee80211_lookup_channel_rxstats() only determines 11b or 11g channels
for now - this is enough for scanning, but not 100% true in all cases.
If we ever need to handle off-channel scan support for things like
static-40MHz or static-80MHz, or turbo-G, or half/quarter rates,
then we should extend this.
  
  [1] This is a side effect of frequency-hopping and CCK modes - you
  can receive beacons when you think you're on a different channel.
  In particular, CCK (which is used by the low 11b rates, eg beacons!)
  is decodable from adjacent channels - just at a low SNR.
  FH is a side effect of having the hardware/firmware do the frequency
  hopping - it may pick up beacons transmitted from other FH networks
  that are in a different phase of hopping frequencies.

Modified:
  head/sys/dev/ath/if_ath_rx.c
  head/sys/dev/ath/if_ath_rx.h
  head/sys/dev/ath/if_athvar.h
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wi/if_wivar.h
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_adhoc.c
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_input.c
  head/sys/net80211/ieee80211_input.h
  head/sys/net80211/ieee80211_mesh.c
  head/sys/net80211/ieee80211_monitor.c
  head/sys/net80211/ieee80211_proto.h
  head/sys/net80211/ieee80211_sta.c
  head/sys/net80211/ieee80211_tdma.c
  head/sys/net80211/ieee80211_tdma.h
  head/sys/net80211/ieee80211_var.h
  head/sys/net80211/ieee80211_wds.c

Modified: head/sys/dev/ath/if_ath_rx.c
==
--- head/sys/dev/ath/if_ath_rx.cMon May 25 15:18:32 2015
(r283534)
+++ head/sys/dev/ath/if_ath_rx.cMon May 25 16:37:41 2015
(r283535)
@@ -327,7 +327,7 @@ ath_legacy_rxbuf_init(struct ath_softc *
  */
 void
 ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m,
-   int subtype, int rssi, int nf)
+   int subtype, const struct ieee80211_rx_stats *rxs, int rssi, int nf)
 {
struct ieee80211vap *vap = ni-ni_vap;
struct ath_softc *sc = vap-iv_ic-ic_ifp-if_softc;
@@ -353,7 +353,7 @@ ath_recv_mgmt(struct ieee80211_node *ni,
 * Call up first so subsequent work can use information
 * potentially stored in the node (e.g. for ibss merge).
 */
-   

Re: svn commit: r283331 - head/sys/arm/arm

2015-05-25 Thread Ian Lepore
On Mon, 2015-05-25 at 07:23 -0400, John Baldwin wrote:
 On Saturday, May 23, 2015 10:28:59 PM Andrew Turner wrote:
  Author: andrew
  Date: Sat May 23 22:28:59 2015
  New Revision: 283331
  URL: https://svnweb.freebsd.org/changeset/base/283331
  
  Log:
Use the wait-for-event instruction to put the core we have just enabled
to sleep while it waits to start scheduling. The boot core can then use
the send-event instruction to wake the cores when they should enter the
scheduler.

MFC after:1 week
  
  Modified:
head/sys/arm/arm/mp_machdep.c
  
  Modified: head/sys/arm/arm/mp_machdep.c
  ==
  --- head/sys/arm/arm/mp_machdep.c   Sat May 23 21:58:41 2015
  (r283330)
  +++ head/sys/arm/arm/mp_machdep.c   Sat May 23 22:28:59 2015
  (r283331)
  @@ -185,8 +185,11 @@ init_secondary(int cpu)
  atomic_add_rel_32(mp_naps, 1);
   
  /* Spin until the BSP releases the APs */
  -   while (!aps_ready)
  -   ;
  +   while (!atomic_load_acq_int(aps_ready)) {
  +#if __ARM_ARCH = 7
  +   __asm __volatile(wfe);
  +#endif
  +   }
 
 I don't know that this atomic load acquire is really changing
 anything here?  Since aps_ready is volatile reading it should
 already be atomic on each check around the loop.
 
  /* Initialize curthread */
  KASSERT(PCPU_GET(idlethread) != NULL, (no idle thread));
  @@ -353,6 +356,10 @@ release_aps(void *dummy __unused)
  arm_unmask_irq(i);
  }
  atomic_store_rel_int(aps_ready, 1);
  +   /* Wake the other threads up */
  +#if __ARM_ARCH = 7
  +   armv7_sev();
  +#endif
 
 So I'm not at all familiar with these instructions or what they do,
 but are the events level triggered?  In particular, is there any
 sort of race where the sev might arrive in between the check of
 aps_ready and the wfe on an AP?  (For example, if wfe/sev were
 similar to using mwait on x86 for wfe and a memory write for sev,
 x86 would require a call to monitor before doing a check of
 aps_ready to handle the race like so:
 
   while (!aps_ready) {
   monitor(aps_ready);
   if (!aps_ready)
   mwait();
   }
 

The arm send-event/wait-for-event system includes a 1-bit event latch
per core that indicates whether an event arrived since the prior wait.
The latch is checked atomically by the hardware as part of going into
low-power mode, so you can't get stuck waiting by an event-arrival race,
you just need to be prepared to handle spurious wakeups.

-- Ian

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


svn commit: r283532 - head/sys/dev/iwn

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 15:09:17 2015
New Revision: 283532
URL: https://svnweb.freebsd.org/changeset/base/283532

Log:
  Store softc in ic_softc and access it without using struct ifnet.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon May 25 15:08:38 2015(r283531)
+++ head/sys/dev/iwn/if_iwn.c   Mon May 25 15:09:17 2015(r283532)
@@ -556,6 +556,7 @@ iwn_attach(device_t dev)
 
ic = ifp-if_l2com;
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(dev);
ic-ic_phytype = IEEE80211_T_OFDM;  /* not only, but not used */
ic-ic_opmode = IEEE80211_M_STA;/* default to BSS mode */
@@ -1316,10 +1317,10 @@ iwn_vap_create(struct ieee80211com *ic, 
 const uint8_t bssid[IEEE80211_ADDR_LEN],
 const uint8_t mac[IEEE80211_ADDR_LEN])
 {
+   struct iwn_softc *sc = ic-ic_softc;
struct iwn_vap *ivp;
struct ieee80211vap *vap;
uint8_t mac1[IEEE80211_ADDR_LEN];
-   struct iwn_softc *sc = ic-ic_ifp-if_softc;
 
if (!TAILQ_EMPTY(ic-ic_vaps)) /* only one at a time */
return NULL;
@@ -2526,7 +2527,7 @@ static int
 iwn_setregdomain(struct ieee80211com *ic, struct ieee80211_regdomain *rd,
 int nchan, struct ieee80211_channel chans[])
 {
-   struct iwn_softc *sc = ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ic-ic_softc;
int i;
 
for (i = 0; i  nchan; i++) {
@@ -2798,7 +2799,7 @@ iwn_newstate(struct ieee80211vap *vap, e
 {
struct iwn_vap *ivp = IWN_VAP(vap);
struct ieee80211com *ic = vap-iv_ic;
-   struct iwn_softc *sc = ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ic-ic_softc;
int error = 0;
 
DPRINTF(sc, IWN_DEBUG_TRACE, -%s begin\n, __func__);
@@ -5248,7 +5249,7 @@ static int
 iwn_updateedca(struct ieee80211com *ic)
 {
 #define IWN_EXP2(x)((1  (x)) - 1)/* CWmin = 2^ECWmin - 1 */
-   struct iwn_softc *sc = ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ic-ic_softc;
struct iwn_edca_params cmd;
int aci;
 
@@ -7082,7 +7083,7 @@ iwn_ampdu_rx_start(struct ieee80211_node
 int baparamset, int batimeout, int baseqctl)
 {
 #define MS(_v, _f) (((_v)  _f)  _f##_S)
-   struct iwn_softc *sc = ni-ni_ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ni-ni_ic-ic_softc;
struct iwn_ops *ops = sc-ops;
struct iwn_node *wn = (void *)ni;
struct iwn_node_info node;
@@ -7118,7 +7119,7 @@ static void
 iwn_ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap)
 {
struct ieee80211com *ic = ni-ni_ic;
-   struct iwn_softc *sc = ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ic-ic_softc;
struct iwn_ops *ops = sc-ops;
struct iwn_node *wn = (void *)ni;
struct iwn_node_info node;
@@ -7146,7 +7147,7 @@ static int
 iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
 int dialogtoken, int baparamset, int batimeout)
 {
-   struct iwn_softc *sc = ni-ni_ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ni-ni_ic-ic_softc;
int qid;
 
DPRINTF(sc, IWN_DEBUG_TRACE, -Doing %s\n, __func__);
@@ -7176,7 +7177,7 @@ static int
 iwn_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
 int code, int baparamset, int batimeout)
 {
-   struct iwn_softc *sc = ni-ni_ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ni-ni_ic-ic_softc;
int qid = *(int *)tap-txa_private;
uint8_t tid = tap-txa_tid;
int ret;
@@ -7205,7 +7206,7 @@ iwn_ampdu_tx_start(struct ieee80211com *
 uint8_t tid)
 {
struct ieee80211_tx_ampdu *tap = ni-ni_tx_ampdu[tid];
-   struct iwn_softc *sc = ni-ni_ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ni-ni_ic-ic_softc;
struct iwn_ops *ops = sc-ops;
struct iwn_node *wn = (void *)ni;
struct iwn_node_info node;
@@ -7239,7 +7240,7 @@ iwn_ampdu_tx_start(struct ieee80211com *
 static void
 iwn_ampdu_tx_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap)
 {
-   struct iwn_softc *sc = ni-ni_ic-ic_ifp-if_softc;
+   struct iwn_softc *sc = ni-ni_ic-ic_softc;
struct iwn_ops *ops = sc-ops;
uint8_t tid = tap-txa_tid;
int qid;
@@ -8774,8 +8775,8 @@ static void
 iwn_scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell)
 {
struct ieee80211vap *vap = ss-ss_vap;
-   struct iwn_softc *sc = vap-iv_ic-ic_ifp-if_softc;
struct ieee80211com *ic = vap-iv_ic;
+   struct iwn_softc *sc = ic-ic_softc;
int error;
 
IWN_LOCK(sc);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to 

svn commit: r283530 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 14:54:10 2015
New Revision: 283530
URL: https://svnweb.freebsd.org/changeset/base/283530

Log:
  Remove unused include.

Modified:
  head/sys/net80211/ieee80211_radiotap.c

Modified: head/sys/net80211/ieee80211_radiotap.c
==
--- head/sys/net80211/ieee80211_radiotap.c  Mon May 25 14:30:44 2015
(r283529)
+++ head/sys/net80211/ieee80211_radiotap.c  Mon May 25 14:54:10 2015
(r283530)
@@ -43,7 +43,6 @@ __FBSDID($FreeBSD$);
 #include net/bpf.h
 #include net/if.h
 #include net/if_var.h
-#include net/if_llc.h
 #include net/if_media.h
 #include net/ethernet.h
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 10:40:09 AM John Baldwin wrote:
 On Monday, May 25, 2015 05:04:21 PM Chagin Dmitry wrote:
 That is fine to reuse, but it should probably be explicitly noted in the
 comments for that version that it is both for clang 3.6.1 and for x86-64
 Linux support.  I imagine the ports tree will know which versions include
    want to
 your changes.

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


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread Slawa Olhovchenkov
On Mon, May 25, 2015 at 10:40:09AM -0400, John Baldwin wrote:

 Some other related questions are: can we revive print/acroread now and or
 use a 64-bit flash plugin after these changes?

I am still use print/acroread.
As I know removing print/acroread irrelevant to linuxator.
This is will by security reasson.
I am don't open suspicious pdf from suspicious source and just ignore
this removing.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread Slawa Olhovchenkov
On Mon, May 25, 2015 at 12:32:41PM -0400, John Baldwin wrote:

 On Monday, May 25, 2015 06:13:39 PM Slawa Olhovchenkov wrote:
  On Mon, May 25, 2015 at 10:40:09AM -0400, John Baldwin wrote:
  
   Some other related questions are: can we revive print/acroread now and or
   use a 64-bit flash plugin after these changes?
  
  I am still use print/acroread.
  As I know removing print/acroread irrelevant to linuxator.
  This is will by security reasson.
  I am don't open suspicious pdf from suspicious source and just ignore
  this removing.
 
 I mean more if these updates allow us to update to a newer version of
 print/acroread that would no longer be vulnerable (if such a thing exists)
 whether 32- or 64-bit.

Currenly I don't see any linux in Acrobat Reader support OS: 
https://get.adobe.com/reader/otherversions/
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283537 - in head/sys/dev: ath bwi bwn if_ndis ipw iwi malo mwl ral usb/wlan wi wpi wtap

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 18:50:26 2015
New Revision: 283537
URL: https://svnweb.freebsd.org/changeset/base/283537

Log:
  Set ic_softc in all 802.11 drivers. Not required right now, but will be
  used quite soon.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/ral/rt2560.c
  head/sys/dev/ral/rt2661.c
  head/sys/dev/ral/rt2860.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wtap/if_wtap.c

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/ath/if_ath.c   Mon May 25 18:50:26 2015(r283537)
@@ -592,6 +592,7 @@ ath_attach(u_int16_t devid, struct ath_s
goto bad;
}
ic = ifp-if_l2com;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(sc-sc_dev);
 
/* set these up early for if_printf use */

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/bwi/if_bwi.c   Mon May 25 18:50:26 2015(r283537)
@@ -507,6 +507,7 @@ bwi_attach(struct bwi_softc *sc)
ieee80211_init_channels(ic, NULL, bands);
 
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(dev);
ic-ic_caps = IEEE80211_C_STA |
  IEEE80211_C_SHSLOT |

Modified: head/sys/dev/bwn/if_bwn.c
==
--- head/sys/dev/bwn/if_bwn.c   Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/bwn/if_bwn.c   Mon May 25 18:50:26 2015(r283537)
@@ -1058,6 +1058,7 @@ bwn_attach_post(struct bwn_softc *sc)
 
ic = ifp-if_l2com;
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(sc-sc_dev);
/* XXX not right but it's not used anywhere important */
ic-ic_phytype = IEEE80211_T_OFDM;

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Mon May 25 17:06:52 2015
(r283536)
+++ head/sys/dev/if_ndis/if_ndis.c  Mon May 25 18:50:26 2015
(r283537)
@@ -738,6 +738,7 @@ ndis_attach(dev)
 
ifp-if_ioctl = ndis_ioctl_80211;
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_DS;

Modified: head/sys/dev/ipw/if_ipw.c
==
--- head/sys/dev/ipw/if_ipw.c   Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/ipw/if_ipw.c   Mon May 25 18:50:26 2015(r283537)
@@ -286,6 +286,7 @@ ipw_attach(device_t dev)
IFQ_SET_READY(ifp-if_snd);
 
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_DS;

Modified: head/sys/dev/iwi/if_iwi.c
==
--- head/sys/dev/iwi/if_iwi.c   Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/iwi/if_iwi.c   Mon May 25 18:50:26 2015(r283537)
@@ -364,6 +364,7 @@ iwi_attach(device_t dev)
IFQ_SET_READY(ifp-if_snd);
 
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(dev);
ic-ic_opmode = IEEE80211_M_STA;
ic-ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */

Modified: head/sys/dev/malo/if_malo.c
==
--- head/sys/dev/malo/if_malo.c Mon May 25 17:06:52 2015(r283536)
+++ head/sys/dev/malo/if_malo.c Mon May 25 18:50:26 2015(r283537)
@@ -276,6 +276,7 @@ malo_attach(uint16_t devid, struct malo_
IFQ_SET_READY(ifp-if_snd);
 
ic-ic_ifp = ifp;
+   ic-ic_softc = sc;
ic-ic_name = device_get_nameunit(sc-malo_dev);
/* XXX not right but it's not used anywhere important */
ic-ic_phytype = IEEE80211_T_OFDM;

Modified: head/sys/dev/mwl/if_mwl.c
==
--- 

svn commit: r283540 - in head/sys: dev/ath dev/bwi dev/bwn dev/if_ndis dev/iwn dev/malo dev/mwl dev/ral dev/usb/wlan dev/wi dev/wpi dev/wtap net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 19:53:29 2015
New Revision: 283540
URL: https://svnweb.freebsd.org/changeset/base/283540

Log:
  Change three methods in struct ieee80211com, namely ic_updateslot,
  ic_update_mcast and ic_update_promisc, to pass pointer to the ieee80211com,
  not to the ifnet.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/ral/rt2560.c
  head/sys/dev/ral/rt2661.c
  head/sys/dev/ral/rt2860.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wtap/if_wtap.c
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_proto.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Mon May 25 19:48:48 2015(r283539)
+++ head/sys/dev/ath/if_ath.c   Mon May 25 19:53:29 2015(r283540)
@@ -166,9 +166,9 @@ static void ath_bmiss_proc(void *, int);
 static voidath_key_update_begin(struct ieee80211vap *);
 static voidath_key_update_end(struct ieee80211vap *);
 static voidath_update_mcast_hw(struct ath_softc *);
-static voidath_update_mcast(struct ifnet *);
-static voidath_update_promisc(struct ifnet *);
-static voidath_updateslot(struct ifnet *);
+static voidath_update_mcast(struct ieee80211com *);
+static voidath_update_promisc(struct ieee80211com *);
+static voidath_updateslot(struct ieee80211com *);
 static voidath_bstuck_proc(void *, int);
 static voidath_reset_proc(void *, int);
 static int ath_desc_alloc(struct ath_softc *);
@@ -3547,9 +3547,9 @@ ath_key_update_end(struct ieee80211vap *
 }
 
 static void
-ath_update_promisc(struct ifnet *ifp)
+ath_update_promisc(struct ieee80211com *ic)
 {
-   struct ath_softc *sc = ifp-if_softc;
+   struct ath_softc *sc = ic-ic_softc;
u_int32_t rfilt;
 
/* configure rx filter */
@@ -3611,9 +3611,9 @@ ath_update_mcast_hw(struct ath_softc *sc
  * awake before operating.
  */
 static void
-ath_update_mcast(struct ifnet *ifp)
+ath_update_mcast(struct ieee80211com *ic)
 {
-   struct ath_softc *sc = ifp-if_softc;
+   struct ath_softc *sc = ic-ic_softc;
 
ATH_LOCK(sc);
ath_power_set_power_state(sc, HAL_PM_AWAKE);
@@ -3697,10 +3697,9 @@ ath_setslottime(struct ath_softc *sc)
  * slot time based on the current setting.
  */
 static void
-ath_updateslot(struct ifnet *ifp)
+ath_updateslot(struct ieee80211com *ic)
 {
-   struct ath_softc *sc = ifp-if_softc;
-   struct ieee80211com *ic = ifp-if_l2com;
+   struct ath_softc *sc = ic-ic_softc;
 
/*
 * When not coordinating the BSS, change the hardware

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon May 25 19:48:48 2015(r283539)
+++ head/sys/dev/bwi/if_bwi.c   Mon May 25 19:53:29 2015(r283540)
@@ -113,7 +113,7 @@ static void bwi_scan_start(struct ieee80
 static voidbwi_set_channel(struct ieee80211com *);
 static voidbwi_scan_end(struct ieee80211com *);
 static int bwi_newstate(struct ieee80211vap *, enum ieee80211_state, int);
-static voidbwi_updateslot(struct ifnet *);
+static voidbwi_updateslot(struct ieee80211com *);
 static int bwi_media_change(struct ifnet *);
 
 static voidbwi_calibrate(void *);
@@ -3735,14 +3735,13 @@ bwi_set_bssid(struct bwi_softc *sc, cons
 }
 
 static void
-bwi_updateslot(struct ifnet *ifp)
+bwi_updateslot(struct ieee80211com *ic)
 {
-   struct bwi_softc *sc = ifp-if_softc;
-   struct ieee80211com *ic = ifp-if_l2com;
+   struct bwi_softc *sc = ic-ic_softc;
struct bwi_mac *mac;
 
BWI_LOCK(sc);
-   if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
+   if (ic-ic_ifp-if_drv_flags  IFF_DRV_RUNNING) {
DPRINTF(sc, BWI_DBG_80211, %s\n, __func__);
 
KASSERT(sc-sc_cur_regwin-rw_type == BWI_REGWIN_T_MAC,

Modified: head/sys/dev/bwn/if_bwn.c
==
--- head/sys/dev/bwn/if_bwn.c   Mon May 25 19:48:48 2015(r283539)
+++ head/sys/dev/bwn/if_bwn.c   Mon May 25 19:53:29 2015(r283540)
@@ -181,8 +181,8 @@ static void bwn_addchannels(struct ieee8
const struct bwn_channelinfo *, int);
 static int bwn_raw_xmit(struct ieee80211_node *, struct mbuf *,
const struct ieee80211_bpf_params 

RE: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt.

2015-05-25 Thread Cy schubert
Thanks bapt@. I will take a look after work tonight.

~Cy

-Original Message-
From: Baptiste Daroussin
Sent: 25/05/2015 12:45
To: Cy Schubert
Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; 
svn-src-head@freebsd.org
Subject: Re: svn commit: r280849 - in head: contrib/ntp 
contrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf 
contrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt...

On Mon, Mar 30, 2015 at 01:30:17PM +, Cy Schubert wrote:
 Author: cy
 Date: Mon Mar 30 13:30:15 2015
 New Revision: 280849
 URL: https://svnweb.freebsd.org/changeset/base/280849
 
 Log:
   MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
   
   Thanks to roberto for providing pointers to wedge this into HEAD.
   
   Approved by:roberto
 
Thanks for the update, but you have reintroduced overlinking of useless
libraries all over ntp.

for example with ntpdc:
The binary does not need at all to link with ncurses explicitly
The binary does not need to link with both libedit and readline (libedit is
enough and prefered)
The binary does not need to link to libmd as it does not use it.
The binary needs libcrypto but absolutly not to libssl

Also ntpdc does not build if WITHOUT_OPENSSL because in the config.h it is
hardcoded that it needs openssl, for example:
#define USE_OPENSSL_CRYPTO_RAND 1

Before the update, libmd was used for the digests functions. gGven now it is
hardcoded that openssl is required libmd should be replaced by libcrypto but
you should not have both.

I'm working on fixing the overlink, but given I know nothing about libntp's code
I will let others have a look on what to do with the MK_OPENSSL.

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


svn commit: r283539 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 19:48:48 2015
New Revision: 283539
URL: https://svnweb.freebsd.org/changeset/base/283539

Log:
  When sending RTM_IEEE80211_CSA, RTM_IEEE80211_RADAR, RTM_IEEE80211_CAC and
  RTM_IEEE80211_RADIO routing messages, broadcast them on all vap interfaces
  instead of sending them on parent.
  
  Reviewed by:  adrian
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/net80211/ieee80211_freebsd.c

Modified: head/sys/net80211/ieee80211_freebsd.c
==
--- head/sys/net80211/ieee80211_freebsd.c   Mon May 25 19:18:16 2015
(r283538)
+++ head/sys/net80211/ieee80211_freebsd.c   Mon May 25 19:48:48 2015
(r283539)
@@ -694,8 +694,9 @@ void
 ieee80211_notify_csa(struct ieee80211com *ic,
const struct ieee80211_channel *c, int mode, int count)
 {
-   struct ifnet *ifp = ic-ic_ifp;
struct ieee80211_csa_event iev;
+   struct ieee80211vap *vap;
+   struct ifnet *ifp;
 
memset(iev, 0, sizeof(iev));
iev.iev_flags = c-ic_flags;
@@ -703,42 +704,53 @@ ieee80211_notify_csa(struct ieee80211com
iev.iev_ieee = c-ic_ieee;
iev.iev_mode = mode;
iev.iev_count = count;
-   CURVNET_SET(ifp-if_vnet);
-   rt_ieee80211msg(ifp, RTM_IEEE80211_CSA, iev, sizeof(iev));
-   CURVNET_RESTORE();
+   TAILQ_FOREACH(vap, ic-ic_vaps, iv_next) {
+   ifp = vap-iv_ifp;
+   CURVNET_SET(ifp-if_vnet);
+   rt_ieee80211msg(ifp, RTM_IEEE80211_CSA, iev, sizeof(iev));
+   CURVNET_RESTORE();
+   }
 }
 
 void
 ieee80211_notify_radar(struct ieee80211com *ic,
const struct ieee80211_channel *c)
 {
-   struct ifnet *ifp = ic-ic_ifp;
struct ieee80211_radar_event iev;
+   struct ieee80211vap *vap;
+   struct ifnet *ifp;
 
memset(iev, 0, sizeof(iev));
iev.iev_flags = c-ic_flags;
iev.iev_freq = c-ic_freq;
iev.iev_ieee = c-ic_ieee;
-   CURVNET_SET(ifp-if_vnet);
-   rt_ieee80211msg(ifp, RTM_IEEE80211_RADAR, iev, sizeof(iev));
-   CURVNET_RESTORE();
+   TAILQ_FOREACH(vap, ic-ic_vaps, iv_next) {
+   ifp = vap-iv_ifp;
+   CURVNET_SET(ifp-if_vnet);
+   rt_ieee80211msg(ifp, RTM_IEEE80211_RADAR, iev, sizeof(iev));
+   CURVNET_RESTORE();
+   }
 }
 
 void
 ieee80211_notify_cac(struct ieee80211com *ic,
const struct ieee80211_channel *c, enum ieee80211_notify_cac_event type)
 {
-   struct ifnet *ifp = ic-ic_ifp;
struct ieee80211_cac_event iev;
+   struct ieee80211vap *vap;
+   struct ifnet *ifp;
 
memset(iev, 0, sizeof(iev));
iev.iev_flags = c-ic_flags;
iev.iev_freq = c-ic_freq;
iev.iev_ieee = c-ic_ieee;
iev.iev_type = type;
-   CURVNET_SET(ifp-if_vnet);
-   rt_ieee80211msg(ifp, RTM_IEEE80211_CAC, iev, sizeof(iev));
-   CURVNET_RESTORE();
+   TAILQ_FOREACH(vap, ic-ic_vaps, iv_next) {
+   ifp = vap-iv_ifp;
+   CURVNET_SET(ifp-if_vnet);
+   rt_ieee80211msg(ifp, RTM_IEEE80211_CAC, iev, sizeof(iev));
+   CURVNET_RESTORE();
+   }
 }
 
 void
@@ -782,14 +794,18 @@ ieee80211_notify_country(struct ieee8021
 void
 ieee80211_notify_radio(struct ieee80211com *ic, int state)
 {
-   struct ifnet *ifp = ic-ic_ifp;
struct ieee80211_radio_event iev;
+   struct ieee80211vap *vap;
+   struct ifnet *ifp;
 
memset(iev, 0, sizeof(iev));
iev.iev_state = state;
-   CURVNET_SET(ifp-if_vnet);
-   rt_ieee80211msg(ifp, RTM_IEEE80211_RADIO, iev, sizeof(iev));
-   CURVNET_RESTORE();
+   TAILQ_FOREACH(vap, ic-ic_vaps, iv_next) {
+   ifp = vap-iv_ifp;
+   CURVNET_SET(ifp-if_vnet);
+   rt_ieee80211msg(ifp, RTM_IEEE80211_RADIO, iev, sizeof(iev));
+   CURVNET_RESTORE();
+   }
 }
 
 void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt.

2015-05-25 Thread Baptiste Daroussin
On Mon, May 25, 2015 at 01:19:52PM -0700, Cy schubert wrote:
 Thanks bapt@. I will take a look after work tonight.
 
 ~Cy

Actually I have been able to fix all the issues, but double check never hurts :)

I have figured out that building WITHOUT_OPENSSL disables the AUTOKEY protocol
support so I bet keeping the switch in ntp makes sense (this is only used in
ntp-keygen) which is why in this makefile there is no alternative to libcrypto
with libmd, so when one will build WITHOUT_OPENSSL it will be built without the
autokey feature.

Best regards,
Bapt


pgp5FHtKGMaCy.pgp
Description: PGP signature


svn commit: r283544 - in head/sys: amd64/linux32 compat/linux i386/linux

2015-05-25 Thread Dmitry Chagin
Author: dchagin
Date: Mon May 25 20:44:46 2015
New Revision: 283544
URL: https://svnweb.freebsd.org/changeset/base/283544

Log:
  When I merged the lemul branch I missied kib@'s r282708 commit.
  This is not the final fix as I need properly cleanup thread resources
  before other threads suicide.
  
  Tested by:Ruslan Makhmatkhanov

Modified:
  head/sys/amd64/linux32/linux32_machdep.c
  head/sys/compat/linux/linux_emul.c
  head/sys/i386/linux/linux_machdep.c

Modified: head/sys/amd64/linux32/linux32_machdep.c
==
--- head/sys/amd64/linux32/linux32_machdep.cMon May 25 20:29:35 2015
(r283543)
+++ head/sys/amd64/linux32/linux32_machdep.cMon May 25 20:44:46 2015
(r283544)
@@ -126,7 +126,6 @@ int
 linux_execve(struct thread *td, struct linux_execve_args *args)
 {
struct image_args eargs;
-   struct vmspace *oldvmspace;
char *path;
int error;
 
@@ -137,19 +136,11 @@ linux_execve(struct thread *td, struct l
printf(ARGS(execve, %s), path);
 #endif
 
-   error = pre_execve(td, oldvmspace);
-   if (error != 0) {
-   free(path, M_TEMP);
-   return (error);
-   }
error = freebsd32_exec_copyin_args(eargs, path, UIO_SYSSPACE,
args-argp, args-envp);
free(path, M_TEMP);
if (error == 0)
-   error = kern_execve(td, eargs, NULL);
-   if (error == 0)
error = linux_common_execve(td, eargs);
-   post_execve(td, error, oldvmspace);
return (error);
 }
 

Modified: head/sys/compat/linux/linux_emul.c
==
--- head/sys/compat/linux/linux_emul.c  Mon May 25 20:29:35 2015
(r283543)
+++ head/sys/compat/linux/linux_emul.c  Mon May 25 20:44:46 2015
(r283544)
@@ -172,27 +172,19 @@ linux_common_execve(struct thread *td, s
 {
struct linux_pemuldata *pem;
struct epoll_emuldata *emd;
+   struct vmspace *oldvmspace;
struct linux_emuldata *em;
struct proc *p;
int error;
 
p = td-td_proc;
 
-   /*
-* Unlike FreeBSD abort all other threads before
-* proceeding exec.
-*/
-   PROC_LOCK(p);
-   /* See exit1() comments. */
-   thread_suspend_check(0);
-   while (p-p_flag  P_HADTHREADS) {
-   if (!thread_single(p, SINGLE_EXIT))
-   break;
-   thread_suspend_check(0);
-   }
-   PROC_UNLOCK(p);
+   error = pre_execve(td, oldvmspace);
+   if (error != 0)
+   return (error);
 
error = kern_execve(td, eargs, NULL);
+   post_execve(td, error, oldvmspace);
if (error != 0)
return (error);
 

Modified: head/sys/i386/linux/linux_machdep.c
==
--- head/sys/i386/linux/linux_machdep.c Mon May 25 20:29:35 2015
(r283543)
+++ head/sys/i386/linux/linux_machdep.c Mon May 25 20:44:46 2015
(r283544)
@@ -104,7 +104,6 @@ int
 linux_execve(struct thread *td, struct linux_execve_args *args)
 {
struct image_args eargs;
-   struct vmspace *oldvmspace;
char *newpath;
int error;
 
@@ -115,19 +114,11 @@ linux_execve(struct thread *td, struct l
printf(ARGS(execve, %s), newpath);
 #endif
 
-   error = pre_execve(td, oldvmspace);
-   if (error != 0) {
-   free(newpath, M_TEMP);
-   return (error);
-   }
error = exec_copyin_args(eargs, newpath, UIO_SYSSPACE,
args-argp, args-envp);
free(newpath, M_TEMP);
if (error == 0)
-   error = kern_execve(td, eargs, NULL);
-   if (error == 0)
error = linux_common_execve(td, eargs);
-   post_execve(td, error, oldvmspace);
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


RE: svn commit: r280849 - in head: contrib/ntpcontrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/confcontrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt...

2015-05-25 Thread Cy schubert
I don't have internet access at the moment, just a cell phone with really 
crappy data performance, so I'm not in the know right now. But if you don't 
mind I can make openssl a conditional.

~Cy

-Original Message-
From: Baptiste Daroussin
Sent: 25/05/2015 13:36
To: Cy schubert
Cc: Cy Schubert; src-committ...@freebsd.org; svn-src-...@freebsd.org; 
svn-src-head@freebsd.org
Subject: Re: svn commit: r280849 - in head: 
contrib/ntpcontrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff 
contrib/ntp/confcontrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers 
contrib/nt...

On Mon, May 25, 2015 at 01:19:52PM -0700, Cy schubert wrote:
 Thanks bapt@. I will take a look after work tonight.
 
 ~Cy

Actually I have been able to fix all the issues, but double check never hurts :)

I have figured out that building WITHOUT_OPENSSL disables the AUTOKEY protocol
support so I bet keeping the switch in ntp makes sense (this is only used in
ntp-keygen) which is why in this makefile there is no alternative to libcrypto
with libmd, so when one will build WITHOUT_OPENSSL it will be built without the
autokey feature.

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


Re: svn commit: r280849 - in head: contrib/ntpcontrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/confcontrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt...

2015-05-25 Thread Baptiste Daroussin
On Mon, May 25, 2015 at 02:02:07PM -0700, Cy schubert wrote:
 I don't have internet access at the moment, just a cell phone with really 
 crappy data performance, so I'm not in the know right now. But if you don't 
 mind I can make openssl a conditional.
 
 ~Cy

This is what I did, no rush, I have fixed everthing in r283542

Best regards,
Bapt


pgpEHiK2WYGcP.pgp
Description: PGP signature


svn commit: r283538 - head/sys/net80211

2015-05-25 Thread Adrian Chadd
Author: adrian
Date: Mon May 25 19:18:16 2015
New Revision: 283538
URL: https://svnweb.freebsd.org/changeset/base/283538

Log:
  Convert malloc/free back to #define's, as part of OS portability work.
  
  DragonflyBSD uses the FreeBSD wireless stack and drivers.  Their malloc()
  API is named differently, so they don't have userland/kernel symbol
  clashes like we do (think libuinet.)
  
  So, to make it easier for them and to port to other BSDs/other operating
  systems, start hiding the malloc specific bits behind defines in
  ieee80211_freebsd.h.
  
  DragonflyBSD can now put these portability defines in their local
  ieee80211_dragonflybsd.h.
  
  This should be a great big no-op for everyone running wifi.
  
  TODO:
  
  * kill M_WAITOK - some platforms just don't want you to use it
  * .. and/or handle it returning NULL rather than waiting forever.
  * MALLOC_DEFINE() ?
  * Migrate the well-known malloc names (eg M_TEMP) to net80211
namespace defines.

Modified:
  head/sys/net80211/ieee80211_acl.c
  head/sys/net80211/ieee80211_amrr.c
  head/sys/net80211/ieee80211_crypto_ccmp.c
  head/sys/net80211/ieee80211_crypto_tkip.c
  head/sys/net80211/ieee80211_crypto_wep.c
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/net80211/ieee80211_freebsd.h
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_hwmp.c
  head/sys/net80211/ieee80211_input.c
  head/sys/net80211/ieee80211_ioctl.c
  head/sys/net80211/ieee80211_mesh.c
  head/sys/net80211/ieee80211_node.c
  head/sys/net80211/ieee80211_output.c
  head/sys/net80211/ieee80211_power.c
  head/sys/net80211/ieee80211_proto.c
  head/sys/net80211/ieee80211_ratectl_none.c
  head/sys/net80211/ieee80211_regdomain.c
  head/sys/net80211/ieee80211_rssadapt.c
  head/sys/net80211/ieee80211_scan_sta.c
  head/sys/net80211/ieee80211_scan_sw.c
  head/sys/net80211/ieee80211_sta.c
  head/sys/net80211/ieee80211_superg.c
  head/sys/net80211/ieee80211_tdma.c

Modified: head/sys/net80211/ieee80211_acl.c
==
--- head/sys/net80211/ieee80211_acl.c   Mon May 25 18:50:26 2015
(r283537)
+++ head/sys/net80211/ieee80211_acl.c   Mon May 25 19:18:16 2015
(r283538)
@@ -99,8 +99,8 @@ acl_attach(struct ieee80211vap *vap)
 {
struct aclstate *as;
 
-   as = (struct aclstate *) malloc(sizeof(struct aclstate),
-   M_80211_ACL, M_NOWAIT | M_ZERO);
+   as = (struct aclstate *) IEEE80211_MALLOC(sizeof(struct aclstate),
+   M_80211_ACL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (as == NULL)
return 0;
ACL_LOCK_INIT(as, acl);
@@ -123,7 +123,7 @@ acl_detach(struct ieee80211vap *vap)
acl_free_all(vap);
vap-iv_as = NULL;
ACL_LOCK_DESTROY(as);
-   free(as, M_80211_ACL);
+   IEEE80211_FREE(as, M_80211_ACL);
 }
 
 static __inline struct acl *
@@ -147,7 +147,7 @@ _acl_free(struct aclstate *as, struct ac
 
TAILQ_REMOVE(as-as_list, acl, acl_list);
LIST_REMOVE(acl, acl_hash);
-   free(acl, M_80211_ACL);
+   IEEE80211_FREE(acl, M_80211_ACL);
as-as_nacls--;
 }
 
@@ -175,7 +175,8 @@ acl_add(struct ieee80211vap *vap, const 
struct acl *acl, *new;
int hash;
 
-   new = (struct acl *) malloc(sizeof(struct acl), M_80211_ACL, M_NOWAIT | 
M_ZERO);
+   new = (struct acl *) IEEE80211_MALLOC(sizeof(struct acl),
+   M_80211_ACL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (new == NULL) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL,
ACL: add %s failed, no memory\n, ether_sprintf(mac));
@@ -188,7 +189,7 @@ acl_add(struct ieee80211vap *vap, const 
LIST_FOREACH(acl, as-as_hash[hash], acl_hash) {
if (IEEE80211_ADDR_EQ(acl-acl_macaddr, mac)) {
ACL_UNLOCK(as);
-   free(new, M_80211_ACL);
+   IEEE80211_FREE(new, M_80211_ACL);
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL,
ACL: add %s failed, already present\n,
ether_sprintf(mac));
@@ -302,8 +303,8 @@ acl_getioctl(struct ieee80211vap *vap, s
ireq-i_len = space;/* return required space */
return 0;   /* NB: must not error */
}
-   ap = (struct ieee80211req_maclist *) malloc(space,
-   M_TEMP, M_NOWAIT);
+   ap = (struct ieee80211req_maclist *) IEEE80211_MALLOC(space,
+   M_TEMP, IEEE80211_M_NOWAIT);
if (ap == NULL)
return ENOMEM;
i = 0;
@@ -318,7 +319,7 @@ acl_getioctl(struct ieee80211vap *vap, s
ireq-i_len = space;
} else
error = copyout(ap, ireq-i_data, ireq-i_len);
-   free(ap, M_TEMP);
+   IEEE80211_FREE(ap, M_TEMP);
 

Re: svn commit: r283538 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
On Mon, May 25, 2015 at 07:18:16PM +, Adrian Chadd wrote:
A   * kill M_WAITOK - some platforms just don't want you to use it

Actually all functions called in device attach context or in
syscall context should use M_WAITOK. This makes API more robust and
simplifies code a lot.

Can we achieve portability without losing this nice feature of
FreeBSD?

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


Re: svn commit: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contrib/n

2015-05-25 Thread Baptiste Daroussin
On Mon, Mar 30, 2015 at 01:30:17PM +, Cy Schubert wrote:
 Author: cy
 Date: Mon Mar 30 13:30:15 2015
 New Revision: 280849
 URL: https://svnweb.freebsd.org/changeset/base/280849
 
 Log:
   MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
   
   Thanks to roberto for providing pointers to wedge this into HEAD.
   
   Approved by:roberto
 
Thanks for the update, but you have reintroduced overlinking of useless
libraries all over ntp.

for example with ntpdc:
The binary does not need at all to link with ncurses explicitly
The binary does not need to link with both libedit and readline (libedit is
enough and prefered)
The binary does not need to link to libmd as it does not use it.
The binary needs libcrypto but absolutly not to libssl

Also ntpdc does not build if WITHOUT_OPENSSL because in the config.h it is
hardcoded that it needs openssl, for example:
#define USE_OPENSSL_CRYPTO_RAND 1

Before the update, libmd was used for the digests functions. gGven now it is
hardcoded that openssl is required libmd should be replaced by libcrypto but
you should not have both.

I'm working on fixing the overlink, but given I know nothing about libntp's code
I will let others have a look on what to do with the MK_OPENSSL.

Best regards,
Bapt


pgpZzLZHSo_T3.pgp
Description: PGP signature


svn commit: r283542 - in head/usr.sbin/ntp: . ntp-keygen ntpd ntpdate ntpdc ntpq sntp

2015-05-25 Thread Baptiste Daroussin
Author: bapt
Date: Mon May 25 20:27:46 2015
New Revision: 283542
URL: https://svnweb.freebsd.org/changeset/base/283542

Log:
  Fix overlinking again after recent ntp updates
  Fix building WITHOUT_OPENSSL

Modified:
  head/usr.sbin/ntp/Makefile.inc
  head/usr.sbin/ntp/config.h
  head/usr.sbin/ntp/ntp-keygen/Makefile
  head/usr.sbin/ntp/ntpd/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile
  head/usr.sbin/ntp/sntp/Makefile

Modified: head/usr.sbin/ntp/Makefile.inc
==
--- head/usr.sbin/ntp/Makefile.inc  Mon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/Makefile.inc  Mon May 25 20:27:46 2015
(r283542)
@@ -11,7 +11,7 @@ NTPDEFS=   -DSYS_FREEBSD
 CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS}
 
 .if ${MK_OPENSSL} != no  !defined(RELEASE_CRUNCH)
-CFLAGS+= -DOPENSSL
+CFLAGS+= -DOPENSSL -DUSE_OPENSSL_CRYPTO_RAND -DAUTOKEY
 .endif
 
 WARNS?=0

Modified: head/usr.sbin/ntp/config.h
==
--- head/usr.sbin/ntp/config.h  Mon May 25 20:06:49 2015(r283541)
+++ head/usr.sbin/ntp/config.h  Mon May 25 20:27:46 2015(r283542)
@@ -9,7 +9,7 @@
 /* #undef ADJTIME_IS_ACCURATE */
 
 /* Support NTP Autokey protocol? */
-#define AUTOKEY 1
+/* #define AUTOKEY 1 */
 
 /* why not HAVE_P_S? */
 /* #undef CALL_PTHREAD_SETCONCURRENCY */
@@ -1578,7 +1578,7 @@ typedef unsigned int  uintptr_t;
 #define USE_FSETOWNCTTY 1
 
 /* Use OpenSSL's crypto random functions */
-#define USE_OPENSSL_CRYPTO_RAND 1
+/* #define USE_OPENSSL_CRYPTO_RAND 1 */
 
 /* OK to use snprintb()? */
 /* #undef USE_SNPRINTB */

Modified: head/usr.sbin/ntp/ntp-keygen/Makefile
==
--- head/usr.sbin/ntp/ntp-keygen/Makefile   Mon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/ntp-keygen/Makefile   Mon May 25 20:27:46 2015
(r283542)
@@ -23,7 +23,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n
 LIBADD+=   ntp opts pthread
 
 .if ${MK_OPENSSL} != no
-LIBADD+=   md crypto
+LIBADD+=   crypto
 .endif
 
 .include bsd.prog.mk

Modified: head/usr.sbin/ntp/ntpd/Makefile
==
--- head/usr.sbin/ntp/ntpd/Makefile Mon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/ntpd/Makefile Mon May 25 20:27:46 2015
(r283542)
@@ -35,10 +35,12 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n
-I${.CURDIR}/../ \
-I${.CURDIR}
 
-LIBADD=parse ntp m rt opts md pthread
+LIBADD=parse ntp m opts pthread
 
 .if ${MK_OPENSSL} != no
 LIBADD+=   crypto
+.else
+LIBADD+=   md
 .endif
 
 CLEANFILES+= .version version.c

Modified: head/usr.sbin/ntp/ntpdate/Makefile
==
--- head/usr.sbin/ntp/ntpdate/Makefile  Mon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/ntpdate/Makefile  Mon May 25 20:27:46 2015
(r283542)
@@ -14,10 +14,12 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n
-I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \
-I${.CURDIR}/../
 
-LIBADD=rt ntp m pthread
+LIBADD=ntp m pthread
 
 .if ${MK_OPENSSL} != no
-LIBADD+=   md ssl crypto
+LIBADD+=   crypto
+.else
+LIBADD+=   md
 .endif
 
 CLEANFILES+= .version version.c

Modified: head/usr.sbin/ntp/ntpdc/Makefile
==
--- head/usr.sbin/ntp/ntpdc/MakefileMon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/ntpdc/MakefileMon May 25 20:27:46 2015
(r283542)
@@ -18,12 +18,14 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n
-I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \
-I${.CURDIR}/../ -I${.CURDIR}
 
-LIBADD=edit md ntp m readline opts ncurses pthread
+LIBADD=edit ntp m opts pthread
 CFLAGS+=   -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
-I${DESTDIR}/${INCLUDEDIR}/edit
 
 .if ${MK_OPENSSL} != no
-LIBADD+=   ssl crypto
+LIBADD+=   crypto
+.else
+LIBADD+=   md
 .endif
 
 CLEANFILES+= .version version.c

Modified: head/usr.sbin/ntp/ntpq/Makefile
==
--- head/usr.sbin/ntp/ntpq/Makefile Mon May 25 20:06:49 2015
(r283541)
+++ head/usr.sbin/ntp/ntpq/Makefile Mon May 25 20:27:46 2015
(r283542)
@@ -21,10 +21,12 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/n
-I${.CURDIR}/../../../contrib/ntp/sntp/libopts \
-I${.CURDIR}/../
 
-LIBADD+=   edit md ntp opts m pthread
+LIBADD+=   edit ntp opts m pthread
 
 .if ${MK_OPENSSL} != no
-LIBADD+=   ssl crypto
+LIBADD+=   crypto
+.else
+LIBADD+=   md
 .endif
 
 CFLAGS+=   -DHAVE_LIBEDIT 

svn commit: r283543 - head/gnu/lib

2015-05-25 Thread Baptiste Daroussin
Author: bapt
Date: Mon May 25 20:29:35 2015
New Revision: 283543
URL: https://svnweb.freebsd.org/changeset/base/283543

Log:
  ntp is now again libreadline free, so only build libreadline for gdb

Modified:
  head/gnu/lib/Makefile

Modified: head/gnu/lib/Makefile
==
--- head/gnu/lib/Makefile   Mon May 25 20:27:46 2015(r283542)
+++ head/gnu/lib/Makefile   Mon May 25 20:29:35 2015(r283543)
@@ -16,7 +16,7 @@ SUBDIR+= libssp
 SUBDIR+= tests
 .endif
 
-.if ${MK_GDB} != no || ${MK_NTP} != no
+.if ${MK_GDB} != no
 SUBDIR+=   libreadline
 .endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283511 - head/sys/opencrypto

2015-05-25 Thread Mark Johnston
On Mon, May 25, 2015 at 11:26:01AM +, Bjoern A. Zeeb wrote:
 
  On 25 May 2015, at 01:31 , Mark Johnston ma...@freebsd.org wrote:
  
  Author: markj
  Date: Mon May 25 01:31:39 2015
  New Revision: 283511
  URL: https://svnweb.freebsd.org/changeset/base/283511
  
  Log:
   Use the correct number of arguments for the
   opencrypto:deflate:deflate_global:bad DTrace probe, which is defined to
   have
 
 Once upon a time, these expended to exactly the same if my memory doesn’t
 fool me.  Thanks for cleaning up though!

They still do I think. Some upcoming work on SDT will turn this sort of
discrepancy into a compile error though; this was the one occurrence of
it that I ran into.

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

svn commit: r283541 - head/sys/net80211

2015-05-25 Thread Gleb Smirnoff
Author: glebius
Date: Mon May 25 20:06:49 2015
New Revision: 283541
URL: https://svnweb.freebsd.org/changeset/base/283541

Log:
  Cleanup compat shims for FreeBSD versions that predate 10.0-RELEASE.
  There are no plans to merge anything save a trivial bugfix to stable/9.
  
  Discussed with:   adrian

Modified:
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/net80211/ieee80211_freebsd.h
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_input.c
  head/sys/net80211/ieee80211_output.c
  head/sys/net80211/ieee80211_proto.h
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211.c
==
--- head/sys/net80211/ieee80211.c   Mon May 25 19:53:29 2015
(r283540)
+++ head/sys/net80211/ieee80211.c   Mon May 25 20:06:49 2015
(r283541)
@@ -245,15 +245,9 @@ null_transmit(struct ifnet *ifp, struct 
return EACCES;  /* XXX EIO/EPERM? */
 }
 
-#if __FreeBSD_version = 131
 static int
 null_output(struct ifnet *ifp, struct mbuf *m,
const struct sockaddr *dst, struct route *ro)
-#else
-static int
-null_output(struct ifnet *ifp, struct mbuf *m,
-   struct sockaddr *dst, struct route *ro)
-#endif
 {
if_printf(ifp, discard raw packet\n);
return null_transmit(ifp, m);

Modified: head/sys/net80211/ieee80211_freebsd.c
==
--- head/sys/net80211/ieee80211_freebsd.c   Mon May 25 19:53:29 2015
(r283540)
+++ head/sys/net80211/ieee80211_freebsd.c   Mon May 25 20:06:49 2015
(r283541)
@@ -66,10 +66,8 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, C
 
 static MALLOC_DEFINE(M_80211_COM, 80211com, 802.11 com state);
 
-#if __FreeBSD_version = 120
 static const char wlanname[] = wlan;
 static struct if_clone *wlan_cloner;
-#endif
 
 /*
  * Allocate/free com structure in conjunction with ifnet;
@@ -136,18 +134,10 @@ wlan_clone_create(struct if_clone *ifc, 
if_printf(ifp, TDMA not supported\n);
return EOPNOTSUPP;
}
-#if __FreeBSD_version = 120
vap = ic-ic_vap_create(ic, wlanname, unit,
cp.icp_opmode, cp.icp_flags, cp.icp_bssid,
cp.icp_flags  IEEE80211_CLONE_MACADDR ?
cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp));
-#else
-   vap = ic-ic_vap_create(ic, ifc-ifc_name, unit,
-   cp.icp_opmode, cp.icp_flags, cp.icp_bssid,
-   cp.icp_flags  IEEE80211_CLONE_MACADDR ?
-   cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp));
-
-#endif
 
return (vap == NULL ? EIO : 0);
 }
@@ -161,19 +151,11 @@ wlan_clone_destroy(struct ifnet *ifp)
ic-ic_vap_delete(vap);
 }
 
-#if __FreeBSD_version  120
-IFC_SIMPLE_DECLARE(wlan, 0);
-#endif
-
 void
 ieee80211_vap_destroy(struct ieee80211vap *vap)
 {
CURVNET_SET(vap-iv_ifp-if_vnet);
-#if __FreeBSD_version = 120
if_clone_destroyif(wlan_cloner, vap-iv_ifp);
-#else
-   if_clone_destroyif(wlan_cloner, vap-iv_ifp);
-#endif
CURVNET_RESTORE();
 }
 
@@ -891,21 +873,13 @@ wlan_modevent(module_t mod, int type, vo
bpf_track, 0, EVENTHANDLER_PRI_ANY);
wlan_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event,
wlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
-#if __FreeBSD_version = 120
wlan_cloner = if_clone_simple(wlanname, wlan_clone_create,
wlan_clone_destroy, 0);
-#else
-   if_clone_attach(wlan_cloner);
-#endif
if_register_com_alloc(IFT_IEEE80211, wlan_alloc, wlan_free);
return 0;
case MOD_UNLOAD:
if_deregister_com_alloc(IFT_IEEE80211);
-#if __FreeBSD_version = 120
if_clone_detach(wlan_cloner);
-#else
-   if_clone_detach(wlan_cloner);
-#endif
EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent);
EVENTHANDLER_DEREGISTER(iflladdr_event, wlan_ifllevent);
return 0;
@@ -914,11 +888,7 @@ wlan_modevent(module_t mod, int type, vo
 }
 
 static moduledata_t wlan_mod = {
-#if __FreeBSD_version = 120
wlanname,
-#else
-   wlan,
-#endif
wlan_modevent,
0
 };

Modified: head/sys/net80211/ieee80211_freebsd.h
==
--- head/sys/net80211/ieee80211_freebsd.h   Mon May 25 19:53:29 2015
(r283540)
+++ head/sys/net80211/ieee80211_freebsd.h   Mon May 25 20:06:49 2015
(r283541)
@@ -234,21 +234,9 @@ struct mbuf *ieee80211_getmgtframe(uint8
 #defineM_FFM_PROTO6/* fast frame */
 #defineM_TXCB  M_PROTO7/* do tx complete 
callback */
 #defineM_AMPDU_MPDUM_PROTO8

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

2015-05-25 Thread John Baldwin
Author: jhb
Date: Mon May 25 22:13:22 2015
New Revision: 283546
URL: https://svnweb.freebsd.org/changeset/base/283546

Log:
  Add KTR tracing for some MI ptrace events.
  
  Differential Revision:https://reviews.freebsd.org/D2643
  Reviewed by:  kib

Modified:
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_fork.c
  head/sys/kern/kern_sig.c
  head/sys/kern/sys_process.c
  head/sys/sys/ktr_class.h

Modified: head/sys/kern/kern_exit.c
==
--- head/sys/kern/kern_exit.c   Mon May 25 22:12:30 2015(r283545)
+++ head/sys/kern/kern_exit.c   Mon May 25 22:13:22 2015(r283546)
@@ -525,6 +525,8 @@ exit1(struct thread *td, int rv)
 */
while ((q = LIST_FIRST(p-p_orphans)) != NULL) {
PROC_LOCK(q);
+   CTR2(KTR_PTRACE, exit: pid %d, clearing orphan %d, p-p_pid,
+   q-p_pid);
clear_orphan(q);
PROC_UNLOCK(q);
}
@@ -857,6 +859,9 @@ proc_reap(struct thread *td, struct proc
t = proc_realparent(p);
PROC_LOCK(t);
PROC_LOCK(p);
+   CTR2(KTR_PTRACE,
+   wait: traced child %d moved back to parent %d, p-p_pid,
+   t-p_pid);
proc_reparent(p, t);
p-p_oppid = 0;
PROC_UNLOCK(p);
@@ -1216,6 +1221,10 @@ loop:
PROC_UNLOCK(q);
}
 
+   CTR4(KTR_PTRACE,
+   wait: returning trapped pid %d status %#x (xstat %d) xthread %d,
+   p-p_pid, W_STOPCODE(p-p_xstat), p-p_xstat,
+   p-p_xthread != NULL ? p-p_xthread-td_tid : -1);
PROC_UNLOCK(p);
return (0);
}

Modified: head/sys/kern/kern_fork.c
==
--- head/sys/kern/kern_fork.c   Mon May 25 22:12:30 2015(r283545)
+++ head/sys/kern/kern_fork.c   Mon May 25 22:13:22 2015(r283546)
@@ -1035,6 +1035,9 @@ fork_return(struct thread *td, struct tr
dbg = p-p_pptr-p_pptr;
p-p_flag |= P_TRACED;
p-p_oppid = p-p_pptr-p_pid;
+   CTR2(KTR_PTRACE,
+   fork_return: attaching to new child pid %d: oppid %d,
+   p-p_pid, p-p_oppid);
proc_reparent(p, dbg);
sx_xunlock(proctree_lock);
td-td_dbgflags |= TDB_CHILD;

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cMon May 25 22:12:30 2015(r283545)
+++ head/sys/kern/kern_sig.cMon May 25 22:13:22 2015(r283546)
@@ -2478,6 +2478,8 @@ ptracestop(struct thread *td, int sig)
 
td-td_dbgflags |= TDB_XSIG;
td-td_xsig = sig;
+   CTR4(KTR_PTRACE, ptracestop: tid %d (pid %d) flags %#x sig %d,
+   td-td_tid, p-p_pid, td-td_dbgflags, sig);
PROC_SLOCK(p);
while ((p-p_flag  P_TRACED)  (td-td_dbgflags  TDB_XSIG)) {
if (p-p_flag  P_SINGLE_EXIT) {

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Mon May 25 22:12:30 2015(r283545)
+++ head/sys/kern/sys_process.c Mon May 25 22:13:22 2015(r283546)
@@ -432,6 +432,9 @@ ptrace_vm_entry(struct thread *td, struc
free(freepath, M_TEMP);
}
}
+   if (error == 0)
+   CTR3(KTR_PTRACE, PT_VM_ENTRY: pid %d, entry %d, start %p,
+   p-p_pid, pve-pve_entry, pve-pve_start);
 
return (error);
 }
@@ -826,6 +829,7 @@ kern_ptrace(struct thread *td, int req, 
if (p-p_flag  P_PPWAIT)
p-p_flag |= P_PPTRACE;
p-p_oppid = p-p_pptr-p_pid;
+   CTR1(KTR_PTRACE, PT_TRACE_ME: pid %d, p-p_pid);
break;
 
case PT_ATTACH:
@@ -845,17 +849,25 @@ kern_ptrace(struct thread *td, int req, 
proc_reparent(p, td-td_proc);
}
data = SIGSTOP;
+   CTR2(KTR_PTRACE, PT_ATTACH: pid %d, oppid %d, p-p_pid,
+   p-p_oppid);
goto sendsig;   /* in PT_CONTINUE below */
 
case PT_CLEARSTEP:
+   CTR2(KTR_PTRACE, PT_CLEARSTEP: tid %d (pid %d), td2-td_tid,
+   p-p_pid);
error = ptrace_clear_single_step(td2);
break;
 
case PT_SETSTEP:
+   CTR2(KTR_PTRACE, PT_SETSTEP: tid %d (pid %d), td2-td_tid,
+   p-p_pid);
error = ptrace_single_step(td2);
break;
 
case PT_SUSPEND:
+   

svn commit: r283550 - head/sys/arm/broadcom/bcm2835

2015-05-25 Thread Luiz Otavio O Souza
Author: loos
Date: Tue May 26 01:30:09 2015
New Revision: 283550
URL: https://svnweb.freebsd.org/changeset/base/283550

Log:
  Remove unused mutex and softc variables.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Tue May 26 01:09:56 
2015(r283549)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Tue May 26 01:30:09 
2015(r283550)
@@ -76,23 +76,13 @@ TUNABLE_INT(hw.bcm2835.sdhci.pio_mode,
 
 struct bcm_sdhci_softc {
device_tsc_dev;
-   struct mtx  sc_mtx;
struct resource *   sc_mem_res;
struct resource *   sc_irq_res;
bus_space_tag_t sc_bst;
bus_space_handle_t  sc_bsh;
void *  sc_intrhand;
struct mmc_request *sc_req;
-   struct mmc_data *   sc_data;
-   uint32_tsc_flags;
-#defineLPC_SD_FLAGS_IGNORECRC  (1  0)
-   int sc_xfer_direction;
-#defineDIRECTION_READ  0
-#defineDIRECTION_WRITE 1
-   int sc_xfer_done;
-   int sc_bus_busy;
struct sdhci_slot   sc_slot;
-   int sc_dma_inuse;
int sc_dma_ch;
bus_dma_tag_t   sc_dma_tag;
bus_dmamap_tsc_dma_map;
@@ -113,11 +103,6 @@ static void bcm_sdhci_intr(void *);
 static int bcm_sdhci_get_ro(device_t, device_t);
 static void bcm_sdhci_dma_intr(int ch, void *arg);
 
-#definebcm_sdhci_lock(_sc) 
\
-mtx_lock(_sc-sc_mtx);
-#definebcm_sdhci_unlock(_sc)   
\
-mtx_unlock(_sc-sc_mtx);
-
 static void
 bcm_sdhci_dmacb(void *arg, bus_dma_segment_t *segs, int nseg, int err)
 {
@@ -187,8 +172,6 @@ bcm_sdhci_attach(device_t dev)
if (bootverbose)
device_printf(dev, SDHCI frequency: %dMHz\n, default_freq);
 
-   mtx_init(sc-sc_mtx, bcm sdhci, sdhci, MTX_DEF);
-
rid = 0;
sc-sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, rid,
RF_ACTIVE);
@@ -277,7 +260,6 @@ fail:
bus_release_resource(dev, SYS_RES_IRQ, 0, sc-sc_irq_res);
if (sc-sc_mem_res)
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc-sc_mem_res);
-   mtx_destroy(sc-sc_mtx);
 
return (err);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet

2015-05-25 Thread Julian Elischer

On 5/25/15 8:27 PM, George Neville-Neil wrote:



On 24 May 2015, at 22:50, Julian Elischer wrote:


On 5/24/15 9:24 PM, George Neville-Neil wrote:


On 23 May 2015, at 17:59, hiren panchasara wrote:


On 04/29/15 at 05:19P, George V. Neville-Neil wrote:

Author: gnn
Date: Wed Apr 29 17:19:55 2015
New Revision: 282240
URL: https://svnweb.freebsd.org/changeset/base/282240

Log:
Brief demo script showing the various values that can be read via
the new SIFTR statically defined tracepoint (SDT).

Differential Revision: https://reviews.freebsd.org/D2387
Reviewed by:bz, markj

Modified:
head/cddl/lib/libdtrace/tcp.d
head/sys/netinet/in_kdtrace.c
head/sys/netinet/in_kdtrace.h
head/sys/netinet/siftr.c

George,

This seems useful. Can this be MFC'd to 10?

I think it can be.  I'll mark this and do it when I'm back from 
holiday.  Nag me if I forget :-)


Best,
George



George.. check out this script to make MFCs to 10 an absolute snap..

instead of being a worrying operation, it's a few keystrokes...
 http://www.freebsd.org/~julian/MFC-10.sh
credits to Bapt for the original (ports) idea.


you don't even need to have a tree checked out.. it does all that..



Thanks!

Best,
George




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


Re: svn commit: r280849 - in head: contrib/ntpcontrib/ntp/adjtimedcontrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/confcontrib/ntp/htmlcontrib/ntp/html/build contrib/ntp/html/drivers contrib/nt...

2015-05-25 Thread Cy Schubert
In message 20150525210441.ge39...@ivaldir.etoilebsd.net, Baptiste 
Daroussin w
rites:
 
 
 --LSp5EJdfMPwZcMS1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Mon, May 25, 2015 at 02:02:07PM -0700, Cy schubert wrote:
  I don't have internet access at the moment, just a cell phone with really=
  crappy data performance, so I'm not in the know right now. But if you don'=
 t mind I can make openssl a conditional.
 =20
  ~Cy
 
 This is what I did, no rush, I have fixed everthing in r283542

Ah yes. I see. Thank you.


-- 
Cheers,
Cy Schubert cy.schub...@komquats.com or cy.schub...@cschubert.com
FreeBSD UNIX:  c...@freebsd.org   Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


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


Re: svn commit: r283547 - head/sys/arm/conf

2015-05-25 Thread John-Mark Gurney
Ian Lepore wrote this message on Mon, May 25, 2015 at 23:27 +:
 Author: ian
 Date: Mon May 25 23:27:13 2015
 New Revision: 283547
 URL: https://svnweb.freebsd.org/changeset/base/283547
 
 Log:
   Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not
   BREAK_TO_DEBUGGER if they have a serial console (most do).  A burst of
   serial line noise (such as unplugging a usb serial adapter) can look like
   a break and drop a working system into the debugger.  The alt break sequence
   (CR~^B) works fine on both serial and non-serial consoles.

Just so you know, this removes support for video console to break into
the debugger via keyboard...  This mean ctrl-alt-esc and other key
sequences won't work anymore...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283549 - head/share/mk

2015-05-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue May 26 01:09:56 2015
New Revision: 283549
URL: https://svnweb.freebsd.org/changeset/base/283549

Log:
  Considers cases when NO_SHARED?=[no|NO] as dynamically linking
  
  This reduces overlinking for parts of the build system where NO_SHARED is
  set to no/NO

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue May 26 00:44:29 2015
(r283548)
+++ head/share/mk/src.libnames.mk   Tue May 26 01:09:56 2015
(r283549)
@@ -255,7 +255,7 @@ LDADD_${_l}?=   -lprivate${_l}
 .else
 LDADD_${_l}?=  ${LDADD_${_l}_L} -l${_l}
 .endif
-.if defined(_DP_${_l})  defined(NO_SHARED)
+.if defined(_DP_${_l})  defined(NO_SHARED)  (${NO_SHARED} != no  
${NO_SHARED} != NO)
 .for _d in ${_DP_${_l}}
 DPADD_${_l}+=  ${DPADD_${_d}}
 LDADD_${_l}+=  ${LDADD_${_d}}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r283547 - head/sys/arm/conf

2015-05-25 Thread Ian Lepore
Author: ian
Date: Mon May 25 23:27:13 2015
New Revision: 283547
URL: https://svnweb.freebsd.org/changeset/base/283547

Log:
  Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not
  BREAK_TO_DEBUGGER if they have a serial console (most do).  A burst of
  serial line noise (such as unplugging a usb serial adapter) can look like
  a break and drop a working system into the debugger.  The alt break sequence
  (CR~^B) works fine on both serial and non-serial consoles.

Modified:
  head/sys/arm/conf/ALPINE
  head/sys/arm/conf/BEAGLEBONE
  head/sys/arm/conf/CUBIEBOARD
  head/sys/arm/conf/CUBIEBOARD2
  head/sys/arm/conf/DOCKSTAR
  head/sys/arm/conf/DREAMPLUG-1001
  head/sys/arm/conf/EFIKA_MX
  head/sys/arm/conf/EXYNOS5.common
  head/sys/arm/conf/PANDABOARD
  head/sys/arm/conf/RK3188
  head/sys/arm/conf/RPI-B
  head/sys/arm/conf/RPI2
  head/sys/arm/conf/SOCKIT.common
  head/sys/arm/conf/VYBRID
  head/sys/arm/conf/ZEDBOARD

Modified: head/sys/arm/conf/ALPINE
==
--- head/sys/arm/conf/ALPINEMon May 25 22:13:22 2015(r283546)
+++ head/sys/arm/conf/ALPINEMon May 25 23:27:13 2015(r283547)
@@ -31,7 +31,7 @@ options   SMP # Enable multiple cores
 
 # Debugging
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
+optionsALT_BREAK_TO_DEBUGGER
 optionsKDB
 optionsDDB #Enable the kernel debugger
 

Modified: head/sys/arm/conf/BEAGLEBONE
==
--- head/sys/arm/conf/BEAGLEBONEMon May 25 22:13:22 2015
(r283546)
+++ head/sys/arm/conf/BEAGLEBONEMon May 25 23:27:13 2015
(r283547)
@@ -40,7 +40,7 @@ options   PLATFORM
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
+optionsALT_BREAK_TO_DEBUGGER
 #options   VERBOSE_SYSINIT # Enable verbose sysinit messages
 optionsKDB # Enable kernel debugger support
 # For minimum debugger support (stable branch) use:

Modified: head/sys/arm/conf/CUBIEBOARD
==
--- head/sys/arm/conf/CUBIEBOARDMon May 25 22:13:22 2015
(r283546)
+++ head/sys/arm/conf/CUBIEBOARDMon May 25 23:27:13 2015
(r283547)
@@ -29,7 +29,7 @@ options   SCHED_4BSD  # 4BSD scheduler
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
+optionsALT_BREAK_TO_DEBUGGER
 #options   VERBOSE_SYSINIT # Enable verbose sysinit messages
 optionsKDB # Enable kernel debugger support
 # For minimum debugger support (stable branch) use:

Modified: head/sys/arm/conf/CUBIEBOARD2
==
--- head/sys/arm/conf/CUBIEBOARD2   Mon May 25 22:13:22 2015
(r283546)
+++ head/sys/arm/conf/CUBIEBOARD2   Mon May 25 23:27:13 2015
(r283547)
@@ -30,7 +30,7 @@ options   SMP # Enable multiple cores
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
+optionsALT_BREAK_TO_DEBUGGER
 #options   VERBOSE_SYSINIT # Enable verbose sysinit messages
 optionsKDB # Enable kernel debugger support
 # For minimum debugger support (stable branch) use:

Modified: head/sys/arm/conf/DOCKSTAR
==
--- head/sys/arm/conf/DOCKSTAR  Mon May 25 22:13:22 2015(r283546)
+++ head/sys/arm/conf/DOCKSTAR  Mon May 25 23:27:13 2015(r283547)
@@ -50,7 +50,6 @@ options   _KPOSIX_PRIORITY_SCHEDULING # P
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
 optionsALT_BREAK_TO_DEBUGGER
 optionsKDB # Enable kernel debugger support
 optionsDDB # Enable the kernel debugger

Modified: head/sys/arm/conf/DREAMPLUG-1001
==
--- head/sys/arm/conf/DREAMPLUG-1001Mon May 25 22:13:22 2015
(r283546)
+++ head/sys/arm/conf/DREAMPLUG-1001Mon May 25 23:27:13 2015
(r283547)
@@ -53,7 +53,6 @@ options   _KPOSIX_PRIORITY_SCHEDULING # P
 
 # Debugging for use in -current
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
-optionsBREAK_TO_DEBUGGER
 optionsALT_BREAK_TO_DEBUGGER
 optionsKDB   

Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread John Baldwin
On Monday, May 25, 2015 08:27:34 PM Slawa Olhovchenkov wrote:
 On Mon, May 25, 2015 at 12:32:41PM -0400, John Baldwin wrote:
 
  On Monday, May 25, 2015 06:13:39 PM Slawa Olhovchenkov wrote:
   On Mon, May 25, 2015 at 10:40:09AM -0400, John Baldwin wrote:
   
Some other related questions are: can we revive print/acroread now and 
or
use a 64-bit flash plugin after these changes?
   
   I am still use print/acroread.
   As I know removing print/acroread irrelevant to linuxator.
   This is will by security reasson.
   I am don't open suspicious pdf from suspicious source and just ignore
   this removing.
  
  I mean more if these updates allow us to update to a newer version of
  print/acroread that would no longer be vulnerable (if such a thing exists)
  whether 32- or 64-bit.
 
 Currenly I don't see any linux in Acrobat Reader support OS: 
 https://get.adobe.com/reader/otherversions/

Humm, it seems it was pulled last year. :-/

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


svn commit: r283551 - head/sys/kern

2015-05-25 Thread Xin LI
Author: delphij
Date: Tue May 26 01:40:33 2015
New Revision: 283551
URL: https://svnweb.freebsd.org/changeset/base/283551

Log:
  MFuser/delphij/zfs-arc-rebase@r281754:
  
  In r256613, taskqueue_enqueue_locked() have been modified to release the
  task queue lock before returning.  In r276665, taskqueue_drain_all() will
  call taskqueue_enqueue_locked() to insert the barrier task into the queue,
  but did not reacquire the lock after it but later code expects the lock
  still being held (e.g. TQ_SLEEP()).
  
  The barrier task is special and if we release then reacquire the lock,
  there would be a small race window where a high priority task could sneak
  into the queue.  Looking more closely, the race seems to be tolerable but
  is undesirable from semantics standpoint.
  
  To solve this, in taskqueue_drain_tq_queue(), instead of directly calling
  taskqueue_enqueue_locked(), insert the barrier task directly without
  releasing the lock.

Modified:
  head/sys/kern/subr_taskqueue.c
Directory Properties:
  head/   (props changed)
  head/sys/   (props changed)

Modified: head/sys/kern/subr_taskqueue.c
==
--- head/sys/kern/subr_taskqueue.c  Tue May 26 01:30:09 2015
(r283550)
+++ head/sys/kern/subr_taskqueue.c  Tue May 26 01:40:33 2015
(r283551)
@@ -323,17 +323,16 @@ taskqueue_drain_tq_queue(struct taskqueu
return;
 
/*
-* Enqueue our barrier with the lowest possible priority
-* so we are inserted after all current tasks.
+* Enqueue our barrier after all current tasks, but with
+* the highest priority so that newly queued tasks cannot
+* pass it.  Because of the high priority, we can not use
+* taskqueue_enqueue_locked directly (which drops the lock
+* anyway) so just insert it at tail while we have the
+* queue lock.
 */
-   TASK_INIT(t_barrier, 0, taskqueue_task_nop_fn, t_barrier);
-   taskqueue_enqueue_locked(queue, t_barrier);
-
-   /*
-* Raise the barrier's priority so newly queued tasks cannot
-* pass it.
-*/
-   t_barrier.ta_priority = USHRT_MAX;
+   TASK_INIT(t_barrier, USHRT_MAX, taskqueue_task_nop_fn, t_barrier);
+   STAILQ_INSERT_TAIL(queue-tq_queue, t_barrier, ta_link);
+   t_barrier.ta_pending = 1;
 
/*
 * Once the barrier has executed, all previously queued tasks
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64

2015-05-25 Thread Bruce Simpson

All,

The enhancements to the Linux runtime are probably of more interest to 
folk porting server applications; I am particularly happy to see 
recvmmsg() and sendmmsg() go in.


It might also be wise to emulate the getrandom() API, even if this is 
only in terms of wrapping the relevant sysctl for now.


On 25/05/2015 18:27, Slawa Olhovchenkov wrote:
Currenly I don't see any linux in Acrobat Reader support OS: 
https://get.adobe.com/reader/otherversions/ 


It got pulled. Of course, support for PDF's forms varies greatly outside 
of official Adobe product.


A better alternative might be the MuPDF backend for KDE Okular, or for 
Zathura, neither of which are packaged  anywhere in the Linux world yet. 
Of course, this could be built natively, without needing the Linux 
runtime support.


I've noticed that rendering performance seems disappointing in the open 
source Linux PDF readers, as compared to OS X Preview.app on similar 
hardware.


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


svn commit: r283555 - head/sys/net80211

2015-05-25 Thread Adrian Chadd
Author: adrian
Date: Tue May 26 04:25:11 2015
New Revision: 283555
URL: https://svnweb.freebsd.org/changeset/base/283555

Log:
  Migrate the 802.11s locks out into ieee80211_freebsd.h, so they can be
  defined as platform specific bits.
  
  This is to help make OS portability easier.

Modified:
  head/sys/net80211/ieee80211_freebsd.h
  head/sys/net80211/ieee80211_mesh.c
  head/sys/net80211/ieee80211_mesh.h

Modified: head/sys/net80211/ieee80211_freebsd.h
==
--- head/sys/net80211/ieee80211_freebsd.h   Tue May 26 03:58:18 2015
(r283554)
+++ head/sys/net80211/ieee80211_freebsd.h   Tue May 26 04:25:11 2015
(r283555)
@@ -184,6 +184,27 @@ typedef struct mtx ieee80211_scan_table_
 #defineIEEE80211_SCAN_TABLE_UNLOCK(_st)
mtx_unlock((_st)-st_lock)
 
 /*
+ * Mesh node/routing definitions.
+ */
+typedef struct mtx ieee80211_rte_lock_t;
+#defineMESH_RT_ENTRY_LOCK_INIT(_rt, _name) \
+   mtx_init((rt)-rt_lock, _name, 802.11s route entry, MTX_DEF)
+#defineMESH_RT_ENTRY_LOCK_DESTROY(_rt) \
+   mtx_destroy((_rt)-rt_lock)
+#defineMESH_RT_ENTRY_LOCK(rt)  mtx_lock((rt)-rt_lock)
+#defineMESH_RT_ENTRY_LOCK_ASSERT(rt) mtx_assert((rt)-rt_lock, 
MA_OWNED)
+#defineMESH_RT_ENTRY_UNLOCK(rt)mtx_unlock((rt)-rt_lock)
+
+typedef struct mtx ieee80211_rt_lock_t;
+#defineMESH_RT_LOCK(ms)mtx_lock((ms)-ms_rt_lock)
+#defineMESH_RT_LOCK_ASSERT(ms) mtx_assert((ms)-ms_rt_lock, MA_OWNED)
+#defineMESH_RT_UNLOCK(ms)  mtx_unlock((ms)-ms_rt_lock)
+#defineMESH_RT_LOCK_INIT(ms, name) \
+   mtx_init((ms)-ms_rt_lock, name, 802.11s routing table, MTX_DEF)
+#defineMESH_RT_LOCK_DESTROY(ms) \
+   mtx_destroy((ms)-ms_rt_lock)
+
+/*
  * Node reference counting definitions.
  *
  * ieee80211_node_initref  initialize the reference count to 1

Modified: head/sys/net80211/ieee80211_mesh.c
==
--- head/sys/net80211/ieee80211_mesh.c  Tue May 26 03:58:18 2015
(r283554)
+++ head/sys/net80211/ieee80211_mesh.c  Tue May 26 04:25:11 2015
(r283555)
@@ -162,14 +162,6 @@ static const struct ieee80211_mesh_proto
 static struct ieee80211_mesh_proto_pathmesh_proto_paths[4];
 static struct ieee80211_mesh_proto_metric  mesh_proto_metrics[4];
 
-#defineRT_ENTRY_LOCK(rt)   mtx_lock((rt)-rt_lock)
-#defineRT_ENTRY_LOCK_ASSERT(rt) mtx_assert((rt)-rt_lock, MA_OWNED)
-#defineRT_ENTRY_UNLOCK(rt) mtx_unlock((rt)-rt_lock)
-
-#defineMESH_RT_LOCK(ms)mtx_lock((ms)-ms_rt_lock)
-#defineMESH_RT_LOCK_ASSERT(ms) mtx_assert((ms)-ms_rt_lock, MA_OWNED)
-#defineMESH_RT_UNLOCK(ms)  mtx_unlock((ms)-ms_rt_lock)
-
 MALLOC_DEFINE(M_80211_MESH_PREQ, 80211preq, 802.11 MESH Path Request 
frame);
 MALLOC_DEFINE(M_80211_MESH_PREP, 80211prep, 802.11 MESH Path Reply frame);
 MALLOC_DEFINE(M_80211_MESH_PERR, 80211perr, 802.11 MESH Path Error frame);
@@ -218,7 +210,7 @@ mesh_rt_add_locked(struct ieee80211vap *
rt-rt_vap = vap;
IEEE80211_ADDR_COPY(rt-rt_dest, dest);
rt-rt_priv = (void *)ALIGN(rt[1]);
-   mtx_init(rt-rt_lock, MBSS_RT, 802.11s route entry, 
MTX_DEF);
+   MESH_RT_ENTRY_LOCK_INIT(rt, MBSS_RT);
callout_init(rt-rt_discovery, 1);
rt-rt_updtime = ticks; /* create time */
TAILQ_INSERT_TAIL(ms-ms_routes, rt, rt_next);
@@ -271,11 +263,11 @@ ieee80211_mesh_rt_update(struct ieee8021
KASSERT(rt != NULL, (route is NULL));
 
now = ticks;
-   RT_ENTRY_LOCK(rt);
+   MESH_RT_ENTRY_LOCK(rt);
 
/* dont clobber a proxy entry gated by us */
if (rt-rt_flags  IEEE80211_MESHRT_FLAGS_PROXY  rt-rt_nhops == 0) {
-   RT_ENTRY_UNLOCK(rt);
+   MESH_RT_ENTRY_UNLOCK(rt);
return rt-rt_lifetime;
}
 
@@ -296,7 +288,7 @@ ieee80211_mesh_rt_update(struct ieee8021
new_lifetime, rt-rt_lifetime);
}
lifetime = rt-rt_lifetime;
-   RT_ENTRY_UNLOCK(rt);
+   MESH_RT_ENTRY_UNLOCK(rt);
 
return lifetime;
 }
@@ -358,9 +350,9 @@ mesh_rt_del(struct ieee80211_mesh_state 
 * Grab the lock before destroying it, to be sure no one else
 * is holding the route.
 */
-   RT_ENTRY_LOCK(rt);
+   MESH_RT_ENTRY_LOCK(rt);
callout_drain(rt-rt_discovery);
-   mtx_destroy(rt-rt_lock);
+   MESH_RT_ENTRY_LOCK_DESTROY(rt);
IEEE80211_FREE(rt, M_80211_MESH_RT);
 }
 
@@ -653,7 +645,7 @@ mesh_vdetach(struct ieee80211vap *vap)
ieee80211_iterate_nodes(vap-iv_ic-ic_sta, mesh_vdetach_peers,
NULL);
ieee80211_mesh_rt_flush(vap);
-   mtx_destroy(ms-ms_rt_lock);
+   MESH_RT_LOCK_DESTROY(ms);

svn commit: r283556 - head/sys/net80211

2015-05-25 Thread Adrian Chadd
Author: adrian
Date: Tue May 26 04:37:59 2015
New Revision: 283556
URL: https://svnweb.freebsd.org/changeset/base/283556

Log:
  Migrate the scan iterator lock typedefs out into ieee80211_freebsd.h.
  
  This removes the final piece of freebsd-specific locking that snuck
  into the tree - it's now all inside ieee80211_freebsd.h.

Modified:
  head/sys/net80211/ieee80211_freebsd.h
  head/sys/net80211/ieee80211_scan_sta.c

Modified: head/sys/net80211/ieee80211_freebsd.h
==
--- head/sys/net80211/ieee80211_freebsd.h   Tue May 26 04:25:11 2015
(r283555)
+++ head/sys/net80211/ieee80211_freebsd.h   Tue May 26 04:37:59 2015
(r283556)
@@ -183,6 +183,13 @@ typedef struct mtx ieee80211_scan_table_
 #defineIEEE80211_SCAN_TABLE_LOCK(_st)  
mtx_lock((_st)-st_lock)
 #defineIEEE80211_SCAN_TABLE_UNLOCK(_st)
mtx_unlock((_st)-st_lock)
 
+typedef struct mtx ieee80211_scan_iter_lock_t;
+#defineIEEE80211_SCAN_ITER_LOCK_INIT(_st, _name) \
+   mtx_init((_st)-st_scanlock, _name, 802.11 scangen, MTX_DEF)
+#defineIEEE80211_SCAN_ITER_LOCK_DESTROY(_st)   
mtx_destroy((_st)-st_scanlock)
+#defineIEEE80211_SCAN_ITER_LOCK(_st)   
mtx_lock((_st)-st_scanlock)
+#defineIEEE80211_SCAN_ITER_UNLOCK(_st) mtx_unlock((_st)-st_scanlock)
+
 /*
  * Mesh node/routing definitions.
  */

Modified: head/sys/net80211/ieee80211_scan_sta.c
==
--- head/sys/net80211/ieee80211_scan_sta.c  Tue May 26 04:25:11 2015
(r283555)
+++ head/sys/net80211/ieee80211_scan_sta.c  Tue May 26 04:37:59 2015
(r283556)
@@ -102,7 +102,7 @@ struct sta_table {
ieee80211_scan_table_lock_t st_lock;/* on scan table */
TAILQ_HEAD(, sta_entry) st_entry;   /* all entries */
LIST_HEAD(, sta_entry) st_hash[STA_HASHSIZE];
-   struct mtx  st_scanlock;/* on st_scaniter */
+   ieee80211_scan_iter_lock_t st_scanlock; /* on st_scaniter */
u_int   st_scaniter;/* gen# for iterator */
u_int   st_scangen; /* scan generation # */
int st_newscan;
@@ -165,7 +165,7 @@ sta_attach(struct ieee80211_scan_state *
if (st == NULL)
return 0;
IEEE80211_SCAN_TABLE_LOCK_INIT(st, scantable);
-   mtx_init(st-st_scanlock, scangen, 802.11 scangen, MTX_DEF);
+   IEEE80211_SCAN_ITER_LOCK_INIT(st, scangen);
TAILQ_INIT(st-st_entry);
ss-ss_priv = st;
nrefs++;/* NB: we assume caller locking */
@@ -183,7 +183,7 @@ sta_detach(struct ieee80211_scan_state *
if (st != NULL) {
sta_flush_table(st);
IEEE80211_SCAN_TABLE_LOCK_DESTROY(st);
-   mtx_destroy(st-st_scanlock);
+   IEEE80211_SCAN_ITER_LOCK_DESTROY(st);
IEEE80211_FREE(st, M_80211_SCAN);
KASSERT(nrefs  0, (imbalanced attach/detach));
nrefs--;/* NB: we assume caller locking */
@@ -1403,7 +1403,7 @@ sta_iterate(struct ieee80211_scan_state 
struct sta_entry *se;
u_int gen;
 
-   mtx_lock(st-st_scanlock);
+   IEEE80211_SCAN_ITER_LOCK(st);
gen = st-st_scaniter++;
 restart:
IEEE80211_SCAN_TABLE_LOCK(st);
@@ -1419,7 +1419,7 @@ restart:
}
IEEE80211_SCAN_TABLE_UNLOCK(st);
 
-   mtx_unlock(st-st_scanlock);
+   IEEE80211_SCAN_ITER_UNLOCK(st);
 }
 
 static void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org