Re: kern/176051: [kernel] [patch] uipc: Simplify and correct debug printing of flags.

2014-02-27 Thread brueffer
Synopsis: [kernel] [patch] uipc: Simplify and correct debug printing of flags.

State-Changed-From-To: open->feedback
State-Changed-By: brueffer
State-Changed-When: Thu Feb 27 11:00:28 CET 2014
State-Changed-Why: 
The patch in the PR doesn't compile (latest HEAD).  The one here works, but is 
a bit ugly:
https://people.freebsd.org/~brueffer/uipc_debug.c.diff

Do you have a better suggestion?


Responsible-Changed-From-To: freebsd-bugs->brueffer
Responsible-Changed-By: brueffer
Responsible-Changed-When: Thu Feb 27 11:00:28 CET 2014
Responsible-Changed-Why: 
I'll take care of this.

http://www.freebsd.org/cgi/query-pr.cgi?pr=176051
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


misc/187108: [PATCH] astro/py-astLib fix incorrect update alert on portscout

2014-02-27 Thread Eero H�nninen

>Number: 187108
>Category:   misc
>Synopsis:   [PATCH] astro/py-astLib fix incorrect update alert on portscout
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 27 12:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Eero Hänninen
>Release:10.0-RELEASE
>Organization:
>Environment:
FreeBSD sneezy 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 
22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Ignore incorrect versioning on upstream and make portscout happy.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN py-astLib.orig/Makefile py-astLib/Makefile
--- py-astLib.orig/Makefile 2014-02-09 17:56:08.0 +0200
+++ py-astLib/Makefile  2014-02-27 14:38:43.0 +0200
@@ -19,6 +19,8 @@
${PKGNAMEPREFIX}matplotlib>=0.98:${PORTSDIR}/math/py-matplotlib
 RUN_DEPENDS:=  ${BUILD_DEPENDS}
 
+PORTSCOUT= skipv:0.15,0.17,0.17.1  # incorrect versioning upstream
+
 USE_PYTHON=yes
 USE_PYDISTUTILS=   yes
 PYDISTUTILS_AUTOPLIST= yes


>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Re: misc/187108: [PATCH] astro/py-astLib fix incorrect update alert on portscout

2014-02-27 Thread Eero Hänninen

Sorry this bug should be in Category ports and Class change-request


2014-02-27 14:50 kirjutas freebsd-gnats-sub...@freebsd.org:

