<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 18, 2020 at 5:21 PM <<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: He Zhe <<a href="mailto:zhe.he@windriver.com" target="_blank">zhe.he@windriver.com</a>><br>
<br>
For syscall<br>
ssize_t copy_file_range(int fd_in, loff_t *off_in,<br>
int fd_out, loff_t *off_out,<br>
size_t len, unsigned int flags);<br>
off_out is loff_t* that is long long, 64 bits on 32-bit architectures,<br>
while len is size_t that unsigned int, 32 bits on 32-bit architectures.<br>
<br>
In subcase "max length", simplified as below,<br>
<br>
dst = tst_max_lfs_filesize();<br>
TEST(sys_copy_file_range(fd_src, 0, *tc->copy_to_fd, &dst, tc->len, tc->flags));<br>
<br>
where dst is 4K*4G and len is 4G, so (4K+1)*4G is always smaller than 4G*4G,<br>
it can never match the following kernel condition on 32-bit architectures.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Thanks for fixing this, pushed.</div></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>