Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs.

2011-12-06 Thread Petr Salinger
The following reply was made to PR kern/163076; it has been noted by GNATS.

From: Petr Salinger 
To: Jaakko Heinonen 
Cc: Poul-Henning Kamp , bug-follo...@freebsd.org
Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs
 and procfs.
Date: Tue, 6 Dec 2011 09:38:49 +0100 (CET)

 >>> Yes, r222004 changed sbuf_finish() to not clear s->s_error which causes
 >>> the regression. I am not sure if we should blame r222004 or the pseudofs
 >>> code.
 
 The "dd testcase" works for us with change bellow.
 It also solves the original problem.
 I am unsure whether it is a right way, though.
 
 Petr
 
 
 --- a/sys/fs/pseudofs/pseudofs_vnops.c
 +++ b/sys/fs/pseudofs/pseudofs_vnops.c
 @@ -640,7 +640,7 @@
  if (buflen > MAXPHYS + 1)
  buflen = MAXPHYS + 1;
 
 -   sb = sbuf_new(sb, NULL, buflen, 0);
 +   sb = sbuf_new(sb, NULL, MAXPHYS + 1, 0);
  if (sb == NULL) {
  error = EIO;
  goto ret;
 @@ -654,7 +654,12 @@
  }
 
  sbuf_finish(sb);
 -   error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio);
 +
 +   if (buflen > sbuf_len(sb))
 +   buflen = sbuf_len(sb);
 +   else
 +   buflen--;
 +   error = uiomove_frombuf(sbuf_data(sb), buflen, uio);
  sbuf_delete(sb);
   ret:
  vn_lock(vn, locked | LK_RETRY);
 
___
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/161248: [ahci] Time out, extremly slow response while copying large files

2011-12-06 Thread Julien Cigar
The following reply was made to PR kern/161248; it has been noted by GNATS.

From: Julien Cigar 
To: bug-follo...@freebsd.org, kal...@gmx.at
Cc:  
Subject: Re: kern/161248: [ahci] Time out, extremly slow response while copying
 large files
Date: Tue, 06 Dec 2011 10:02:56 +0100

 This is a multi-part message in MIME format.
 --080907010006050005010300
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Same problem here (on 9.0-RC1) on a HP microserver (N40L):
 
 ahcich3: Timeout on slot 5 port 0
 ahcich3: is  cs 0020 ss 0020 rs 0020 tfd c0 serr 
  cmd e517
 ahcich3: AHCI reset: device not ready after 31000ms (tfd = 0080)
 ahcich3: Timeout on slot 5 port 0
 ahcich3: is  cs 0020 ss  rs 0020 tfd 00 serr 
  cmd e517
 ahcich3: AHCI reset: device not ready after 31000ms (tfd = 0080)
 ahcich3: Timeout on slot 5 port 0
 ahcich3: is  cs 0020 ss  rs 0020 tfd 00 serr 
  cmd e517
 (ada3:ahcich3:0:0:0): lost device
 ahcich3: AHCI reset: device not ready after 31000ms (tfd = 0080)
 ahcich3: Timeout on slot 5 port 0
 ahcich3: is  cs 0020 ss 0020 rs 0020 tfd 00 serr 
  cmd e517
 GEOM_RAID3: Cannot write metadata on ada3 (device=backup, error=5).
 GEOM_RAID3: Cannot update metadata on disk ada3 (error=5).
 GEOM_RAID3: Cannot update metadata on disk ada3 (error=6).
 GEOM_RAID3: Device backup: provider ada3 disconnected.
 (ada3:ahcich3:0:0:0): removing device entry
 ahcich3: AHCI reset: device not ready after 31000ms (tfd = 0080)
 ahcich3: Poll timeout on slot 5 port 0
 ahcich3: is  cs 0020 ss  rs 0020 tfd 00 serr 
  cmd e517
 
 The controller is:
 ahci0@pci0:0:17:0:  class=0x010601 card=0x1609103c chip=0x43911002 
 rev=0x40 hdr=0x00
  vendor = 'ATI Technologies Inc'
  device = 'SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]'
  class  = mass storage
  subclass   = SATA
 
 -- 
 No trees were killed in the creation of this message.
 However, many electrons were terribly inconvenienced.
 
 --080907010006050005010300
 Content-Type: text/x-vcard; charset=utf-8;
  name="jcigar.vcf"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="jcigar.vcf"
 
 begin:vcard
 fn:Julien Cigar
 n:Cigar;Julien
 org;quoted-printable:Belgian Biodiversity Platform;ULB (Universit=C3=A9 Libre 
de Bruxelles)
 adr:;;;Brussels;;;Belgium
 email;internet:jci...@ulb.ac.be
 tel;work:+32(0)26505752
 x-mozilla-html:FALSE
 url:http://www.biodiversity.be
 version:2.1
 end:vcard
 
 
 --080907010006050005010300--
