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: <47AEFDE9.7060405@web.de>
Date:	Sun, 10 Feb 2008 14:36:41 +0100
From:	Jan Kiszka <jan.kiszka@....de>
To:	Marcin Slusarz <marcin.slusarz@...il.com>
CC:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@....com.au>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jason Wessel <jason.wessel@...driver.com>
Subject: Re: [3/6] kgdb: core

Marcin Slusarz wrote:
> On Sun, Feb 10, 2008 at 08:13:31AM +0100, Ingo Molnar wrote:
>> +	} else {
>> +		while (count-- > 0) {
>> +			unsigned char ch;
>> +
>> +			if (probe_kernel_address(mem, ch)) {
>> +				kgdb_may_fault = 0;
>> +				return ERR_PTR(-EINVAL);
>> +			}
>> +			mem++;
>> +			*buf++ = hexchars[ch >> 4];
>> +			*buf++ = hexchars[ch & 0xf];
> use pack_hex_byte?

Good point! kgdb introduces this helper but don't use it consequently!

>> +/*
>> + * While we find nice hex chars, build a long_val.
>> + * Return number of chars processed.
>> + */
>> +int kgdb_hex2long(char **ptr, long *long_val)
>> +{
>> +	int hex_val;
>> +	int num = 0;
>> +
>> +	*long_val = 0;
>> +
>> +	while (**ptr) {
>> +		hex_val = hex(**ptr);
>> +		if (hex_val >= 0) {
>> +			*long_val = (*long_val << 4) | hex_val;
>> +			num++;
>> +		} else
>> +			break;
>> +
>> +		(*ptr)++;
>> +	}
> if (hex_val < 0)
> 	break;
> *long_val = (*long_val << 4) | hex_val;
> num++;
> (*ptr)++;

Jep, will include this in the cleanup patch I'm currently baking.

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