CLANG reports an error with %b in printf(9)

2013-10-01 Thread Luigi Rizzo
] printf(%s%d: quirks=0x%b\n, periph-periph_name, ~^ /usr/home/luigi/FreeBSD/head/sys/cam/cam_xpt.c:1070:36: error: data argument not used by format string [-Werror,-Wformat-extra-args] periph-unit_number, quirks, bit_string); Does anyone

Re: CLANG reports an error with %b in printf(9)

2013-10-01 Thread Dimitry Andric
specifier 'b' [-Werror,-Wformat-invalid-specifier] printf(%s%d: quirks=0x%b\n, periph-periph_name, ~^ /usr/home/luigi/FreeBSD/head/sys/cam/cam_xpt.c:1070:36: error: data argument not used by format string [-Werror,-Wformat-extra-args

Re: swp_pager_meta_build DoS printf

2012-08-16 Thread Dag-Erling Smørgrav
John Baldwin j...@freebsd.org writes: I think DES has a newer variant of this now? Committed, along with an additional patch that warns you if you configure more swap than the pager can handle. DES -- Dag-Erling Smørgrav - d...@des.no ___

Re: swp_pager_meta_build DoS printf

2012-08-15 Thread John Baldwin
On Monday, August 13, 2012 1:49:38 am Sergey Kandaurov wrote: On 2 July 2012 20:31, Bjoern A. Zeeb bzeeb-li...@lists.zabbadoz.net wrote: On 2. Jul 2012, at 14:36 , John Baldwin wrote: On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: Hey, hitting this printf

Re: swp_pager_meta_build DoS printf

2012-08-15 Thread Sergey Kandaurov
A. Zeeb wrote: Hey, hitting this printf in swp_pager_meta_build() if (uma_zone_exhausted(swap_zone)) { printf(swap zone exhausted, increase kern.maxswzone\n); vm_pageout_oom(VM_OOM_SWAPZ

Re: swp_pager_meta_build DoS printf

2012-08-14 Thread Dag-Erling Smørgrav
Sergey Kandaurov pluk...@gmail.com writes: What about this patch? It enables to ratelimit the printf. I have a different patch that just prints one message when swzone is exhausted and another when more space becomes available. However, we might want to combine the two, so that it periodically

Re: swp_pager_meta_build DoS printf

2012-08-12 Thread Sergey Kandaurov
On 2 July 2012 20:31, Bjoern A. Zeeb bzeeb-li...@lists.zabbadoz.net wrote: On 2. Jul 2012, at 14:36 , John Baldwin wrote: On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: Hey, hitting this printf in swp_pager_meta_build() if (uma_zone_exhausted(swap_zone

Re: swp_pager_meta_build DoS printf

2012-07-02 Thread John Baldwin
On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: Hey, hitting this printf in swp_pager_meta_build() if (uma_zone_exhausted(swap_zone)) { printf(swap zone exhausted, increase kern.maxswzone\n

Re: swp_pager_meta_build DoS printf

2012-07-02 Thread Bjoern A. Zeeb
On 2. Jul 2012, at 14:36 , John Baldwin wrote: On Sunday, July 01, 2012 8:23:31 am Bjoern A. Zeeb wrote: Hey, hitting this printf in swp_pager_meta_build() if (uma_zone_exhausted(swap_zone)) { printf(swap zone exhausted, increase

swp_pager_meta_build DoS printf

2012-07-01 Thread Bjoern A. Zeeb
Hey, hitting this printf in swp_pager_meta_build() if (uma_zone_exhausted(swap_zone)) { printf(swap zone exhausted, increase kern.maxswzone\n); vm_pageout_oom(VM_OOM_SWAPZ

Re: locks under printf(9) and WITNESS

2012-01-28 Thread Andriy Gapon
== cpu_new_callout): callout - et_hw_mtx o Eventtimers' doconfigtimer calls loadtimer with et_hw_mtx held, loadtimer calls et_start method of a configured event timer and, e.g. in the case of lapic_et_start and bootverbose it calls printf(9), which gives: et_hw_mtx - scrlock This is just for the information

Re: locks under printf(9) and WITNESS [Was: new panic in cpu_reset() with WITNESS]

2012-01-23 Thread Gleb Smirnoff
On Sat, Jan 21, 2012 at 07:26:55PM +0200, Andriy Gapon wrote: A BTW, we have a quite strange situation with spin locks in console output path. A cnputs_mtx is marked as MTX_NOWITNESS, supposedly because cnputs (printf) can be A called in any locking context (even during normal operation

Re: locks under printf(9) and WITNESS [Was: new panic in cpu_reset() with WITNESS]

2012-01-23 Thread Andriy Gapon
on 23/01/2012 15:04 Gleb Smirnoff said the following: On Sat, Jan 21, 2012 at 07:26:55PM +0200, Andriy Gapon wrote: A BTW, we have a quite strange situation with spin locks in console output path. A cnputs_mtx is marked as MTX_NOWITNESS, supposedly because cnputs (printf) can

locks under printf(9) and WITNESS [Was: new panic in cpu_reset() with WITNESS]

2012-01-21 Thread Andriy Gapon
BTW, we have a quite strange situation with spin locks in console output path. cnputs_mtx is marked as MTX_NOWITNESS, supposedly because cnputs (printf) can be called in any locking context (even during normal operation). But there are a number of console-specific locks (scrlock, uart_hwmtx

Re: locks under printf(9) and WITNESS [Was: new panic in cpu_reset() with WITNESS]

2012-01-21 Thread Andriy Gapon
on 21/01/2012 16:37 Andriy Gapon said the following: BTW, we have a quite strange situation with spin locks in console output path. cnputs_mtx is marked as MTX_NOWITNESS, supposedly because cnputs (printf) can be called in any locking context (even during normal operation

bug in clang printf format | was Re: Strange warning with clang and 9RC1 (ntohs)

2011-11-04 Thread Axel Gonzalez
After getting in contact with clang's ml, the determined that this a bug in clang's format checker. Note that this bug affects: printf(%hu\n, ntohs(x)); This happens in 9 that ntohs is defined as a macro using conditinal operator (? :) The discussion is here: http

Re: man(1) no longer understands manpages like .so man3/printf.3

2010-11-06 Thread Gordon Tetlow
On Fri, Nov 5, 2010 at 8:57 AM, Anonymous swel...@gmail.com wrote: A few examples from ports tree  devel/automake111: automake-1.11(1)  devel/gettext: dcgettext(3), dcngettext(3), dgettext(3), dngettext(3)  devel/nasm: rdf2com(1), rdf2ihx(1), rdf2ith(1), rdf2srec(1)  textproc/gnugrep:

man(1) no longer understands manpages like .so man3/printf.3

2010-11-05 Thread Anonymous
A few examples from ports tree devel/automake111: automake-1.11(1) devel/gettext: dcgettext(3), dcngettext(3), dgettext(3), dngettext(3) devel/nasm: rdf2com(1), rdf2ihx(1), rdf2ith(1), rdf2srec(1) textproc/gnugrep: egrep(1), fgrep(1) www/neon29: ne_get_{request,session}_flag(3),

Re: [patch] annoying newline in kernel printf

2003-09-09 Thread Bruce Evans
: create disk ad4 dp=0xc2490870 No. sys/kern/kern_tc.c: $FreeBSD: src/sys/kern/kern_tc.c,v 1.157 2003/09/03 08:14:16 phk Exp $ --- sys/kern/kern_tc.c.org Tue Sep 9 00:21:30 2003 +++ sys/kern/kern_tc.c Tue Sep 9 00:21:57 2003 @@ -297,12 +297,11 @@ printf

[patch] annoying newline in kernel printf

2003-09-08 Thread Pawel Worach
/kern/kern_tc.c: $FreeBSD: src/sys/kern/kern_tc.c,v 1.157 2003/09/03 08:14:16 phk Exp $ --- sys/kern/kern_tc.c.org Tue Sep 9 00:21:30 2003 +++ sys/kern/kern_tc.c Tue Sep 9 00:21:57 2003 @@ -297,12 +297,11 @@ printf( -- Insufficient hz, needs at least %u\n, u

printf...! and BSD

2003-02-10 Thread Auge Mike
Hi, First of all, Thanks to all of you for your help and support. I have tried to go deeper and deeper to find out how printf works. ((( Of course the aim of trying to understand the printf, is to understand how the internals of the BSD kernel work))) till i've faced the following function

Re: printf....!

2003-02-09 Thread clemens fischer
Auge Mike [EMAIL PROTECTED]: I was trying to know how printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) if your program runs in user-space, try strace(1) or ktrace(1). clemens

Re: printf....!

2003-02-09 Thread Wes Peters
On Saturday 08 February 2003 22:12, Auge Mike wrote: Hi all, I was trying to know how printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) I'am not really familiar with the way FreeBSD

Re: printf....!

2003-02-09 Thread Giorgos Keramidas
On 2003-02-08 16:23, David Leimbach [EMAIL PROTECTED] wrote: Dave On Saturday, February 8, 2003, at 04:12 PM, Auge Mike wrote: Hi all, I was trying to know how printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd

printf....!

2003-02-08 Thread Auge Mike
Hi all, I was trying to know how printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) I'am not really familiar with the way FreeBSD handle interrupts. I like from any one of you to tell me what

Re: printf....!

2003-02-08 Thread David Leimbach
printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) I'am not really familiar with the way FreeBSD handle interrupts. I like from any one of you to tell me what functions will be called next and in which

Re: printf....!

2003-02-08 Thread Miguel Mendez
On Sat, 8 Feb 2003 16:23:21 -0600 David Leimbach [EMAIL PROTECTED] wrote: Howdy. Isn't it ultimately interrupt 08 on the PC with an index in the EAX register for the write subroutine? I am pretty sure that's correct. I might have the interrupt value wrong though. s/08/0x80/ :-)

Re: printf....!

2003-02-08 Thread Craig Rodrigues
I was trying to know how printf works in FreeBSD... I hvae reached to this point : #define _write(fd, s, n) \ __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) I'am not really familiar with the way FreeBSD handle interrupts. I like from any one of you to tell me what

RE: acpi_cpu printf

2003-01-22 Thread John Baldwin
On 21-Jan-2003 Nate Lawson wrote: How is this? --- acpi_cpu.c 16 Oct 2002 17:28:52 - 1.14 +++ acpi_cpu.c 21 Jan 2003 06:07:43 - @@ -295,8 +295,10 @@ /* set initial speed */ acpi_cpu_power_profile(NULL); -printf(acpi_cpu: CPU throttling enabled, %d

Re: acpi_cpu printf

2003-01-21 Thread Terry Lambert
Nate Lawson wrote: How is this? [ ... less alarming throttling message ... ] I like it. I don't know if it's redundant with the currently ... thing, but I'd like to see it: +printf(acpi_cpu: throttling enabled, %d steps from %d.%d%% to 100%%, Instead; of course, that's my left-to-right

Re: acpi_cpu printf

2003-01-21 Thread Daniel Holmes
+printf(acpi_cpu: throttling enabled, %d steps from 100%% to %d.%d%%, + currently %d.%d%%\n Personally, rather than 'enabled', how about 'available'? Using the word enabled might give some newbies fits when they try to figure it out what it means. It sounds like the throttling

Re: acpi_cpu printf

2003-01-21 Thread Nate Lawson
On Tue, 21 Jan 2003, Daniel Holmes wrote: +printf(acpi_cpu: throttling enabled, %d steps from 100%% to %d.%d%%, + currently %d.%d%%\n Personally, rather than 'enabled', how about 'available'? Using the word enabled might give some newbies fits when they try to figure it out

Re: acpi_cpu printf

2003-01-21 Thread Terry Lambert
Daniel Holmes wrote: +printf(acpi_cpu: throttling enabled, %d steps from 100%% to %d.%d%%, + currently %d.%d%%\n Personally, rather than 'enabled', how about 'available'? Using the word enabled might give some newbies fits when they try to figure it out what it means

Re: acpi_cpu printf

2003-01-21 Thread Dan Nelson
In the last episode (Jan 21), Terry Lambert said: I think that changing the order from 100% to 10% to 10% to 100% will, if people ignore the second printed line, imply that there was a transition from 10% to 100%, rather than the reverse (that was my response to the patch). Or better yet,

acpi_cpu printf

2003-01-20 Thread Nate Lawson
How is this? --- acpi_cpu.c 16 Oct 2002 17:28:52 - 1.14 +++ acpi_cpu.c 21 Jan 2003 06:07:43 - @@ -295,8 +295,10 @@ /* set initial speed */ acpi_cpu_power_profile(NULL); -printf(acpi_cpu: CPU throttling enabled, %d steps from 100%% to %d.%d%%\n

int_64t support in kernel printf(), anyone ?

1999-04-30 Thread Poul-Henning Kamp
Ok, since my last request went so well, lets try again: Adrians patch for the rlimit file in procfs revealed that the kernel printf doesn't support 64 bit integers on i386. Anyone care to try their hands on that little detail ? -- Poul-Henning Kamp FreeBSD coreteam member p

Proposed change to printf

1999-03-11 Thread Doug Rabson
I want to make this change to printf so that it treats format codes like '%llx' as 64bit formats (i.e. the same as '%qx'). This convention is the same as that used by glibc. I needed this change to make an i386-alpha cross debugger which worked properly but I think that it is a good idea

Re: Proposed change to printf

1999-03-11 Thread Bruce Evans
I want to make this change to printf so that it treats format codes like '%llx' as 64bit formats (i.e. the same as '%qx'). This convention is the same as that used by glibc. %llx is actually for unsigned long longs, and %qx is actually for u_quad_t's. These types are different for FreeBSD

Re: Proposed change to printf

1999-03-11 Thread Doug Rabson
On Thu, 11 Mar 1999, Bruce Evans wrote: I want to make this change to printf so that it treats format codes like '%llx' as 64bit formats (i.e. the same as '%qx'). This convention is the same as that used by glibc. %llx is actually for unsigned long longs, and %qx is actually

Re: Proposed change to printf

1999-03-11 Thread Bruce Evans
@@ -1016,7 +1019,10 @@ flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags LONGINT) + flags |= QUADINT; + else +

Re: Proposed change to printf

1999-03-11 Thread Doug Rabson
On Fri, 12 Mar 1999, Bruce Evans wrote: @@ -1016,7 +1019,10 @@ flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags LONGINT) + flags |= QUADINT; +

Re: Proposed change to printf

1999-03-11 Thread Doug Rabson
On Fri, 12 Mar 1999, Bruce Evans wrote: @@ -1016,7 +1019,10 @@ flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags LONGINT) + flags |= QUADINT; +