___
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/163076: It is not possible to read in chunks from linprocfs and procfs.

2011-12-06 Thread Poul-Henning Kamp
The following reply was made to PR kern/163076; it has been noted by GNATS.

From: "Poul-Henning Kamp" 
To: Jaakko Heinonen 
Cc: Petr Salinger , bug-follo...@freebsd.org
Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs 
and procfs.
Date: Tue, 06 Dec 2011 11:20:09 +

 In message <20111205214201.GA37871@jh>, Jaakko Heinonen writes:
 >On 2011-12-05, Poul-Henning Kamp wrote:
 
 >> Sbufs were designed to have "latching error semantics" and any errors
 >> should not be cleared by sbuf_finish() for exactly that reason.
 >
 >Shouldn't sbuf_finish() then check s->s_error before appending the
 >trailing '\0' and setting the SBUF_FINISHED flag? The problem in
 >question wasn't caught earlier because sbuf_finish() happily finishes
 >the buffer even if it has an error.
 
 I belive the code is written so that there is always reserved space 
 for the final '\0'
 
 sbuf_finish() should finish _any_ sbuf, and return zero only if
 the finished buffer is fully OK.
 
 I belive it does that, if not its a bug.
 
 The intent is that you don't have to check for errors more than
 one place: sbuf_finish()
 
 -- 
 Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
 p...@freebsd.org | TCP/IP since RFC 956
 FreeBSD committer   | BSD since 4.3-tahoe
 Never attribute to malice what can adequately be explained by incompetence.
___
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/163076: It is not possible to read in chunks from linprocfs and procfs.

2011-12-06 Thread Jaakko Heinonen
The following reply was made to PR kern/163076; it has been noted by GNATS.

From: Jaakko Heinonen 
To: Poul-Henning Kamp 
Cc: Petr Salinger , bug-follo...@freebsd.org
Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs
 and procfs.
Date: Tue, 6 Dec 2011 15:21:36 +0200

 On 2011-12-06, Poul-Henning Kamp wrote:
 > >Shouldn't sbuf_finish() then check s->s_error before appending the
 > >trailing '\0' and setting the SBUF_FINISHED flag? The problem in
 > >question wasn't caught earlier because sbuf_finish() happily finishes
 > >the buffer even if it has an error.
 > 
 > I belive the code is written so that there is always reserved space 
 > for the final '\0'
 > 
 > sbuf_finish() should finish _any_ sbuf, and return zero only if
 > the finished buffer is fully OK.
 
 Anyway I find it inconsistent that you can successfully call
 sbuf_finish() and sbuf_data() but not for example sbuf_len() on an
 errored buffer.
 
 Thus you can "fix" the problem with the subtle change below.
 
 %%%
 Index: sys/fs/pseudofs/pseudofs_vnops.c
 ===
 --- sys/fs/pseudofs/pseudofs_vnops.c   (revision 228153)
 +++ sys/fs/pseudofs/pseudofs_vnops.c   (working copy)
 @@ -651,7 +651,7 @@ pfs_read(struct vop_read_args *va)
}
  
sbuf_finish(sb);
 -  error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio);
 +  error = uiomove_frombuf(sbuf_data(sb), strlen(sbuf_data(sb)), uio);
sbuf_delete(sb);
  ret:
vn_lock(vn, locked | LK_RETRY);
 %%%
 
 -- 
 Jaakko
