On Jan 19, 2015, at 8:46, Brandon Allbery <allbery.b at gmail.com> wrote:> On Mon, Jan 19, 2015 at 10:44 AM, Anton Shterenlikht <mexas at bris.ac.uk> > wrote: > >> So perhaps changing MNAMELEN will break statfs(2) on >> -stable too? >> > > I believe the context there is not so much "-current is special", as > "changing it for everyone is bad news" (and this would necessarily need to > originate in -current).A compat layer needs to be created for all of the affected syscalls, and the change needs to be made. That?s it in a nutshell. Doing it in 11 makes sense since there is a compat layer for 10 now? if I knew all of the steps I would happily do them as annoys me from time to time as well with the path length issue. Thanks! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20150119/c0a7e57d/attachment.sig>
Willem Jan Withagen
2015-Jan-20 00:14 UTC
old bug: mount_nfs path/name is limited to 88 chars
On 19-1-2015 22:20, Garrett Cooper wrote:> On Jan 19, 2015, at 8:46, Brandon Allbery <allbery.b at gmail.com> > wrote: > >> On Mon, Jan 19, 2015 at 10:44 AM, Anton Shterenlikht >> <mexas at bris.ac.uk> wrote: >> >>> So perhaps changing MNAMELEN will break statfs(2) on -stable >>> too? >>> >> >> I believe the context there is not so much "-current is special", >> as "changing it for everyone is bad news" (and this would >> necessarily need to originate in -current). > > A compat layer needs to be created for all of the affected syscalls, > and the change needs to be made. That?s it in a nutshell. > > Doing it in 11 makes sense since there is a compat layer for 10 now? > if I knew all of the steps I would happily do them as annoys me from > time to time as well with the path length issue.Well after this the next problem you'll be running into is: #define PATH_MAX 1024 /* max bytes in pathname */ Which I already did inf find(1) because the paths in backups of big filesystems already bit in like 2011. Talked about it with Jilles, and got more or less the same answer: You can up the value, but expect things to break. Which it did when I only fixed the size in find. It would break in the program that got the path fed. Never dared to just up the value, compile kernel/world, install and reboot. And then see what comes of it. So IMHO if possible this would need to be extended as well... --WjW
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/19/15 13:20, Garrett Cooper wrote:> On Jan 19, 2015, at 8:46, Brandon Allbery <allbery.b at gmail.com> > wrote: > >> On Mon, Jan 19, 2015 at 10:44 AM, Anton Shterenlikht >> <mexas at bris.ac.uk> wrote: >> >>> So perhaps changing MNAMELEN will break statfs(2) on -stable >>> too? >>> >> >> I believe the context there is not so much "-current is special", >> as "changing it for everyone is bad news" (and this would >> necessarily need to originate in -current). > > A compat layer needs to be created for all of the affected > syscalls, and the change needs to be made. That?s it in a > nutshell. > > Doing it in 11 makes sense since there is a compat layer for 10 > now? if I knew all of the steps I would happily do them as annoys > me from time to time as well with the path length issue.Compat layer may break applications in other funny ways and we probably have to return e.g. ENAMETOOLONG for legacy applications if the names are too long to fit into the buffer, but I don't see any easy solution either: I wish we have bumped it in 2003 when the struct receives its first big revamp by bumping all statistic fields to 64-bit. I personally think we probably better create a new API and keep the existing one for (limited) compatibility. For instance, it may be sensible to make f_mntfromname and f_mntonname fields variable length and have the caller pass a pointer and their length. If we set an arbitrary limit, no matter it's 88, 256 or 4096, one will hit it some time. BTW. If someone wants to change statfs(2), please make sure to create reverse-compatibility shims at the same time (see lib/libc/sys/fcntl.c for an example). The statfs(2) API is used in a lot of places, especially fts(3), and breaking it either way (running new world with old kernel, or running old world with new kernel) would be a big pain to recover from. Cheers, - -- Xin LI <delphij at delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.1 (FreeBSD) iQIcBAEBCgAGBQJUvanaAAoJEJW2GBstM+nsgoQP/0+Ulfmmmj9n9cWA0h1NxD3O a59aZXxbFtRu2SkIZprzFOL4TLnmyKEthFGmUgRSm7SH3GuaWVPBsgHTjSddYA/f vD3fBei780akT/higazmSENKR0eWqL0zENG8HJndQ0XLLcv8eeHZEFFhbUlYA4JU 4ArzoKEwsxiQ4jKB+KSFRU4QR4Raarljx6m4gQyXO6QAPEcyO035YH+bJlMSPjYg wcJZiZXmsRYsjZMhKDGeO5tIiD8R/UwOcMKsaQ/O+bwCgWtHFe5gLDKxGjMlLc9c NuhXE2/xlyBdAf3OHTlgr61dPmArQl0pyLXDUfd8K0s05FQ22bGHaSCT0FyNNG0J 55rnr30iDczVjQV1rTk9AwvsTJzACyaRrCV3zXGpxr86XwGFRta4ebMYZNuRXhdZ sLsTZWpIc3gnvOH4CiZHPmr1mbHoAY1RN9G23T5ENu2zYNJVozXhJ4NkoZkKzxUj b19qox4aKtG9QT7h5HU7R7Q64Sz2dYty8VD4OZ/azQrLGjVdI+2KUq6M3SAIRBro IAmGY62OQyz8aDVhr/Ap/N7GnV4suCZf08kgg3+oREU0a8QAxEHCDnNH4MJ9xz6v +2GpYWp0AuCFJ77XQC7IB6va1hK+PZnuOZ9yNVKTTadEwSk4GK2fQv6YwLjiyYKM PiOk31dmRfQB+3mqZ+Oj =a3fA -----END PGP SIGNATURE-----