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]
Date:	Sun, 10 Feb 2008 17:43:27 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Marcin Slusarz <marcin.slusarz@...il.com>
Cc:	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 <marcin.slusarz@...il.com> wrote:

> > +		if (CACHE_FLUSH_IS_SAFE) {
> > +			if (current->mm && addr < TASK_SIZE) {
> > +				flush_cache_range(current->mm->mmap_cache,
> > +						addr, addr + BREAK_INSTR_SIZE);
> > +			} else {
> > +				flush_icache_range(addr, addr +
> > +						BREAK_INSTR_SIZE);
> > +			}
> > +		}
> unneeded braces (here and in many other places)

this is a small detail, but you are wrong. These braces around 
multi-line statements are unneded _for the compiler_, but are very much 
wanted by humans. You'll see akpm, me and others reject/fix patches on a 
routine basis that make this cleanliness mistake. Please watch out for 
this when writing patches ;-)

> if ()
> else if ()
> else
> 
> will look better

nope. I consciously avoid that construct because it's dangerous: it can 
quite easily result in the wrong logic. Having _more_ braces than needed 
by the compiler is a style error in only a single, special case.

> > +	if (*(ptr++) != ',') {
> > +		error_packet(remcom_out_buffer, -EINVAL);
> > +		return;
> > +	} else {
> no else needed

agreed - fixed.

> if (!kgdb_hex2long()) {
> 	error_packet();
> 	return;
> }

fixed.

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