___
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/163095: Add WITH_OPENSSH_NONE_CIPHER src.conf(5) knob

2011-12-06 Thread Jeremy Chadwick

>Number: 163095
>Category:   bin
>Synopsis:   Add WITH_OPENSSH_NONE_CIPHER src.conf(5) knob
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 06 18:10:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Chadwick
>Release:FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Dec 1 
04:37:29 PST 2011 
r...@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64
>Description:
The recently-committed addition of the HPN patches to the base
system OpenSSH introduced the ability to make use of the "None"
cipher:

http://www.freebsd.org/cgi/cvsweb.cgi/src/crypto/openssh/README.hpn

However, enabling use of it requires a somewhat "hackish"
addition to /etc/make.conf like the following:

.if ${.CURDIR:M/usr/src/secure/*}
CFLAGS+=-DNONE_CIPHER_ENABLED
.endif

The below patch adds the ability to enable this cipher by simply
adding WITH_OPENSSH_NONE_CIPHER to one's /etc/src.conf.

The below patch was tested on RELENG_8 (with buildworld); may
require minor adjustments for application to the 9.x source.

Patch and situation itself was initially discussed with bz@ and
brooks@ privately.  Desire for this is also justified via the
user community:

http://lists.freebsd.org/pipermail/freebsd-stable/2011-December/064727.html

>How-To-Repeat:
n/a
>Fix:
Apply the below patch.  Patch will also be available for download
at the below URL, once I get a PR number.

http://jdc.parodius.com/freebsd/{prnum}/

Committer should be aware that the src.conf.5 man page will need
to be rebuilt prior to commit.  I believe
src/tools/build/options/makeman is for this purpose.


diff -ruN /origsrc/secure/lib/libssh/Makefile src/secure/lib/libssh/Makefile
--- /origsrc/secure/lib/libssh/Makefile 2010-04-20 23:33:10.0 -0700
+++ src/secure/lib/libssh/Makefile  2011-12-06 09:38:15.976388562 -0800
@@ -39,6 +39,10 @@
 LDADD+=-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
 .endif
 
+.if ${MK_OPENSSH_NONE_CIPHER} != "no"
+CFLAGS+= -DNONE_CIPHER_ENABLED
+.endif
+
 NO_LINT=
 
 DPADD+=${LIBCRYPTO} ${LIBCRYPT}
diff -ruN /origsrc/secure/usr.bin/ssh/Makefile src/secure/usr.bin/ssh/Makefile
--- /origsrc/secure/usr.bin/ssh/Makefile2010-04-20 23:33:10.0 
-0700
+++ src/secure/usr.bin/ssh/Makefile 2011-12-06 09:38:24.173485693 -0800
@@ -25,6 +25,10 @@
 LDADD+= -lgssapi
 .endif
 
+.if ${MK_OPENSSH_NONE_CIPHER} != "no"
+CFLAGS+= -DNONE_CIPHER_ENABLED
+.endif
+
 .if defined(X11BASE) || defined(LOCALBASE)
 # Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
 # 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
diff -ruN /origsrc/secure/usr.sbin/sshd/Makefile 
src/secure/usr.sbin/sshd/Makefile
--- /origsrc/secure/usr.sbin/sshd/Makefile  2010-04-20 23:33:10.0 
-0700
+++ src/secure/usr.sbin/sshd/Makefile   2011-12-06 09:37:56.833786139 -0800
@@ -38,6 +38,10 @@
 LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lasn1
 .endif
 
+.if ${MK_OPENSSH_NONE_CIPHER} != "no"
+CFLAGS+= -DNONE_CIPHER_ENABLED
+.endif
+
 .if defined(X11BASE)
 # Recommended /etc/make.conf setting is X11BASE=${LOCALBASE} for x.org
 # 7.x upgrade on <= 6.2, but LOCALBASE has moved out of scope of src/
diff -ruN /origsrc/share/mk/bsd.own.mk src/share/mk/bsd.own.mk
--- /origsrc/share/mk/bsd.own.mk2010-05-25 13:16:36.0 -0700
+++ src/share/mk/bsd.own.mk 2011-12-06 09:38:46.729274164 -0800
@@ -408,7 +408,8 @@
 BIND_SIGCHASE \
 BIND_XML \
 HESIOD \
-IDEA
+IDEA \
+OPENSSH_NONE_CIPHER
 .if defined(WITH_${var}) && defined(WITHOUT_${var})
 .error WITH_${var} and WITHOUT_${var} can't both be set.
 .endif
diff -ruN /origsrc/tools/build/options/WITH_OPENSSH_NONE_CIPHER 
src/tools/build/options/WITH_OPENSSH_NONE_CIPHER
--- /origsrc/tools/build/options/WITH_OPENSSH_NONE_CIPHER   1969-12-31 
16:00:00.0 -0800
+++ src/tools/build/options/WITH_OPENSSH_NONE_CIPHER2011-12-06 
09:39:30.929282637 -0800
@@ -0,0 +1,8 @@
+.\" $FreeBSD: $
+Set to include the "None" cipher into OpenSSH and its libraries.
+Additional adjustments may need to be done to system configuration
+files, such as
+.Xr sshd_config 5 ,
+to enable this cipher. Please see
+.Pa /usr/src/crypto/openssh/README.hpn
+for full details.
>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: bin/163095: Add WITH_OPENSSH_NONE_CIPHER src.conf(5) knob

2011-12-06 Thread brooks
Synopsis: Add WITH_OPENSSH_NONE_CIPHER src.conf(5) knob

Responsible-Changed-From-To: freebsd-bugs->brooks
Responsible-Changed-By: brooks
Responsible-Changed-When: Tue Dec 6 19:21:33 UTC 2011
Responsible-Changed-Why: 
Grab this one since I committed the work it improves.

http://www.freebsd.org/cgi/query-pr.cgi?pr=163095
___
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/163098: ktrace leak & fix

2011-12-06 Thread Loganaden Velvindron

>Number: 163098
>Category:   kern
>Synopsis:   ktrace leak & fix
>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:   Tue Dec 06 20:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Loganaden Velvindron
>Release:8.2
>Organization:
devio.us
>Environment:
>Description:
djm@openbsd : The issue was that the syscall wrapper did not clear retval when
an error occurs in the syscall itself. retval was being passed back
to ktrace, and could leak some kernel stack (e.g. via ptrace PT_READ*).

>How-To-Repeat:

>Fix:
Index: src/sys/kern/kern_ktrace.c
===
RCS file: /home/ncvs/src/sys/kern/kern_ktrace.c,v
retrieving revision 1.130.2.2.4.1
diff -u -p -r1.130.2.2.4.1 kern_ktrace.c
--- src/sys/kern/kern_ktrace.c  21 Dec 2010 17:09:25 -  1.130.2.2.4.1
+++ src/sys/kern/kern_ktrace.c  3 Dec 2011 19:22:13 -
@@ -426,7 +426,7 @@ ktrsysret(code, error, retval)
ktp = &req->ktr_data.ktr_sysret;
ktp->ktr_code = code;
ktp->ktr_error = error;
-   ktp->ktr_retval = retval;   /* what about val2 ? */
+   ktp->ktr_retval = error == 0 ? retval: 0;   /* what about val2 ? */
ktr_submitrequest(curthread, req);
 }
 

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


