Re: svn commit: r317277 - head/sys/crypto/chacha20

2017-04-21 Thread Rui Paulo
On Apr 21, 2017, at 18:06, Dag-Erling Smørgrav  wrote:
> 
> Author: des
> Date: Sat Apr 22 01:06:23 2017
> New Revision: 317277
> URL: https://svnweb.freebsd.org/changeset/base/317277
> 
> Log:
>  Fix counter increment in Salsa and ChaCha.
> 
>  In my eagerness to eliminate a branch which is taken once per 2^38
>  bytes of keystream, I forgot that the state words are in host order.
>  Thus, the counter increment code worked fine on little-endian
>  machines, but not on big-endian ones.  Switch to a simpler (branchful)
>  solution.

I’m surprised there’s no mention of who reviewed your change, especially when 
you’re changing crypto code.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r301172 - head/contrib/blacklist

2016-06-05 Thread Rui Paulo
On Fri, 2016-06-03 at 08:50 +0200, Jan Beich wrote:
> Kurt Lidl <l...@freebsd.org> writes:
> 
> > Author: lidl
> > Date: Wed Jun  1 22:04:10 2016
> > New Revision: 301172
> > URL: https://svnweb.freebsd.org/changeset/base/301172
> > 
> > Log:
> >   Import NetBSD's blacklist source from vendor tree
> >   
> >   This import includes The basic blacklist library and utility
> > programs,
> >   to add a system-wide packet filtering notification mechanism to
> >   FreeBSD.
> >   
> >   The rational behind the daemon was given by Christos Zoulas in a
> >   presentation at vBSDcon 2015: https://youtu.be/fuuf8G28mjs
> >   
> >   Reviewed by:  rpaulo
> >   Approved by:  rpaulo
> >   Obtained from:NetBSD
> >   Relnotes: YES
> 
> Can you track FreeBSD version in manpages? Maybe ping upstream, so
> they
> add .Fx as well.
> 
> $ fgrep .Nx contrib/blacklist/**/*.[0-9]
> contrib/blacklist/bin/blacklistctl.8:.Nx 7 .
> contrib/blacklist/bin/blacklistd.8:.Nx 7 .
> contrib/blacklist/bin/blacklistd.conf.5:.Nx 7 .
> 
> $ man blacklistd | col -b | fgrep -A1 HISTORY
> HISTORY
>  blacklistd appeared in NetBSD 7.

We don't really need to submit that change to NetBSD.  Just change the
man page in FreeBSD and hopefully future merges won't remove it. ;-)

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

svn commit: r289549 - in head: contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/s...

2015-10-18 Thread Rui Paulo
Author: rpaulo
Date: Sun Oct 18 21:38:25 2015
New Revision: 289549
URL: https://svnweb.freebsd.org/changeset/base/289549

Log:
  Update hostapd/wpa_supplicant to version 2.5.
  
  Tested by several people on current@/wireless@.
  
  Relnotes: yes

Added:
  head/contrib/wpa/patches/openssl-0.9.8zf-tls-extensions.patch
 - copied unchanged from r289285, 
vendor/wpa/dist/patches/openssl-0.9.8zf-tls-extensions.patch
  head/contrib/wpa/src/crypto/sha384-prf.c
 - copied unchanged from r289285, vendor/wpa/dist/src/crypto/sha384-prf.c
  head/contrib/wpa/src/fst/
 - copied from r289285, vendor/wpa/dist/src/fst/
  head/contrib/wpa/wpa_supplicant/eapol_test.py
 - copied unchanged from r289285, 
vendor/wpa/dist/wpa_supplicant/eapol_test.py
  head/contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c
 - copied unchanged from r289285, 
vendor/wpa/dist/wpa_supplicant/p2p_supplicant_sd.c
Deleted:
  head/contrib/wpa/src/crypto/crypto_cryptoapi.c
  head/contrib/wpa/src/crypto/tls_schannel.c
Modified:
  head/contrib/wpa/hostapd/ChangeLog
  head/contrib/wpa/hostapd/config_file.c
  head/contrib/wpa/hostapd/config_file.h
  head/contrib/wpa/hostapd/ctrl_iface.c
  head/contrib/wpa/hostapd/defconfig
  head/contrib/wpa/hostapd/hlr_auc_gw.c
  head/contrib/wpa/hostapd/hlr_auc_gw.milenage_db
  head/contrib/wpa/hostapd/hostapd.conf
  head/contrib/wpa/hostapd/hostapd_cli.c
  head/contrib/wpa/hostapd/main.c
  head/contrib/wpa/hs20/client/Makefile
  head/contrib/wpa/hs20/client/osu_client.c
  head/contrib/wpa/hs20/client/spp_client.c
  head/contrib/wpa/src/ap/accounting.c
  head/contrib/wpa/src/ap/acs.c
  head/contrib/wpa/src/ap/ap_config.c
  head/contrib/wpa/src/ap/ap_config.h
  head/contrib/wpa/src/ap/ap_drv_ops.c
  head/contrib/wpa/src/ap/ap_drv_ops.h
  head/contrib/wpa/src/ap/ap_list.c
  head/contrib/wpa/src/ap/ap_list.h
  head/contrib/wpa/src/ap/authsrv.c
  head/contrib/wpa/src/ap/beacon.c
  head/contrib/wpa/src/ap/beacon.h
  head/contrib/wpa/src/ap/ctrl_iface_ap.c
  head/contrib/wpa/src/ap/dfs.c
  head/contrib/wpa/src/ap/drv_callbacks.c
  head/contrib/wpa/src/ap/eap_user_db.c
  head/contrib/wpa/src/ap/hostapd.c
  head/contrib/wpa/src/ap/hostapd.h
  head/contrib/wpa/src/ap/hw_features.c
  head/contrib/wpa/src/ap/hw_features.h
  head/contrib/wpa/src/ap/ieee802_11.c
  head/contrib/wpa/src/ap/ieee802_11.h
  head/contrib/wpa/src/ap/ieee802_11_auth.c
  head/contrib/wpa/src/ap/ieee802_11_auth.h
  head/contrib/wpa/src/ap/ieee802_11_ht.c
  head/contrib/wpa/src/ap/ieee802_11_vht.c
  head/contrib/wpa/src/ap/ieee802_1x.c
  head/contrib/wpa/src/ap/ieee802_1x.h
  head/contrib/wpa/src/ap/ndisc_snoop.c
  head/contrib/wpa/src/ap/sta_info.c
  head/contrib/wpa/src/ap/sta_info.h
  head/contrib/wpa/src/ap/utils.c
  head/contrib/wpa/src/ap/vlan_init.c
  head/contrib/wpa/src/ap/vlan_init.h
  head/contrib/wpa/src/ap/vlan_util.c
  head/contrib/wpa/src/ap/wmm.c
  head/contrib/wpa/src/ap/wpa_auth.c
  head/contrib/wpa/src/ap/wpa_auth.h
  head/contrib/wpa/src/ap/wpa_auth_ft.c
  head/contrib/wpa/src/ap/wpa_auth_glue.c
  head/contrib/wpa/src/ap/wpa_auth_i.h
  head/contrib/wpa/src/ap/wpa_auth_ie.c
  head/contrib/wpa/src/ap/wps_hostapd.c
  head/contrib/wpa/src/ap/x_snoop.c
  head/contrib/wpa/src/common/common_module_tests.c
  head/contrib/wpa/src/common/defs.h
  head/contrib/wpa/src/common/hw_features_common.c
  head/contrib/wpa/src/common/hw_features_common.h
  head/contrib/wpa/src/common/ieee802_11_common.c
  head/contrib/wpa/src/common/ieee802_11_common.h
  head/contrib/wpa/src/common/ieee802_11_defs.h
  head/contrib/wpa/src/common/privsep_commands.h
  head/contrib/wpa/src/common/qca-vendor.h
  head/contrib/wpa/src/common/sae.c
  head/contrib/wpa/src/common/sae.h
  head/contrib/wpa/src/common/version.h
  head/contrib/wpa/src/common/wpa_common.c
  head/contrib/wpa/src/common/wpa_common.h
  head/contrib/wpa/src/common/wpa_ctrl.c
  head/contrib/wpa/src/common/wpa_ctrl.h
  head/contrib/wpa/src/crypto/crypto.h
  head/contrib/wpa/src/crypto/crypto_module_tests.c
  head/contrib/wpa/src/crypto/crypto_openssl.c
  head/contrib/wpa/src/crypto/dh_groups.c
  head/contrib/wpa/src/crypto/fips_prf_openssl.c
  head/contrib/wpa/src/crypto/ms_funcs.c
  head/contrib/wpa/src/crypto/ms_funcs.h
  head/contrib/wpa/src/crypto/random.c
  head/contrib/wpa/src/crypto/sha1-tlsprf.c
  head/contrib/wpa/src/crypto/sha1-tprf.c
  head/contrib/wpa/src/crypto/sha256-kdf.c
  head/contrib/wpa/src/crypto/sha384.h
  head/contrib/wpa/src/crypto/tls.h
  head/contrib/wpa/src/crypto/tls_gnutls.c
  head/contrib/wpa/src/crypto/tls_internal.c
  head/contrib/wpa/src/crypto/tls_none.c
  head/contrib/wpa/src/crypto/tls_openssl.c
  head/contrib/wpa/src/drivers/driver.h
  head/contrib/wpa/src/drivers/driver_bsd.c
  head/contrib/wpa/src/drivers/driver_ndis.c
  head/contrib/wpa/src/drivers/driver_nl80211.h
  head/contrib/wpa/src/drivers/driver_nl80211_android.c
  head/contrib/wpa/src/drivers/driver_nl80211_capa.c
  head/contrib/wpa/src/drivers/driver_nl80211_event.c
  

svn commit: r289262 - head/usr.sbin/config

2015-10-13 Thread Rui Paulo
Author: rpaulo
Date: Tue Oct 13 20:25:03 2015
New Revision: 289262
URL: https://svnweb.freebsd.org/changeset/base/289262

Log:
  Fix two memory leaks in config(8).
  
  PR:   202145
  Submitted by: Kurt Lidl 

Modified:
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Tue Oct 13 20:24:57 2015
(r289261)
+++ head/usr.sbin/config/mkmakefile.c   Tue Oct 13 20:25:03 2015
(r289262)
@@ -623,6 +623,7 @@ do_xxfiles(char *tag, FILE *fp)
slen = strlen(suff);
 
fprintf(fp, "%sFILES=", SUFF);
+   free(SUFF);
lpos = 8;
STAILQ_FOREACH(tp, , f_next)
if (tp->f_type != NODEPEND) {
@@ -641,6 +642,7 @@ do_xxfiles(char *tag, FILE *fp)
fprintf(fp, "%s ", tp->f_fn);
lpos += len + 1;
}
+   free(suff);
if (lpos != 8)
putc('\n', fp);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r288657 - head/sys/netinet6

2015-10-06 Thread Rui Paulo
On Sun, 2015-10-04 at 08:21 +, Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Sun Oct  4 08:21:15 2015
> New Revision: 288657
> URL: https://svnweb.freebsd.org/changeset/base/288657
> 
> Log:
>   Add __noinline attribute to several functions to ease dtrace
> instrumentation
> 

What instrumentation?  Is there a DTrace script in userland that uses
these functions?  If not, this should not have been committed as you
just made the code slower.  This is one of those changes that should be
kept in your own repository.

-- 
Rui Paulo

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


Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-10-02 Thread Rui Paulo
On Thu, 2015-09-24 at 08:29 -0700, Adrian Chadd wrote:
> ... I'm confused about the "load it by hand" stuff in net80211. Why
> don't we just do the kldload at that point?
> 

I was talking about ieee80211_load_module.  net80211 module auto
loading doesn't work probably because kern_kldload() can't be called
from certain contexts.

-- 
Rui Paulo

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


Re: svn commit: r288362 - head/sys/cddl/dev/sdt

2015-10-02 Thread Rui Paulo
On Tue, 2015-09-29 at 11:58 +, Andriy Gapon wrote:
> Author: avg
> Date: Tue Sep 29 11:58:21 2015
> New Revision: 288362
> URL: https://svnweb.freebsd.org/changeset/base/288362
> 
> Log:
>   sdt: start checking version field when parsing probe definitions
>   
>   This is an extra safety measure.
>   
>   MFC after:  21 days
> 
> Modified:
>   head/sys/cddl/dev/sdt/sdt.c
> 
> Modified: head/sys/cddl/dev/sdt/sdt.c
> =
> =
> --- head/sys/cddl/dev/sdt/sdt.c   Tue Sep 29 11:55:26 2015
> (r288361)
> +++ head/sys/cddl/dev/sdt/sdt.c   Tue Sep 29 11:58:21 2015
> (r288362)
> @@ -141,6 +141,12 @@ sdt_create_probe(struct sdt_probe *probe
>   char *to;
>   size_t len;
>  
> + if (probe->version != (int)sizeof(*probe)) {
> + printf("ignoring probe %p, version %u expected
> %u\n",
> + probe, probe->version, (int)sizeof(*probe));
> + return;
> + }
> +
> 

Not picking on your change, but this version management sounds like a
bad idea to me...

-- 
Rui Paulo

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


Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-10-02 Thread Rui Paulo
On Fri, 2015-10-02 at 12:10 -0700, Adrian Chadd wrote:
> On 2 October 2015 at 11:04, Rui Paulo <rpa...@me.com> wrote:
> > On Thu, 2015-09-24 at 08:29 -0700, Adrian Chadd wrote:
> > > ... I'm confused about the "load it by hand" stuff in net80211.
> > > Why
> > > don't we just do the kldload at that point?
> > > 
> > 
> > I was talking about ieee80211_load_module.  net80211 module auto
> > loading doesn't work probably because kern_kldload() can't be
> > called
> > from certain contexts.
> 
> hm, can we do it from a taskqueue?
> 

Sure, but I suspect the caller might not want to sleep waiting for the
taskqueue to terminate.  I really haven't looked into it, sorry... 

It might be a better idea to check if the driver does software and/or
hardware crypto and load the appropriate modules at that time.  Then
check which ratesel module should be used and load that as well.  The
list continues :-)

-- 
Rui Paulo

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


Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-09-23 Thread Rui Paulo
I gave you feedback: it crashed somewhere else.  I haven't had time to
work on it.
However, go ahead and commit that fix.  That code was clearly wrong.

On Mon, 2015-09-21 at 23:21 -0700, Scott Long wrote:
> As a side note, I’m still waiting for feedback on the patch I sent
> you for scsi_sg.  I’d like to get this fixed.
> 
> Scott
> 
> > On Sep 21, 2015, at 3:53 PM, Rui Paulo <rpa...@me.com> wrote:
> > 
> > No, that doesn't work very well.  Not only the modules don't auto
> > -load, the way the modules are compiled is different.  See, for
> > example, cam ctl which doesn't compile the sg code when it's built
> > into the kernel, but compiles it when it's built as a module.  The
> > sg code is currently buggy and causes insta-panics with GNOME 3
> > (perhaps the auto-mounter in hald (?)).
> > --
> > Rui Paulo
> > 
> > 
> > On Sep 21, 2015, at 11:24 AM, Adrian Chadd <adrian.ch...@gmail.com>
> > wrote:
> > 
> > > Hi,
> > > 
> > > Warner has been working on the modular kernel thing. But
> > > honestly, I
> > > think we should just start biting that bullet and ship a modules
> > > -only
> > > GENERIC by default..
> > > 
> > > 
> > > -a
> > > 
> > > 
> > > On 21 September 2015 at 11:02, Rui Paulo <rpa...@me.com> wrote:
> > > > So, we're going to keep ignoring the problem and keep patching
> > > > things up?
> > > > It's a bit sad that a single driver (pmspcv) is able to cause
> > > > so much
> > > > problems.
> > > > 
> > > > --
> > > > Rui Paulo
> > > > 
> > > > 
> > > > On Sep 17, 2015, at 01:36 PM, John Baldwin <j...@freebsd.org>
> > > > wrote:
> > > > 
> > > > Author: jhb
> > > > Date: Thu Sep 17 20:36:46 2015
> > > > New Revision: 287934
> > > > URL: https://svnweb.freebsd.org/changeset/base/287934
> > > >  
> > > > 
> > > > Log:
> > > > The EFI boot loader allocates a single chunk of contiguous
> > > > memory to
> > > > hold the kernel, modules, and any other loaded data. This
> > > > memory block
> > > > is relocated to the kernel's expected location during the
> > > > transfer of
> > > > control from the loader to the kernel.
> > > > 
> > > > The GENERIC kernel on amd64 has recently grown such that a
> > > > kernel + zfs.ko
> > > > no longer fits in the default staging size. Bump the default
> > > > size from
> > > > 32MB to 48MB to provide more breathing room.
> > > > 
> > > > PR: 201679
> > > > Reviewed by: imp
> > > > MFC after: 1 week
> > > > Differential Revision: https://reviews.freebsd.org/D3666
> > > >  
> > > > 
> > > > Modified:
> > > > head/sys/boot/efi/loader/copy.c
> > > > 
> > > > Modified: head/sys/boot/efi/loader/copy.c
> > > > ===
> > > > ===
> > > > --- head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:34 2015
> > > > (r287933)
> > > > +++ head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:46 2015
> > > > (r287934)
> > > > @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
> > > > #include 
> > > > 
> > > > #ifndef EFI_STAGING_SIZE
> > > > -#define EFI_STAGING_SIZE 32
> > > > +#define EFI_STAGING_SIZE 48
> > > > #endif
> > > > 
> > > > #define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096)
> > > > 
> 

-- 
Rui Paulo

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

Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-09-23 Thread Rui Paulo
Those were the issues that I encountered when I started using MINIMAL.
I didn't do a thorough investigation.

Auto loading is a much bigger problem that just loading drivers for
PCI/USB/etc devices.  For example, net80211 doesn't auto load the wlan
crypto modules by default nor the amrr module.

On Mon, 2015-09-21 at 17:59 -0600, Warner Losh wrote:
> Apart from the inlining issue John raised (which I agree with his
> solution on, btw)
> and the one cam ctl module, what other modules are meaningfully
> different when
> compiled as modules.
> 
> Assume that the auto-loading bit is solved, at least for devices on
> self-enumerating
> busses.
> 
> Warner
> 
> 
> > On Sep 21, 2015, at 4:53 PM, Rui Paulo <rpa...@me.com> wrote:
> > 
> > No, that doesn't work very well.  Not only the modules don't auto
> > -load, the way the modules are compiled is different.  See, for
> > example, cam ctl which doesn't compile the sg code when it's built
> > into the kernel, but compiles it when it's built as a module.  The
> > sg code is currently buggy and causes insta-panics with GNOME 3
> > (perhaps the auto-mounter in hald (?)).
> > --
> > Rui Paulo
> > 
> > 
> > On Sep 21, 2015, at 11:24 AM, Adrian Chadd <adrian.ch...@gmail.com>
> > wrote:
> > 
> > > Hi,
> > > 
> > > Warner has been working on the modular kernel thing. But
> > > honestly, I
> > > think we should just start biting that bullet and ship a modules
> > > -only
> > > GENERIC by default..
> > > 
> > > 
> > > -a
> > > 
> > > 
> > > On 21 September 2015 at 11:02, Rui Paulo <rpa...@me.com> wrote:
> > > > So, we're going to keep ignoring the problem and keep patching
> > > > things up?
> > > > It's a bit sad that a single driver (pmspcv) is able to cause
> > > > so much
> > > > problems.
> > > > 
> > > > --
> > > > Rui Paulo
> > > > 
> > > > 
> > > > On Sep 17, 2015, at 01:36 PM, John Baldwin <j...@freebsd.org>
> > > > wrote:
> > > > 
> > > > Author: jhb
> > > > Date: Thu Sep 17 20:36:46 2015
> > > > New Revision: 287934
> > > > URL: https://svnweb.freebsd.org/changeset/base/287934
> > > > 
> > > > 
> > > > Log:
> > > > The EFI boot loader allocates a single chunk of contiguous
> > > > memory to
> > > > hold the kernel, modules, and any other loaded data. This
> > > > memory block
> > > > is relocated to the kernel's expected location during the
> > > > transfer of
> > > > control from the loader to the kernel.
> > > > 
> > > > The GENERIC kernel on amd64 has recently grown such that a
> > > > kernel + zfs.ko
> > > > no longer fits in the default staging size. Bump the default
> > > > size from
> > > > 32MB to 48MB to provide more breathing room.
> > > > 
> > > > PR: 201679
> > > > Reviewed by: imp
> > > > MFC after: 1 week
> > > > Differential Revision: https://reviews.freebsd.org/D3666
> > > > 
> > > > 
> > > > Modified:
> > > > head/sys/boot/efi/loader/copy.c
> > > > 
> > > > Modified: head/sys/boot/efi/loader/copy.c
> > > > ===
> > > > ===
> > > > --- head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:34 2015
> > > > (r287933)
> > > > +++ head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:46 2015
> > > > (r287934)
> > > > @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
> > > > #include 
> > > > 
> > > > #ifndef EFI_STAGING_SIZE
> > > > -#define EFI_STAGING_SIZE 32
> > > > +#define EFI_STAGING_SIZE 48
> > > > #endif
> > > > 
> > > > #define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096)
> > > > 
> 

-- 
Rui Paulo

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


Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-09-21 Thread Rui Paulo

No, that doesn't work very well.  Not only the modules don't auto-load, the way 
the modules are compiled is different.  See, for example, cam ctl which doesn't 
compile the sg code when it's built into the kernel, but compiles it when it's 
built as a module.  The sg code is currently buggy and causes insta-panics with 
GNOME 3 (perhaps the auto-mounter in hald (?)).

--
Rui Paulo


On Sep 21, 2015, at 11:24 AM, Adrian Chadd <adrian.ch...@gmail.com> wrote:


Hi,

Warner has been working on the modular kernel thing. But honestly, I
think we should just start biting that bullet and ship a modules-only
GENERIC by default..


-a


On 21 September 2015 at 11:02, Rui Paulo <rpa...@me.com> wrote:

So, we're going to keep ignoring the problem and keep patching things up?
It's a bit sad that a single driver (pmspcv) is able to cause so much
problems.

--
Rui Paulo


On Sep 17, 2015, at 01:36 PM, John Baldwin <j...@freebsd.org> wrote:

Author: jhb
Date: Thu Sep 17 20:36:46 2015
New Revision: 287934
URL: https://svnweb.freebsd.org/changeset/base/287934
 


Log:
The EFI boot loader allocates a single chunk of contiguous memory to
hold the kernel, modules, and any other loaded data. This memory block
is relocated to the kernel's expected location during the transfer of
control from the loader to the kernel.

The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko
no longer fits in the default staging size. Bump the default size from
32MB to 48MB to provide more breathing room.

PR: 201679
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3666
 


Modified:
head/sys/boot/efi/loader/copy.c

Modified: head/sys/boot/efi/loader/copy.c
==
--- head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:34 2015
(r287933)
+++ head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:46 2015
(r287934)
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include 

#ifndef EFI_STAGING_SIZE
-#define EFI_STAGING_SIZE 32
+#define EFI_STAGING_SIZE 48
#endif

#define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096)


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

Re: svn commit: r287934 - head/sys/boot/efi/loader

2015-09-21 Thread Rui Paulo

So, we're going to keep ignoring the problem and keep patching things up?  
It's a bit sad that a single driver (pmspcv) is able to cause so much problems.

--
Rui Paulo


On Sep 17, 2015, at 01:36 PM, John Baldwin <j...@freebsd.org> wrote:


Author: jhb
Date: Thu Sep 17 20:36:46 2015
New Revision: 287934
URL: https://svnweb.freebsd.org/changeset/base/287934

Log:
The EFI boot loader allocates a single chunk of contiguous memory to
hold the kernel, modules, and any other loaded data. This memory block
is relocated to the kernel's expected location during the transfer of
control from the loader to the kernel.

The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko
no longer fits in the default staging size. Bump the default size from
32MB to 48MB to provide more breathing room.

PR:201679
Reviewed by:imp
MFC after:  1 week
Differential Revision:https://reviews.freebsd.org/D3666

Modified:
head/sys/boot/efi/loader/copy.c

Modified: head/sys/boot/efi/loader/copy.c
==
--- head/sys/boot/efi/loader/copy.c  Thu Sep 17 20:36:34 2015(r287933)
+++ head/sys/boot/efi/loader/copy.cThu Sep 17 20:36:46 2015
(r287934)
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include 

#ifndef EFI_STAGING_SIZE
-#define  EFI_STAGING_SIZE32
+#defineEFI_STAGING_SIZE48
#endif

#defineSTAGE_PAGES  ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096)


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

Re: svn commit: r287299 - head/sys/boot/efi/loader/arch/amd64

