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:	Mon, 13 May 2013 11:33:03 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/module.c: for looping, need use 'goto' instead
 of 'break' to jump out in time

On 05/13/2013 09:17 AM, Rusty Russell wrote:
> Chen Gang <gang.chen@...anux.com> writes:
>> > On 2013年05月08日 08:29, Rusty Russell wrote:
>>> >> Chen Gang <gang.chen@...anux.com> writes:
>>>>> >>> > In the 'for' looping, when error occurs, the 'break' only jump out of
>>>>> >>> > 'switch', and still in 'for' looping.  If error occurs multiple times,
>>>>> >>> > the original error value will be overwrite.
>>>>> >>> >
>>>>> >>> > Currently, that will not cause issue, but still better to improve it,
>>>>> >>> > so that let it return the first real error code in time.
>>> >> We choose to print all the problems, rather than just one.  I don't
>>> >> really mind though.
>>> >> 
>> >
>> > It sounds good: "choose to print all the problems, rather than just one"
>> >
>> > If so, it seems enough to only return a bool value to known whether
>> > success or fail, do not need the error details any more (since they are
>> > already been printed)
>> >
>>> >> It we want this patch, it would be neater to just 'return -ENOEXEC'
>>> >> and 'return PTR_ERR(ksym) ?: -ENOENT'.
>> >
>> > If we really want this patch (still only print the first error, and
>> > return the real error value), I should send patch v2 (also 'ret' is
>> > obsoleted)
> I would take such a patch, since it makes things a little neater.  But
> if you don't write it, I wouldn't write it myself, since it's
> borderline.

OK, thank, I should write it, and now I will "choose to print all the
problems, and return a bool value", and it will be as a cleanup patch.

I will finish it within 2 days (2013-05-15).

If have additional suggestions or completions, please reply.


Thanks.
-- 
Chen Gang

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