misc/163104: missing extra patch file for audio/aureal-kmod

2011-12-06 Thread Dzmitry Bialou

>Number: 163104
>Category:   misc
>Synopsis:   missing extra patch file for audio/aureal-kmod
>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:   Wed Dec 07 07:00:25 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Dzmitry Bialou
>Release:8.2-RELEASE
>Organization:
>Environment:
FreeBSD oemcomp.openair 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0: Wed Oct  5 
14:45:45 GMT+3 2011 root@oemcomp.openair:/usr/obj/usr/src/sys/TELIASONERA  
i386
>Description:
File aureal-kmod/files/extra_80_patch-au88x0.c was not commited in 
ports/162349

===>  License check disabled, port has not defined LICENSE
===>  Extracting for aureal-kmod-1.5_6
=> SHA256 Checksum OK for au88x0-1.5_4.tar.gz.
===>  Patching for aureal-kmod-1.5_6
===>  Applying extra patch 
/usr/ports/audio/aureal-kmod/files/extra_80_patch-au88x0.c
cannot open /usr/ports/audio/aureal-kmod/files/extra_80_patch-au88x0.c: No 
such file or directory
*** Error code 2

Stop in /usr/ports/audio/aureal-kmod.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN aureal-kmod.orig/files/extra_80_patch-au88x0.c 
aureal-kmod/files/extra_80_patch-au88x0.c
--- aureal-kmod.orig/files/extra_80_patch-au88x0.c   1970-01-01 
05:00:00.0 +0500
+++ aureal-kmod/files/extra_80_patch-au88x0.c   2010-07-11 
02:11:56.0 +0600
@@ -0,0 +1,121 @@
+--- ./au88x0.c.orig  2010-07-11 01:34:42.0 +0600
 ./au88x0.c 2010-07-11 01:34:51.0 +0600
