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:	Wed, 30 Oct 2013 08:13:41 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Tao Ma <tm@....ma>
Cc:	Boxi Liu <boxi10liu@...il.com>,
	"lewis.liulei" <lewis.liulei@...wei.com>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	Robin Dong <sanbai@...bao.com>
Subject: Re: fix the ext4_read_inline_dir return value

Applied, thanks.

On Tue, Oct 22, 2013 at 10:10:27AM +0800, Tao Ma wrote:
> But next time please generate the patch with git format-patch and send
> it using git send-email.

Yes, please.  :-)

I've reworded the commit description a little.

    In ext4_read_inline_dir(), if there is inline data, the successful
    return value is the return value of ext4_read_inline_data().  Howewer,
    this is used by ext4_readdir(), and while it seems harmless to return
    a positive value on success, it's inconsistent, since historically
    we've always return 0 on success.
    

BTW, it looks like it would simplify the code a bit to change
ext4_read_inline_page() and ext4_read_line_data() to return 0 on
success, since it looks like the positive value on success isn't
needed anywhere, and this would allow us to remove lines such as this:

       return ret >= 0 ? 0 : ret;

as well as the forced ret = 0; in this commit.

Could you take a look and verify that this is true, and I haven't
missed anything?

Also, it would be nice if the functions in fs/ext4/inline.c documented
what the return values are for each of the functions, one way or
another.

Thanks!!

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