2015-08-30 Thread Rui Paulo
On Sun, 2015-08-30 at 01:40 +, Marcel Moolenaar wrote:
 Author: marcel
 Date: Sun Aug 30 01:39:59 2015
 New Revision: 287299
 URL: https://svnweb.freebsd.org/changeset/base/287299
 
 Log:
   Add a gop command to help diagnose VT efifb problems. The gop
   command has the following sub-commands:
 list  - list all possible modes (paged)
 get   - return the current mode
 set mode- set the current mode to mode
 

This is duplicating the functionality of the `mode' command.  Please
remove the mode command.

Also, 'gop' is pretty weird for a command name.  Maybe we can change
that to something more user friendly?

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


svn commit: r286791 - in head: share/mk usr.bin/lorder

2015-08-14 Thread Rui Paulo
Author: rpaulo
Date: Fri Aug 14 22:54:52 2015
New Revision: 286791
URL: https://svnweb.freebsd.org/changeset/base/286791

Log:
  Introduce a new make variable: NMFLAGS.
  
  As the name indicates, these are flags to pass to nm(1).  The newer
  binutils have a plugin mechanism so, to build something with LLVM's
  LTO, we need to pass flags to nm(1).  This commit also extends
  lorder(1) to pass NMFLAGS to nm(1).

Modified:
  head/share/mk/sys.mk
  head/usr.bin/lorder/lorder.1
  head/usr.bin/lorder/lorder.sh

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkFri Aug 14 22:02:14 2015(r286790)
+++ head/share/mk/sys.mkFri Aug 14 22:54:52 2015(r286791)
@@ -167,6 +167,7 @@ MAKE?=  make
 
 .if !defined(%POSIX)
 NM ?=  nm
+NMFLAGS?=
 
 OBJC   ?=  cc
 OBJCFLAGS  ?=  ${OBJCINCLUDES} ${CFLAGS} -Wno-import

Modified: head/usr.bin/lorder/lorder.1
==
--- head/usr.bin/lorder/lorder.1Fri Aug 14 22:02:14 2015
(r286790)
+++ head/usr.bin/lorder/lorder.1Fri Aug 14 22:54:52 2015
(r286791)
@@ -28,7 +28,7 @@
 .\ @(#)lorder.1   8.2 (Berkeley) 4/28/95
 .\ $FreeBSD$
 .\
-.Dd October 25, 2006
+.Dd August 14, 2015
 .Dt LORDER 1
 .Os
 .Sh NAME
@@ -68,6 +68,9 @@ Path to the
 .Xr nm 1
 binary, defaults to
 .Dq Li nm .
+.It Ev NMFLAGS
+Flags to pass to
+.Xr nm 1 .
 .El
 .Sh EXAMPLES
 .Bd -literal -offset indent

Modified: head/usr.bin/lorder/lorder.sh
==
--- head/usr.bin/lorder/lorder.sh   Fri Aug 14 22:02:14 2015
(r286790)
+++ head/usr.bin/lorder/lorder.sh   Fri Aug 14 22:54:52 2015
(r286791)
@@ -60,7 +60,7 @@ done
 #
 # if the line has  U  it's a globally undefined symbol, put it into
 # the reference file.
-${NM} -go $* | sed 
+${NM} ${NMFLAGS} -go $* | sed 
/ [TDW] / {
s/:.* [TDW] / /
w $S
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r286792 - head/share/mk

2015-08-14 Thread Rui Paulo
Author: rpaulo
Date: Fri Aug 14 22:55:23 2015
New Revision: 286792
URL: https://svnweb.freebsd.org/changeset/base/286792

Log:
  bsd.lib.mk: pass NMFLAGS to the lorder script.

Modified:
  head/share/mk/bsd.lib.mk

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkFri Aug 14 22:54:52 2015(r286791)
+++ head/share/mk/bsd.lib.mkFri Aug 14 22:55:23 2015(r286792)
@@ -171,7 +171,7 @@ _LIBS=  lib${LIB_PRIVATE}${LIB}.a
 lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS}
@${ECHO} building static ${LIB} library
@rm -f ${.TARGET}
-   ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | 
tsort -q` ${ARADD}
+   ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' lorder 
${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
 .endif
 
@@ -185,7 +185,7 @@ NOPATH_FILES+=  ${POBJS}
 lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS}
@${ECHO} building profiled ${LIB} library
@rm -f ${.TARGET}
-   ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` 
${ARADD}
+   ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' NMFLAGS='${NMFLAGS}' lorder 
${POBJS} | tsort -q` ${ARADD}
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
 .endif
 
@@ -250,7 +250,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS}
 .endif
