Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/compat/sys




> On Jun 28, 2020, at 10:24 AM, Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
> 
>    Date:        Sat, 27 Jun 2020 11:49:30 -0400
>    From:        "Christos Zoulas" <christos%netbsd.org@localhost>
>    Message-ID:  <20200627154930.84E22FB28%cvs.NetBSD.org@localhost>
> 
>  | Modified Files:
>  | 	src/sys/compat/sys: mount.h
>  |
>  | Log Message:
>  | Ignore the supplied size, and always use the argument size that we know.
> 
> Is this fix correct?    Certainly looks more reasonable than
> what was there before, as the supplied size (for no seemingly
> good reason) is often 0, but in compat_20_sys_getfsstat() (in
> sys/compat/common/vfs_syscalls_20.c) statvfs_to_statfs12_copy()
> is called, via do_sys_getvfsstat() with a size of
> sizeof(struct statvfs90) and a statvfs90 (compat/sys/statvfs.h)
> is certainly not the same size as a statfs12 (compat/sys/mount.h)
> 
> Or perhaps (probably more likely) compat_20_sys_getfsstat() should
> be passing sizeof(struct statfs12) instead ?   (And now may as well
> just pass 0).

No, it has to be sizeof(struct statfs12) because the function fills an
array of struct statfs12 and needs to know how much to increment.

Thanks,

christos

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index