[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180507111142.GA18116@bombadil.infradead.org>
Date: Mon, 7 May 2018 04:11:42 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Miklos Szeredi <mszeredi@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, Amir Goldstein <amir73il@...il.com>
Subject: Re: [PATCH 1/3] vfs: dedpue: return s64
On Mon, May 07, 2018 at 10:21:06AM +0200, Miklos Szeredi wrote:
> f_op->dedupe_file_range() gets a u64 length to dedup and returns an ssize_t
> actual length deduped. This breaks badly on 32bit archs since the returned
> length will be truncated and possibly overflow into the sign bit (xfs and
> ocfs2 are affected, btrfs limits actual length to 16MiB).
>
> Returning s64 should be good, since clone_verify_area() makes sure that the
> supplied length doesn't overflow.
Why s64 rather than loff_t? Particularly since the next patch turns
the paramters into loff_t.
Powered by blists - more mailing lists