${_LD} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
-   `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
+   `NM='${NM}' NMFLAGS='${NMFLAGS}' lorder ${SOBJS} | tsort -q` 
${LDADD}
 .if ${MK_CTF} != no
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r286793 - head/sys/kern

2015-08-14 Thread Rui Paulo
Author: rpaulo
Date: Fri Aug 14 22:57:13 2015
New Revision: 286793
URL: https://svnweb.freebsd.org/changeset/base/286793

Log:
  genassym.sh: call nm(1) with NMFLAGS.

Modified:
  head/sys/kern/genassym.sh

Modified: head/sys/kern/genassym.sh
==
--- head/sys/kern/genassym.sh   Fri Aug 14 22:55:23 2015(r286792)
+++ head/sys/kern/genassym.sh   Fri Aug 14 22:57:13 2015(r286793)
@@ -10,7 +10,7 @@ usage()
 
 work()
 {
-   ${NM:='nm'} $1 | ${AWK:='awk'} '
+   ${NM:='nm'} ${NMFLAGS} $1 | ${AWK:='awk'} '
/ C .*sign$/ {
sign = substr($1, length($1) - 3, 4)
sub(^0*, , sign)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r286794 - head/sys/conf

2015-08-14 Thread Rui Paulo
Author: rpaulo
Date: Fri Aug 14 22:58:32 2015
New Revision: 286794
URL: https://svnweb.freebsd.org/changeset/base/286794

Log:
  sys/conf: pass NMFLAGS to nm(1) via genassym.sh.

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Fri Aug 14 22:57:13 2015(r286793)
+++ head/sys/conf/files.amd64   Fri Aug 14 22:58:32 2015(r286794)
@@ -40,7 +40,7 @@ ia32_genassym.o   standard
\
 #
 ia32_assym.h   standard\
dependency  $S/kern/genassym.sh ia32_genassym.o   \
-   compile-withenv NM='${NM}' sh $S/kern/genassym.sh ia32_genassym.o 
 ${.TARGET} \
+   compile-withenv NM='${NM}' NMFLAGS='${NMFLAGS}' sh 
$S/kern/genassym.sh ia32_genassym.o  ${.TARGET} \
no-obj no-implicit-rule before-depend   \
clean   ia32_assym.h
 #

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Fri Aug 14 22:57:13 2015(r286793)
+++ head/sys/conf/kern.post.mk  Fri Aug 14 22:58:32 2015(r286794)
@@ -174,7 +174,7 @@ hack.So: Makefile
 ./assym.s: assym.s
 
 assym.s: $S/kern/genassym.sh genassym.o
-   NM='${NM}' sh $S/kern/genassym.sh genassym.o  ${.TARGET}
+   NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o  
${.TARGET}
 
 genassym.o: $S/$M/$M/genassym.c
${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r286581 - head/sys/conf

2015-08-10 Thread Rui Paulo
Author: rpaulo
Date: Mon Aug 10 16:32:47 2015
New Revision: 286581
URL: https://svnweb.freebsd.org/changeset/base/286581

Log:
  Fix a comment for iwm.
  
  Submitted by: brueffer

Modified:
  head/sys/conf/options

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Mon Aug 10 14:03:39 2015(r286580)
+++ head/sys/conf/options   Mon Aug 10 16:32:47 2015(r286581)
@@ -851,7 +851,7 @@ MWL_DIAGAPI opt_mwl.h
 MWL_AGGR_SIZE  opt_mwl.h
 MWL_TX_NODROP  opt_mwl.h
 
-# Options for the Intel 802.11n wireless driver
+# Options for the Intel 802.11ac wireless driver
 IWM_DEBUG  opt_iwm.h
 
 # Options for the Intel 802.11n wireless driver
___
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: r286441 - in head: share/man/man4 sys/contrib/dev/iwm sys/dev/iwm sys/modules/iwm sys/modules/iwmfw sys/modules/iwmfw/iwm3160fw sys/modules/iwmfw/iwm7260fw sys/modules/iwmfw/iwm7265fw

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 06:06:48 2015
New Revision: 286441
URL: https://svnweb.freebsd.org/changeset/base/286441

Log:
  Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.
  
  There are still several bugs, but I've been using it for a while now.
  Thanks to all the testers and to Adrian for his help with this
  driver.
  
  This driver isn't connected to the build yet, but it will be soon.
  
  There's no MFC planned because the driver isn't very stable yet.
  
  Reviewed by:  adrian
  Obtained from:https://github.com/rpaulo/iwm
  Tested by:adrian, gjb, dumbbell (others that I forgot).
  Relnotes: yes

Added:
  head/share/man/man4/iwm.4   (contents, props changed)
  head/share/man/man4/iwmfw.4   (contents, props changed)
  head/sys/contrib/dev/iwm/
  head/sys/contrib/dev/iwm/LICENSE
  head/sys/contrib/dev/iwm/iwm-3160-9.fw.uu   (contents, props changed)
  head/sys/contrib/dev/iwm/iwm-7260-9.fw.uu   (contents, props changed)
  head/sys/contrib/dev/iwm/iwm-7265-9.fw.uu   (contents, props changed)
  head/sys/dev/iwm/
  head/sys/dev/iwm/if_iwm.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_binding.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_binding.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_debug.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_mac_ctxt.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_mac_ctxt.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_pcie_trans.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_pcie_trans.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_phy_ctxt.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_phy_ctxt.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_phy_db.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_phy_db.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_power.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_power.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_scan.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_scan.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_time_event.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_time_event.h   (contents, props changed)
  head/sys/dev/iwm/if_iwm_util.c   (contents, props changed)
  head/sys/dev/iwm/if_iwm_util.h   (contents, props changed)
  head/sys/dev/iwm/if_iwmreg.h   (contents, props changed)
  head/sys/dev/iwm/if_iwmvar.h   (contents, props changed)
  head/sys/modules/iwm/
  head/sys/modules/iwm/Makefile   (contents, props changed)
  head/sys/modules/iwmfw/
  head/sys/modules/iwmfw/Makefile   (contents, props changed)
  head/sys/modules/iwmfw/Makefile.inc   (contents, props changed)
  head/sys/modules/iwmfw/iwm3160fw/
  head/sys/modules/iwmfw/iwm3160fw/Makefile   (contents, props changed)
  head/sys/modules/iwmfw/iwm7260fw/
  head/sys/modules/iwmfw/iwm7260fw/Makefile   (contents, props changed)
  head/sys/modules/iwmfw/iwm7265fw/
  head/sys/modules/iwmfw/iwm7265fw/Makefile   (contents, props changed)

Added: head/share/man/man4/iwm.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/iwm.4   Sat Aug  8 06:06:48 2015(r286441)
@@ -0,0 +1,153 @@
+.\ Copyright (c) 2004-2006
+.\Damien Bergamini damien.bergam...@free.fr. All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice unmodified, this list of conditions, and the following
+.\disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd July 1, 2015
+.Dt IWM 4
+.Os
+.Sh NAME
+.Nm iwm
+.Nd Intel IEEE 802.11ac wireless network driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+include the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device iwm

svn commit: r286442 - head/sys/modules/iwmfw

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 06:08:20 2015
New Revision: 286442
URL: https://svnweb.freebsd.org/changeset/base/286442

Log:
  iwmfw: fix the path to the firmware file.

Modified:
  head/sys/modules/iwmfw/Makefile.inc

Modified: head/sys/modules/iwmfw/Makefile.inc
==
--- head/sys/modules/iwmfw/Makefile.inc Sat Aug  8 06:06:48 2015
(r286441)
+++ head/sys/modules/iwmfw/Makefile.inc Sat Aug  8 06:08:20 2015
(r286442)
@@ -14,5 +14,5 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #
 #FIRMWARE_LICENSE=
 
-${_FIRM}: ${.CURDIR}/${_FIRM}.uu
+${_FIRM}: ${.CURDIR}/../../../contrib/dev/iwm/${_FIRM}.uu
uudecode -p $?  ${.TARGET}
___
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: r286466 - head/sys/dev/iwm

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 20:07:25 2015
New Revision: 286466
URL: https://svnweb.freebsd.org/changeset/base/286466

Log:
  iwm: fix a KASSERT: s/ds_size/ds_len/.

Modified:
  head/sys/dev/iwm/if_iwm_util.c

Modified: head/sys/dev/iwm/if_iwm_util.c
==
--- head/sys/dev/iwm/if_iwm_util.c  Sat Aug  8 19:29:59 2015
(r286465)
+++ head/sys/dev/iwm/if_iwm_util.c  Sat Aug  8 20:07:25 2015
(r286466)
@@ -163,7 +163,7 @@ iwm_dma_map_mem(void *arg, bus_dma_segme
KASSERT(nsegs = 2, (too many DMA segments, %d should be = 2,
nsegs));
if (nsegs  1)
-   KASSERT(segs[1].ds_addr == segs[0].ds_addr + segs[0].ds_size,
+   KASSERT(segs[1].ds_addr == segs[0].ds_addr + segs[0].ds_len,
(fragmented DMA memory));
*(bus_addr_t *)arg = segs[0].ds_addr;
 }
@@ -402,4 +402,3 @@ iwm_free_resp(struct iwm_softc *sc, stru
sc-sc_wantresp = -1;
wakeup(sc-sc_wantresp);
 }
-
___
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: r286471 - head/sys/conf

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 20:45:12 2015
New Revision: 286471
URL: https://svnweb.freebsd.org/changeset/base/286471

Log:
  sys/conf/options: add IWM_DEBUG.

Modified:
  head/sys/conf/options

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Sat Aug  8 20:34:55 2015(r286470)
+++ head/sys/conf/options   Sat Aug  8 20:45:12 2015(r286471)
@@ -852,6 +852,9 @@ MWL_AGGR_SIZE   opt_mwl.h
 MWL_TX_NODROP  opt_mwl.h
 
 # Options for the Intel 802.11n wireless driver
+IWM_DEBUG  opt_iwm.h
+
+# Options for the Intel 802.11n wireless driver
 IWN_DEBUG  opt_iwn.h
 
 # Options for the Intel 3945ABG wireless driver
___
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: r286472 - head/sys/conf

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 20:45:47 2015
New Revision: 286472
URL: https://svnweb.freebsd.org/changeset/base/286472

Log:
  Add nodevice iwmfw to WITHOUT_SOURCELESS_UCODE.

Modified:
  head/sys/conf/WITHOUT_SOURCELESS_UCODE

Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE
==
--- head/sys/conf/WITHOUT_SOURCELESS_UCODE  Sat Aug  8 20:45:12 2015
(r286471)
+++ head/sys/conf/WITHOUT_SOURCELESS_UCODE  Sat Aug  8 20:45:47 2015
(r286472)
@@ -20,6 +20,7 @@ nodevice  cp
 nodevice   ctau
 nodevice   ipwfw
 nodevice   iwifw
+nodevice   iwmfw
 nodevice   iwnfw
 nodevice   wpifw
 
___
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: r286474 - head/sys/conf

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 21:08:10 2015
New Revision: 286474
URL: https://svnweb.freebsd.org/changeset/base/286474

Log:
  sys/conf/files: add iwm and iwmfw.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sat Aug  8 20:56:30 2015(r286473)
+++ head/sys/conf/files Sat Aug  8 21:08:10 2015(r286474)
@@ -1605,6 +1605,58 @@ iwi_monitor.fw   optional iwimonitorfw |
compile-with${NORMAL_FW}  \
no-obj no-implicit-rule \
clean   iwi_monitor.fw
+dev/iwm/if_iwm.c   optional iwm
+dev/iwm/if_iwm_binding.c   optional iwm
+dev/iwm/if_iwm_mac_ctxt.c  optional iwm
+dev/iwm/if_iwm_pcie_trans.coptional iwm
+dev/iwm/if_iwm_phy_ctxt.c  optional iwm
+dev/iwm/if_iwm_phy_db.coptional iwm
+dev/iwm/if_iwm_power.c optional iwm
+dev/iwm/if_iwm_scan.c  optional iwm
+dev/iwm/if_iwm_time_event.coptional iwm
+dev/iwm/if_iwm_util.c  optional iwm
+iwm3160fw.coptional iwm3160fw | iwmfw  \
+   compile-with${AWK} -f $S/tools/fw_stub.awk iwm3160.fw:iwm3160fw 
-miwm3160fw -c${.TARGET} \
+   no-implicit-rule before-depend local\
+   clean   iwm3160fw.c
+iwm3160fw.fwo  optional iwm3160fw | iwmfw  \
+   dependency  iwm3160.fw\
+   compile-with${NORMAL_FWO} \
+   no-implicit-rule\
+   clean   iwm3160fw.fwo
+iwm3160.fw optional iwm3160fw | iwmfw  \
+   dependency  $S/contrib/dev/iwm/iwm-3160-9.fw.uu \
+   compile-with${NORMAL_FW}  \
+   no-obj no-implicit-rule \
+   clean   iwm3160.fw
+iwm7260fw.coptional iwm7260fw | iwmfw  \
+   compile-with${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw 
-miwm7260fw -c${.TARGET} \
+   no-implicit-rule before-depend local\
+   clean   iwm7260fw.c
+iwm7260fw.fwo  optional iwm7260fw | iwmfw  \
+   dependency  iwm7260.fw\
+   compile-with${NORMAL_FWO} \
+   no-implicit-rule\
+   clean   iwm7260fw.fwo
+iwm7260.fw optional iwm7260fw | iwmfw  \
+   dependency  $S/contrib/dev/iwm/iwm-7260-9.fw.uu \
+   compile-with${NORMAL_FW}  \
+   no-obj no-implicit-rule \
+   clean   iwm7260.fw
+iwm7265fw.coptional iwm7265fw | iwmfw  \
+   compile-with${AWK} -f $S/tools/fw_stub.awk iwm7265.fw:iwm7265fw 
-miwm7265fw -c${.TARGET} \
+   no-implicit-rule before-depend local\
+   clean   iwm7265fw.c
+iwm7265fw.fwo  optional iwm7265fw | iwmfw  \
+   dependency  iwm7265.fw\
+   compile-with${NORMAL_FWO} \
+   no-implicit-rule\
+   clean   iwm7265fw.fwo
+iwm7265.fw optional iwm7265fw | iwmfw  \
+   dependency  $S/contrib/dev/iwm/iwm-7265-9.fw.uu \
+   compile-with${NORMAL_FW}  \
+   no-obj no-implicit-rule \
+   clean   iwm7265.fw
 dev/iwn/if_iwn.c   optional iwn
 iwn1000fw.coptional iwn1000fw | iwnfw  \
compile-with${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw 
-miwn1000fw -c${.TARGET} \
___
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: r286475 - head/sys/dev/iwm

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 21:08:35 2015
New Revision: 286475
URL: https://svnweb.freebsd.org/changeset/base/286475

Log:
  iwm: use the proper include path for iwm headers.

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_binding.c
  head/sys/dev/iwm/if_iwm_mac_ctxt.c
  head/sys/dev/iwm/if_iwm_pcie_trans.c
  head/sys/dev/iwm/if_iwm_phy_ctxt.c
  head/sys/dev/iwm/if_iwm_phy_db.c
  head/sys/dev/iwm/if_iwm_power.c
  head/sys/dev/iwm/if_iwm_scan.c
  head/sys/dev/iwm/if_iwm_time_event.c
  head/sys/dev/iwm/if_iwm_util.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Sat Aug  8 21:08:10 2015(r286474)
+++ head/sys/dev/iwm/if_iwm.c   Sat Aug  8 21:08:35 2015(r286475)
@@ -148,19 +148,19 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_ratectl.h
 #include net80211/ieee80211_radiotap.h
 
-#include if_iwmreg.h
-#include if_iwmvar.h
-#include if_iwm_debug.h
-#include if_iwm_util.h
-#include if_iwm_binding.h
-#include if_iwm_phy_db.h
-#include if_iwm_mac_ctxt.h
-#include if_iwm_phy_ctxt.h
-#include if_iwm_time_event.h
-#include if_iwm_power.h
-#include if_iwm_scan.h
+#include dev/iwm/if_iwmreg.h
+#include dev/iwm/if_iwmvar.h
+#include dev/iwm/if_iwm_debug.h
+#include dev/iwm/if_iwm_util.h
+#include dev/iwm/if_iwm_binding.h
+#include dev/iwm/if_iwm_phy_db.h
+#include dev/iwm/if_iwm_mac_ctxt.h
+#include dev/iwm/if_iwm_phy_ctxt.h
+#include dev/iwm/if_iwm_time_event.h
+#include dev/iwm/if_iwm_power.h
+#include dev/iwm/if_iwm_scan.h
 
-#include if_iwm_pcie_trans.h
+#include dev/iwm/if_iwm_pcie_trans.h
 
 const uint8_t iwm_nvm_channels[] = {
/* 2.4 GHz */

Modified: head/sys/dev/iwm/if_iwm_binding.c
==
--- head/sys/dev/iwm/if_iwm_binding.c   Sat Aug  8 21:08:10 2015
(r286474)
+++ head/sys/dev/iwm/if_iwm_binding.c   Sat Aug  8 21:08:35 2015
(r286475)
@@ -148,11 +148,11 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_ratectl.h
 #include net80211/ieee80211_radiotap.h
 
-#include if_iwmreg.h
-#include if_iwmvar.h
-#include if_iwm_debug.h
-#include if_iwm_util.h
-#include if_iwm_binding.h
+#include dev/iwm/if_iwmreg.h
+#include dev/iwm/if_iwmvar.h
+#include dev/iwm/if_iwm_debug.h
+#include dev/iwm/if_iwm_util.h
+#include dev/iwm/if_iwm_binding.h
 
 /*
  * BEGIN iwlwifi/mvm/binding.c

Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c
==
--- head/sys/dev/iwm/if_iwm_mac_ctxt.c  Sat Aug  8 21:08:10 2015
(r286474)
+++ head/sys/dev/iwm/if_iwm_mac_ctxt.c  Sat Aug  8 21:08:35 2015
(r286475)
@@ -148,11 +148,11 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_ratectl.h
 #include net80211/ieee80211_radiotap.h
 
-#include if_iwmreg.h
-#include if_iwmvar.h
-#include if_iwm_debug.h
-#include if_iwm_util.h
-#include if_iwm_mac_ctxt.h
+#include dev/iwm/if_iwmreg.h
+#include dev/iwm/if_iwmvar.h
+#include dev/iwm/if_iwm_debug.h
+#include dev/iwm/if_iwm_util.h
+#include dev/iwm/if_iwm_mac_ctxt.h
 
 /*
  * BEGIN mvm/mac-ctxt.c

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==
--- head/sys/dev/iwm/if_iwm_pcie_trans.cSat Aug  8 21:08:10 2015
(r286474)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.cSat Aug  8 21:08:35 2015
(r286475)
@@ -148,11 +148,10 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_ratectl.h
 #include net80211/ieee80211_radiotap.h
 
-#include if_iwmreg.h
-#include if_iwmvar.h
-#include if_iwm_debug.h
-
-#include if_iwm_pcie_trans.h
+#include dev/iwm/if_iwmreg.h
+#include dev/iwm/if_iwmvar.h
+#include dev/iwm/if_iwm_debug.h
+#include dev/iwm/if_iwm_pcie_trans.h
 
 /*
  * This is a subset of what's in linux iwlwifi/pcie/trans.c.

Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c
==
--- head/sys/dev/iwm/if_iwm_phy_ctxt.c  Sat Aug  8 21:08:10 2015
(r286474)
+++ head/sys/dev/iwm/if_iwm_phy_ctxt.c  Sat Aug  8 21:08:35 2015
(r286475)
@@ -148,18 +148,11 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_ratectl.h
 #include net80211/ieee80211_radiotap.h
 
-#include if_iwmreg.h
-#include if_iwmvar.h
-#include if_iwm_debug.h
-#include if_iwm_util.h
-
-#if 0
-#include if_iwm_binding.h
-#include if_iwm_phy_db.h
-#include if_iwm_mac_ctxt.h
-#include if_iwm_pcie_trans.h
-#endif
-#include if_iwm_phy_ctxt.h
+#include dev/iwm/if_iwmreg.h
+#include dev/iwm/if_iwmvar.h
+#include dev/iwm/if_iwm_debug.h
+#include dev/iwm/if_iwm_util.h
+#include dev/iwm/if_iwm_phy_ctxt.h
 
 /*
  * BEGIN iwlwifi/mvm/phy-ctxt.c

Modified: head/sys/dev/iwm/if_iwm_phy_db.c
==
--- head/sys/dev/iwm/if_iwm_phy_db.cSat Aug  8 21:08:10 2015
(r286474)
+++ 

svn commit: r286476 - in head/sys/modules: . iwm

2015-08-08 Thread Rui Paulo
Author: rpaulo
Date: Sat Aug  8 21:09:41 2015
New Revision: 286476
URL: https://svnweb.freebsd.org/changeset/base/286476

Log:
  Build the iwm and iwmfw modules by default on x86.

Modified:
  head/sys/modules/Makefile
  head/sys/modules/iwm/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Sat Aug  8 21:08:35 2015(r286475)
+++ head/sys/modules/Makefile   Sat Aug  8 21:09:41 2015(r286476)
@@ -174,6 +174,8 @@ SUBDIR= \
${_ispfw} \
${_iwi} \
${_iwifw} \
+   ${_iwm} \
+   ${_iwmfw} \
${_iwn} \
${_iwnfw} \
${_ix} \
@@ -575,20 +577,18 @@ _ida= ida
 _iir=  iir
 _ipmi= ipmi
 _ips=  ips
-_ipw=  ipw
-.if ${MK_SOURCELESS_UCODE} != no
-_ipwfw=ipwfw
-.endif
 _isci= isci
+_ipw=  ipw
 _iwi=  iwi
-.if ${MK_SOURCELESS_UCODE} != no
-_iwifw=iwifw
-.endif
+_iwm=  iwm
 _iwn=  iwn
+_ixgb= ixgb
 .if ${MK_SOURCELESS_UCODE} != no
+_ipwfw=ipwfw
+_iwifw=iwifw
+_iwmfw=iwmfw
 _iwnfw=iwnfw
 .endif
-_ixgb= ixgb
 .if ${MK_OFED} != no || defined(ALL_MODULES)
 _mlx4= mlx4
 _mlx4ib=   mlx4ib

Modified: head/sys/modules/iwm/Makefile
==
--- head/sys/modules/iwm/Makefile   Sat Aug  8 21:08:35 2015
(r286475)
+++ head/sys/modules/iwm/Makefile   Sat Aug  8 21:09:41 2015
(r286476)
@@ -9,9 +9,8 @@ SRCS+=  if_iwm_mac_ctxt.c if_iwm_phy_ctxt
 SRCS+= if_iwm_power.c if_iwm_scan.c
 # bus layer
 SRCS+= if_iwm_pcie_trans.c
-
 SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h
 
-CFLAGS+= -DIWM_DEBUG -I${.CURDIR}/../../dev/iwm
+CFLAGS+= -DIWM_DEBUG
 
 .include bsd.kmod.mk
___
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: r286294 - head/sys/arm/conf

2015-08-04 Thread Rui Paulo
Author: rpaulo
Date: Tue Aug  4 19:04:02 2015
New Revision: 286294
URL: https://svnweb.freebsd.org/changeset/base/286294

Log:
  BEAGLEBONE: remove dtrace from MODULES_EXTRA.
  
  This config is already building all modules, so we don't need the
  MODULES_EXTRA definition.  It was also causing problems to users who
  rely on MODULES_OVERRIDE to do the right thing.
  
  Discussed with:   ian

Modified:
  head/sys/arm/conf/BEAGLEBONE

Modified: head/sys/arm/conf/BEAGLEBONE
==
--- head/sys/arm/conf/BEAGLEBONETue Aug  4 18:59:54 2015
(r286293)
+++ head/sys/arm/conf/BEAGLEBONETue Aug  4 19:04:02 2015
(r286294)
@@ -32,7 +32,6 @@ makeoptions   MODULES_EXTRA=dtb/am335x
 optionsKDTRACE_HOOKS   # Kernel DTrace hooks
 optionsDDB_CTF # all architectures - kernel ELF linker 
loads CTF data
 makeoptionsWITH_CTF=1
-makeoptionsMODULES_EXTRA+=opensolaris dtrace dtrace/profile dtrace/fbt
 
 optionsHZ=100
 optionsSCHED_4BSD  # 4BSD scheduler
___
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: r284585 - head/sys/dev/atkbdc

2015-06-18 Thread Rui Paulo
Author: rpaulo
Date: Fri Jun 19 00:10:30 2015
New Revision: 284585
URL: https://svnweb.freebsd.org/changeset/base/284585

Log:
  Synaptics: fix a problem with trackpoint passthrough.
  
  There was a inconsistency which led to enable passthrough commands
  being interpreted as actual touchpad commands.
  
  Submitted by: Jan Kokemüller jan.kokemueller at gmail.com
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Fri Jun 19 00:00:32 2015(r284584)
+++ head/sys/dev/atkbdc/psm.c   Fri Jun 19 00:10:30 2015(r284585)
@@ -4839,9 +4839,7 @@ enable_synaptics(struct psm_softc *sc, e
synaptics_set_mode(sc, synaptics_preferred_mode(sc));
 
if (trackpoint_support  synhw.capPassthrough) {
-   synaptics_passthrough_on(sc);
enable_trackpoint(sc, arg);
-   synaptics_passthrough_off(sc);
}
 
VLOG(3, (LOG_DEBUG, synaptics: END init (%d buttons)\n, buttons));
@@ -5096,16 +5094,29 @@ enable_trackpoint(struct psm_softc *sc, 
KBDC kbdc = sc-kbdc;
int id;
 
+   /*
+* If called from enable_synaptics(), make sure that passthrough
+* mode is enabled so we can reach the trackpoint.
+* However, passthrough mode must be disabled before setting the
+* trackpoint parameters, as rackpoint_command() enables and disables
+* passthrough mode on its own.
+*/
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_on(sc);
+
if (send_aux_command(kbdc, 0xe1) != PSM_ACK ||
read_aux_data(kbdc) != 0x01)
-   return (FALSE);
+   goto no_trackpoint;
id = read_aux_data(kbdc);
if (id  0x01)
-   return (FALSE);
+   goto no_trackpoint;
if (arg == PROBE)
sc-tphw = id;
if (!trackpoint_support)
-   return (FALSE);
+   goto no_trackpoint;
+
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_off(sc);
 
if (arg == PROBE) {
trackpoint_sysctl_create_tree(sc);
@@ -5122,6 +5133,12 @@ enable_trackpoint(struct psm_softc *sc, 
set_trackpoint_parameters(sc);
 
return (TRUE);
+
+no_trackpoint:
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_off(sc);
+
+   return (FALSE);
 }
 
 /* Interlink electronics VersaPad */
___
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: r284474 - head/usr.sbin/syslogd

2015-06-16 Thread Rui Paulo
Author: rpaulo
Date: Tue Jun 16 22:26:22 2015
New Revision: 284474
URL: https://svnweb.freebsd.org/changeset/base/284474

Log:
  syslogd: support multiple -b options.
  
  It's now possible to bind multiple sockets to different IP addresses.
  
  PR:   159305
  Submitted by: Kurt Lidl lidl pix.net
  Sponsored by: Pi-Coral, Inc.

Modified:
  head/usr.sbin/syslogd/syslogd.8
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.8
==
--- head/usr.sbin/syslogd/syslogd.8 Tue Jun 16 22:25:08 2015
(r284473)
+++ head/usr.sbin/syslogd/syslogd.8 Tue Jun 16 22:26:22 2015
(r284474)
@@ -28,7 +28,7 @@
 .\ @(#)syslogd.8  8.1 (Berkeley) 6/6/93
 .\ $FreeBSD$
 .\
-.Dd March 3, 2015
+.Dd June 16, 2015
 .Dt SYSLOGD 8
 .Os
 .Sh NAME
@@ -194,6 +194,8 @@ The default
 .Ar service
 is
 .Ql syslog .
+This option can be specified multiple times to bind to
+multiple addresses and/or ports.
 .It Fl C
 Create log files that do not exist (permission is set to
 .Li 0600 ) .

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:25:08 2015
(r284473)
+++ head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:26:22 2015
(r284474)
@@ -124,6 +124,15 @@ const char ctty[] = _PATH_CONSOLE;
 #defineMAXUNAMES   20  /* maximum number of user names */
 
 /*
+ * List of hosts for binding.
+ */
+static STAILQ_HEAD(, host) hqueue;
+struct host {
+   char*name;
+   STAILQ_ENTRY(host)  next;
+};
+
+/*
  * Unix sockets.
  * We have two default sockets, one with 666 permissions,
  * and one for privileged programs.
@@ -275,7 +284,7 @@ static int  Foreground = 0; /* Run in for
 static int resolve = 1;/* resolve hostname */
 static charLocalHostName[MAXHOSTNAMELEN];  /* our hostname */
 static const char *LocalDomain;/* our local domain name */
-static int *finet; /* Internet datagram socket */
+static int *finet; /* Internet datagram sockets */
 static int fklog = -1; /* /dev/klog */
 static int Initialized;/* set when we have initialized ourselves */
 static int MarkInterval = 20 * 60; /* interval between marks in seconds */
@@ -348,10 +357,10 @@ main(int argc, char *argv[])
struct sockaddr_storage frominet;
fd_set *fdsr = NULL;
char line[MAXLINE + 1];
-   char *bindhostname;
const char *hname;
struct timeval tv, *tvp;
struct sigaction sact;
+   struct host *host;
struct funix *fx, *fx1;
sigset_t mask;
pid_t ppid = 1, spid;
@@ -360,7 +369,8 @@ main(int argc, char *argv[])
if (madvise(NULL, 0, MADV_PROTECT) != 0)
dprintf(madvise() failed: %s\n, strerror(errno));
 
-   bindhostname = NULL;
+   STAILQ_INIT(hqueue);
+
while ((ch = getopt(argc, argv, 468Aa:b:cCdf:Fkl:m:nNop:P:sS:Tuv))
!= -1)
switch (ch) {
@@ -383,8 +393,13 @@ main(int argc, char *argv[])
usage();
break;
case 'b':
-   bindhostname = optarg;
+  {
+   if ((host = malloc(sizeof(struct host))) == NULL)
+   err(1, malloc failed);
+   host-name = optarg;
+   STAILQ_INSERT_TAIL(hqueue, host, next);
break;
+  }
case 'c':
no_compress++;
break;
@@ -433,7 +448,7 @@ main(int argc, char *argv[])
if (strlen(name) = sizeof(sunx.sun_path))
errx(1, %s path too long, exiting, name);
if ((fx = malloc(sizeof(struct funix))) == NULL)
-   errx(1, malloc failed);
+   err(1, malloc failed);
fx-s = -1;
fx-name = name;
fx-mode = mode;
@@ -555,8 +570,26 @@ main(int argc, char *argv[])
}
increase_rcvbuf(fx-s);
}
-   if (SecureMode = 1)
-   finet = socksetup(family, bindhostname);
+   if (SecureMode = 1) {
+   if (STAILQ_EMPTY(hqueue))
+   finet = socksetup(family, NULL);
+   STAILQ_FOREACH(host, hqueue, next) {
+   int *finet0, total;
+   finet0 = socksetup(family, host-name);
+   if (finet0  !finet) {
+   finet = finet0;
+   } else if (finet0  finet) {
+   total = *finet0 + *finet + 1;
+   finet = realloc(finet, total * sizeof(int));
+

svn commit: r284475 - head/usr.sbin/syslogd

2015-06-16 Thread Rui Paulo
Author: rpaulo
Date: Tue Jun 16 22:31:38 2015
New Revision: 284475
URL: https://svnweb.freebsd.org/changeset/base/284475

Log:
  syslogd: don't leak finet0.
  
  Submitted by: Kurt Lidl lidl pix.net
  Sponsored by: Pi-Coral, Inc.

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

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:26:22 2015
(r284474)
+++ head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:31:38 2015
(r284475)
@@ -587,6 +587,7 @@ main(int argc, char *argv[])
finet[(*finet)+i] = finet0[i];
}
*finet = total - 1;
+   free(finet0);
}
}
}
___
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: r284476 - head/usr.sbin/syslogd

2015-06-16 Thread Rui Paulo
Author: rpaulo
Date: Tue Jun 16 22:42:19 2015
New Revision: 284476
URL: https://svnweb.freebsd.org/changeset/base/284476

Log:
  syslogd: re-read the timezone when receive a SIGHUP.
  
  syslogd already re-reads the configuration file and the hostname when
  receiving a SIGHUP, so it makes sense to reset the timezone.
  Special care was taken to ensure we don't break installations running
  with a custom TZ variable.
  
  PR:   196905
  Submitted by: Kurt Lidl lidl pix.net
  Sponsored by: Pi-Coral, Inc.

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

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:31:38 2015
(r284475)
+++ head/usr.sbin/syslogd/syslogd.c Tue Jun 16 22:42:19 2015
(r284476)
@@ -1603,6 +1603,24 @@ init(int signo)
}
 
/*
+* Load / reload timezone data (in case it changed).
+*
+* Just calling tzset() again does not work, the timezone code
+* caches the result.  However, by setting the TZ variable, one
+* can defeat the caching and have the timezone code really
+* reload the timezone data.  Respect any initial setting of
+* TZ, in case the system is configured specially.
+*/
+   dprintf(loading timezone data via tzset()\n);
+   if (getenv(TZ)) {
+   tzset();
+   } else {
+   setenv(TZ, :/etc/localtime, 1);
+   tzset();
+   unsetenv(TZ);
+   }
+
+   /*
 *  Close all open log files.
 */
Initialized = 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


svn commit: r284247 - head/sys/dev/ichsmb

2015-06-10 Thread Rui Paulo
Author: rpaulo
Date: Wed Jun 10 22:37:09 2015
New Revision: 284247
URL: https://svnweb.freebsd.org/changeset/base/284247

Log:
  ichsmb: remove whitespace.

Modified:
  head/sys/dev/ichsmb/ichsmb_pci.c

Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==
--- head/sys/dev/ichsmb/ichsmb_pci.cWed Jun 10 22:33:56 2015
(r284246)
+++ head/sys/dev/ichsmb/ichsmb_pci.cWed Jun 10 22:37:09 2015
(r284247)
@@ -5,7 +5,7 @@
  * Copyright (c) 2000 Whistle Communications, Inc.
  * All rights reserved.
  * Author: Archie Cobbs arc...@freebsd.org
- * 
+ *
  * Subject to the following obligations and disclaimer of warranty, use and
  * redistribution of this software, in source or object code forms, with or
  * without modifications are expressly permitted by Whistle Communications;
@@ -16,7 +16,7 @@
  *Communications, Inc. trademarks, including the mark WHISTLE
  *COMMUNICATIONS on advertising, endorsements, or otherwise except as
  *such appears in the above copyright notice or in the software.
- * 
+ *
  * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS AS IS, AND
  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
  * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
___
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: r284248 - head/sys/dev/ichsmb

2015-06-10 Thread Rui Paulo
Author: rpaulo
Date: Wed Jun 10 22:39:10 2015
New Revision: 284248
URL: https://svnweb.freebsd.org/changeset/base/284248

Log:
  ichsmb: add Intel Wellsburg device ID.
  
  Submitted by: Michael Allen mallen pi-coral.com
  MFC after:1 week
  Sponsored by: Pi-Coral, Inc.

Modified:
  head/sys/dev/ichsmb/ichsmb_pci.c

Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==
--- head/sys/dev/ichsmb/ichsmb_pci.cWed Jun 10 22:37:09 2015
(r284247)
+++ head/sys/dev/ichsmb/ichsmb_pci.cWed Jun 10 22:39:10 2015
(r284248)
@@ -91,6 +91,7 @@ __FBSDID($FreeBSD$);
 #define ID_LPTLP   0x9c228086
 #define ID_WCPT0x8ca28086
 #define ID_WCPTLP  0x9ca28086
+#defineID_WELLSBURG0x8d228086
 
 #define PCIS_SERIALBUS_SMBUS_PROGIF0x00
 
@@ -212,6 +213,9 @@ ichsmb_pci_probe(device_t dev)
case ID_COLETOCRK:
device_set_desc(dev, Intel Coleto Creek SMBus controller);
break;
+   case ID_WELLSBURG:
+   device_set_desc(dev, Intel Wellsburg SMBus controller);
+   break;
default:
return (ENXIO);
}
___
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: r283138 - head/sys/arm/ti

2015-05-20 Thread Rui Paulo
Author: rpaulo
Date: Wed May 20 06:23:01 2015
New Revision: 283138
URL: https://svnweb.freebsd.org/changeset/base/283138

Log:
  ti_pruss: pass the correct IRQ to userland.
  
  Also, fix several problems with the kqueue notification.
  
  Submitted by: Manuel Stühn freebsdnewbie at freenet.de

Modified:
  head/sys/arm/ti/ti_pruss.c
  head/sys/arm/ti/ti_pruss.h

Modified: head/sys/arm/ti/ti_pruss.c
==
--- head/sys/arm/ti/ti_pruss.c  Wed May 20 05:49:52 2015(r283137)
+++ head/sys/arm/ti/ti_pruss.c  Wed May 20 06:23:01 2015(r283138)
@@ -70,7 +70,8 @@ static void   ti_pruss_kq_read_detach(s
 static int ti_pruss_kq_read_event(struct knote *, long);
 static d_kqfilter_tti_pruss_kqfilter;
 
-#defineTI_PRUSS_IRQS   8
+#defineTI_PRUSS_IRQS   8
+
 struct ti_pruss_softc {
struct mtx  sc_mtx;
struct resource *sc_mem_res;
@@ -119,6 +120,7 @@ static struct resource_spec ti_pruss_irq
{ SYS_RES_IRQ,  7,  RF_ACTIVE },
{ -1,   0,  0 }
 };
+CTASSERT(TI_PRUSS_IRQS == nitems(ti_pruss_irq_spec) - 1);
 
 static struct ti_pruss_irq_arg {
intirq;
@@ -166,6 +168,7 @@ ti_pruss_attach(device_t dev)
sc = device_get_softc(dev);
rid = 0;
mtx_init(sc-sc_mtx, TI PRUSS, NULL, MTX_DEF);
+   knlist_init_mtx(sc-sc_selinfo.si_note, sc-sc_mtx);
sc-sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, rid,
RF_ACTIVE);
if (sc-sc_mem_res == NULL) {
@@ -219,6 +222,9 @@ ti_pruss_detach(device_t dev)
rman_get_rid(sc-sc_irq_res[i]),
sc-sc_irq_res[i]);
}
+   knlist_clear(sc-sc_selinfo.si_note, 0);
+   knlist_destroy(sc-sc_selinfo.si_note);
+   mtx_destroy(sc-sc_mtx);
if (sc-sc_mem_res)
bus_release_resource(dev, SYS_RES_MEMORY, 
rman_get_rid(sc-sc_mem_res),
sc-sc_mem_res);
@@ -231,13 +237,23 @@ ti_pruss_detach(device_t dev)
 static void
 ti_pruss_intr(void *arg)
 {
-   struct ti_pruss_irq_arg *iap;
-   struct ti_pruss_softc *sc;
-
-   iap = arg;
-   sc = iap-sc;
-   DPRINTF(interrupt %p, sc);
-   KNOTE_UNLOCKED(sc-sc_selinfo.si_note, iap-irq);
+   int val;
+   struct ti_pruss_irq_arg *iap = arg;
+   struct ti_pruss_softc *sc = iap-sc;
+   /*
+* Interrupts pr1_host_intr[0:7] are mapped to 
+* Host-2 to Host-9 of PRU-ICSS IRQ-controller.
+*/
+   const int pru_int = iap-irq + 2;
+   const int pru_int_mask = (1  pru_int);
+
+   val = ti_pruss_reg_read(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIER);
+   DPRINTF(interrupt %p, %d, sc, pru_int);
+   if (!(val  pru_int_mask))
+   return;
+   ti_pruss_reg_write(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIDISR, 
+   pru_int);
+   KNOTE_UNLOCKED(sc-sc_selinfo.si_note, pru_int);
 }
 
 static int

Modified: head/sys/arm/ti/ti_pruss.h
==
--- head/sys/arm/ti/ti_pruss.h  Wed May 20 05:49:52 2015(r283137)
+++ head/sys/arm/ti/ti_pruss.h  Wed May 20 06:23:01 2015(r283138)
@@ -33,4 +33,8 @@
 #definePRUSS_AM33XX_REV0x4e82A900
 #definePRUSS_AM33XX_INTC   0x2
 
+#define PRUSS_INTC_HIER0x1500
+#define PRUSS_INTC_HIDISR  0x0038
+#define PRUSS_INTC_HIPIR_BASE  0x0900
+
 #endif /* _TI_PRUSS_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: r283025 - head/cddl/contrib/opensolaris/lib/libdtrace/common

2015-05-18 Thread Rui Paulo
On Sunday 17 May 2015 03:59:09 Mark Johnston wrote:
 Author: markj
 Date: Sun May 17 03:59:08 2015
 New Revision: 283025
 URL: https://svnweb.freebsd.org/changeset/base/283025
 
 Log:
   As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
 return an error if one of the depends_on directives in a library is not
 satisfied. In this case, libdtrace is supposed to ignore the library and
 carry on. However, the remainder of the library may still be buffered by
 the lexer, causing libdtrace to erroneously continue processing it on the
 next call to yyparse(). Fix this by explicitly flushing the input buffer
 each time the compiler state is reset.

Hmm, nice catch!

-- 
Rui Paulo
___
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: r283012 - head/sys/dev/acpi_support

2015-05-16 Thread Rui Paulo
Author: rpaulo
Date: Sat May 16 20:06:39 2015
New Revision: 283012
URL: https://svnweb.freebsd.org/changeset/base/283012

Log:
  acpi_ibm: whitespace.

Modified:
  head/sys/dev/acpi_support/acpi_ibm.c

Modified: head/sys/dev/acpi_support/acpi_ibm.c
==
--- head/sys/dev/acpi_support/acpi_ibm.cSat May 16 20:04:49 2015
(r283011)
+++ head/sys/dev/acpi_support/acpi_ibm.cSat May 16 20:06:39 2015
(r283012)
@@ -530,7 +530,7 @@ acpi_ibm_sysctl(SYSCTL_HANDLER_ARGS)
int error = 0;
int function;
int method;
-   
+
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
 
sc = (struct acpi_ibm_softc *)oidp-oid_arg1;
@@ -823,7 +823,7 @@ acpi_ibm_sysctl_init(struct acpi_ibm_sof
return (FALSE);
 
case ACPI_IBM_METHOD_FANSPEED:
-   /* 
+   /*
 * Some models report the fan speed in levels from 0-7
 * Newer models report it contiguously
 */
@@ -834,7 +834,7 @@ acpi_ibm_sysctl_init(struct acpi_ibm_sof
 
case ACPI_IBM_METHOD_FANLEVEL:
case ACPI_IBM_METHOD_FANSTATUS:
-   /* 
+   /*
 * Fan status is only supported on those models,
 * which report fan RPM contiguously, not in levels
 */
@@ -871,10 +871,10 @@ acpi_ibm_thermal_sysctl(SYSCTL_HANDLER_A
 
for (int i = 0; i  8; ++i) {
temp_cmd[3] = '0' + i;
-   
-   /* 
+
+   /*
 * The TMPx methods seem to return +/- 128 or 0
-* when the respecting sensor is not available 
+* when the respecting sensor is not available
 */
if (ACPI_FAILURE(acpi_GetInteger(sc-ec_handle, temp_cmd,
temp[i])) || ABS(temp[i]) == 128 || temp[i] == 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: r282948 - head/lib/libthr/thread

2015-05-15 Thread Rui Paulo
On Friday 15 May 2015 08:40:17 Konstantin Belousov wrote:
 Author: kib
 Date: Fri May 15 08:40:17 2015
 New Revision: 282948
 URL: https://svnweb.freebsd.org/changeset/base/282948
 
 Log:
   Some third-party malloc(3) implementations use pthread_setspecific(3)
   to handle per-thread information.  Since our pthread_setspecific()
   implementation calls calloc(3) to allocate per-thread specific data
   storage, things get complicated.
 
   Switch the allocator to use bare mmap(2).  There is some loss of the
   allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct
   pthread_specific_elem) is 3K (it actually spans whole page due to
   padding), but I believe it is more acceptable than additional code for
   specialized allocator().
 
   The alternatives would either to make the specific data array be part of
   the struct thread, or use internal bindings to call the libc malloc,
   avoiding interposing.
 
   Also do the style pass over the thr_spec.c, esp. simplify the
   conditionals nesting by returning early when an error detected.
   Remove trivial comments.
 
   Found by:   y...@rawbw.com
   PR: 200138
   Sponsored by:   The FreeBSD Foundation
   MFC after:  2 weeks

Thanks!  I think umem might be affected as well.

-- 
Rui Paulo
___
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: r282910 - head

2015-05-14 Thread Rui Paulo
Author: rpaulo
Date: Thu May 14 17:37:10 2015
New Revision: 282910
URL: https://svnweb.freebsd.org/changeset/base/282910

Log:
  ObsoleteFiles: add lib32 entries for libyaml missed in r262407.
  
  Pointy hat:   bapt

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu May 14 17:12:45 2015(r282909)
+++ head/ObsoleteFiles.inc  Thu May 14 17:37:10 2015(r282910)
@@ -649,6 +649,10 @@ OLD_FILES+=usr/lib/private/libyaml.a
 OLD_FILES+=usr/lib/private/libyaml.so
 OLD_FILES+=usr/lib/private/libyaml.so.1
 OLD_FILES+=usr/lib/private/libyaml_p.a
+OLD_FILES+=usr/lib32/private/libyaml.a
+OLD_FILES+=usr/lib32/private/libyaml.so
+OLD_FILES+=usr/lib32/private/libyaml.so.1
+OLD_FILES+=usr/lib32/private/libyaml_p.a
 # 20140216: new clang import which bumps version from 3.3 to 3.4.
 OLD_FILES+=usr/bin/llvm-prof
 OLD_FILES+=usr/bin/llvm-ranlib
___
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: r282827 - in head/sys: arm/ti/am335x boot/fdt/dts/arm

2015-05-12 Thread Rui Paulo
On Wednesday 13 May 2015 01:10:28 Luiz Otavio O Souza wrote:
 Author: loos
 Date: Wed May 13 01:10:28 2015
 New Revision: 282827
 URL: https://svnweb.freebsd.org/changeset/base/282827
 
 Log:
   Add support for the power button on BeagleBone Black.
 
   Shutdown and turn off the board when the power button is pressed.
 
   Submitted by:   Michal Meloun mel...@miracle.cz
   Relnotes:   yes

Cool! But...

 
 Modified:
   head/sys/arm/ti/am335x/am335x_pmic.c
   head/sys/boot/fdt/dts/arm/beaglebone-black.dts
 
 Modified: head/sys/arm/ti/am335x/am335x_pmic.c
 
 == --- head/sys/arm/ti/am335x/am335x_pmic.c   Wed May 13 00:28:36
 2015  (r282826) +++ head/sys/arm/ti/am335x/am335x_pmic.c  Wed May 13 
01:10:28
 2015  (r282827) @@ -37,6 +37,7 @@ __FBSDID($FreeBSD$);
  #include sys/clock.h
  #include sys/time.h
  #include sys/bus.h
 +#include sys/proc.h
  #include sys/reboot.h
  #include sys/resource.h
  #include sys/rman.h
 @@ -58,12 +59,20 @@ __FBSDID($FreeBSD$);
  #define TPS65217D0x6
 
  /* TPS65217 Reisters */
 -#define TPS65217_CHIPID_REG  0x00
 -#define TPS65217_STATUS_REG  0x0A
 -#define  TPS65217_STATUS_OFF (1U  7)
 -#define  TPS65217_STATUS_ACPWR   (1U  3)
 -#define  TPS65217_STATUS_USBPWR  (1U  2)
 -#define  TPS65217_STATUS_BT  (1U  0)
 +#define  TPS65217_CHIPID_REG 0x00
 +#define  TPS65217_INT_REG0x02
 +#define   TPS65217_INT_PBM   (1U  6)
 +#define   TPS65217_INT_ACM   (1U  5)
 +#define   TPS65217_INT_USBM  (1U  4)
 +#define   TPS65217_INT_PBI   (1U  2)
 +#define   TPS65217_INT_ACI   (1U  1)
 +#define   TPS65217_INT_USBI  (1U  0)
 +
 +#define  TPS65217_STATUS_REG 0x0A
 +#define   TPS65217_STATUS_OFF(1U  7)
 +#define   TPS65217_STATUS_ACPWR  (1U  3)
 +#define   TPS65217_STATUS_USBPWR (1U  2)
 +#define   TPS65217_STATUS_BT (1U  0)
 
  #define MAX_IIC_DATA_SIZE2
 
 @@ -72,6 +81,8 @@ struct am335x_pmic_softc {
   device_tsc_dev;
   uint32_tsc_addr;
   struct intr_config_hook enum_hook;
 + struct resource *sc_irq_res;
 + void*sc_intrhand;
  };
 
  static void am335x_pmic_shutdown(void *, int);
 @@ -105,6 +116,38 @@ am335x_pmic_write(device_t dev, uint8_t
   return (iicbus_transfer(dev, msg, 1));
  }
 
 +static void
 +am335x_pmic_intr(void *arg)
 +{
 + struct am335x_pmic_softc *sc = (struct am335x_pmic_softc *)arg;
 + uint8_t int_reg, status_reg;
 + int rv;
 + char notify_buf[16];
 +
 + THREAD_SLEEPING_OK();
 + rv = am335x_pmic_read(sc-sc_dev, TPS65217_INT_REG, int_reg, 1);

Scary!  The correct way to handle this case is to start a task(9).  Why wasn't 
that done here?

-- 
Rui Paulo
___
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: r282734 - in head/sys: dev/atkbdc sys

2015-05-10 Thread Rui Paulo
Author: rpaulo
Date: Sun May 10 20:36:57 2015
New Revision: 282734
URL: https://svnweb.freebsd.org/changeset/base/282734

Log:
  synaptics: more support for semi-MT trackpads.
  
  Several improvements to the Synaptics driver to support
  semi-multitouch trackpads and some other fixes:
  
  - Two finger scrolling support for semi-MT touchpads. Those include
  many of the older Synaptics touchpads before true multitouch support
  (indicated by capMultiFinger). Semi-MT touchpads can report a second
  finger position, but the X or Y coordinate may be swapped with some
  coordinate of the first finger. This is a result of how the hardware
  works internally. Therefore, all that can be reliably extracted is the
  bounding box of the two finger positions. Semi-MT touchpads can be
  recognized by the capAdvancedGestures capability bit. After setting the
  mode byte, advanced gestures mode has to be enabled. Then, data packets
  compatible with the capMultiFinger format are sent, so the same two
  finger scrolling code can be leveraged. Enabling advanced gestures mode
  on true multitouch touchpads should be harmless. Linux seems to always
  enable advanced gestures mode.
  
  - Put mode setting logic into own functions synaptics_preferred_mode()
  and synaptics_set_mode() to have this in one place.
  synaptics_passthrough_on() and synaptics_passthrough_off() currently
  always use 0xc1 as the mode byte, which may be wrong for touchpads that
  don't have capExtended.
  
  - Expose X and Y resolution of touchpad to userland. Also expose minimum
  and maximum X and Y coordinates. This is useful for programs in
  userspace that read raw PSM packets (with PSM_LEVEL_NATIVE enabled) and
  need to interpret the coordinates.
  
  - Also send extended w mode packets (see section 3.2.9 of
  511-000275-01_RevB.pdf) to userspace if PSM_LEVEL_NATIVE is enabled.
  This is useful for userspace programs/drivers such as
  xf86-input-synaptics that can handle these packets.
  
  - Fix parsing of nExtendedQueries, and request extended/continued
  capability bits depending on this value.
  
  - capReportsMax, capClearPad, capAdvancedGestures and capCoveredPad must
  be extracted from status[0] and not status[2], I think.
  
  Submitted by: Jan Kokemüller jan.kokemueller at gmail.com

Modified:
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sun May 10 20:02:26 2015(r282733)
+++ head/sys/dev/atkbdc/psm.c   Sun May 10 20:36:57 2015(r282734)
@@ -483,6 +483,8 @@ static probefunc_t  enable_versapad;
 static void set_trackpoint_parameters(struct psm_softc *sc);
 static void synaptics_passthrough_on(struct psm_softc *sc);
 static void synaptics_passthrough_off(struct psm_softc *sc);
+static int synaptics_preferred_mode(struct psm_softc *sc);
+static void synaptics_set_mode(struct psm_softc *sc, int mode_byte);
 
 static struct {
int model;
@@ -933,14 +935,8 @@ doopen(struct psm_softc *sc, int command
get_mouse_status(sc-kbdc, stat, 0, 3);
if ((SYNAPTICS_VERSION_GE(sc-synhw, 7, 5) ||
 stat[1] == 0x47) 
-   stat[2] == 0x40) {
-   /* Set the mode byte -- request wmode where
-* available */
-   if (sc-synhw.capExtended)
-   mouse_ext_command(sc-kbdc, 0xc1);
-   else
-   mouse_ext_command(sc-kbdc, 0xc0);
-   set_mouse_sampling_rate(sc-kbdc, 20);
+stat[2] == 0x40) {
+   synaptics_set_mode(sc, synaptics_preferred_mode(sc));
VLOG(5, (LOG_DEBUG, psm%d: Synaptis Absolute Mode 
hopefully restored\n,
sc-unit));
@@ -2176,6 +2172,20 @@ psmioctl(struct cdev *dev, u_long cmd, c
(*(int *)addr  PSM_LEVEL_MAX))
return (EINVAL);
sc-mode.level = *(int *)addr;
+
+   if (sc-hw.model == MOUSE_MODEL_SYNAPTICS) {
+   /*
+* If we are entering PSM_LEVEL_NATIVE, we want to
+* enable sending of extended W mode packets to
+* userland. Reset the mode of the touchpad so that the
+* change in the level is picked up.
+*/
+   error = block_mouse_data(sc, command_byte);
+   if (error)
+   return (error);
+   synaptics_set_mode(sc, synaptics_preferred_mode(sc));
+   unblock_mouse_data(sc, command_byte);
+   }
break;
 
case MOUSE_GETSTATUS:
@@ -2865,7 +2875,8 @@ proc_synaptics(struct psm_softc *sc, pac
 

Re: svn commit: r282728 - head/sys/boot/efi/loader/arch/i386

2015-05-10 Thread Rui Paulo
On Sunday 10 May 2015 13:30:22 Ian Lepore wrote:
 Author: ian
 Date: Sun May 10 13:30:21 2015
 New Revision: 282728
 URL: https://svnweb.freebsd.org/changeset/base/282728
 
 Log:
   Don't check the return value from self_reloc(), it can't fail and doesn't
   return a value.
 
   Despite what I said in my prior commit, it turns out this one platform
   was checking the return value from the old self-reloc code (which returned
 a hard-coded 0).

Mea culpa.  :-)

-- 
Rui Paulo
___
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: r281806 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20 contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/...

2015-04-20 Thread Rui Paulo
Author: rpaulo
Date: Tue Apr 21 01:45:11 2015
New Revision: 281806
URL: https://svnweb.freebsd.org/changeset/base/281806

Log:
  Merge wpa_supplicant/hostapd 2.4.
  
  Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
  bug fixes.
  
  Relnotes: yes

Added:
  head/contrib/wpa/CONTRIBUTIONS
 - copied unchanged from r281682, vendor/wpa/dist/CONTRIBUTIONS
  head/contrib/wpa/hostapd/hapd_module_tests.c
 - copied unchanged from r281682, 
vendor/wpa/dist/hostapd/hapd_module_tests.c
  head/contrib/wpa/hostapd/wps-ap-nfc.py
 - copied unchanged from r281682, vendor/wpa/dist/hostapd/wps-ap-nfc.py
  head/contrib/wpa/hs20/
 - copied from r281682, vendor/wpa/dist/hs20/
  head/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch
 - copied unchanged from r281682, 
vendor/wpa/dist/patches/openssl-0.9.8za-tls-extensions.patch
  head/contrib/wpa/src/ap/acs.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.c
  head/contrib/wpa/src/ap/acs.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.h
  head/contrib/wpa/src/ap/bss_load.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.c
  head/contrib/wpa/src/ap/bss_load.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.h
  head/contrib/wpa/src/ap/dfs.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.c
  head/contrib/wpa/src/ap/dfs.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.h
  head/contrib/wpa/src/ap/dhcp_snoop.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.c
  head/contrib/wpa/src/ap/dhcp_snoop.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.h
  head/contrib/wpa/src/ap/ndisc_snoop.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.c
  head/contrib/wpa/src/ap/ndisc_snoop.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.h
  head/contrib/wpa/src/ap/x_snoop.c
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.c
  head/contrib/wpa/src/ap/x_snoop.h
 - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.h
  head/contrib/wpa/src/common/common_module_tests.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/common/common_module_tests.c
  head/contrib/wpa/src/common/hw_features_common.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/common/hw_features_common.c
  head/contrib/wpa/src/common/hw_features_common.h
 - copied unchanged from r281682, 
vendor/wpa/dist/src/common/hw_features_common.h
  head/contrib/wpa/src/common/ieee802_1x_defs.h
 - copied unchanged from r281682, 
vendor/wpa/dist/src/common/ieee802_1x_defs.h
  head/contrib/wpa/src/common/qca-vendor-attr.h
 - copied unchanged from r281682, 
vendor/wpa/dist/src/common/qca-vendor-attr.h
  head/contrib/wpa/src/common/qca-vendor.h
 - copied unchanged from r281682, vendor/wpa/dist/src/common/qca-vendor.h
  head/contrib/wpa/src/common/sae.c
 - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.c
  head/contrib/wpa/src/common/sae.h
 - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.h
  head/contrib/wpa/src/common/tnc.h
 - copied unchanged from r281682, vendor/wpa/dist/src/common/tnc.h
  head/contrib/wpa/src/common/wpa_helpers.c
 - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.c
  head/contrib/wpa/src/common/wpa_helpers.h
 - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.h
  head/contrib/wpa/src/crypto/aes-siv.c
 - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes-siv.c
  head/contrib/wpa/src/crypto/aes_siv.h
 - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes_siv.h
  head/contrib/wpa/src/crypto/crypto_module_tests.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/crypto/crypto_module_tests.c
  head/contrib/wpa/src/crypto/sha256-kdf.c
 - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha256-kdf.c
  head/contrib/wpa/src/crypto/sha384.h
 - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha384.h
  head/contrib/wpa/src/drivers/driver_macsec_qca.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_macsec_qca.c
  head/contrib/wpa/src/drivers/driver_nl80211.h
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_nl80211.h
  head/contrib/wpa/src/drivers/driver_nl80211_android.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_nl80211_android.c
  head/contrib/wpa/src/drivers/driver_nl80211_capa.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_nl80211_capa.c
  head/contrib/wpa/src/drivers/driver_nl80211_event.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_nl80211_event.c
  head/contrib/wpa/src/drivers/driver_nl80211_monitor.c
 - copied unchanged from r281682, 
vendor/wpa/dist/src/drivers/driver_nl80211_monitor.c
  

svn commit: r281807 - head/usr.sbin/wpa

2015-04-20 Thread Rui Paulo
Author: rpaulo
Date: Tue Apr 21 02:00:37 2015
New Revision: 281807
URL: https://svnweb.freebsd.org/changeset/base/281807

Log:
  Fix wpa/hostapd build without OpenSSL.

Modified:
  head/usr.sbin/wpa/Makefile.crypto

Modified: head/usr.sbin/wpa/Makefile.crypto
==
--- head/usr.sbin/wpa/Makefile.crypto   Tue Apr 21 01:45:11 2015
(r281806)
+++ head/usr.sbin/wpa/Makefile.crypto   Tue Apr 21 02:00:37 2015
(r281807)
@@ -53,7 +53,8 @@ SRCS+=tls_openssl.c
 .endif
 
 .if defined(CONFIG_INTERNAL_AES)
-SRCS+= aes-internal.c \
+SRCS+= aes-unwrap.c aes-wrap.c \
+   aes-internal.c \
aes-internal-dec.c \
aes-internal-enc.c
 .endif
@@ -92,7 +93,7 @@ SRCS+=md4-internal.c
 .endif
 
 .if defined(CONFIG_INTERNAL_MD5)
-SRCS+= md5-internal.c
+SRCS+= md5.c md5-internal.c
 .endif
 
 .if defined(NEED_FIPS186_2_PRF)
___
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: r281704 - head/sys/dev/atkbdc

2015-04-18 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 18 20:55:55 2015
New Revision: 281704
URL: https://svnweb.freebsd.org/changeset/base/281704

Log:
  Synaptics: don't report the middle button when clickPad is used.
  
  On trackpads that had support for both, we were sending two button
  events when the trackpad was pressed.
  
  Tested by:Jakob Alvermark jakob at alvermark.net
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sat Apr 18 20:55:33 2015(r281703)
+++ head/sys/dev/atkbdc/psm.c   Sat Apr 18 20:55:55 2015(r281704)
@@ -2756,7 +2756,8 @@ proc_synaptics(struct psm_softc *sc, pac
touchpad_buttons |= MOUSE_BUTTON4DOWN;
if ((pb-ipacket[3] ^ pb-ipacket[0])  0x02)
touchpad_buttons |= MOUSE_BUTTON5DOWN;
-   } else if (sc-synhw.capExtended  sc-synhw.capMiddle) {
+   } else if (sc-synhw.capExtended  sc-synhw.capMiddle 
+   !sc-synhw.capClickPad) {
/* Middle Button */
if ((pb-ipacket[0] ^ pb-ipacket[3])  0x01)
touchpad_buttons |= MOUSE_BUTTON2DOWN;
___
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: r281686 - head/sys/dev/etherswitch

2015-04-18 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 18 07:34:39 2015
New Revision: 281686
URL: https://svnweb.freebsd.org/changeset/base/281686

Log:
  Fix French typos in etherswitch.

Modified:
  head/sys/dev/etherswitch/miiproxy.c

Modified: head/sys/dev/etherswitch/miiproxy.c
==
--- head/sys/dev/etherswitch/miiproxy.c Sat Apr 18 06:53:13 2015
(r281685)
+++ head/sys/dev/etherswitch/miiproxy.c Sat Apr 18 07:34:39 2015
(r281686)
@@ -62,35 +62,35 @@ struct mdioproxy_softc {
 };
 
 /*
- * The rendevous data structures and functions allow two device endpoints to
+ * The rendezvous data structures and functions allow two device endpoints to
  * match up, so that the proxy endpoint can be associated with a target
  * endpoint.  The proxy has to know the device name of the target that it
- * wants to associate with, for example through a hint.  The rendevous code
+ * wants to associate with, for example through a hint.  The rendezvous code
  * makes no assumptions about the devices that want to meet.
  */
-struct rendevous_entry;
+struct rendezvous_entry;
 
-enum rendevous_op {
-   RENDEVOUS_ATTACH,
-   RENDEVOUS_DETACH
+enum rendezvous_op {
+   RENDEZVOUS_ATTACH,
+   RENDEZVOUS_DETACH
 };
 
-typedef int (*rendevous_callback_t)(enum rendevous_op,
-struct rendevous_entry *);
+typedef int (*rendezvous_callback_t)(enum rendezvous_op,
+struct rendezvous_entry *);
 
-static SLIST_HEAD(rendevoushead, rendevous_entry) rendevoushead =
-SLIST_HEAD_INITIALIZER(rendevoushead);
+static SLIST_HEAD(rendezvoushead, rendezvous_entry) rendezvoushead =
+SLIST_HEAD_INITIALIZER(rendezvoushead);
 
-struct rendevous_endpoint {
+struct rendezvous_endpoint {
device_tdevice;
const char  *name;
-   rendevous_callback_tcallback;
+   rendezvous_callback_t   callback;
 };
 
-struct rendevous_entry {
-   SLIST_ENTRY(rendevous_entry)entries;
-   struct rendevous_endpoint   proxy;
-   struct rendevous_endpoint   target;
+struct rendezvous_entry {
+   SLIST_ENTRY(rendezvous_entry)   entries;
+   struct rendezvous_endpoint  proxy;
+   struct rendezvous_endpoint  target;
 };
 
 /*
@@ -98,15 +98,15 @@ struct rendevous_entry {
  * returns an error, undo the attachment.
  */
 static int
-rendevous_attach(struct rendevous_entry *e, struct rendevous_endpoint *ep)
+rendezvous_attach(struct rendezvous_entry *e, struct rendezvous_endpoint *ep)
 {
int error;
 
-   error = e-proxy.callback(RENDEVOUS_ATTACH, e);
+   error = e-proxy.callback(RENDEZVOUS_ATTACH, e);
if (error == 0) {
-   error = e-target.callback(RENDEVOUS_ATTACH, e);
+   error = e-target.callback(RENDEZVOUS_ATTACH, e);
if (error != 0) {
-   e-proxy.callback(RENDEVOUS_DETACH, e);
+   e-proxy.callback(RENDEZVOUS_DETACH, e);
ep-device = NULL;
ep-callback = NULL;
}
@@ -115,27 +115,27 @@ rendevous_attach(struct rendevous_entry 
 }
 
 /*
- * Create an entry for the proxy in the rendevous list.  The name parameter
+ * Create an entry for the proxy in the rendezvous list.  The name parameter
  * indicates the name of the device that is the target endpoint for this
- * rendevous.  The callback will be invoked as soon as the target is
+ * rendezvous.  The callback will be invoked as soon as the target is
  * registered: either immediately if the target registered itself earlier,
  * or once the target registers.  Returns ENXIO if the target has not yet
  * registered.
  */
 static int
-rendevous_register_proxy(device_t dev, const char *name,
-rendevous_callback_t callback)
+rendezvous_register_proxy(device_t dev, const char *name,
+rendezvous_callback_t callback)
 {
-   struct rendevous_entry *e;
+   struct rendezvous_entry *e;
 
KASSERT(callback != NULL, (callback must be set));
-   SLIST_FOREACH(e, rendevoushead, entries) {
+   SLIST_FOREACH(e, rendezvoushead, entries) {
if (strcmp(name, e-target.name) == 0) {
/* the target is already attached */
e-proxy.name = device_get_nameunit(dev);
e-proxy.device = dev;
e-proxy.callback = callback;
-   return (rendevous_attach(e, e-proxy));
+   return (rendezvous_attach(e, e-proxy));
}
}
e = malloc(sizeof(*e), M_MIIPROXY, M_WAITOK | M_ZERO);
@@ -143,34 +143,34 @@ rendevous_register_proxy(device_t dev, c
e-proxy.device = dev;
e-proxy.callback = callback;
e-target.name = name;
-   SLIST_INSERT_HEAD(rendevoushead, e, entries);
+   SLIST_INSERT_HEAD(rendezvoushead, e, entries);
return (ENXIO);
 }
 
 /*
- * Create an entry in the rendevous list for the 

svn commit: r281544 - head/sys/dev/sound/pci/hda

2015-04-14 Thread Rui Paulo
Author: rpaulo
Date: Wed Apr 15 05:24:39 2015
New Revision: 281544
URL: https://svnweb.freebsd.org/changeset/base/281544

Log:
  snd_hda: add support for the Lenovo X1 20BS model.
  
  This requires a patch to redirect the output to a separate DAC when
  the headphones are used.  While there, add device strings for Intel
  Broadwell HDA controllers and Realtek ALC292 codecs.
  
  MFC after:1 week

Modified:
  head/sys/dev/sound/pci/hda/hdaa_patches.c
  head/sys/dev/sound/pci/hda/hdac.c
  head/sys/dev/sound/pci/hda/hdac.h
  head/sys/dev/sound/pci/hda/hdacc.c

Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
==
--- head/sys/dev/sound/pci/hda/hdaa_patches.c   Wed Apr 15 05:13:41 2015
(r281543)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c   Wed Apr 15 05:24:39 2015
(r281544)
@@ -401,6 +401,13 @@ hdac_pin_patch(struct hdaa_widget *w)
patch = as=1 seq=15;
break;
}
+   } else if (id == HDA_CODEC_ALC292 
+   subid == LENOVO_X120BS_SUBVENDOR) {
+   switch (nid) {
+   case 21:
+   patch = as=1 seq=15;
+   break;
+   }
}
 
if (patch != NULL)

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Wed Apr 15 05:13:41 2015
(r281543)
+++ head/sys/dev/sound/pci/hda/hdac.c   Wed Apr 15 05:24:39 2015
(r281544)
@@ -81,6 +81,8 @@ static const struct {
{ HDA_INTEL_HSW1,Intel Haswell,   0, 0 },
{ HDA_INTEL_HSW2,Intel Haswell,   0, 0 },
{ HDA_INTEL_HSW3,Intel Haswell,   0, 0 },
+   { HDA_INTEL_BDW1,Intel Broadwell, 0, 0 },
+   { HDA_INTEL_BDW2,Intel Broadwell, 0, 0 },
{ HDA_INTEL_CPT, Intel Cougar Point,  0, 0 },
{ HDA_INTEL_PATSBURG,Intel Patsburg,  0, 0 },
{ HDA_INTEL_PPT1,Intel Panther Point, 0, 0 },

Modified: head/sys/dev/sound/pci/hda/hdac.h
==
--- head/sys/dev/sound/pci/hda/hdac.h   Wed Apr 15 05:13:41 2015
(r281543)
+++ head/sys/dev/sound/pci/hda/hdac.h   Wed Apr 15 05:24:39 2015
(r281544)
@@ -46,6 +46,7 @@
 #define HDA_INTEL_HSW1 HDA_MODEL_CONSTRUCT(INTEL, 0x0a0c)
 #define HDA_INTEL_HSW2 HDA_MODEL_CONSTRUCT(INTEL, 0x0c0c)
 #define HDA_INTEL_HSW3 HDA_MODEL_CONSTRUCT(INTEL, 0x0d0c)
+#define HDA_INTEL_BDW1 HDA_MODEL_CONSTRUCT(INTEL, 0x160c)
 #define HDA_INTEL_CPT  HDA_MODEL_CONSTRUCT(INTEL, 0x1c20)
 #define HDA_INTEL_PATSBURG HDA_MODEL_CONSTRUCT(INTEL, 0x1d20)
 #define HDA_INTEL_PPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x1e20)
@@ -67,6 +68,7 @@
 #define HDA_INTEL_WELLS2   HDA_MODEL_CONSTRUCT(INTEL, 0x8d21)
 #define HDA_INTEL_LPTLP1   HDA_MODEL_CONSTRUCT(INTEL, 0x9c20)
 #define HDA_INTEL_LPTLP2   HDA_MODEL_CONSTRUCT(INTEL, 0x9c21)
+#define HDA_INTEL_BDW2 HDA_MODEL_CONSTRUCT(INTEL, 0x9ca0)
 #define HDA_INTEL_ALL  HDA_MODEL_CONSTRUCT(INTEL, 0x)
 
 /* Nvidia */
@@ -235,6 +237,7 @@
 #define LENOVO_TCA55_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
 #defineLENOVO_X1_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21e8)
 #defineLENOVO_X1CRBN_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9)
+#defineLENOVO_X120BS_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2227)
 #define LENOVO_X220_SUBVENDOR  HDA_MODEL_CONSTRUCT(LENOVO, 0x21da)
 #define LENOVO_X300_SUBVENDOR  HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac)
 #defineLENOVO_T400_SUBVENDOR   HDA_MODEL_CONSTRUCT(LENOVO, 0x20f2)
@@ -338,6 +341,7 @@
 #define HDA_CODEC_ALC273   HDA_CODEC_CONSTRUCT(REALTEK, 0x0273)
 #define HDA_CODEC_ALC275   HDA_CODEC_CONSTRUCT(REALTEK, 0x0275)
 #define HDA_CODEC_ALC276   HDA_CODEC_CONSTRUCT(REALTEK, 0x0276)
+#define HDA_CODEC_ALC292   HDA_CODEC_CONSTRUCT(REALTEK, 0x0292)
 #define HDA_CODEC_ALC660   HDA_CODEC_CONSTRUCT(REALTEK, 0x0660)
 #define HDA_CODEC_ALC662   HDA_CODEC_CONSTRUCT(REALTEK, 0x0662)
 #define HDA_CODEC_ALC663   HDA_CODEC_CONSTRUCT(REALTEK, 0x0663)
@@ -622,6 +626,7 @@
 #define HDA_CODEC_INTELCPT HDA_CODEC_CONSTRUCT(INTEL, 0x2805)
 #define HDA_CODEC_INTELPPT HDA_CODEC_CONSTRUCT(INTEL, 0x2806)
 #define HDA_CODEC_INTELHSW HDA_CODEC_CONSTRUCT(INTEL, 0x2807)
+#define HDA_CODEC_INTELBDW HDA_CODEC_CONSTRUCT(INTEL, 0x2808)
 #define HDA_CODEC_INTELCL  HDA_CODEC_CONSTRUCT(INTEL, 0x29fb)
 #define HDA_CODEC_INTELHDA_CODEC_CONSTRUCT(INTEL, 0x)
 

Modified: head/sys/dev/sound/pci/hda/hdacc.c
==
--- head/sys/dev/sound/pci/hda/hdacc.c  Wed Apr 15 05:13:41 2015
(r281543)
+++ head/sys/dev/sound/pci/hda/hdacc.c  Wed Apr 15 05:24:39 2015
(r281544)
@@ -87,6 

svn commit: r281441 - head/sys/dev/atkbdc

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 18:45:22 2015
New Revision: 281441
URL: https://svnweb.freebsd.org/changeset/base/281441

Log:
  Add support for controlling the trackpoint when Synaptics is enabled.
  
  To accomplish this, we must put the Synaptics hardware in passthrough
  mode when talking to the trackpoint.
  
  I only performed minor style modifications.
  
  Submitted by: Jan Kokemüller jan.kokemueller at gmail.com
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:44:07 2015(r281440)
+++ head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:45:22 2015(r281441)
@@ -191,7 +191,8 @@ enum {
SYNAPTICS_SYSCTL_VSCROLL_VER_AREA,
SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA,
SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN,
-   SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX
+   SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX,
+   SYNAPTICS_SYSCTL_TOUCHPAD_OFF
 };
 
 typedef struct synapticsinfo {
@@ -229,6 +230,7 @@ typedef struct synapticsinfo {
int  vscroll_min_delta;
int  vscroll_div_min;
int  vscroll_div_max;
+   int  touchpad_off;
 } synapticsinfo_t;
 
 typedef struct synapticspacket {
@@ -478,6 +480,10 @@ static probefunc_t enable_synaptics;
 static probefunc_t enable_trackpoint;
 static probefunc_t enable_versapad;
 
+static void set_trackpoint_parameters(struct psm_softc *sc);
+static void synaptics_passthrough_on(struct psm_softc *sc);
+static void synaptics_passthrough_off(struct psm_softc *sc);
+
 static struct {
int model;
u_char  syncmask;
@@ -885,6 +891,13 @@ doinitialize(struct psm_softc *sc, mouse
set_mouse_resolution(kbdc, mode-resolution);
set_mouse_scaling(kbdc, 1);
set_mouse_mode(kbdc);
+
+   /*
+* Trackpoint settings are lost on resume.
+* Restore them here.
+*/
+   if (sc-tphw  0)
+   set_trackpoint_parameters(sc);
}
 
/* Record sync on the next data packet we see. */
@@ -2725,6 +2738,12 @@ proc_synaptics(struct psm_softc *sc, pac
goto SYNAPTICS_END;
}
 
+   if (sc-syninfo.touchpad_off) {
+   *x = *y = *z = 0;
+   ms-button = ms-obutton;
+   goto SYNAPTICS_END;
+   }
+
/* Button presses */
touchpad_buttons = 0;
if (pb-ipacket[0]  0x01)
@@ -4131,6 +4150,10 @@ synaptics_sysctl(SYSCTL_HANDLER_ARGS)
if (arg  -6143 || arg  6143)
return (EINVAL);
break;
+case SYNAPTICS_SYSCTL_TOUCHPAD_OFF:
+   if (arg  0 || arg  1)
+   return (EINVAL);
+   break;
default:
return (EINVAL);
}
@@ -4458,6 +4481,15 @@ synaptics_sysctl_create_tree(struct psm_
sc-syninfo.vscroll_div_max, SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX,
synaptics_sysctl, I,
Divisor for slow scrolling);
+
+   /* hw.psm.synaptics.touchpad_off. */
+   sc-syninfo.touchpad_off = 0;
+   SYSCTL_ADD_PROC(sc-syninfo.sysctl_ctx,
+   SYSCTL_CHILDREN(sc-syninfo.sysctl_tree), OID_AUTO,
+   touchpad_off, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY,
+   sc-syninfo.touchpad_off, SYNAPTICS_SYSCTL_TOUCHPAD_OFF,
+   synaptics_sysctl, I,
+   Turn off touchpad);
 }
 
 static int
@@ -4689,25 +4721,75 @@ enable_synaptics(KBDC kbdc, struct psm_s
VLOG(3, (LOG_DEBUG, synaptics: END init (%d buttons)\n, buttons));
 
if (sc != NULL) {
+   if (trackpoint_support  synhw.capPassthrough) {
+   synaptics_passthrough_on(sc);
+   enable_trackpoint(kbdc, sc);
+   synaptics_passthrough_off(sc);
+   }
/* Create sysctl tree. */
synaptics_sysctl_create_tree(sc);
-
sc-hw.buttons = buttons;
}
 
return (TRUE);
 }
 
+static void
+synaptics_passthrough_on(struct psm_softc *sc)
+{
+   int mode_byte;
+
+   mode_byte = 0xc1 | (1  5);
+   VLOG(2, (LOG_NOTICE, psm: setting pass-through mode. %d\n,
+   mode_byte));
+   mouse_ext_command(sc-kbdc, mode_byte);
+
+   /* Commit the Set Mode Byte command sent above. */
+   set_mouse_sampling_rate(sc-kbdc, 20);
+}
+
+static void
+synaptics_passthrough_off(struct psm_softc *sc)
+{
+   int mode_byte;
+
+   mode_byte = 0xc1;
+   VLOG(2, (LOG_NOTICE, psm: turning pass-through mode off.\n));
+   set_mouse_scaling(sc-kbdc, 2);
+   set_mouse_scaling(sc-kbdc, 1);
+   mouse_ext_command(sc-kbdc, mode_byte);
+
+   /* Commit the Set Mode Byte command sent above. */

svn commit: r281440 - in head/sys: dev/atkbdc sys

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 18:44:07 2015
New Revision: 281440
URL: https://svnweb.freebsd.org/changeset/base/281440

Log:
  Improve Synaptics support for newer touchpads.
  
  Enable two finger scrolling by default and disable the edge scrolling if
  the touchpad has no physical zone for it.  Disable directional scrolling
  by default to avoid using extended buttons as scroll buttons.
  
  Add support for ClickPad.  On Lenovo laptops, this is the button
  reported when one presses the touchpad.
  
  While there, fix a problem where the extended buttons were not reporting
  the button release event correctly: we need to save the state of the
  buttons and report it to sysmouse until we receive a packet from the
  touchpad indicating the button has been released.  This makes it
  possible to use an extended button to resize a window.  On Lenovo
  laptops, the major buttons are actually reported as extended buttons.
  
  Tested by:many (current@)
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sat Apr 11 17:52:47 2015(r281439)
+++ head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:44:07 2015(r281440)
@@ -198,6 +198,7 @@ typedef struct synapticsinfo {
struct sysctl_ctx_list   sysctl_ctx;
struct sysctl_oid   *sysctl_tree;
int  directional_scrolls;
+   int  two_finger_scroll;
int  min_pressure;
int  max_pressure;
int  max_width;
@@ -336,6 +337,7 @@ struct psm_softc {  /* Driver status inf
int lasterr;
int cmdcount;
struct sigio*async; /* Processes waiting for SIGIO */
+   int extended_buttons;
 };
 static devclass_t psm_devclass;
 
@@ -2752,7 +2754,13 @@ proc_synaptics(struct psm_softc *sc, pac
if (pb-ipacket[5]  0x02)
touchpad_buttons |= MOUSE_BUTTON7DOWN;
} else {
-   touchpad_buttons |= MOUSE_BUTTON2DOWN;
+   if (pb-ipacket[4]  0x01)
+   touchpad_buttons |= MOUSE_BUTTON1DOWN;
+   if (pb-ipacket[5]  0x01)
+   touchpad_buttons |= MOUSE_BUTTON3DOWN;
+   if (pb-ipacket[4]  0x02)
+   touchpad_buttons |= MOUSE_BUTTON2DOWN;
+   sc-extended_buttons = touchpad_buttons;
}
 
/*
@@ -2774,13 +2782,26 @@ proc_synaptics(struct psm_softc *sc, pac
mask = (1  maskedbits) - 1;
pb-ipacket[4] = ~(mask);
pb-ipacket[5] = ~(mask);
+   } else  if (!sc-syninfo.directional_scrolls 
+   !sc-synaction.in_vscroll) {
+   /*
+* Keep reporting MOUSE DOWN until we get a new packet
+* indicating otherwise.
+*/
+   touchpad_buttons |= sc-extended_buttons;
}
}
+   /* Handle ClickPad. */
+   if (sc-synhw.capClickPad 
+   ((pb-ipacket[0] ^ pb-ipacket[3])  0x01))
+   touchpad_buttons |= MOUSE_BUTTON1DOWN;
 
ms-button = touchpad_buttons | guest_buttons;
 
-   /* Check pressure to detect a real wanted action on the
-* touchpad. */
+   /*
+* Check pressure to detect a real wanted action on the
+* touchpad.
+*/
if (*z = sc-syninfo.min_pressure) {
synapticsaction_t *synaction;
int cursor, peer, window;
@@ -2793,7 +2814,7 @@ proc_synaptics(struct psm_softc *sc, pac
int weight_current, weight_previous, weight_len_squared;
int div_min, div_max, div_len;
int vscroll_hor_area, vscroll_ver_area;
-
+   int two_finger_scroll;
int len, weight_prev_x, weight_prev_y;
int div_max_x, div_max_y, div_x, div_y;
 
@@ -2820,6 +2841,7 @@ proc_synaptics(struct psm_softc *sc, pac
div_len = sc-syninfo.div_len;
vscroll_hor_area = sc-syninfo.vscroll_hor_area;
vscroll_ver_area = sc-syninfo.vscroll_ver_area;
+   two_finger_scroll = sc-syninfo.two_finger_scroll;
 
/* Palm detection. */
if (!(
@@ -2979,33 +3001,57 @@ proc_synaptics(struct psm_softc *sc, pac
if (timevalcmp(sc-lastsoftintr, sc-taptimeout, ) ||
dxp = sc-syninfo.vscroll_min_delta ||
dyp = 

svn commit: r281406 - head/sys/dev/netmap

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 06:20:46 2015
New Revision: 281406
URL: https://svnweb.freebsd.org/changeset/base/281406

Log:
  netmap: improve the netmap attach message on FreeBSD.
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==
--- head/sys/dev/netmap/netmap.cSat Apr 11 05:38:07 2015
(r281405)
+++ head/sys/dev/netmap/netmap.cSat Apr 11 06:20:46 2015
(r281406)
@@ -2710,11 +2710,17 @@ netmap_attach(struct netmap_adapter *arg
}
 #endif /* linux */
 
+#ifdef __FreeBSD__
+   if_printf(ifp, netmap queues/slots: TX %d/%d, RX %d/%d\n,
+   hwna-up.num_tx_rings, hwna-up.num_tx_desc,
+   hwna-up.num_rx_rings, hwna-up.num_rx_desc);
+#else
D(success for %s tx %d/%d rx %d/%d queues/slots,
hwna-up.name,
hwna-up.num_tx_rings, hwna-up.num_tx_desc,
hwna-up.num_rx_rings, hwna-up.num_rx_desc
);
+#endif
return 0;
 
 fail:
___
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: r281372 - head/lib/liblzma

2015-04-10 Thread Rui Paulo

On Apr 10, 2015, at 10:22 AM, Xin LI delp...@freebsd.org wrote:

Author: delphij
Date: Fri Apr 10 17:21:47 2015
New Revision: 281372
URL: https://svnweb.freebsd.org/changeset/base/281372

Log:
For reasons that I am not understand yet, using the libmd version of
SHA256 would make libarchive based application to give:

       archive_read_extract(): Lzma library error: Corrupted input data

(Internally this is LZMA_DATA_ERR)

However, the libmd version of SHA256 is supposed to give same result
as the bundled version do, and xz(1) is not affected.
 
Can you test libarchive from github?
___
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: r281136 - head/sys/dev/ichsmb

2015-04-06 Thread Rui Paulo
Author: rpaulo
Date: Mon Apr  6 06:02:58 2015
New Revision: 281136
URL: https://svnweb.freebsd.org/changeset/base/281136

Log:
  ichsmb: add a device id for the Wildcat Point-LP.
  
  MFC after:1 week

Modified:
  head/sys/dev/ichsmb/ichsmb_pci.c

Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==
--- head/sys/dev/ichsmb/ichsmb_pci.cMon Apr  6 03:21:22 2015
(r281135)
+++ head/sys/dev/ichsmb/ichsmb_pci.cMon Apr  6 06:02:58 2015
(r281136)
@@ -86,9 +86,10 @@ __FBSDID($FreeBSD$);
 #define ID_CPT 0x1c228086
 #define ID_PPT 0x1e228086
 #define ID_AVOTON  0x1f3c8086
-#define ID_COLETOCRK   0x23B08086 
+#define ID_COLETOCRK   0x23B08086
 #define ID_LPT 0x8c228086
 #define ID_WCPT0x8ca28086
+#define ID_WCPTLP  0x9ca28086
 
 #define PCIS_SERIALBUS_SMBUS_PROGIF0x00
 
@@ -201,6 +202,9 @@ ichsmb_pci_probe(device_t dev)
case ID_WCPT:
device_set_desc(dev, Intel Wildcat Point SMBus controller);
break;
+   case ID_WCPTLP:
+   device_set_desc(dev, Intel Wildcat Point-LP SMBus controller);
+   break;
case ID_COLETOCRK:
device_set_desc(dev, Intel Coleto Creek SMBus controller);
break;
___
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: r281138 - in head/sys/boot: efi/loader i386/libi386 i386/loader

2015-04-06 Thread Rui Paulo
, smbios.bios_vendor) 
smbios_match_str(maker, smbios.maker) 
smbios_match_str(product, smbios.product));

Added: head/sys/boot/i386/libi386/smbios.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/i386/libi386/smbios.h Mon Apr  6 06:55:47 2015
(r281138)
@@ -0,0 +1,34 @@
+/*-
+ * Copyright (c) 2015 Rui Paulo rpa...@freebsd.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+#ifndef _SMBIOS_H_
+#define_SMBIOS_H_
+
+void   smbios_detect(const caddr_t);
+intsmbios_match(const char *, const char *, const char *);
+
+#endif /* _SMBIOS_H_ */

Modified: head/sys/boot/i386/loader/main.c
==
--- head/sys/boot/i386/loader/main.cMon Apr  6 06:44:48 2015
(r281137)
+++ head/sys/boot/i386/loader/main.cMon Apr  6 06:55:47 2015
(r281138)
@@ -43,6 +43,7 @@ __FBSDID($FreeBSD$);
 #include bootstrap.h
 #include common/bootargs.h
 #include libi386/libi386.h
+#include libi386/smbios.h
 #include btxv86.h
 
 #ifdef LOADER_ZFS_SUPPORT
@@ -115,7 +116,7 @@ main(void)
 }
 setheap(heap_bottom, heap_top);
 
-/* 
+/*
  * XXX Chicken-and-egg problem; we want to have console output early, but 
some
  * console attributes may depend on reading from eg. the boot device, 
which we
  * can't do yet.
@@ -181,7 +182,7 @@ main(void)
 biosacpi_detect();
 
 /* detect SMBIOS for future reference */
-smbios_detect();
+smbios_detect(NULL);
 
 /* detect PCI BIOS for future reference */
 biospci_detect();
___
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: r281127 - in head/sys: dev/atkbdc sys

2015-04-05 Thread Rui Paulo
Author: rpaulo
Date: Mon Apr  6 01:04:08 2015
New Revision: 281127
URL: https://svnweb.freebsd.org/changeset/base/281127

Log:
  psm: print newer Synaptics Touchpad capabilities.

Modified:
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Apr  6 00:34:59 2015(r281126)
+++ head/sys/dev/atkbdc/psm.c   Mon Apr  6 01:04:08 2015(r281127)
@@ -4483,8 +4483,12 @@ enable_synaptics(KBDC kbdc, struct psm_s
synhw.nExtendedQueries = (status[0]  0x70) != 0;
synhw.capMiddle= (status[0]  0x04) != 0;
synhw.capPassthrough   = (status[2]  0x80) != 0;
+   synhw.capLowPower  = (status[2]  0x40) != 0;
+   synhw.capMultiFingerReport =
+(status[2]  0x20) != 0;
synhw.capSleep = (status[2]  0x10) != 0;
synhw.capFourButtons   = (status[2]  0x08) != 0;
+   synhw.capBallistics= (status[2]  0x04) != 0;
synhw.capMultiFinger   = (status[2]  0x02) != 0;
synhw.capPalmDetect= (status[2]  0x01) != 0;
 
@@ -4495,8 +4499,12 @@ enable_synaptics(KBDC kbdc, struct psm_s
printf(   nExtendedQueries: %d\n,
synhw.nExtendedQueries);
printf(   capPassthrough: %d\n, synhw.capPassthrough);
+   printf(   capLowPower: %d\n, synhw.capLowPower);
+   printf(   capMultiFingerReport: %d\n,
+   synhw.capMultiFingerReport);
printf(   capSleep: %d\n, synhw.capSleep);
printf(   capFourButtons: %d\n, synhw.capFourButtons);
+   printf(   capBallistics: %d\n, synhw.capBallistics);
printf(   capMultiFinger: %d\n, synhw.capMultiFinger);
printf(   capPalmDetect: %d\n, synhw.capPalmDetect);
}

Modified: head/sys/sys/mouse.h
==
--- head/sys/sys/mouse.hMon Apr  6 00:34:59 2015(r281126)
+++ head/sys/sys/mouse.hMon Apr  6 01:04:08 2015(r281127)
@@ -108,6 +108,9 @@ typedef struct synapticshw {
int capPalmDetect;
int capPassthrough;
int capMiddle;
+   int capLowPower;
+   int capMultiFingerReport;
+   int capBallistics;
int nExtendedButtons;
int nExtendedQueries;
 } synapticshw_t;
___
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: r281070 - head/sys/dev/usb/wlan

2015-04-04 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 08:41:02 2015
New Revision: 281070
URL: https://svnweb.freebsd.org/changeset/base/281070

Log:
  urtwn: blink the LED when scanning.
  
  Previously, the driver was trying to blink the LED in the newstate
  function, but that only gets called once (unlike OpenBSD's net80211
  stack).  Move the LED blinking to set_channel().
  
  While there, don't try to set the channel when we switch to the SCAN
  state.  This is already accomplished by the set_channel() function.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cSat Apr  4 08:36:02 2015
(r281069)
+++ head/sys/dev/usb/wlan/if_urtwn.cSat Apr  4 08:41:02 2015
(r281070)
@@ -1568,14 +1568,9 @@ urtwn_newstate(struct ieee80211vap *vap,
urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg);
}
}
-   /* Make link LED blink during scan. */
-   urtwn_set_led(sc, URTWN_LED_LINK, !sc-ledlink);
-
/* Pause AC Tx queues. */
urtwn_write_1(sc, R92C_TXPAUSE,
urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f);
-
-   urtwn_set_chan(sc, ic-ic_curchan, NULL);
break;
case IEEE80211_S_AUTH:
/* Set initial gain under link. */
@@ -3131,8 +3126,13 @@ static void
 urtwn_set_channel(struct ieee80211com *ic)
 {
struct urtwn_softc *sc = ic-ic_ifp-if_softc;
+   struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps);
 
URTWN_LOCK(sc);
+   if (vap-iv_state == IEEE80211_S_SCAN) {
+   /* Make link LED blink during scan. */
+   urtwn_set_led(sc, URTWN_LED_LINK, !sc-ledlink);
+   }
urtwn_set_chan(sc, ic-ic_curchan, NULL);
URTWN_UNLOCK(sc);
 }
___
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: r281069 - head/sys/dev/usb/wlan

2015-04-04 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 08:36:02 2015
New Revision: 281069
URL: https://svnweb.freebsd.org/changeset/base/281069

Log:
  Remove whitespace.

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cSat Apr  4 08:11:10 2015
(r281068)
+++ head/sys/dev/usb/wlan/if_urtwn.cSat Apr  4 08:36:02 2015
(r281069)
@@ -176,12 +176,12 @@ static struct ieee80211vap *urtwn_vap_cr
 const uint8_t [IEEE80211_ADDR_LEN],
 const uint8_t [IEEE80211_ADDR_LEN]);
 static voidurtwn_vap_delete(struct ieee80211vap *);
-static struct mbuf *   urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int, 
+static struct mbuf *   urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int,
int *);
-static struct mbuf *   urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, 
+static struct mbuf *   urtwn_rxeof(struct usb_xfer *, struct urtwn_data *,
int *, int8_t *);
 static voidurtwn_txeof(struct usb_xfer *, struct urtwn_data *);
-static int urtwn_alloc_list(struct urtwn_softc *, 
+static int urtwn_alloc_list(struct urtwn_softc *,
struct urtwn_data[], int, int);
 static int urtwn_alloc_rx_list(struct urtwn_softc *);
 static int urtwn_alloc_tx_list(struct urtwn_softc *);
@@ -191,24 +191,24 @@ static void   urtwn_free_list(struct urtw
struct urtwn_data data[], int);
 static struct urtwn_data * _urtwn_getbuf(struct urtwn_softc *);
 static struct urtwn_data * urtwn_getbuf(struct urtwn_softc *);
-static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, 
+static int urtwn_write_region_1(struct urtwn_softc *, uint16_t,
uint8_t *, int);
 static voidurtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t);
 static voidurtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t);
 static voidurtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t);
-static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, 
+static int urtwn_read_region_1(struct urtwn_softc *, uint16_t,
uint8_t *, int);
 static uint8_t urtwn_read_1(struct urtwn_softc *, uint16_t);
 static uint16_turtwn_read_2(struct urtwn_softc *, uint16_t);
 static uint32_turtwn_read_4(struct urtwn_softc *, uint16_t);
-static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, 
+static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t,
const void *, int);
 static voidurtwn_r92c_rf_write(struct urtwn_softc *, int,
uint8_t, uint32_t);
-static voidurtwn_r88e_rf_write(struct urtwn_softc *, int, 
+static voidurtwn_r88e_rf_write(struct urtwn_softc *, int,
uint8_t, uint32_t);
 static uint32_turtwn_rf_read(struct urtwn_softc *, int, 
uint8_t);
-static int urtwn_llt_write(struct urtwn_softc *, uint32_t, 
+static int urtwn_llt_write(struct urtwn_softc *, uint32_t,
uint32_t);
 static uint8_t urtwn_efuse_read_1(struct urtwn_softc *, uint16_t);
 static voidurtwn_efuse_read(struct urtwn_softc *);
@@ -219,7 +219,7 @@ static void urtwn_r88e_read_rom(struct 
 static int urtwn_ra_init(struct urtwn_softc *);
 static voidurtwn_tsf_sync_enable(struct urtwn_softc *);
 static voidurtwn_set_led(struct urtwn_softc *, int, int);
-static int urtwn_newstate(struct ieee80211vap *, 
+static int urtwn_newstate(struct ieee80211vap *,
enum ieee80211_state, int);
 static voidurtwn_watchdog(void *);
 static voidurtwn_update_avgrssi(struct urtwn_softc *, int, int8_t);
@@ -237,7 +237,7 @@ static int  urtwn_r88e_power_on(struct u
 static int urtwn_llt_init(struct urtwn_softc *);
 static voidurtwn_fw_reset(struct urtwn_softc *);
 static voidurtwn_r88e_fw_reset(struct urtwn_softc *);
-static int urtwn_fw_loadpage(struct urtwn_softc *, int, 
+static int urtwn_fw_loadpage(struct urtwn_softc *, int,
const uint8_t *, int);
 static int urtwn_load_firmware(struct urtwn_softc *);
 static int urtwn_r92c_dma_init(struct urtwn_softc *);
@@ -249,22 +249,22 @@ static void   urtwn_cam_init(struct urtwn
 static voidurtwn_pa_bias_init(struct urtwn_softc *);
 static voidurtwn_rxfilter_init(struct urtwn_softc *);
 static voidurtwn_edca_init(struct urtwn_softc *);
-static 

Re: svn commit: r281059 - head/sys/boot/efi/boot1

2015-04-04 Thread Rui Paulo
On Apr 4, 2015, at 00:27, Bruce Evans b...@optusnet.com.au wrote:
 
 On Sat, 4 Apr 2015, Rui Paulo wrote:
 
 Log:
 boot1 EFI: reset the screen and select the best mode.
 
 It's necessary to reset the screen to make sure any vendor pixels are
 gone when we start boot1.  In the Lenovo X1 (3rd gen), this is the
 only way to clear the screen.  Previously, the Lenovo logo would only
 disappear after the kernel started scrolling the display.
 
 After resetting the screen, EFI could put us in the worst LCD mode
 (oversized characters), so we now find the largest mode we can use and
 hope it's the most appropriate one (it's not trivial to tell what's
 the correct LCD resolution at this point).  It's worth noting that the
 final stage loader has a 'mode' command that can be used to switch
 text modes.
 
 :-(.
 
 I just complained about the bug that vt (on non-EFI) clears the screen
 where sc carefully preserves the screen in its history buffer.

In my case, the buffer was a Lenovo logo.  In other cases it might include 
POST messages, but like you said vt already clears it.

 For graphics mode, determining the resolution is the trivial part :-).
 You also need OCR or something to translate the pixels into the format
 of your history buffer.  Don't forget to fetch Lenevo's history buffer
 and translate it into your format :-).
 
 I don't have problems with boot logos except when the battery dies,
 since I turn them off until the CMOS forgets, but lose boot messages
 in another way from newer monitors blanking the screen after mode
 switches for much longer than older monitors.  I expected newer systems
 to fix this by using the same graphics mode for the whole boot.

This is very specific to EFI.  FreeBSD has always strived to give you text 
messages during boot and, while it would be easy to have the FreeBSD logo all 
the way to Xorg like Ubuntu does, I don't see that happening any time soon.

Speaking of mode switching, they are pretty fast on this system.

 Resetting the screen is even worse than clearing.  Whole boots should
 take a second or 2.  I don't get close to that.  More like 20.  But with
 the monitor blanking the screen for 5+ seconds afer every mode switch,
 even a 20-second boot gives almost no time for reading its messages.
 Saving the messages in history buffers or booting with -p becomes more
 important.

In my system, these EFI calls (reset + clear) don't take long.  I can't tell 
any difference between the old boot time and the new boot time.

--
Rui Paulo



___
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: r281101 - head/sys/dev/hwpmc

2015-04-04 Thread Rui Paulo
Author: rpaulo
Date: Sun Apr  5 05:09:38 2015
New Revision: 281101
URL: https://svnweb.freebsd.org/changeset/base/281101

Log:
  Remove whitespace.

Modified:
  head/sys/dev/hwpmc/hwpmc_core.c

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==
--- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr  5 05:07:24 2015
(r281100)
+++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr  5 05:09:38 2015
(r281101)
@@ -410,7 +410,7 @@ iaf_start_pmc(int cpu, int ri)
iafc-pc_resync = 0;
iafc-pc_globalctrl |= (1ULL  (ri + IAF_OFFSET));
msr = rdmsr(IA_GLOBAL_CTRL)  ~IAF_GLOBAL_CTRL_MASK;
-   wrmsr(IA_GLOBAL_CTRL, msr | (iafc-pc_globalctrl  
+   wrmsr(IA_GLOBAL_CTRL, msr | (iafc-pc_globalctrl 
 IAF_GLOBAL_CTRL_MASK));
} while (iafc-pc_resync != 0);
 
@@ -487,7 +487,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value
 
/* Turn off fixed counters */
msr = rdmsr(IAF_CTRL)  ~IAF_CTRL_MASK;
-   wrmsr(IAF_CTRL, msr); 
+   wrmsr(IAF_CTRL, msr);
 
wrmsr(IAF_CTR0 + ri, v  ((1ULL  core_iaf_width) - 1));
 
@@ -704,7 +704,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2),
 IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA),
 
-IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | 
+IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW |
IAP_F_IB | IAP_F_IBX | IAP_F_HWX),
 IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
 
@@ -1316,7 +1316,7 @@ static struct iap_event_descr iap_events
 
 IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
-IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | 
+IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX |
IAP_F_IB |IAP_F_SB |  IAP_F_SBX | IAP_F_HW | IAP_F_HWX),
 
 IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2),
@@ -1466,7 +1466,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
IAP_F_I7 | IAP_F_WM | IAP_F_CAS),
 IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM |
-   IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | 
+   IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW |
IAP_F_CAS | IAP_F_HWX),
 IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX |
@@ -1623,10 +1623,10 @@ static struct iap_event_descr iap_events
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM |
IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
-IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | 
+IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB |
 IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX),
-IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB 
| 
+IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB |
 IAP_F_HW | IAP_F_HWX),
 IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB |
IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
@@ -1716,7 +1716,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS),
 IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS),
-IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | 
+IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB |
 IAP_F_IBX | IAP_F_HW | IAP_F_HWX),
 
 IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS),
@@ -1876,7 +1876,7 @@ iap_is_event_architectural(enum pmc_even
return (EV_IS_NOTARCH);
}
 
-   return (((core_architectural_events  (1  ae)) == 0) ? 
+   return (((core_architectural_events  (1  ae)) == 0) ?
EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP);
 }
 
___
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: r281102 - in head/sys: dev/hwpmc sys

2015-04-04 Thread Rui Paulo
Author: rpaulo
Date: Sun Apr  5 05:14:20 2015
New Revision: 281102
URL: https://svnweb.freebsd.org/changeset/base/281102

Log:
  hwpmc: add initial Intel Broadwell support.
  
  The full list of aliases and events will follow in a subsequent
  commit.
  
  MFC after:1 month

Modified:
  head/sys/dev/hwpmc/hwpmc_core.c
  head/sys/dev/hwpmc/hwpmc_intel.c
  head/sys/dev/hwpmc/pmc_events.h
  head/sys/sys/pmc.h

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==
--- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr  5 05:09:38 2015
(r281101)
+++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr  5 05:14:20 2015
(r281102)
@@ -574,7 +574,8 @@ struct iap_event_descr {
 #defineIAP_F_HW(1  10)   /* CPU: Haswell */
 #defineIAP_F_CAS   (1  11)   /* CPU: Atom Silvermont */
 #defineIAP_F_HWX   (1  12)   /* CPU: Haswell Xeon */
-#defineIAP_F_FM(1  13)   /* Fixed mask */
+#defineIAP_F_BW(1  13)   /* CPU: Broadwell */
+#defineIAP_F_FM(1  14)   /* Fixed mask */
 
 #defineIAP_F_ALLCPUSCORE2  \
 (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA)
@@ -2074,6 +2075,7 @@ iap_allocate_pmc(int cpu, int ri, struct
if (iap_event_corei7_ok_on_counter(ev, ri) == 0)
return (EINVAL);
break;
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:
case PMC_CPU_INTEL_SANDYBRIDGE_XEON:
case PMC_CPU_INTEL_IVYBRIDGE:
@@ -2106,6 +2108,9 @@ iap_allocate_pmc(int cpu, int ri, struct
case PMC_CPU_INTEL_ATOM_SILVERMONT:
cpuflag = IAP_F_CAS;
break;
+   case PMC_CPU_INTEL_BROADWELL:
+   cpuflag = IAP_F_BW;
+   break;
case PMC_CPU_INTEL_CORE:
cpuflag = IAP_F_CC;
break;

Modified: head/sys/dev/hwpmc/hwpmc_intel.c
==
--- head/sys/dev/hwpmc/hwpmc_intel.cSun Apr  5 05:09:38 2015
(r281101)
+++ head/sys/dev/hwpmc/hwpmc_intel.cSun Apr  5 05:14:20 2015
(r281102)
@@ -179,6 +179,10 @@ pmc_intel_initialize(void)
cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON;
nclasses = 3;
break;
+   case 0x3D:
+   cputype = PMC_CPU_INTEL_BROADWELL;
+   nclasses = 3;
+   break;
case 0x3F:  /* Per Intel document 325462-045US 09/2014. */
case 0x46:  /* Per Intel document 325462-045US 09/2014. */
/* Should 46 be XEON. probably its own? */
@@ -227,6 +231,7 @@ pmc_intel_initialize(void)
 */
case PMC_CPU_INTEL_ATOM:
case PMC_CPU_INTEL_ATOM_SILVERMONT:
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_CORE:
case PMC_CPU_INTEL_CORE2:
case PMC_CPU_INTEL_CORE2EXTREME:
@@ -295,6 +300,7 @@ pmc_intel_initialize(void)
case PMC_CPU_INTEL_HASWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:
case PMC_CPU_INTEL_WESTMERE:
+   case PMC_CPU_INTEL_BROADWELL:
error = pmc_uncore_initialize(pmc_mdep, ncpus);
break;
default:
@@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md)
 #ifdefined(__i386__) || defined(__amd64__)
case PMC_CPU_INTEL_ATOM:
case PMC_CPU_INTEL_ATOM_SILVERMONT:
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_CORE:
case PMC_CPU_INTEL_CORE2:
case PMC_CPU_INTEL_CORE2EXTREME:
@@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md)
 */
 #ifdefined(__i386__) || defined(__amd64__)
switch (md-pmd_cputype) {
+   case PMC_CPU_INTEL_BROADWELL:
case PMC_CPU_INTEL_COREI7:
case PMC_CPU_INTEL_HASWELL:
case PMC_CPU_INTEL_SANDYBRIDGE:

Modified: head/sys/dev/hwpmc/pmc_events.h
==
--- head/sys/dev/hwpmc/pmc_events.h Sun Apr  5 05:09:38 2015
(r281101)
+++ head/sys/dev/hwpmc/pmc_events.h Sun Apr  5 05:14:20 2015
(r281102)
@@ -1554,6 +1554,11 @@ __PMC_EV_ALIAS(BACLEARS.RETURN,I
 __PMC_EV_ALIAS(BACLEARS.COND,IAP_EVENT_E6H_10H)  
\
 __PMC_EV_ALIAS(MS_DECODED.MS_ENTRY,  IAP_EVENT_E7H_01H)
 
+/*
+ * Aliases for Broadwell PMC events.
+ */
+#define __PMC_EV_ALIAS_BROADWELL() \
+__PMC_EV_ALIAS_INTEL_ARCHITECTURAL()
 
 /*
  * Aliases for Core PMC events.
@@ -4228,6 +4233,11 @@ __PMC_EV(UCP, EVENT_86H_01H)
 #definePMC_EV_UCP_FIRSTPMC_EV_UCP_EVENT_00H_01H
 #definePMC_EV_UCP_LAST PMC_EV_UCP_EVENT_86H_01H
 
+/*
+ * Aliases for Broadwell 

svn commit: r281059 - head/sys/boot/efi/boot1

2015-04-03 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 04:27:54 2015
New Revision: 281059
URL: https://svnweb.freebsd.org/changeset/base/281059

Log:
  boot1 EFI: reset the screen and select the best mode.
  
  It's necessary to reset the screen to make sure any vendor pixels are
  gone when we start boot1.  In the Lenovo X1 (3rd gen), this is the
  only way to clear the screen.  Previously, the Lenovo logo would only
  disappear after the kernel started scrolling the display.
  
  After resetting the screen, EFI could put us in the worst LCD mode
  (oversized characters), so we now find the largest mode we can use and
  hope it's the most appropriate one (it's not trivial to tell what's
  the correct LCD resolution at this point).  It's worth noting that the
  final stage loader has a 'mode' command that can be used to switch
  text modes.
  
  While there, enable the software cursor, just like in the legacy boot
  mode.
  
  MFC after:1 week

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==
--- head/sys/boot/efi/boot1/boot1.c Sat Apr  4 04:18:52 2015
(r281058)
+++ head/sys/boot/efi/boot1/boot1.c Sat Apr  4 04:27:54 2015
(r281059)
@@ -108,11 +108,12 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 {
EFI_HANDLE handles[128];
EFI_BLOCK_IO *blkio;
-   UINTN i, nparts = sizeof(handles);
+   UINTN i, nparts = sizeof(handles), cols, rows, max_dim, best_mode;
EFI_STATUS status;
EFI_DEVICE_PATH *devpath;
EFI_BOOT_SERVICES *BS;
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL;
+   SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL;
char *path = _PATH_LOADER;
 
systab = Xsystab;
@@ -124,6 +125,26 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
if (status == EFI_SUCCESS)
(void)ConsoleControl-SetMode(ConsoleControl,
EfiConsoleControlScreenText);
+   /*
+* Reset the console and find the best text mode.
+*/
+   conout = systab-ConOut;
+   conout-Reset(conout, TRUE);
+   max_dim = best_mode = 0;
+   for (i = 0; ; i++) {
+   status = conout-QueryMode(conout, i,
+   cols, rows);
+   if (EFI_ERROR(status))
+   break;
+   if (cols * rows  max_dim) {
+   max_dim = cols * rows;
+   best_mode = i;
+   }
+   }
+   if (max_dim  0)
+   conout-SetMode(conout, best_mode);
+   conout-EnableCursor(conout, TRUE);
+   conout-ClearScreen(conout);
 
printf( \n FreeBSD EFI boot block\n);
printf(   Loader path: %s\n, path);
___
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: r281058 - head/sys/boot/efi/boot1

2015-04-03 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 04:18:52 2015
New Revision: 281058
URL: https://svnweb.freebsd.org/changeset/base/281058

Log:
  Remove whitespace.

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==
--- head/sys/boot/efi/boot1/boot1.c Sat Apr  4 02:34:40 2015
(r281057)
+++ head/sys/boot/efi/boot1/boot1.c Sat Apr  4 04:18:52 2015
(r281058)
@@ -30,7 +30,7 @@ __FBSDID($FreeBSD$);
 
 #define _PATH_LOADER   /boot/loader.efi
 #define _PATH_KERNEL   /boot/kernel/kernel
- 
+
 #define BSIZEMAX   16384
 
 typedef int putc_func_t(char c, void *arg);
@@ -40,7 +40,7 @@ struct sp_data {
u_int   sp_len;
u_int   sp_size;
 };
-
+
 static const char digits[] = 0123456789abcdef;
 
 static void panic(const char *fmt, ...) __dead2;
@@ -62,7 +62,7 @@ static void load(const char *fname);
 EFI_SYSTEM_TABLE *systab;
 EFI_HANDLE *image;
 
-static void 
+static void
 bcopy(const void *src, void *dst, size_t len)
 {
const char *s = src;
@@ -71,12 +71,12 @@ bcopy(const void *src, void *dst, size_t
while (len-- != 0)
*d++ = *s++;
 }
-   
+
 static void
 memcpy(void *dst, const void *src, size_t len)
 {
bcopy(src, dst, len);
-}   
+}
 
 static void
 bzero(void *b, size_t len)
@@ -86,7 +86,7 @@ bzero(void *b, size_t len)
while (len-- != 0)
*p++ = 0;
 }
-
+
 static int
 strcmp(const char *s1, const char *s2)
 {
@@ -134,7 +134,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 
for (i = 0; i  nparts; i++) {
status = systab-BootServices-HandleProtocol(handles[i],
-   DevicePathGUID, (void **)devpath); 
+   DevicePathGUID, (void **)devpath);
if (EFI_ERROR(status))
continue;
 
@@ -142,7 +142,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
devpath = NextDevicePathNode(devpath);
 
status = systab-BootServices-HandleProtocol(handles[i],
-   BlockIoProtocolGUID, (void **)blkio); 
+   BlockIoProtocolGUID, (void **)blkio);
if (EFI_ERROR(status))
continue;
 
@@ -158,7 +158,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 
bootdevhandle = handles[i];
load(path);
-   
+
panic(Load failed);
 
return EFI_SUCCESS;
@@ -266,7 +266,7 @@ fsstat(ufs_ino_t inode)
 }
 
 static struct dmadat __dmadat;
-
+
 static int
 domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet)
 {
@@ -278,7 +278,7 @@ domount(EFI_DEVICE_PATH *device, EFI_BLO
if (!quiet)
printf(domount: can't read superblock\n);
return (-1);
-   } 
+   }
if (!quiet)
printf(Succesfully mounted UFS filesystem\n);
return (0);
@@ -303,7 +303,7 @@ load(const char *fname)
status = systab-BootServices-AllocatePool(EfiLoaderData,
bufsize, buffer);
fsread(ino, buffer, bufsize);
-   
+
/* XXX: For secure boot, we need our own loader here */
status = systab-BootServices-LoadImage(TRUE, image, bootdevpath,
buffer, bufsize, loaderhandle);
@@ -549,4 +549,3 @@ __ultoa(char *buf, u_long ul, int base)
while ((ul /= base) != 0);
return (p);
 }
-
___
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: r281061 - head/sys/boot/efi/loader

2015-04-03 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 04:30:37 2015
New Revision: 281061
URL: https://svnweb.freebsd.org/changeset/base/281061

Log:
  loader/EFI: improve the help of the 'mode' command.

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Sat Apr  4 04:29:31 2015
(r281060)
+++ head/sys/boot/efi/loader/main.c Sat Apr  4 04:30:37 2015
(r281061)
@@ -285,7 +285,7 @@ command_configuration(int argc, char *ar
 }
 
 
-COMMAND_SET(mode, mode, change or display text modes, command_mode);
+COMMAND_SET(mode, mode, change or display EFI text modes, command_mode);
 
 static int
 command_mode(int argc, char *argv[])
@@ -331,7 +331,7 @@ command_mode(int argc, char *argv[])
}
 
if (i != 0)
-   printf(Choose the mode with \col mode number\\n);
+   printf(Select a mode with the command \mode number\\n);
 
return (CMD_OK);
 }
___
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: r281060 - head/sys/boot/efi/boot1

2015-04-03 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr  4 04:29:31 2015
New Revision: 281060
URL: https://svnweb.freebsd.org/changeset/base/281060

Log:
  Remove an unnecessary space in a printf call.

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==
--- head/sys/boot/efi/boot1/boot1.c Sat Apr  4 04:27:54 2015
(r281059)
+++ head/sys/boot/efi/boot1/boot1.c Sat Apr  4 04:29:31 2015
(r281060)
@@ -146,7 +146,8 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
conout-EnableCursor(conout, TRUE);
conout-ClearScreen(conout);
 
-   printf( \n FreeBSD EFI boot block\n);
+   printf(\n
+   FreeBSD EFI boot block\n);
printf(   Loader path: %s\n, path);
 
status = systab-BootServices-LocateHandle(ByProtocol,
___
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: r280728 - head/sys/conf

2015-03-27 Thread Rui Paulo
On Mar 26, 2015, at 21:44, Warner Losh i...@bsdimp.com wrote:
 Yea, the ships passed in the night. I’ve had these changes in my tree for a 
 while.
 
 However, It kinda can be overridden by compiling the modules directly. Since
 the actual module’s Makefiles don’t depend on this, I think we’re OK. Can you 
 test
 building a kernel on the BBB you have and let me know if it produces working 
 ZFS?

As long as this change works with MODULES_OVERRIDE, I'm fine with it.

--
Rui Paulo



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

2015-03-26 Thread Rui Paulo
On Mar 26, 2015, at 19:35, Warner Losh i...@freebsd.org wrote:
 
 Author: imp
 Date: Fri Mar 27 02:35:25 2015
 New Revision: 280728
 URL: https://svnweb.freebsd.org/changeset/base/280728
 
 Log:
  Categorize certain kernel builds as being broken in certain places.
 
  Differential Revision: https://reviews.freebsd.org/D2011
 
 Modified:
  head/sys/conf/kern.opts.mk
 
 Modified: head/sys/conf/kern.opts.mk
 ==
 --- head/sys/conf/kern.opts.mkFri Mar 27 02:35:11 2015
 (r280727)
 +++ head/sys/conf/kern.opts.mkFri Mar 27 02:35:25 2015
 (r280728)
 @@ -75,6 +75,34 @@ BROKEN_OPTIONS+= EISA
 BROKEN_OPTIONS+= OFED
 .endif
 
 +# Options that cannot be turned on this architecture, usually because
 +# of compilation or other issues so severe it cannot be used even
 +# on an experimental basis
 +__ALWAYS_NO_OPTIONS=
 +
 +# Things that don't work based on the CPU
 +.if ${MACHINE_CPUARCH} == arm
 +__ALWAYS_NO_OPTIONS+= CDDL ZFS
 +.endif

This isn't entirely true.  With a properly tuned ARC and kmem size, ZFS seems 
to work on a BeagleBone.  There have been reports on the freebsd-arm mailing 
list this month.  Based on my understanding of your previous commit, it looks 
like this can't be overridden which is a problem.

--
Rui Paulo



___
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: r280665 - head/sys/vm

2015-03-25 Thread Rui Paulo
Author: rpaulo
Date: Thu Mar 26 05:20:18 2015
New Revision: 280665
URL: https://svnweb.freebsd.org/changeset/base/280665

Log:
  Add comments about CTLFLAG_RDTUN vs. TUNABLE_INT_FETCH.
  
  Requested by: julian

Modified:
  head/sys/vm/memguard.c
  head/sys/vm/vm_page.c

Modified: head/sys/vm/memguard.c
==
--- head/sys/vm/memguard.c  Thu Mar 26 05:18:17 2015(r280664)
+++ head/sys/vm/memguard.c  Thu Mar 26 05:20:18 2015(r280665)
@@ -69,7 +69,7 @@ static SYSCTL_NODE(_vm, OID_AUTO, memgua
 static u_int vm_memguard_divisor;
 SYSCTL_UINT(_vm_memguard, OID_AUTO, divisor, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
 vm_memguard_divisor,
-0, (kmem_size/memguard_divisor) == memguard submap size); 
+0, (kmem_size/memguard_divisor) == memguard submap size);
 
 /*
  * Short description (ks_shortdesc) of memory type to monitor.
@@ -162,6 +162,7 @@ memguard_fudge(unsigned long km_size, co
u_long mem_pgs, parent_size;
 
vm_memguard_divisor = 10;
+   /* CTFLAG_RDTUN doesn't work during the early boot process. */
TUNABLE_INT_FETCH(vm.memguard.divisor, vm_memguard_divisor);
 
parent_size = vm_map_max(parent_map) - vm_map_min(parent_map) +

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Thu Mar 26 05:18:17 2015(r280664)
+++ head/sys/vm/vm_page.c   Thu Mar 26 05:20:18 2015(r280665)
@@ -349,6 +349,9 @@ vm_page_startup(vm_offset_t vaddr)
/*
 * Allocate memory for use when boot strapping the kernel memory
 * allocator.
+*
+* CTFLAG_RDTUN doesn't work during the early boot process, so we must
+* manually fetch the value.
 */
TUNABLE_INT_FETCH(vm.boot_pages, boot_pages);
new_end = end - (boot_pages * UMA_SLAB_SIZE);
___
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: r280456 - head/sys/vm

2015-03-24 Thread Rui Paulo
Author: rpaulo
Date: Tue Mar 24 20:07:27 2015
New Revision: 280456
URL: https://svnweb.freebsd.org/changeset/base/280456

Log:
  Remove whitespace.

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Tue Mar 24 20:00:11 2015(r280455)
+++ head/sys/vm/vm_page.c   Tue Mar 24 20:07:27 2015(r280456)
@@ -160,7 +160,7 @@ vm_page_init_fakepg(void *dummy)
 {
 
fakepg_zone = uma_zcreate(fakepg, sizeof(struct vm_page), NULL, NULL,
-   NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); 
+   NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM);
 }
 
 /* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */
@@ -443,7 +443,7 @@ vm_page_startup(vm_offset_t vaddr)
 */
for (pa = new_end; pa  phys_avail[biggestone + 1]; pa += PAGE_SIZE)
dump_add_page(pa);
-#endif 
+#endif
phys_avail[biggestone + 1] = new_end;
 
/*
@@ -702,7 +702,7 @@ vm_page_unhold(vm_page_t mem)
  * vm_page_unhold_pages:
  *
  * Unhold each of the pages that is referenced by the given array.
- */ 
+ */
 void
 vm_page_unhold_pages(vm_page_t *ma, int count)
 {
@@ -1303,7 +1303,7 @@ vm_page_rename(vm_page_t m, vm_object_t 
  * zero is given for end, then the range's upper bound is
  * infinity.  If the given object is backed by a vnode and it
  * transitions from having one or more cached pages to none, the
- * vnode's hold count is reduced. 
+ * vnode's hold count is reduced.
  */
 void
 vm_page_cache_free(vm_object_t object, vm_pindex_t start, vm_pindex_t end)
@@ -1455,7 +1455,7 @@ vm_page_is_cached(vm_object_t object, vm
  * VM_ALLOC_NOBUSY do not exclusive busy the page
  * VM_ALLOC_NODUMP do not include the page in a kernel core dump
  * VM_ALLOC_NOOBJ  page is not associated with an object and
- * should not be exclusive busy 
+ * should not be exclusive busy
  * VM_ALLOC_SBUSY  shared busy the allocated page
  * VM_ALLOC_WIRED  wire the allocated page
  * VM_ALLOC_ZERO   prefer a zeroed page
@@ -1563,7 +1563,7 @@ vm_page_alloc(vm_object_t object, vm_pin
(vm_page_alloc: page %p has unexpected queue %d, m, m-queue));
KASSERT(m-wire_count == 0, (vm_page_alloc: page %p is wired, m));
KASSERT(m-hold_count == 0, (vm_page_alloc: page %p is held, m));
-   KASSERT(!vm_page_sbusied(m), 
+   KASSERT(!vm_page_sbusied(m),
(vm_page_alloc: page %p is busy, m));
KASSERT(m-dirty == 0, (vm_page_alloc: page %p is dirty, m));
KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT,
@@ -1702,7 +1702,7 @@ vm_page_alloc_contig_vdrop(struct spglis
  * optional allocation flags:
  * VM_ALLOC_NOBUSY do not exclusive busy the page
  * VM_ALLOC_NOOBJ  page is not associated with an object and
- * should not be exclusive busy 
+ * should not be exclusive busy
  * VM_ALLOC_SBUSY  shared busy the allocated page
  * VM_ALLOC_WIRED  wire the allocated page
  * VM_ALLOC_ZERO   prefer a zeroed page
@@ -2399,7 +2399,7 @@ vm_page_unwire(vm_page_t m, uint8_t queu
  * This will cause them to be moved to the cache more quickly and
  * if not actively re-referenced, reclaimed more quickly.  If we just
  * stick these pages at the end of the inactive queue, heavy filesystem
- * meta-data accesses can cause an unnecessary paging load on memory bound 
+ * meta-data accesses can cause an unnecessary paging load on memory bound
  * processes.  This optimization causes one-time-use metadata to be
  * reused more quickly.
  *
@@ -2537,7 +2537,7 @@ vm_page_cache(vm_page_t m)
 
/*
 * Remove the page from the object's collection of resident
-* pages. 
+* pages.
 */
vm_radix_remove(object-rtree, m-pindex);
TAILQ_REMOVE(object-memq, m, listq);
@@ -2610,7 +2610,7 @@ vm_page_cache(vm_page_t m)
  * it gets reused quickly.  However, this can result in a silly syndrome
  * due to the page recycling too quickly.  Small objects will not be
  * fully cached.  On the other hand, if we move the page to the inactive
- * queue we wind up with a problem whereby very large objects 
+ * queue we wind up with a problem whereby very large objects
  * unnecessarily blow away our inactive and cache queues.
  *
  * The solution is to move the pages based on a fixed weighting.  We
@@ -2712,7 +2712,7 @@ retrylookup:
vm_page_xbusied(m) : vm_page_busied(m);
if (sleep) {
if ((allocflags  VM_ALLOC_NOWAIT) != 0)
-   return (NULL); 
+   return (NULL);
   

svn commit: r280457 - head/sys/vm

2015-03-24 Thread Rui Paulo
Author: rpaulo
Date: Tue Mar 24 20:09:55 2015
New Revision: 280457
URL: https://svnweb.freebsd.org/changeset/base/280457

Log:
  Use TUNABLE_INT_FETCH for boot_pages.
  
  vm.boot_pages is marked as a CTLFLAG_RDTUN, but it's used by the VM
  before the sysctl subsystem is initialsed.  We manually fetch the
  variable from the environment to work around this problem.
  
  Tested by:Keith White kwhite at uottawa.ca
  MFC after:1 week

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Tue Mar 24 20:07:27 2015(r280456)
+++ head/sys/vm/vm_page.c   Tue Mar 24 20:09:55 2015(r280457)
@@ -134,8 +134,9 @@ long first_page;
 int vm_page_zero_count;
 
 static int boot_pages = UMA_BOOT_PAGES;
-SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN, boot_pages, 0,
-   number of pages allocated for bootstrapping the VM system);
+SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
+boot_pages, 0,
+number of pages allocated for bootstrapping the VM system);
 
 static int pa_tryrelock_restart;
 SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD,
@@ -349,6 +350,7 @@ vm_page_startup(vm_offset_t vaddr)
 * Allocate memory for use when boot strapping the kernel memory
 * allocator.
 */
+   TUNABLE_INT_FETCH(vm.boot_pages, boot_pages);
new_end = end - (boot_pages * UMA_SLAB_SIZE);
new_end = trunc_page(new_end);
mapped = pmap_map(vaddr, new_end, end,
___
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: r278479 - in head: etc sys/kern

2015-03-23 Thread Rui Paulo
On Mar 22, 2015, at 18:08, Mateusz Guzik mjgu...@gmail.com wrote:
 
 On Mon, Feb 09, 2015 at 11:13:51PM +, Rui Paulo wrote:
 Author: rpaulo
 Date: Mon Feb  9 23:13:50 2015
 New Revision: 278479
 URL: https://svnweb.freebsd.org/changeset/base/278479
 
 Log:
  Notify devd(8) when a process crashed.
 
  This change implements a notification (via devctl) to userland when
  the kernel produces coredumps after a process has crashed.
  devd can then run a specific command to produce a human readable crash
  report.  The command is most usually a helper that runs gdb/lldb
  commands on the file/coredump pair.  It's possible to use this
  functionality for implementing automatic generation of crash reports.
 
  devd(8) will be notified of the full path of the binary that crashed and
  the full path of the coredump file.
 
 
 The more I look at this the more I'm convinced this is quite insecure.
 
 At a minimum this should also grow a flag to decide whether notification
 about jailed process crashes are allowed. Off by default.
 
 As it is you pass a path leading to a jail, but that's inherently
 untrusted and will lead to trouble.

We got sidetracked by the devd-bloat discussion, but I can turn this off until 
a better approach is programmed. 

--
Rui Paulo



___
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: r280410 - head/sys/kern

2015-03-23 Thread Rui Paulo
Author: rpaulo
Date: Tue Mar 24 02:17:17 2015
New Revision: 280410
URL: https://svnweb.freebsd.org/changeset/base/280410

Log:
  Disable coredump_devctl because it could lead to leaking paths to
  jails.

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cTue Mar 24 01:32:46 2015(r280409)
+++ head/sys/kern/kern_sig.cTue Mar 24 02:17:17 2015(r280410)
@@ -180,7 +180,7 @@ static int  set_core_nodump_flag = 0;
 SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, set_core_nodump_flag,
0, Enable setting the NODUMP flag on coredump files);
 
-static int coredump_devctl = 1;
+static int coredump_devctl = 0;
 SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, coredump_devctl,
0, Generate a devctl notification when processes coredump);
 
___
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: r280410 - head/sys/kern

2015-03-23 Thread Rui Paulo
On Mar 23, 2015, at 19:25, Bryan Drewery bdrew...@freebsd.org wrote:
 
 On 3/23/15 9:17 PM, Rui Paulo wrote:
 Author: rpaulo
 Date: Tue Mar 24 02:17:17 2015
 New Revision: 280410
 URL: https://svnweb.freebsd.org/changeset/base/280410
 
 Log:
   Disable coredump_devctl because it could lead to leaking paths to
   jails.
 
 Modified:
   head/sys/kern/kern_sig.c
 
 Modified: head/sys/kern/kern_sig.c
 ==
 --- head/sys/kern/kern_sig.c Tue Mar 24 01:32:46 2015(r280409)
 +++ head/sys/kern/kern_sig.c Tue Mar 24 02:17:17 2015(r280410)
 @@ -180,7 +180,7 @@ static int   set_core_nodump_flag = 0;
  SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, 
 set_core_nodump_flag,
  0, Enable setting the NODUMP flag on coredump files);
 
 -static int  coredump_devctl = 1;
 +static int  coredump_devctl = 0;
  SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, coredump_devctl,
  0, Generate a devctl notification when processes coredump);
 
 
 
 If there is a security concern about this feature I think more needs to be 
 done than just flipping the default. It could easily be forgotten about and 
 make a release.

Sure, but to be honest there are already sysctls that make your system insecure 
and we've been making releases with them for many years.

--
Rui Paulo



___
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: r279567 - head/usr.sbin/syslogd

2015-03-03 Thread Rui Paulo
Author: rpaulo
Date: Tue Mar  3 20:07:59 2015
New Revision: 279567
URL: https://svnweb.freebsd.org/changeset/base/279567

Log:
  Add and document an option to cause syslogd to run in the
  foreground.
  
  This allows a separate process to monitor when and how
  syslogd exits. That process can then restart syslogd if needed.
  
  Differential Revision:https://reviews.freebsd.org/D1985
  Submitted by: Ravi Pokala
  Reviewed by:  allanjude (man page)

Modified:
  head/usr.sbin/syslogd/syslogd.8
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.8
==
--- head/usr.sbin/syslogd/syslogd.8 Tue Mar  3 17:20:19 2015
(r279566)
+++ head/usr.sbin/syslogd/syslogd.8 Tue Mar  3 20:07:59 2015
(r279567)
@@ -36,7 +36,7 @@
 .Nd log systems messages
 .Sh SYNOPSIS
 .Nm
-.Op Fl 468ACcdkNnosTuv
+.Op Fl 468ACcdFkNnosTuv
 .Op Fl a Ar allowed_peer
 .Op Fl b Ar bind_address
 .Op Fl f Ar config_file
@@ -213,6 +213,17 @@ This is probably only of use to develope
 Specify the pathname of an alternate configuration file;
 the default is
 .Pa /etc/syslog.conf .
+.It Fl F
+Run
+.Nm
+in the foreground, rather than going into daemon mode. This is useful if
+some other process uses
+.Xr fork 2
+and
+.Xr exec 3
+to run
+.Nm ,
+and wants to monitor when and how it exits.
 .It Fl k
 Disable the translation of
 messages received with facility

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Tue Mar  3 17:20:19 2015
(r279566)
+++ head/usr.sbin/syslogd/syslogd.c Tue Mar  3 20:07:59 2015
(r279567)
@@ -271,6 +271,7 @@ static struct filed *Files; /* Log files
 static struct filed consfile;  /* Console */
 
 static int Debug;  /* debug flag */
+static int Foreground = 0; /* Run in foreground, instead of daemonizing */
 static int resolve = 1;/* resolve hostname */
 static charLocalHostName[MAXHOSTNAMELEN];  /* our hostname */
 static const char *LocalDomain;/* our local domain name */
@@ -360,7 +361,7 @@ main(int argc, char *argv[])
dprintf(madvise() failed: %s\n, strerror(errno));
 
bindhostname = NULL;
-   while ((ch = getopt(argc, argv, 468Aa:b:cCdf:kl:m:nNop:P:sS:Tuv))
+   while ((ch = getopt(argc, argv, 468Aa:b:cCdf:Fkl:m:nNop:P:sS:Tuv))
!= -1)
switch (ch) {
case '4':
@@ -396,6 +397,9 @@ main(int argc, char *argv[])
case 'f':   /* configuration file */
ConfFile = optarg;
break;
+   case 'F':   /* run in foreground instead of daemon 
*/
+   Foreground++;
+   break;
case 'k':   /* keep remote kern fac */
KeepKernFac = 1;
break;
@@ -487,14 +491,14 @@ main(int argc, char *argv[])
warn(cannot open pid file);
}
 
-   if (!Debug) {
+   if ((!Foreground)  (!Debug)) {
ppid = waitdaemon(0, 0, 30);
if (ppid  0) {
warn(could not become daemon);
pidfile_remove(pfh);
exit(1);
}
-   } else {
+   } else if (Debug) {
setlinebuf(stdout);
}
 
___
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: r279568 - head/usr.sbin/syslogd

2015-03-03 Thread Rui Paulo
On 3 Mar 2015, at 12:24, Sergey Kandaurov pluk...@freebsd.org wrote:
 
 Author: pluknet
 Date: Tue Mar  3 20:23:59 2015
 New Revision: 279568
 URL: https://svnweb.freebsd.org/changeset/base/279568
 
 Log:
  Update .Dd, sync usage() for -F.  Missed in previous change.

That was fast... thanks :-)

--
Rui Paulo



___
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: r279262 - head/sys/netinet

2015-02-26 Thread Rui Paulo

On Feb 24, 2015, at 09:43 PM, Xin LI delp...@freebsd.org wrote:

Author: delphij
Date: Wed Feb 25 05:42:59 2015
New Revision: 279262
URL: https://svnweb.freebsd.org/changeset/base/279262

Log:
Fix integer overflow in IGMP protocol.

Security:    FreeBSD-SA-15:04.igmp
Security:        CVE-2015-1414
Found by:        Mateusz Kocielski, Logicaltrust
Analyzed by:      Marek Kroemeke, Mateusz Kocielski (s...@netbsd.org) and
           22733db72ab3ed94b5f8a1ffcde850251fe6f466
 
It looks weird to me that a SHA1 hash is capable of analysing code Maybe 
the AI Winter has finally ended?  :-)
___
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: r279073 - head/share/man/man7

2015-02-20 Thread Rui Paulo

On Feb 20, 2015, at 10:49 AM, Glen Barber g...@freebsd.org wrote:

Author: gjb
Date: Fri Feb 20 18:49:49 2015
New Revision: 279073
URL: https://svnweb.freebsd.org/changeset/base/279073

Log:
Fix XZ_THREADS description in release(7), which defaults to
'0', not kern.ncpu.

Sponsored by:        The FreeBSD Foundation

Modified:
head/share/man/man7/release.7

Modified: head/share/man/man7/release.7
==
--- head/share/man/man7/release.7        Fri Feb 20 18:42:00 2015        
(r279072)
+++ head/share/man/man7/release.7    Fri Feb 20 18:49:49 2015        (r279073)
@@ -262,8 +262,9 @@ Set to the number of threads
should use when compressing images.
By default,
.Va XZ_THREADS
-is set to the number of cores reported by
-.Va kern.ncpu .
+is set to
+.Va 0 ,
+which uses all available cores on the system.
 
... provided there's enough memory.
___
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: r277300 - in head: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/mdb/tools/common cddl/contrib/opensolaris/cmd/plockstat cddl/c

2015-02-18 Thread Rui Paulo

On Jan 17, 2015, at 06:45 AM, Steven Hartland s...@freebsd.org wrote:

Author: smh
Date: Sat Jan 17 14:44:59 2015
New Revision: 277300
URL: https://svnweb.freebsd.org/changeset/base/277300

Log:
Mechanically convert cddl sun #ifdef's to illumos

Since the upstream for cddl code is now illumos not sun, mechanically
convert all sun #ifdef's to illumos #ifdef's which have been used in all
newer code for some time.

Also do a manual pass to correct the use if #ifdef comments as per style(9)
as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos.
 
I had just convinced Mark Johnston to use #ifdef __FreeBSD__ instead of #ifndef 
illumos.  Is there a reason why we keep using #ifndef ?  To me, it's much easier to read #ifdef 
__FreeBSD__ than to note whether theres an n in that pre-processor macro.

___
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: r278933 - head/etc

2015-02-17 Thread Rui Paulo
Author: rpaulo
Date: Wed Feb 18 03:46:43 2015
New Revision: 278933
URL: https://svnweb.freebsd.org/changeset/base/278933

Log:
  Fix a typo in ipv6_down().
  
  We weren't skipping extraneous entries in the ifconfig | grep inet6 case.
  
  Submitted by: Ashutosh Kumar AK0037447 at TechMahindra.com
  MFC after:1 week

Modified:
  head/etc/network.subr

Modified: head/etc/network.subr
==
--- head/etc/network.subr   Wed Feb 18 03:33:17 2015(r278932)
+++ head/etc/network.subr   Wed Feb 18 03:46:43 2015(r278933)
@@ -754,7 +754,7 @@ ipv6_down()
IFS=$_ifs
for _inet6 in $inetList ; do
# get rid of extraneous line
-   case $_inet in
+   case $_inet6 in
inet6\ *)   ;;
*)  continue ;;
esac
___
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: r278914 - in head/sys: kern sys

2015-02-17 Thread Rui Paulo
On Feb 17, 2015, at 11:32, Gleb Smirnoff gleb...@freebsd.org wrote:
 
  Differential Revision:   D1499

You need to use the *FULL* URL.  Otherwise the revision won't be closed 
automatically.  

--
Rui Paulo



___
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: r278926 - in head: . release share/mk

2015-02-17 Thread Rui Paulo
Author: rpaulo
Date: Tue Feb 17 23:13:45 2015
New Revision: 278926
URL: https://svnweb.freebsd.org/changeset/base/278926

Log:
  release: use xz via pipe when compressing the tarballs.
  
  libarchive(3) doesn't support the new liblzma API yet, but this change
  allows us to enable multi-threaded xz compression.
  ``make release'' should now finish in half the time on a machine with
  several cores and fast disks (our typical build server).
  
  This behaviour only applies when building a release and it doesn't
  affect buildworld/installworld.  To disable threaded xz compression,
  set XZ_THREADS=1.
  
  Reviewed by:  gjb
  Tested by:gjb

Modified:
  head/Makefile.inc1
  head/release/Makefile
  head/release/Makefile.vm
  head/share/mk/bsd.own.mk

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Feb 17 22:33:22 2015(r278925)
+++ head/Makefile.inc1  Tue Feb 17 23:13:45 2015(r278926)
@@ -912,25 +912,25 @@ packageworld:
 .for dist in base ${EXTRA_DISTRIBUTIONS}
 .if defined(NO_ROOT)
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
-   --exclude usr/lib/debug \
-   @${DESTDIR}/${DISTDIR}/${dist}.meta
+   tar cvf - --exclude usr/lib/debug \
+   @${DESTDIR}/${DISTDIR}/${dist}.meta | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/${dist}.txz
 .else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
-   --exclude usr/lib/debug .
+   tar cvf - --exclude usr/lib/debug . | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/${dist}.txz
 .endif
 .endfor
 
 .for dist in ${DEBUG_DISTRIBUTIONS}
 . if defined(NO_ROOT)
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \
-   @${DESTDIR}/${DISTDIR}/${dist}.debug.meta
+   tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz
 . else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
-   tar cvJLf ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \
-   usr/lib/debug
+   tar cvLf - usr/lib/debug | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz
 . endif
 .endfor
 
@@ -1138,19 +1138,21 @@ distributekernel distributekernel.debug:
 packagekernel:
 .if defined(NO_ROOT)
cd ${DESTDIR}/${DISTDIR}/kernel; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz \
-   @${DESTDIR}/${DISTDIR}/kernel.meta
+   tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/kernel.txz
 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz \
-   @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta
+   tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz
 .endfor
 .else
cd ${DESTDIR}/${DISTDIR}/kernel; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz .
+   tar cvf - . | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/kernel.txz
 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
-   tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .
+   tar cvf - . | \
+   ${XZ_CMD}  ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz
 .endfor
 .endif
 

Modified: head/release/Makefile
==
--- head/release/Makefile   Tue Feb 17 22:33:22 2015(r278925)
+++ head/release/Makefile   Tue Feb 17 23:13:45 2015(r278926)
@@ -33,18 +33,12 @@
 #  with xz(1) (extremely time consuming)
 #  WITH_CLOUDWARE: if set, build cloud hosting disk images with the release
 #  TARGET/TARGET_ARCH: architecture of built release
-#  XZ_FLAGS: Additional arguments to pass to xz(1)
-#  XZ_THREADS: Number of xz(1) threads to use
-#  NO_XZTHREADS: Disable multi-threaded xz(1) compression
 #
 
 WORLDDIR?= ${.CURDIR}/..
 PORTSDIR?= /usr/ports
 DOCDIR?=   /usr/doc
 RELNOTES_LANG?= en_US.ISO8859-1
-XZCMD?=/usr/bin/xz
-XZ_FLAGS?=
-XZ_THREADS?=
 
 .if !defined(TARGET) || empty(TARGET)
 TARGET=${MACHINE}
@@ -59,15 +53,6 @@ TARGET_ARCH= ${TARGET}
 IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
 DISTDIR=   dist
 
-.if !defined(NO_XZTHREADS)  empty(XZ_THREADS)
-XZ_THREADS=0
-.else
-XZ_THREADS=${XZ_THREADS}
-.endif
-.if !empty(XZ_THREADS)
-XZ_FLAGS+= -T ${XZ_THREADS}
-.endif
-
 # Define OSRELEASE by using newvars.sh
 .if !defined(OSRELEASE) || empty(OSRELEASE)
 .for _V in TYPE BRANCH REVISION
@@ -158,16 +143,18 @@ kernel.txz:
 src.txz:
mkdir -p ${DISTDIR}/usr
ln -fs ${WORLDDIR} 

svn commit: r278873 - head

2015-02-16 Thread Rui Paulo
Author: rpaulo
Date: Mon Feb 16 23:29:56 2015
New Revision: 278873
URL: https://svnweb.freebsd.org/changeset/base/278873

Log:
  Fix a typo when invoking tar(1) to create the debug distributions.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Feb 16 22:33:44 2015(r278872)
+++ head/Makefile.inc1  Mon Feb 16 23:29:56 2015(r278873)
@@ -929,7 +929,7 @@ packageworld:
@${DESTDIR}/${DISTDIR}/${dist}.debug.meta
 . else
${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
-   tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \
+   tar cvJLf ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz \
usr/lib/debug
 . endif
 .endfor
___
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: r278658 - head/lib/libproc

2015-02-12 Thread Rui Paulo
Author: rpaulo
Date: Fri Feb 13 03:18:29 2015
New Revision: 278658
URL: https://svnweb.freebsd.org/changeset/base/278658

Log:
  Teach libproc how to find debugging symbols in /usr/lib/debug.
  
  MFC after:1 week

Modified:
  head/lib/libproc/proc_sym.c

Modified: head/lib/libproc/proc_sym.c
==
--- head/lib/libproc/proc_sym.c Fri Feb 13 02:10:09 2015(r278657)
+++ head/lib/libproc/proc_sym.c Fri Feb 13 03:18:29 2015(r278658)
@@ -82,6 +82,21 @@ fail:
strlcpy(buf, symbol, len);
 }
 
+static int
+find_dbg_obj(const char *path)
+{
+   int fd;
+   char dbg_path[PATH_MAX];
+
+   snprintf(dbg_path, sizeof(dbg_path),
+   /usr/lib/debug/%s.debug, path);
+   fd = open(dbg_path, O_RDONLY);
+   if (fd  0)
+   return (fd);
+   else
+   return (open(path, O_RDONLY));
+}
+
 static void
 proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map)
 {
@@ -295,7 +310,7 @@ proc_addr2sym(struct proc_handle *p, uin
 
if ((map = proc_addr2map(p, addr)) == NULL)
return (-1);
-   if ((fd = open(map-pr_mapname, O_RDONLY, 0))  0) {
+   if ((fd = find_dbg_obj(map-pr_mapname))  0) {
DPRINTF(ERROR: open %s failed, map-pr_mapname);
goto err0;
}
@@ -443,7 +458,7 @@ proc_name2sym(struct proc_handle *p, con
DPRINTFX(ERROR: couldn't find object %s, object);
goto err0;
}
-   if ((fd = open(map-pr_mapname, O_RDONLY, 0))  0) {
+   if ((fd = find_dbg_obj(map-pr_mapname))  0) {
DPRINTF(ERROR: open %s failed, map-pr_mapname);
goto err0;
}
@@ -539,7 +554,7 @@ proc_iter_symbyaddr(struct proc_handle *
 
if ((map = proc_name2map(p, object)) == NULL)
return (-1);
-   if ((fd = open(map-pr_mapname, O_RDONLY))  0) {
+   if ((fd = find_dbg_obj(map-pr_mapname))  0) {
DPRINTF(ERROR: open %s failed, map-pr_mapname);
goto err0;
}
___
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: r278012 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt

2015-02-11 Thread Rui Paulo

On Jan 31, 2015, at 03:12 PM, Mark Johnston ma...@freebsd.org wrote:

Author: markj
Date: Sat Jan 31 23:12:29 2015
New Revision: 278012
URL: https://svnweb.freebsd.org/changeset/base/278012

Log:
Fix mktemp(1) usage.

MFC after:  1 week

Modified:
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
==
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
  Sat Jan 31 23:11:57 2015    (r278011)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
      Sat Jan 31 23:12:29 2015    (r278012)
@@ -48,7 +48,7 @@ fi

dtrace=$1
startdir=$PWD
-dir=$(mktemp -td drtiXX)
+dir=$(mktemp -d -t drtiXX)
if (( $? != 0 )); then
   print -u2 'Could not create safe temporary directory'
   exit 2
 
I hit this exact same problem in xz-utils when running the test suite.  I think 
this is a bug in our mktemp and perhaps it's time we move to a version of 
mktemp that everyone else uses: mktemp.org.
___
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: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen

2015-02-11 Thread Rui Paulo

On Feb 11, 2015, at 08:55 AM, Konstantin Belousov kostik...@gmail.com wrote:
Ok, https://lkml.org/lkml/2013/1/17/552

Patch is below. Please, users of VMWare, test it.
 
Fixed the problem for me on VMware Fusion 6.0.5.
___
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: r278592 - head/sys/kern

2015-02-11 Thread Rui Paulo
Author: rpaulo
Date: Wed Feb 11 19:07:05 2015
New Revision: 278592
URL: https://svnweb.freebsd.org/changeset/base/278592

Log:
  Remove check against NULL after M_WAITOK.
  
  Submitted by: Oliver Pinter

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cWed Feb 11 18:59:46 2015(r278591)
+++ head/sys/kern/kern_sig.cWed Feb 11 19:07:05 2015(r278592)
@@ -3362,8 +3362,6 @@ close:
len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 +
sizeof(' ') + sizeof(core_name) - 1;
data = malloc(len, M_TEMP, M_WAITOK);
-   if (data == NULL)
-   goto out;
if (vn_fullpath_global(td, p-p_textvp, fullpath, freepath) != 0)
goto out;
if (!coredump_sanitise_path(fullpath))
___
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: r278479 - in head: etc sys/kern

2015-02-10 Thread Rui Paulo

On Feb 10, 2015, at 10:52 AM, Slawa Olhovchenkov s...@zxy.spb.ru wrote:
For common case (I am not talk about current devd implementation -- I
am don't have any inforamtion/metrics/etc) routing and processing
events may be sensitive to delay and ordering: may be exist
requirement 'delay not more then 700ns', may be exist requirement
'next event process only after complete process previos event'. And
some event handling may be very CPU/disk/etc consumption. Need to good
think over and design API and architecure.
 
routing events do not come over devd (or any other /dev device): there's a 
routing socket specifically tailored for that purpose.  For that type of 
latency, you probably don't want to be crossing the kernel/userland barrier too 
often (or never).
___
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: r278525 - head/sys/kern

2015-02-10 Thread Rui Paulo
Author: rpaulo
Date: Tue Feb 10 18:35:46 2015
New Revision: 278525
URL: https://svnweb.freebsd.org/changeset/base/278525

Log:
  Remove a printf and an strlen() from the coredump code.

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cTue Feb 10 18:05:58 2015(r278524)
+++ head/sys/kern/kern_sig.cTue Feb 10 18:35:46 2015(r278525)
@@ -3225,14 +3225,13 @@ out:
 static int
 coredump_sanitise_path(const char *path)
 {
-   size_t len, i;
+   size_t i;
 
/*
 * Only send a subset of ASCII to devd(8) because it
 * might pass these strings to sh -c.
 */
-   len = strlen(path);
-   for (i = 0; i  len; i++)
+   for (i = 0; path[i]; i++)
if (!(isalpha(path[i]) || isdigit(path[i])) 
path[i] != '/'  path[i] != '.' 
path[i] != '-')
@@ -3365,10 +3364,8 @@ close:
snprintf(data, sizeof(data), comm=%s , fullpath);
free(freepath, M_TEMP);
freepath = NULL;
-   if (vn_fullpath_global(td, vp, fullpath, freepath) != 0) {
-   printf(could not find coredump\n);
+   if (vn_fullpath_global(td, vp, fullpath, freepath) != 0)
goto out;
-   }
if (!coredump_sanitise_path(fullpath))
goto out;
strlcat(data, core=, sizeof(data));
___
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: r278494 - head/sys/kern

2015-02-10 Thread Rui Paulo

On Feb 10, 2015, at 12:32 AM, Konstantin Belousov kostik...@gmail.com wrote:

And there is double-free somewhere.
 
Are you talking about the Jenkins error?  I think that was the free(name) which 
was the result of a mis-merge and which I fixed yesterday.  Jenkins build #671 
seems to be ok.
___
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: r278479 - in head: etc sys/kern

2015-02-10 Thread Rui Paulo

On Feb 10, 2015, at 07:37 AM, John Baldwin j...@freebsd.org wrote:
That wasn't really my question. My question was if we want distinct streams 
or if we want want unified stream. Having a unified stream might very well 
make sense (and if so we could rename devd to make that more obvious).


I'm fine with renaming devd to eventd or something else, but Ian was saying 
that he's worried about the number of notifications that devd has to process.  
I'm not sure that's a real problem at this point, though.  On freefall, devd 
used 0.07 seconds of CPU time and has been running for a 1 day and a half.  On 
my BeagleBone, devd used 0.61 seconds of CPU time and it has been up for 5 days 
and a half.   On my VM that has been up for 5 days and a half, it used 4 
seconds of CPU time.  Renaming sounds like a good idea and it looks like we 
could leave the optimisations to a later time.

Another thing I had in mind (which is more work) was to abstract the devctl 
kernel code in an API which could make it easy to fan out the notifications to 
multiple /dev devices.  However, that may be overkill.
___
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: r278473 - in head/sys: amd64/amd64 amd64/include amd64/vmm contrib/dev/acpica/include i386/i386 i386/include x86/acpica x86/include x86/x86 x86/xen

2015-02-10 Thread Rui Paulo

On Feb 09, 2015, at 01:01 PM, Konstantin Belousov k...@freebsd.org wrote:

Author: kib
Date: Mon Feb 9 21:00:56 2015
New Revision: 278473
URL: https://svnweb.freebsd.org/changeset/base/278473

Log:
Add x2APIC support. Enable it by default if CPU is capable. The
hw.x2apic_enable tunable allows disabling it from the loader prompt.
 
This breaks VMware Fusion when the host CPU has x2APIC support.  In my case, 
mpt(4) was unable to receive interrupts and USB was similarly broken.  It's 
possible that this is a VMware bug, but you might want to avoid turning this on 
when running under the VMware hypervisor.
___
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: r278545 - head/sys/kern

2015-02-10 Thread Rui Paulo
Author: rpaulo
Date: Wed Feb 11 00:58:15 2015
New Revision: 278545
URL: https://svnweb.freebsd.org/changeset/base/278545

Log:
  Restore the data array in coredump(), but use a different style to
  calculate the length.
  
  Requested by: kib

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cTue Feb 10 23:48:06 2015(r278544)
+++ head/sys/kern/kern_sig.cWed Feb 11 00:58:15 2015(r278545)
@@ -3261,9 +3261,11 @@ coredump(struct thread *td)
void *rl_cookie;
off_t limit;
int compress;
-   char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */
+   char *data = NULL;
char *fullpath, *freepath = NULL;
size_t len;
+   static const char comm_name[] = comm=;
+   static const char core_name[] = core=;
 
 #ifdef COMPRESS_USER_CORES
compress = compress_user_cores;
@@ -3357,25 +3359,31 @@ close:
 */
if (coredump_devctl == 0)
goto out;
+   len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 +
+   sizeof(' ') + sizeof(core_name) - 1;
+   data = malloc(len, M_TEMP, M_WAITOK);
+   if (data == NULL)
+   goto out;
if (vn_fullpath_global(td, p-p_textvp, fullpath, freepath) != 0)
goto out;
if (!coredump_sanitise_path(fullpath))
goto out;
-   snprintf(data, sizeof(data), comm=%s , fullpath);
+   snprintf(data, len, %s%s , comm_name, fullpath);
free(freepath, M_TEMP);
freepath = NULL;
if (vn_fullpath_global(td, vp, fullpath, freepath) != 0)
goto out;
if (!coredump_sanitise_path(fullpath))
goto out;
-   strlcat(data, core=, sizeof(data));
-   len = strlcat(data, fullpath, sizeof(data));
+   strlcat(data, core_name, len);
+   strlcat(data, fullpath, len);
devctl_notify(kernel, signal, coredump, data);
 out:
 #ifdef AUDIT
audit_proc_coredump(td, name, error);
 #endif
free(freepath, M_TEMP);
+   free(data, M_TEMP);
free(name, M_TEMP);
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: r278450 - head/release

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 02:46, Glen Barber g...@freebsd.org wrote:
 
 Author: gjb
 Date: Mon Feb  9 10:46:39 2015
 New Revision: 278450
 URL: https://svnweb.freebsd.org/changeset/base/278450
 
 Log:
  Revert r278445.
 
  I was going to use __FreeBSD_version to determine if
  xz(1) should be multi-threaded by default, but doing
  this will cause problems if/when the changes are merged
  from head.

You can do nm -D liblzma and check for lzma_stream_encoder_mt.  Or you could 
check if xz(1) has threading support via xz -h (ugly).

--
Rui Paulo



___
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: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/libl

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 08:16, John Baldwin j...@freebsd.org wrote:
 
 On Monday, February 09, 2015 06:20:35 AM Rui Paulo wrote:
 Author: rpaulo
 Date: Mon Feb  9 06:20:34 2015
 New Revision: 278433
 URL: https://svnweb.freebsd.org/changeset/base/278433
 
 Log:
  Merge xz 5.2.0.
 
  This brings support for multi-threaded compression.  This brings close
  N times faster compression where N is the number of CPU cores.
  Because of this, liblzma now depends on libthr.
 
  Soon libarchive will be modified to use the new lzma API.
 
  Thanks to antoine@ for the exp-run.
 
 It looks like this uses hw.ncpu to determine the number of cores.  Can you 
 make this cpuset friendly by querying the current process's CPU mask and 
 counting the cores it contains instead?
 
 Somethign like:
 
cpuset_t set;
 
cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, set, sizeof(set));
 
 (I have a CPU_COUNT() macro I should commit that will then let you do:)
 
ncpus = CPU_COUNT(set);

Yes, makes sense.  I'll wait for CPU_COUNT().

--
Rui Paulo



___
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: r278479 - in head: etc sys/kern

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 15:28, Konstantin Belousov kostik...@gmail.com wrote:
 Arguably, there should be a knob, probably sysctl, to turn the
 functionality off. I definitely do not want this on crash boxes used for
 userspace debugging.  Even despite the example handler is inactive.

OK, I can provide a sysctl knob.

 +len = MAXPATHLEN * 2 + 5 /* comm= */ + 5 /* core= */ + 1;
 It is much cleaner to use static const char arrays for the names,
 and use sizeof() - 1 instead of hard-coding commented constants.

OK.  I was trying to avoid allocating 2k on the stack.

 +data = malloc(len, M_TEMP, M_NOWAIT);
 Why is this allocation M_NOWAIT ?

That should be M_WAITOK.

 +freepath = NULL;
 +}
 +if (vn_fullpath_global(td, vp, fullpath, freepath) != 0)
 +goto out;
 +snprintf(data, len, %s core=%s, data, fullpath);
 This is weird, and highly depends on the implementation details, supplying
 the same string as target and source.  IMO strcat(9) is enough there.

OK, I'll change it to strcat.

--
Rui Paulo



___
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: r278495 - in head/sys: conf powerpc/aim powerpc/conf powerpc/ofw powerpc/wii

2015-02-09 Thread Rui Paulo
Author: rpaulo
Date: Tue Feb 10 06:35:16 2015
New Revision: 278495
URL: https://svnweb.freebsd.org/changeset/base/278495

Log:
  Remove FreeBSD/wii.
  
  This port failed to gain traction and probably only a couple Wii consoles
  ran FreeBSD all the way to single user mode with an md(4). IPC
  support was never implemented, so it was impossible to use any peripheral
  
  Any further development, if any, will happen at https://github.com/rpaulo/wii.
  
  Discussed with:   nathanw (a long time ago), jhibbits

Deleted:
  head/sys/powerpc/conf/WII
  head/sys/powerpc/wii/
Modified:
  head/sys/conf/files.powerpc
  head/sys/conf/options.powerpc
  head/sys/powerpc/aim/locore32.S
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/conf/NOTES
  head/sys/powerpc/ofw/ofw_syscons.c

Modified: head/sys/conf/files.powerpc
==
--- head/sys/conf/files.powerpc Tue Feb 10 04:34:39 2015(r278494)
+++ head/sys/conf/files.powerpc Tue Feb 10 06:35:16 2015(r278495)
@@ -242,9 +242,3 @@ powerpc/psim/iobus.coptionalpsim
 powerpc/psim/ata_iobus.c   optionalata psim
 powerpc/psim/openpic_iobus.c   optionalpsim
 powerpc/psim/uart_iobus.c  optionaluart psim
-powerpc/wii/platform_wii.c optionalwii
-powerpc/wii/wii_bus.c  optionalwii
-powerpc/wii/wii_pic.c  optionalwii
-powerpc/wii/wii_fb.c   optionalwii
-powerpc/wii/wii_gpio.c optionalwii wiigpio
-powerpc/wii/wii_ipc.c  optionalwii

Modified: head/sys/conf/options.powerpc
==
--- head/sys/conf/options.powerpc   Tue Feb 10 04:34:39 2015
(r278494)
+++ head/sys/conf/options.powerpc   Tue Feb 10 06:35:16 2015
(r278495)
@@ -24,7 +24,6 @@ PS3   opt_platform.h
 MAMBO
 PSERIES
 PSIM
-WIIopt_platform.h
 
 SC_OFWFB   opt_ofwfb.h
 

Modified: head/sys/powerpc/aim/locore32.S
==
--- head/sys/powerpc/aim/locore32.S Tue Feb 10 04:34:39 2015
(r278494)
+++ head/sys/powerpc/aim/locore32.S Tue Feb 10 06:35:16 2015
(r278495)
@@ -118,9 +118,7 @@ __start:
bdnz1b
sync
isync
-#ifdef WII
-#include powerpc/wii/locore.S
-#endif
+
/* Zero bss, in case we were started by something unhelpful */
li  0,0
lis 8,_edata@ha

Modified: head/sys/powerpc/aim/machdep.c
==
--- head/sys/powerpc/aim/machdep.c  Tue Feb 10 04:34:39 2015
(r278494)
+++ head/sys/powerpc/aim/machdep.c  Tue Feb 10 06:35:16 2015
(r278495)
@@ -260,9 +260,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_
void*kmdp;
 char   *env;
register_t  msr, scratch;
-#ifdef WII
-   register_t  vers;
-#endif
uint8_t *cache_check;
int cacheline_warn;
#ifndef __powerpc64__
@@ -281,16 +278,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_
startkernel = __startkernel;
endkernel = __endkernel;
 
-#ifdef WII
-   /*
-* The Wii loader doesn't pass us any environment so, mdp
-* points to garbage at this point. The Wii CPU is a 750CL.
-*/
-   vers = mfpvr();
-   if ((vers  0xf0e0) == (MPC750  16 | MPC750CL)) 
-   mdp = NULL;
-#endif
-
/* Check for ePAPR loader, which puts a magic value into r6 */
if (mdp == (void *)0x65504150)
mdp = NULL;
@@ -513,13 +500,13 @@ powerpc_init(vm_offset_t fdt, vm_offset_
 */
 
trap_offset += (size_t)restorebridgesize;
-   bcopy(restorebridge, (void *)EXC_RST, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_DSI, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_ALI, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_PGM, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_MCHK, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_TRC, trap_offset); 
-   bcopy(restorebridge, (void *)EXC_BPT, trap_offset); 
+   bcopy(restorebridge, (void *)EXC_RST, trap_offset);
+   bcopy(restorebridge, (void *)EXC_DSI, trap_offset);
+   bcopy(restorebridge, (void *)EXC_ALI, trap_offset);
+   bcopy(restorebridge, (void *)EXC_PGM, trap_offset);
+   bcopy(restorebridge, (void *)EXC_MCHK, trap_offset);
+   bcopy(restorebridge, (void *)EXC_TRC, trap_offset);
+   bcopy(restorebridge, (void *)EXC_BPT, trap_offset);
}
#endif
 
@@ -560,7 +547,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_
 * 

Re: svn commit: r278479 - in head: etc sys/kern

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 18:43, Mateusz Guzik mjgu...@gmail.com wrote:
 
 On Mon, Feb 09, 2015 at 11:13:51PM +, Rui Paulo wrote:
 +notify 10 {
 +match system  kernel;
 +match subsystem   signal;
 +match typecoredump;
 +action logger $comm $core;
 +};
 +
 */
 
 [..]
 +if (vn_fullpath_global(td, p-p_textvp, fullpath, freepath) != 0)
 +goto out;
 +snprintf(data, len, comm=%s, fullpath);
 
 I cannot test it right now, but it looks like immediate privilege
 escalation.
 
 Path is not sanitized in any way and devd passes it to 'sh -c'.
 
 So a file named a.out; /bin/id; meh or so should result in execution
 of aforementioned /bin/id.

Well, you can't have a file name with / but you're right.

 Another note is that currently devctl is record oriented, but this may
 change at some point and free form userspace text could be used to forge
 new events.
 
 As such is trongly suggest we sanitize this somehow. Maybe a base64 or
 something.

I was trying hard to avoid this issue in unpublished my crash helper, but I 
forgot that devd runs execl(sh -c, );  :-(

It might just be easier to inspect the path names and allow only 
[a-z][A-Z][0-9] and '/' before sending the devctl message.

--
Rui Paulo



___
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: r278478 - head/sys/sys

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 16:02, John-Mark Gurney j...@funkthat.com wrote:
 
 Rui Paulo wrote this message on Mon, Feb 09, 2015 at 23:04 +:
 Author: rpaulo
 Date: Mon Feb  9 23:04:30 2015
 New Revision: 278478
 URL: https://svnweb.freebsd.org/changeset/base/278478
 
 Log:
  Add the ability to print a vendor copyright in dmesg.
 
 Should we change this into a linker set so that any module can
 add their own vendor copyright w/o having to modify this again?

So you want a copyright module?  That seems a bit overkill.  :-)

An API like Julian mentioned seems like a better idea, but it's not trivial to 
implement if you want the Copyright to be the first thing to be printed.

--
Rui Paulo



___
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: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/libl

2015-02-09 Thread Rui Paulo
On Feb 8, 2015, at 22:20, Rui Paulo rpa...@freebsd.org wrote:
 
 Author: rpaulo
 Date: Mon Feb  9 06:20:34 2015
 New Revision: 278433
 URL: https://svnweb.freebsd.org/changeset/base/278433
 
 Log:
  Merge xz 5.2.0.
 
  This brings support for multi-threaded compression.  This brings close
  N times faster compression where N is the number of CPU cores.
  Because of this, liblzma now depends on libthr.

For those that want to try it, this patch adds support to multi-threaded 
compression when using lzma in libarchive:

https://people.freebsd.org/~rpaulo/libarchive-lzma-mt.diff

It uses all the available CPU cores by default.

--
Rui Paulo



___
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: r278450 - head/release

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 08:50, Adrian Chadd adr...@freebsd.org wrote:
 
 ... this is why we should have some kind of version identifier in each
 tool, or capability lists. Otherwise lulz will ensue like this.

Well, we have: xz --version will output a version string that should be easy to 
parse.


--
Rui Paulo



___
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: r278479 - in head: etc sys/kern

2015-02-09 Thread Rui Paulo
On Feb 9, 2015, at 15:29, Benjamin Kaduk bjkf...@gmail.com wrote:
 The question boils down to: is the time saved by implementing it this way 
 worth the tradeoff of architectural purity.

Yes, that was a tradeoff.

--
Rui Paulo



___
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: r278468 - head/contrib/xz

2015-02-09 Thread Rui Paulo
Author: rpaulo
Date: Mon Feb  9 19:19:13 2015
New Revision: 278468
URL: https://svnweb.freebsd.org/changeset/base/278468

Log:
  Add a few more instructions to xz/FREEBSD-upgrade.

Modified:
  head/contrib/xz/FREEBSD-upgrade

Modified: head/contrib/xz/FREEBSD-upgrade
==
--- head/contrib/xz/FREEBSD-upgrade Mon Feb  9 19:16:19 2015
(r278467)
+++ head/contrib/xz/FREEBSD-upgrade Mon Feb  9 19:19:13 2015
(r278468)
@@ -16,6 +16,9 @@ sh -c 'for F in `cat FREEBSD-Xlist | gre
 
 You may check if there are any new files that we don't need.
 