+@@ -24,6 +24,10 @@
+  * SUCH DAMAGE.
+  */
+ 
++#ifdef HAVE_KERNEL_OPTION_HEADERS
++#include "opt_snd.h"
++#endif
++
+ /*
+  * Part of this code was inspired by Aureal's linux driver
+  */
+@@ -198,28 +202,28 @@
+ static struct au_info  *find_device_core(void *core_obj);
+ 
+ static u_int32_t au_playfmt[] = {
+-AFMT_MU_LAW,
+- AFMT_STEREO | AFMT_MU_LAW,
+-   AFMT_A_LAW,
+-  AFMT_STEREO | AFMT_A_LAW,
+-AFMT_U8,
+- AFMT_STEREO | AFMT_U8,
+-   AFMT_S16_LE,
+- AFMT_STEREO | AFMT_S16_LE,
++   SND_FORMAT(AFMT_MU_LAW, 1, 0),
++   SND_FORMAT(AFMT_MU_LAW, 2, 0),
++   SND_FORMAT(AFMT_A_LAW, 1, 0),
++SND_FORMAT(AFMT_A_LAW, 2, 0),
++SND_FORMAT(AFMT_U8, 1, 0),
++   SND_FORMAT(AFMT_U8, 2, 0),
++   SND_FORMAT(AFMT_S16_LE, 1, 0),
++   SND_FORMAT(AFMT_S16_LE, 2, 0),
+0
+ };
+ 
+ static struct pcmchan_caps au_playcaps = {4000, 48000, au_playfmt, 0};
+ 
+ static u_int32_t au_recfmt[] = {
+- AFMT_MU_LAW,
+- AFMT_STEREO | AFMT_MU_LAW,
+-   AFMT_A_LAW,
+-  AFMT_STEREO | AFMT_A_LAW,
+-AFMT_U8,
+- AFMT_STEREO | AFMT_U8,
+-   AFMT_S16_LE,
+- AFMT_STEREO | AFMT_S16_LE,
++   SND_FORMAT(AFMT_MU_LAW, 1, 0),
++   SND_FORMAT(AFMT_MU_LAW, 2, 0),
++   SND_FORMAT(AFMT_A_LAW, 1, 0),
++SND_FORMAT(AFMT_A_LAW, 2, 0),
++SND_FORMAT(AFMT_U8, 1, 0),
++   SND_FORMAT(AFMT_U8, 2, 0),
++   SND_FORMAT(AFMT_S16_LE, 1, 0),
++   SND_FORMAT(AFMT_S16_LE, 2, 0),
+0
+ };
+ 
+@@ -491,7 +495,7 @@
+return left | (right << 8);
+ }
+ 
+-static int
++static u_int32_t
+ aumix_setrecsrc(struct snd_mixer *m, u_int32_t src)
+ {
+struct au_info *au;
+@@ -533,7 +537,7 @@
+  KOBJMETHOD(mixer_init,  aumix_init),
+  KOBJMETHOD(mixer_set,   aumix_set),
+   KOBJMETHOD(mixer_setrecsrc, aumix_setrecsrc),
+-{ 0, 0 }
++ KOBJMETHOD_END
+ };
+ MIXER_DECLARE(aumixer);
+ 
+@@ -603,15 +607,12 @@
+ else if (format & AFMT_MU_LAW)
+  fmt->eEncoding = ASPFMTULAW;
+ 
+-   if (format & AFMT_STEREO)
+-fmt->wChannels = 2;
+-   else
+- fmt->wChannels = 1;
++   fmt->wChannels = (AFMT_CHANNEL(format) > 1) ? 2 : 1;
+SetWaveFormat(ch->wave, &ch->fmt);
+  return 0;
+ }
+ 
+-static int
++static u_int32_t
+ auchan_setspeed(kobj_t obj, void *data, u_int32_t speed)
+ {
+   struct  au_chinfo *ch = data;
+@@ -621,7 +622,7 @@
+return speed;
+ }
+ 
+-static int
++static u_int32_t
+ auchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
+ {
+   return blocksize;
+@@ -661,7 +662,7 @@
+return 0;
+ }
+ 
+-static int
++static u_int32_t
+ auchan_getptr(kobj_t obj, void *data)
+ {
+  struct  au_chinfo *ch = data;
+@@ -693,7 +694,7 @@
+KOBJMETHOD(channel_trigger, auchan_trigger),
+  KOBJMETHOD(channel_getptr,  auchan_getptr),
+   KOBJMETHOD(channel_getcaps, auchan_getcaps),
+- { 0, 0 }
++ KOBJMETHOD_END
+ };
+ CHANNEL_DECLARE(auchan);
+


