lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxy8gqCDNJrhh1EWnBe2zUazvzji66g=0KTfA9b6FPn45A@mail.gmail.com>
Date:	Wed, 27 Jul 2011 11:28:16 -0600
From:	Jim Cromie <jim.cromie@...il.com>
To:	Bart Van Assche <bvanassche@....org>
Cc:	jbaron@...hat.com, joe@...ches.com, gregkh@...e.de,
	linux-kernel@...r.kernel.org, gnb@...h.org
Subject: Re: [PATCH 18/25] dynamic_debug: describe_flags with '=[pmflta_]*'

On Tue, Jul 26, 2011 at 1:37 AM, Bart Van Assche <bvanassche@....org> wrote:
> On Mon, Jul 25, 2011 at 11:42 PM, Jim Cromie <jim.cromie@...il.com> wrote:
>> Change describe_flags() to emit '=[pmflta_]+' for current callsite
>> flags, or just '=_' when they're disabled.  Having '=' in output
>> allows a more selective grep expression, in contrast '-' may appear
>> in filenames, line-ranges, and format-strings.  '=' also has better
>> mnemonics, saying; "the current setting are equal to <flags>".
>>
>> The default allows grep "=_" <dbgfs>/dynamic_debug/control
>> to see disabled callsites while avoiding the many occurrences of " = "
>> seen in format strings.
>>
>> Signed-off-by: Jim Cromie <jim.cromie@...il.com>

>> @@ -102,11 +103,12 @@ static char *ddebug_describe_flags(struct _ddebug *dp, char *buf,
>>        int i;
>>
>>        BUG_ON(maxlen < 4);
>> +       *p++ = '=';
>>        for (i = 0; i < ARRAY_SIZE(opt_array); ++i)

>
> The "BUG_ON(maxlen < 4)" tests whether a buffer overflow can occur
> before starting to write in the buffer. Since the above code affects
> the number of characters that can be written in the output buffer,
> shouldn't that statement be updated or replaced ?
>
> Bart.
>

Ack.
Ive just enlarged buffer and check to 10.
strictly, only 9 is needed, but Im feeling generous.

thanks for the close reading.

updated git://github.com/jimc/linux-2.6.git  dyndbg-next
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