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: <20091115.125025.80841962.mitake@dcl.info.waseda.ac.jp>
Date:	Sun, 15 Nov 2009 12:50:25 +0900 (JST)
From:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
To:	mingo@...e.hu
Cc:	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	paulus@...ba.org, fweisbec@...il.com, ling.ma@...el.com
Subject: Re: [PATCH 1/4] perf bench: Add new subsystem and new suite,
 bench/mem-memcpy.c

From: Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 1/4] perf bench: Add new subsystem and new suite, bench/mem-memcpy.c
Date: Fri, 13 Nov 2009 10:46:50 +0100

Thanks for your detailed review, Ingo.
I'll fix the points you mentioned, and,

> > +		case 'B':
> > +		case 'b':
> > +			str[i] = '\0';
> > +			break;
> > +		case 'K':
> > +		case 'k':
> > +			if (str[i + 1] != 'B' && str[i + 1] != 'b')
> > +				goto err;
> > +			unit = K;
> > +			str[i] = '\0';
> > +			break;
> > +		case 'M':
> > +		case 'm':
> > +			if (str[i + 1] != 'B' && str[i + 1] != 'b')
> > +				goto err;
> > +			unit = K * K;
> > +			str[i] = '\0';
> > +			break;
> > +		case 'G':
> > +		case 'g':
> > +			if (str[i + 1] != 'B' && str[i + 1] != 'b')
> > +				goto err;
> > +			unit = K * K * K;
> > +			str[i] = '\0';
> > +			break;
> > +		case '\0':	/* only specified figures */
> > +			unit = 1;
> > +			break;
> > +		default:
> > +			if (!isdigit(str[i]))
> > +				goto err;
> > +			break;
> > +		}
> > +	}
> > +
> > +	length = atoi(str) * unit;
> > +	goto end;
> > +
> > +err:
> > +	fprintf(stderr, "Invalid length:%s\n", str);
> > +end:
> > +	free(str);
> > +	return length;
> > +}
> 
> This should go until a utils/*.c helper file i suspect.
> 

before posting patch series mem-memcpy.c related to,
I'll send the patch to add the function that you should go util/.
Because I think this is the independent topic from mem-memcpy.c

Thanks
	Hitoshi

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