>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: ports/163104: missing extra patch file for audio/aureal-kmod

2011-12-06 Thread linimon
Synopsis: missing extra patch file for audio/aureal-kmod

Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs
Responsible-Changed-By: linimon
Responsible-Changed-When: Wed Dec 7 07:07:04 UTC 2011
Responsible-Changed-Why: 
ports PR.

http://www.freebsd.org/cgi/query-pr.cgi?pr=163104
___
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/162741: commit references a PR

2011-12-06 Thread dfilter service
The following reply was made to PR kern/162741; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/162741: commit references a PR
Date: Wed,  7 Dec 2011 07:03:23 + (UTC)

 Author: alc
 Date: Wed Dec  7 07:03:14 2011
 New Revision: 228317
 URL: http://svn.freebsd.org/changeset/base/228317
 
 Log:
   Eliminate the possibility of 32-bit arithmetic overflow in the calculation
   of vm_kmem_size that may occur if the system administrator has specified a
   vm.vm_kmem_size tunable value that exceeds the hard cap.
   
   PR:  162741
   Submitted by:Adam McDougall
   Reviewed by: bde@
   MFC after:   3 weeks
 
 Modified:
   head/sys/kern/kern_malloc.c
 
 Modified: head/sys/kern/kern_malloc.c
 ==
 --- head/sys/kern/kern_malloc.cWed Dec  7 00:22:34 2011
(r228316)
 +++ head/sys/kern/kern_malloc.cWed Dec  7 07:03:14 2011
(r228317)
 @@ -740,11 +740,11 @@ kmeminit(void *dummy)
/*
 * Limit kmem virtual size to twice the physical memory.
 * This allows for kmem map sparseness, but limits the size
 -   * to something sane. Be careful to not overflow the 32bit
 -   * ints while doing the check.
 +   * to something sane.  Be careful to not overflow the 32bit
 +   * ints while doing the check or the adjustment.
 */
 -  if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count)
 -  vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE;
 +  if (vm_kmem_size / 2 / PAGE_SIZE > mem_size)
 +  vm_kmem_size = 2 * mem_size * PAGE_SIZE;
  
  #ifdef DEBUG_MEMGUARD
tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max);
 ___
 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: kern/162741: [PATCH] vm_kmem_size miscalculated due to int type overflow sometimes

2011-12-06 Thread alc
Synopsis: [PATCH] vm_kmem_size miscalculated due to int type overflow sometimes

State-Changed-From-To: open->patched
State-Changed-By: alc
State-Changed-When: Wed Dec 7 07:13:08 UTC 2011
State-Changed-Why: 
The patch has been applied to HEAD.

http://www.freebsd.org/cgi/query-pr.cgi?pr=162741
___
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"