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] [day] [month] [year] [list]
Message-ID: <20160110010851.GA19773@dhcp-128-25.nay.redhat.com>
Date:	Sun, 10 Jan 2016 09:08:51 +0800
From:	Minfei Huang <mhuang@...hat.com>
To:	Xunlei Pang <xlpang@...hat.com>
Cc:	Petr Tesarik <ptesarik@...e.cz>, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org, ebiederm@...ssion.com,
	akpm@...ux-foundation.org, Dave Young <dyoung@...hat.com>,
	Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH v3 2/2] kexec: Provide
 arch_kexec_protect(unprotect)_crashkres()

On 01/08/16 at 09:28pm, Xunlei Pang wrote:
> On 01/08/2016 at 04:47 PM, Minfei Huang wrote:
> > On 01/08/16 at 10:33am, Xunlei Pang wrote:
> >> +
> >> +static int
> >> +kexec_mark_range(unsigned long start, unsigned long end, bool protect)
> >> +{
> >> +	struct page *page;
> >> +	unsigned int nr_pages;
> >> +
> >> +	/* For physical range: [start, end] */
> >> +	if (!end || start > end)
> >> +		return 0;
> > This test !end is hard to be understood without the annotation. It is
> > better to add the comment about it.
> 
> !end is just for uninitialized crashk resource with a zero end member,
> maybe not so hard to understand :-)

Yes, The test !end may be simple, if someone knows the logic of kexec.
But it's hard to be understood, if there is only a glance from someone
without any annotation.

This test !end is related to the specific code flow, so it is better to
annotate it.

Thanks
Minfei

> 
> Regards,
> Xunlei
> 
> >
> > Otherwise it looks good for me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