+You should run ``configure'' to make sure you use a more recent
+config.h.  Running ``make check'' in the xz source tree is also useful.
+
 The instructions for importing new release and merging to HEAD can be found
 at FreeBSD wiki:
 
___
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: r278479 - in head: etc sys/kern

2015-02-09 Thread Rui Paulo

On Feb 09, 2015, at 03:16 PM, Benjamin Kaduk bjkf...@gmail.com wrote:

On Mon, Feb 9, 2015 at 6:13 PM, Rui Paulo rpa...@freebsd.org wrote:
Author: rpaulo
Date: Mon Feb  9 23:13:50 2015
New Revision: 278479
URL: https://svnweb.freebsd.org/changeset/base/278479

Log:
  Notify devd(8) when a process crashed.

  This change implements a notification (via devctl) to userland when
  the kernel produces coredumps after a process has crashed.
  devd can then run a specific command to produce a human readable crash
  report.  The command is most usually a helper that runs gdb/lldb
  commands on the file/coredump pair.  It's possible to use this
  functionality for implementing automatic generation of crash reports.

  devd(8) will be notified of the full path of the binary that crashed and
  the full path of the coredump file.

What advantage does putting this in devd have over a standalone daemon for 
crash reporting?  Is it just the ease of implementation to leverage the 
existing infrastructure?
 
Well, I want to automatically inspect all the programs that crashed in a given 
system.  I don't see how you can do that with a standalone daemon.  Or maybe I 
didn't understand what you meant.
___
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

  1   2   3   4   5   6   7   >