Thank you very much for your problem report.
It has the internal identification `misc/187108'.
The individual assigned to look at your
report is: freebsd-bugs.

You can access the state of your problem report at any time
via this link:

http://www.freebsd.org/cgi/query-pr.cgi?pr=187108


Category:   misc
Responsible:freebsd-bugs
Synopsis:   [PATCH] astro/py-astLib fix incorrect update alert on 
portscout

Arrival-Date:   Thu Feb 27 12:50:00 UTC 2014

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


bin/187114: rtld does not expand $ORIGIN unless DF_ORIGIN flag is set

2014-02-27 Thread Ed Maste

>Number: 187114
>Category:   bin
>Synopsis:   rtld does not expand $ORIGIN unless DF_ORIGIN flag is set
>Confidential:   no
>Severity:   non-critical
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 27 16:30:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Ed Maste
>Release:FreeBSD 11.0-CURRENT amd64
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 
r259961: Fri Dec 27 21:56:39 UTC 2013 
pe...@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64


>Description:
rtld-elf requires the DF_ORIGIN flag to be set, in order to substitute
$ORIGIN in rpath.  This is not required by Linux's runtime linker, and
apparently not by any other system.

Based on old SCO documentation of the DF_ORIGIN flag it appears the
purpose of the flag is to force early resolution of $ORIGIN for the case
of an executable that does not use $ORIGIN in rpath, but later expects to
dlopen() a library that does.

http://www.sco.com/developers/gabi/2003-12-17/ch5.dynamic.html

The GNU ld documentation describes "-z origin" as "Marks the object may
contain $ORIGIN," which is not particularly helpful.  The GNU gold
linker though hints at the interpretation above: "Mark DSO to indicate
that needs immediate $ORIGIN processing at runtime."

>How-To-Repeat:

>Fix:



>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


bin/187118: service(8): inaccurate error message

2014-02-27 Thread Frederic Culot

>Number: 187118
>Category:   bin
>Synopsis:   service(8): inaccurate error message
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 27 17:30:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Frederic Culot
>Release:FreeBSD 11.0-CURRENT amd64
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 
r259961: Fri Dec 27 21:56:39 UTC 2013 
pe...@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64
>Description:
service(8) checks if the given script exists and is executable before
proceeding (using the -x condition evaluation operator), and issues an
error if one of those conditions is not met. The issue is that the
error message is not accurate, telling only that the given script does
not exist. However, it might be that a user started developing a startup
script and forgot to switch on its execution flag. He might end up
wondering why service(8) reports that his script is missing while in
fact the only issue is that it is not executable.
The attached patch tries to clarify the error message reported by
service(8).

>How-To-Repeat:
  # $EDITOR /etc/rc.d/my_startup_script
  # service my_startup_script start

  my_startup_script does not exist in /etc/rc.d or the local startup
  directories (/usr/local/etc/rc.d)

>Fix:
--- service.patch begins here ---
--- /usr/sbin/service   2014-02-01 11:08:51.792862305 +0100
+++ service 2014-02-27 17:03:29.220048128 +0100
@@ -145,5 +145,5 @@
 
 # If the script was not found
 echo "$script does not exist in /etc/rc.d or the local startup"
-echo "directories (${local_startup})"
+echo "directories (${local_startup}), or is not executable"
 exit 1
--- service.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: misc/187094: FreeBSD DHCP ignores dhcp option interface-mtu

2014-02-27 Thread Robert Blayzor
The following reply was made to PR misc/187094; it has been noted by GNATS.

From: Robert Blayzor 
To: "bug-follo...@freebsd.org" 
Cc:  
Subject: Re: misc/187094: FreeBSD DHCP ignores dhcp option interface-mtu
Date: Thu, 27 Feb 2014 13:24:11 -0500

 I would like to submit the following patch that corrects two major issues:
 
 -  Look for and set MTU according to  DHCP option tag 26 for Interface MTU. 
This allows booting interface to be used on a jumbo frame enabled network.
 
Currently this is broken and cannot be overridden or set later.
 
 -  Remove ancient proxy ARP setting.  Currently it is more of a problem that 
a host is multi-homed and booting interface network may not have a router.
(ie: default route is on another interface/network)
 
The default today is to use DHCP router tag and if no router tag is
supplied by DHCP, default route will be set to hosts self.  Not supplying
a route is a completely valid option, especially since many hosts
multi-homed.
 
 
 Patch is against 10.0-RELEASE
 
 Index: bootp_subr.c
 ===
 --- bootp_subr.c   (revision 261846)
 +++ bootp_subr.c   (working copy)
 @@ -196,6 +196,8 @@
  #define TAG_HOSTNAME   12  /* Client host name */
  #define TAG_ROOT   17  /* Root path */
 
 +#define TAG_INTF_MTU 26  /* Interface MTU Size (RFC2132) */
 +
  /* DHCP specific tags */
  #define TAG_OVERLOAD   52  /* Option Overload */
  #define TAG_MAXMSGSIZE   57  /* Maximum DHCP Message Size */
 @@ -229,6 +231,8 @@
  #endif
 
  static char bootp_cookie[128];
 +static unsigned int bootp_ifmtu = 0;
 +
  static struct socket *bootp_so;
  SYSCTL_STRING(_kern, OID_AUTO, bootp_cookie, CTLFLAG_RD,
bootp_cookie, 0, "Cookie (T134) supplied by bootp server");
 @@ -1030,7 +1034,22 @@
return (0);
}
 
 -  printf("Adjusted interface %s\n", ifctx->ireq.ifr_name);
 +  printf("Adjusted interface %s", ifctx->ireq.ifr_name);
 +
 +  /* Do BOOTP interface options */
 +  if (bootp_ifmtu != 0) {
 +  printf(" (MTU=%d", bootp_ifmtu);
 +  if (bootp_ifmtu > 1514)
 +  printf("/JUMBO");
 +  printf(")");
 +
 +  ifr->ifr_mtu = bootp_ifmtu;
 +  error = ifioctl(bootp_so, SIOCSIFMTU, (caddr_t) ifr, td);
 +  if (error != 0)
 +  panic("%s: SIOCSIFMTU, error=%d", __func__, error);
 +  }
 +printf("\n");
 +
/*
 * Do enough of ifconfig(8) so that the chosen interface
 * can talk to the servers.  (just set the address)
 @@ -1053,7 +1072,12 @@
 
/* Add new default route */
 
 -  if (ifctx->gotgw != 0 || gctx->gotgw == 0) {
 +/*  Only set default route if we received one in the request.
 +Proxy ARP considered obsolete.  More valid to NOT set
 +a router in request as the host may be multi-homed and
 +gateway may not be on this interface.
 +  */
 +  if (ifctx->gotgw != 0 || gctx->gotgw != 0) {
clear_sinaddr(&defdst);
clear_sinaddr(&defmask);
/* XXX MRT just table 0 */
 @@ -1518,6 +1542,11 @@
p[i] = '\0';
}
 
 +p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen,
 + TAG_INTF_MTU);
 +if (p != NULL) {
 +  bootp_ifmtu = (((unsigned char)p[0] << 8) + (unsigned 
char)p[1]);
 +  }
 
printf("\n");
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/174684: commit references a PR

2014-02-27 Thread dfilter service
The following reply was made to PR kern/174684; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/174684: commit references a PR
Date: Thu, 27 Feb 2014 21:42:06 + (UTC)

 Author: delphij
 Date: Thu Feb 27 21:41:52 2014
 New Revision: 262572
 URL: http://svnweb.freebsd.org/changeset/base/262572
 
 Log:
   Get rid of the 'chan' from softc structure and use the latter
   directly as sleep channel.
   
   PR:  kern/174684
   Submitted by:jmg
   MFC after:   2 weeks
 
 Modified:
   head/sys/dev/tws/tws.h
   head/sys/dev/tws/tws_cam.c
   head/sys/dev/tws/tws_user.c
 
 Modified: head/sys/dev/tws/tws.h
 ==
 --- head/sys/dev/tws/tws.h Thu Feb 27 21:01:10 2014(r262571)
 +++ head/sys/dev/tws/tws.h Thu Feb 27 21:41:52 2014(r262572)
 @@ -248,7 +248,6 @@ struct tws_softc {
  struct mtx io_lock;   /* IO  lock */
  struct tws_ioctl_lock ioctl_lock; /* ioctl lock */ 
  u_int32_t seq_id; /* Sequence id */
 -void *chan;   /* IOCTL req wait channel */
  struct tws_circular_q aen_q;  /* aen q */
  struct tws_circular_q trace_q;/* trace q */
  struct tws_stats stats;   /* I/O stats */
 
 Modified: head/sys/dev/tws/tws_cam.c
 ==
 --- head/sys/dev/tws/tws_cam.c Thu Feb 27 21:01:10 2014(r262571)
 +++ head/sys/dev/tws/tws_cam.c Thu Feb 27 21:41:52 2014(r262572)
 @@ -1297,7 +1297,7 @@ tws_reinit(void *arg)
  
  tws_turn_on_interrupts(sc);
  
 -wakeup_one(sc->chan);
 +wakeup_one(sc);
  }
  
  
 
 Modified: head/sys/dev/tws/tws_user.c
 ==
 --- head/sys/dev/tws/tws_user.cThu Feb 27 21:01:10 2014
(r262571)
 +++ head/sys/dev/tws/tws_user.cThu Feb 27 21:41:52 2014
(r262572)
 @@ -103,8 +103,7 @@ tws_passthru(struct tws_softc *sc, void 
  do {
  req = tws_get_request(sc, TWS_REQ_TYPE_PASSTHRU);
  if ( !req ) {
 -sc->chan = (void *)sc;
 -error = tsleep(sc->chan,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
 +error = tsleep(sc,  0, "tws_sleep", TWS_IOCTL_TIMEOUT*hz);
  if ( error == EWOULDBLOCK ) {
  return(ETIMEDOUT);
  }
 @@ -203,7 +202,7 @@ out_data:
  //
  req->state = TWS_REQ_STATE_FREE;
  
 -wakeup_one(sc->chan);
 +wakeup_one(sc);
  
  return(error);
  }
 ___
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: ports/186654: [PATCH] net-mgmt/netmond: fix build

2014-02-27 Thread rene
Synopsis: [PATCH] net-mgmt/netmond: fix build

Responsible-Changed-From-To: freebsd-bugs->rene
Responsible-Changed-By: rene
Responsible-Changed-When: Thu Feb 27 22:36:59 UTC 2014
Responsible-Changed-Why: 
Take

http://www.freebsd.org/cgi/query-pr.cgi?pr=186654
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/174684: [tws] [patch] 3dm2 (or smartctl) triggers a kernel panic

2014-02-27 Thread delphij
Synopsis: [tws] [patch] 3dm2 (or smartctl) triggers a kernel panic

State-Changed-From-To: open->patched
State-Changed-By: delphij
State-Changed-When: Thu Feb 27 22:56:27 UTC 2014
State-Changed-Why: 
Committed jmg@'s fix.


Responsible-Changed-From-To: freebsd-bugs->delphij
Responsible-Changed-By: delphij
Responsible-Changed-When: Thu Feb 27 22:56:27 UTC 2014
Responsible-Changed-Why: 
Take.

http://www.freebsd.org/cgi/query-pr.cgi?pr=174684
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/187126: panic: vm_page_unwire: page XXX's wire count is 0 on NFS client

2014-02-27 Thread Frank Hoeflich

>Number: 187126
>Category:   kern
>Synopsis:   panic: vm_page_unwire: page XXX's wire count is 0 on NFS client
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 28 01:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Frank Hoeflich
>Release:stable/10
>Organization:
TidalScale Inc.
>Environment:
NFS/DHCP client:
node0:~ $ uname -a
FreeBSD node0.tsvirt.pod 10.0-STABLE FreeBSD 10.0-STABLE #0 bb452b1(current): 
Fri Feb 21 12:25:36 PST 2014 tsdev@coral:/usr/home/tsdev/obj/usr/src/sys/TS 
 amd64

NFS/DHCP server:
coral:~ $ uname -a
FreeBSD coral 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #0 r256092: Sun Oct  6 22:30:23 
UTC 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
In preparation for a customer alpha release, I had created two VMs on VMware 
Fusion.  One acted as a DHCP and NFS server; the other, node0, was a DHCP and 
NFS client.  After booting node0 as root I attached to a process on it using 
gdb.  After debugging I typed `shell reboot', node0 synced and went down, then 
got this panic.  Saved the dump and got this bt from kgdb after coming back up:

(kgdb) #0  doadump (textdump=0) at pcpu.h:219
#1  0x80345ffe in db_dump (dummy=, dummy2=0,
dummy3=0, dummy4=0x0) at /usr/src/sys/ddb/db_command.c:543
#2  0x80345a9d in db_command (cmd_table=)
at /usr/src/sys/ddb/db_command.c:449
#3  0x80345814 in db_command_loop ()
at /usr/src/sys/ddb/db_command.c:502
#4  0x80348260 in db_trap (type=, code=0)
at /usr/src/sys/ddb/db_main.c:231
#5  0x80900f73 in kdb_trap (type=3, code=0, tf=)
at /usr/src/sys/kern/subr_kdb.c:656
#6  0x80cde7bb in trap (frame=0xfe0171bfe270)
at /usr/src/sys/amd64/amd64/trap.c:579
#7  0x80cc3192 in calltrap ()
at /usr/src/sys/amd64/amd64/exception.S:232
#8  0x8090072e in kdb_enter (why=0x80f54b6f "panic",
msg=) at cpufunc.h:63
#9  0x808c6b76 in vpanic (fmt=,
ap=) at /usr/src/sys/kern/kern_shutdown.c:752
#10 0x808c6be3 in panic (fmt=)
at /usr/src/sys/kern/kern_shutdown.c:688
#11 0x80b687a9 in vm_page_unwire (m=,
activate=) at /usr/src/sys/vm/vm_page.c:2381
#12 0x80959bd6 in vfs_vmio_release (bp=0xfe0171c74298)
at /usr/src/sys/kern/vfs_bio.c:1859
#13 0x80957f98 in brelse (bp=0xfe0171c74298)
at /usr/src/sys/kern/vfs_bio.c:1712
#14 0x80970e7a in flushbuflist (bufv=,
flags=, bo=0xf800046430d0, slpflag=96,
slptimeo=0) at /usr/src/sys/kern/vfs_subr.c:1383
#15 0x80970b3a in bufobj_invalbuf (bo=0xf800046430d0, flags=1,
slpflag=0, slptimeo=0) at /usr/src/sys/kern/vfs_subr.c:1259
#16 0x80973e0b in vgonel (vp=0xf80004643000)
at /usr/src/sys/kern/vfs_subr.c:1320
#17 0x80973646 in vflush (mp=0xf80004409330, rootrefs=1, flags=2,
td=0xf80004dc1000) at /usr/src/sys/kern/vfs_subr.c:2568
#18 0x807f5155 in nfs_unmount (mp=0xf80004409330,
mntflags=)
at /usr/src/sys/fs/nfsclient/nfs_clvfsops.c:1503
#19 0x8096b2bf in dounmount (mp=0xf80004409330, flags=524288,
td=0xf80004dc1000) at /usr/src/sys/kern/vfs_mount.c:1324
#20 0x80974931 in vfs_unmountall ()
at /usr/src/sys/kern/vfs_subr.c:3396
#21 0x808c62a8 in kern_reboot (howto=0)
at /usr/src/sys/kern/kern_shutdown.c:435
#22 0x808c5cc8 in sys_reboot (td=,
uap=) at /usr/src/sys/kern/kern_shutdown.c:196
#23 0x80cdf483 in amd64_syscall (td=0xf80004dc1000, traced=0)
at subr_syscall.c:134
#24 0x80cc347b in Xfast_syscall ()
at /usr/src/sys/amd64/amd64/exception.S:391
#25 0x00080085e12c in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 
>How-To-Repeat:
1. Boot NFS client.
2. On client, find a process to which you may attach:

node0:~ $ ps -ax | grep cron
1136  -  Is0:00.01 /usr/sbin/cron -s
1212  0  R+0:00.00 grep cron

3. Attach to it: gdb /usr/sbin/cron 1136
4. At the gdb prompt, type `shell reboot'.

This has worked on the first try for me a few times now (and hasn't failed yet).
>Fix:
I do not have a patch.  This resembles

kern/181590: [vm] [panic] amd(8) related vm_page_unwire panics
kern/182661: [PANIC] 9.2-RELEASE vm_page_unwire: page n's wire count is zero

which were reported against msdosfs+tmpfs and nullfs respectively.  182661 has 
been closed and it's possible that similarly patching the NFS vnops would fix 
it.  To my knowledge I'm the first to report it against NFS.

>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "fr

Re: kern/139743: [ichsmb] [patch] ichsmb driver doesn't detects SMB bus on Asus P4B533/P4PE motherboards

2014-02-27 Thread Takefu
>From whom isn't there reaction in this PR?
This is a patch corresponding to 10.0-RELEASE.


--- sys/dev/pci/pci.c.orig  2014-02-24 12:40:07.0 +0900
+++ sys/dev/pci/pci.c   2014-02-24 12:48:55.0 +0900
@@ -112,6 +112,7 @@
uint16_t data);
 static voidpci_enable_msix(device_t dev, u_int index,
uint64_t address, uint32_t data);
+static voidpci_fix_asus_smbus(device_t dev);
 static voidpci_mask_msix(device_t dev, u_int index);
 static voidpci_unmask_msix(device_t dev, u_int index);
 static int pci_msi_blacklisted(void);
@@ -196,54 +197,56 @@
 #definePCI_QUIRK_ENABLE_MSI_VM 3 /* Older chipset in VM where MSI 
works */
 #definePCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */
 #definePCI_QUIRK_DISABLE_MSIX  5 /* MSI-X doesn't work */
+#definePCI_QUIRK_FIXUP_ROUTINE 6 /* PCI needs a fix to continue */
int arg1;
int arg2;
+   void (*fixup_func)(device_t dev);
 };
 
 static const struct pci_quirk pci_quirks[] = {
/* The Intel 82371AB and 82443MX have a map register at offset 0x90. */
-   { 0x71138086, PCI_QUIRK_MAP_REG,0x90,0 },
-   { 0x719b8086, PCI_QUIRK_MAP_REG,0x90,0 },
+   { 0x71138086, PCI_QUIRK_MAP_REG,0x90,0, NULL },
+   { 0x719b8086, PCI_QUIRK_MAP_REG,0x90,0, NULL },
/* As does the Serverworks OSB4 (the SMBus mapping register) */
-   { 0x02001166, PCI_QUIRK_MAP_REG,0x90,0 },
+   { 0x02001166, PCI_QUIRK_MAP_REG,0x90,0, NULL },
 
/*
 * MSI doesn't work with the ServerWorks CNB20-HE Host Bridge
 * or the CMIC-SL (AKA ServerWorks GC_LE).
 */
-   { 0x00141166, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x00171166, PCI_QUIRK_DISABLE_MSI,0,  0 },
+   { 0x00141166, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x00171166, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
 
/*
 * MSI doesn't work on earlier Intel chipsets including
 * E7500, E7501, E7505, 845, 865, 875/E7210, and 855.
 */
-   { 0x25408086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x254c8086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x25508086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x25608086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x25708086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x25788086, PCI_QUIRK_DISABLE_MSI,0,  0 },
-   { 0x35808086, PCI_QUIRK_DISABLE_MSI,0,  0 },
+   { 0x25408086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x254c8086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x25508086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x25608086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x25708086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x25788086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
+   { 0x35808086, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
 
/*
 * MSI doesn't work with devices behind the AMD 8131 HT-PCIX
 * bridge.
 */
-   { 0x74501022, PCI_QUIRK_DISABLE_MSI,0,  0 },
+   { 0x74501022, PCI_QUIRK_DISABLE_MSI,0,  0, NULL },
 
/*
 * MSI-X allocation doesn't work properly for devices passed through
 * by VMware up to at least ESXi 5.1.
 */
-   { 0x079015ad, PCI_QUIRK_DISABLE_MSIX,   0,  0 }, /* PCI/PCI-X */
-   { 0x07a015ad, PCI_QUIRK_DISABLE_MSIX,   0,  0 }, /* PCIe */
+   { 0x079015ad, PCI_QUIRK_DISABLE_MSIX,   0,  0, NULL }, /* PCI/PCI-X 
*/
+   { 0x07a015ad, PCI_QUIRK_DISABLE_MSIX,   0,  0, NULL }, /* PCIe */
 
/*
 * Some virtualization environments emulate an older chipset
 * but support MSI just fine.  QEMU uses the Intel 82440.
 */
-   { 0x12378086, PCI_QUIRK_ENABLE_MSI_VM,  0,  0 },
+   { 0x12378086, PCI_QUIRK_ENABLE_MSI_VM,  0,  0, NULL },
 
/*
 * HPET MMIO base address may appear in Bar1 for AMD SB600 SMBus
@@ -253,7 +256,11 @@
 * For SB600 A21 and later, firmware must set the bit to hide it.
 * For SB700 and later, it is unused and hardcoded to zero.
 */
-   { 0x43851002, PCI_QUIRK_UNMAP_REG,  0x14,   0 },
+   { 0x43851002, PCI_QUIRK_UNMAP_REG,  0x14,   0, NULL },
+
+   /* The ASUS P4B-motherboards needs a hack to enable the Intel 801SMBus 
*/
+   { 0x24408086, PCI_QUIRK_FIXUP_ROUTINE,  0,  0, &pci_fix_asus_smbus 
},
+   { 0x24C08086, PCI_QUIRK_FIXUP_ROUTINE,  0,  0, &pci_fix_asus_smbus 
},
 
{ 0 }
 };
@@ -527,6 +534,27 @@
cfg->hdrtype = PCIM_HDRTYPE_BRIDGE;
 }
 
+/* asus p4b/p4pe hack */
+
+static void
+pci_fix_asus_smbus(device_t dev)
+{
+   int pmccfg;
+
+   /* read subsystem vendor-id */
+   pmccfg = pci

Re: ports/187108: [PATCH] astro/py-astLib fix incorrect update alert on portscout

2014-02-27 Thread linimon
Synopsis: [PATCH] astro/py-astLib fix incorrect update alert on portscout

Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs
Responsible-Changed-By: linimon
Responsible-Changed-When: Fri Feb 28 05:33:36 UTC 2014
Responsible-Changed-Why: 
ports PR.

http://www.freebsd.org/cgi/query-pr.cgi?pr=187108
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: bin/187103: clang 3.4 miscompiles nsAppRunner.cpp from firefox firefox-27.0.1,1 in i386

2014-02-27 Thread Don Lewis
I managed to boil down the offending code to an almost reaonsable test
case.

If I compile the code below with clang thusly:

/usr/bin/clang++ -o sigill.s -S -fvisibility=hidden -fPIC \
  -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual \
  -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare \
  -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof \
  -Wno-unknown-warning-option -Wno-return-type-c-linkage \
  -Wno-mismatched-tags -O2 -pipe -march=athlon64 -fno-strict-aliasing \
  -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections \
  -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe \
  -fno-omit-frame-pointer -pthread -D_THREAD_SAFE sigill.cpp

I get the following assembly code (note the ud2 instruction):

.file   "sigill.cpp"
.section.text._Z9gensigillv,"ax",@progbits
.hidden _Z9gensigillv
.globl  _Z9gensigillv
.align  16, 0x90
.type   _Z9gensigillv,@function
_Z9gensigillv:  # @_Z9gensigillv
# BB#0: # %entry
pushl   %ebp
movl%esp, %ebp
pushl   %ebx
andl$-8, %esp
subl$8, %esp
calll   .L0$pb
.L0$pb:
popl%ebx
.Ltmp0:
addl$_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %ebx
movl$0, (%esp)
leal(%esp), %eax
calll   _ZN13nsCOMPtr_base16begin_assignmentEv@PLT
ud2
.Ltmp1:
.size   _Z9gensigillv, .Ltmp1-_Z9gensigillv


.ident  "FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 
20140216"
.section".note.GNU-stack","",@progbits


Here's the source code:

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include 
#define NS_ERROR_MODULE_BASE_OFFSET 0x45

/* Helpers for defining our enum, to be undef'd later */
#define NS_ERROR_SEVERITY_SUCCESS   0
#define NS_ERROR_SEVERITY_ERROR 1
#define SUCCESS_OR_FAILURE(sev, module, code) \
  ((uint32_t)(sev) << 31) | \
  ((uint32_t)(module + NS_ERROR_MODULE_BASE_OFFSET) << 16) | \
  (uint32_t)(code)
#define SUCCESS(code) \
  SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_SUCCESS, MODULE, code)
#define FAILURE(code) \
  SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_ERROR, MODULE, code)

  typedef enum class tag_nsresult : uint32_t
  {
#undef ERROR
#define ERROR(key, val) key = val
ERROR(NS_OK,  0)
#undef ERROR
  } nsresult;
#define NS_OK nsresult::NS_OK

inline uint32_t NS_FAILED_impl(nsresult _nsresult) {
  return static_cast(_nsresult) & 0x8000;
}
#  define MOZ_LIKELY(x)   (!!(x))
#  define MOZ_UNLIKELY(x) (!!(x))
#define NS_FAILED(_nsresult)((bool)MOZ_UNLIKELY(NS_FAILED_impl(_nsresult)))
#define NS_SUCCEEDED(_nsresult) ((bool)MOZ_LIKELY(!NS_FAILED_impl(_nsresult)))

//--
#define NSCAP_FEATURE_USE_BASE

#define NS_COM_GLUE
#define NS_FASTCALL __attribute__ ((regparm (3), stdcall))
#define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
#define NS_METHOD_(type) type
#define NS_METHOD   NS_METHOD_(nsresult)
#define NS_IMETHOD_(type) virtual type
#define NS_IMETHOD  NS_IMETHOD_(nsresult)

struct nsID {
  /**
   * @name Identifier values
   */
 
  //@{
  uint32_t m0;
  uint16_t m1;
  uint16_t m2;
  uint8_t m3[8];
  //@}

  /**
   * @name Methods
   */
  //@{
  /**
   * Equivalency method. Compares this nsID with another.
   * @return true if they are the same, false if not.
   */

  inline bool Equals(const nsID& other) const {
// Unfortunately memcmp isn't faster than this.
return
  uint32_t*) &m0)[0] == ((uint32_t*) &other.m0)[0]) &&
   (((uint32_t*) &m0)[1] == ((uint32_t*) &other.m0)[1]) &&
   (((uint32_t*) &m0)[2] == ((uint32_t*) &other.m0)[2]) &&
   (((uint32_t*) &m0)[3] == ((uint32_t*) &other.m0)[3]));
  }
  //@}
};

typedef nsID nsIID;
typedef nsID nsCID;
#define REFNSIID const nsIID&
#if 0
#define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid) \
  template \
  struct COMTypeInfo\
  { \
static const nsIID kIID;\
  };\
  static const nsIID& GetIID() {return COMTypeInfo::kIID;}
#endif

typedef uint32_t  nsrefcnt;
class nsISupports {
public:

#if 0
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
#endif

  /**
   * @name Methods
   */

  //@{
  /**
   * A run time mechanism for interface discovery.
   * @param aIID [in] A requested interface IID
   * @param aInstancePtr [out] A pointer to an interface pointer to
   * receive the result.
   * @r

Re: bin/187103: clang 3.4 miscompiles nsAppRunner.cpp from firefox firefox-27.0.1,1 in i386

2014-02-27 Thread Don Lewis
The following reply was made to PR bin/187103; it has been noted by GNATS.

From: Don Lewis 
To: freebsd-gnats-sub...@freebsd.org
Cc: freebsd-bugs@FreeBSD.org
Subject: Re: bin/187103: clang 3.4 miscompiles nsAppRunner.cpp from firefox
 firefox-27.0.1,1 in i386
Date: Thu, 27 Feb 2014 23:05:02 -0800 (PST)

 I managed to boil down the offending code to an almost reaonsable test
 case.
 
 If I compile the code below with clang thusly:
 
 /usr/bin/clang++ -o sigill.s -S -fvisibility=hidden -fPIC \
   -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual \
   -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare \
   -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof \
   -Wno-unknown-warning-option -Wno-return-type-c-linkage \
   -Wno-mismatched-tags -O2 -pipe -march=athlon64 -fno-strict-aliasing \
   -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections \
   -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe \
   -fno-omit-frame-pointer -pthread -D_THREAD_SAFE sigill.cpp
 
 I get the following assembly code (note the ud2 instruction):
 
.file   "sigill.cpp"
.section.text._Z9gensigillv,"ax",@progbits
.hidden _Z9gensigillv
.globl  _Z9gensigillv
.align  16, 0x90
.type   _Z9gensigillv,@function
 _Z9gensigillv:  # @_Z9gensigillv
 # BB#0: # %entry
pushl   %ebp
movl%esp, %ebp
pushl   %ebx
andl$-8, %esp
subl$8, %esp
calll   .L0$pb
 .L0$pb:
popl%ebx
 .Ltmp0:
addl$_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %ebx
movl$0, (%esp)
leal(%esp), %eax
calll   _ZN13nsCOMPtr_base16begin_assignmentEv@PLT
ud2
 .Ltmp1:
.size   _Z9gensigillv, .Ltmp1-_Z9gensigillv
 
 
.ident  "FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 
20140216"
.section".note.GNU-stack","",@progbits
 
 
 Here's the source code:
 
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include 
 #define NS_ERROR_MODULE_BASE_OFFSET 0x45
 
 /* Helpers for defining our enum, to be undef'd later */
 #define NS_ERROR_SEVERITY_SUCCESS   0
 #define NS_ERROR_SEVERITY_ERROR 1
 #define SUCCESS_OR_FAILURE(sev, module, code) \
   ((uint32_t)(sev) << 31) | \
   ((uint32_t)(module + NS_ERROR_MODULE_BASE_OFFSET) << 16) | \
   (uint32_t)(code)
 #define SUCCESS(code) \
   SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_SUCCESS, MODULE, code)
 #define FAILURE(code) \
   SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_ERROR, MODULE, code)
 
   typedef enum class tag_nsresult : uint32_t
   {
 #undef ERROR
 #define ERROR(key, val) key = val
 ERROR(NS_OK,  0)
 #undef ERROR
   } nsresult;
 #define NS_OK nsresult::NS_OK
 
 inline uint32_t NS_FAILED_impl(nsresult _nsresult) {
   return static_cast(_nsresult) & 0x8000;
 }
 #  define MOZ_LIKELY(x)   (!!(x))
 #  define MOZ_UNLIKELY(x) (!!(x))
 #define NS_FAILED(_nsresult)((bool)MOZ_UNLIKELY(NS_FAILED_impl(_nsresult)))
 #define NS_SUCCEEDED(_nsresult) ((bool)MOZ_LIKELY(!NS_FAILED_impl(_nsresult)))
 
 //--
 #define NSCAP_FEATURE_USE_BASE
 
 #define NS_COM_GLUE
 #define NS_FASTCALL __attribute__ ((regparm (3), stdcall))
 #define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
 #define NS_METHOD_(type) type
 #define NS_METHOD   NS_METHOD_(nsresult)
 #define NS_IMETHOD_(type) virtual type
 #define NS_IMETHOD  NS_IMETHOD_(nsresult)
 
 struct nsID {
   /**
* @name Identifier values
*/
  
   //@{
   uint32_t m0;
   uint16_t m1;
   uint16_t m2;
   uint8_t m3[8];
   //@}
 
   /**
* @name Methods
*/
   //@{
   /**
* Equivalency method. Compares this nsID with another.
* @return true if they are the same, false if not.
*/
 
   inline bool Equals(const nsID& other) const {
 // Unfortunately memcmp isn't faster than this.
 return
   uint32_t*) &m0)[0] == ((uint32_t*) &other.m0)[0]) &&
(((uint32_t*) &m0)[1] == ((uint32_t*) &other.m0)[1]) &&
(((uint32_t*) &m0)[2] == ((uint32_t*) &other.m0)[2]) &&
(((uint32_t*) &m0)[3] == ((uint32_t*) &other.m0)[3]));
   }
   //@}
 };
 
 typedef nsID nsIID;
 typedef nsID nsCID;
 #define REFNSIID const nsIID&
 #if 0
 #define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid) \
   template \
   struct COMTypeInfo\
   { \
 static const nsIID kIID;\
   };\
   static