Date: Thu, 17 May 2018 19:43:57 +0200 From: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de> To: freebsd-jail@freebsd.org, freebsd-hackers@freebsd.org Subject: sizeof jail parameter value strings Message-ID: <6BDE831C-48AC-4FA3-B0EC-C4B7D275AFFE@physik.tu-berlin.de>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_A00A7A58-F35D-4F7C-AEB5-82B656D8CD52_= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello lists, =46rom jail(3): > The jail_getv() function takes a null-terminated list of name and v= alue > strings, and passes it to jail_get(2). It is the caller's responsi= bility > to ensure that the value strings point to buffers large enough to h= old > the string representation of the returned parameters. What exactly does =E2=80=9Clarge enough=E2=80=9D mean here? Is there a wa= y to query the size of the corresponding kernel buffers at runtime? Is there a maximum length =C3= =A0 la MAX_JAIL_PARAM_LEN that the string representations of the returned parame= ters are guaranteed to be shorter than? I=E2=80=99m currently implementing a rust wrapper[1] around the jail(2) i= nterface, and am not sure how large buffers for the string parameters I=E2=80=99m querying= with jail_get jail_set have to be. Fabian (I=E2=80=99m not on the freebsd-jail mailing list, so I=E2=80=99d appreci= ate being kept in the CC) [1] https://github.com/fubarnetes/libjail-rs --=_MailMate_A00A7A58-F35D-4F7C-AEB5-82B656D8CD52_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQJWBAEBCgBAFiEEX6JoxdmEemcFacQZmealkcs85+YFAlr9v10iHGZhYmlhbi5m cmV5ZXJAcGh5c2lrLnR1LWJlcmxpbi5kZQAKCRCZ5qWRyzzn5vs9D/40QAEzqkm2 BCyUzh4lJ1uihMPU8x1u1L+pef7ocBJ8zVX/atLAroX5+08zlT8crZqMmz7fvzaa Ba4M3xwIrg0n5OHVWoskPlLs7T0N1WazfIzd733/S5FKfAp8c6GMn1QnMEmTHzzw 45vA0XlIb+0AeiDn+ydcb2AMrpFE6KMq33MmI5qBWzrzsfbRl3rj9jjATcnCZbGq IR11+LAk/jbJgOHEiWWuM2ErFrzsZ1Gv/OI+hiNYiqb7hRM9waTRzLBoQmOdMbUq CgfCuF780mFJxUfLSRv466ISssmmyyA4npv4QKBzVB19raltoJeP0hTn/vIUYcKn bVte/QouOlVJgGFI63zOFBLYY+W6P/7Cq+MlYQADRg3VSWZwekUgr/Ptjc7UpJiV k1PZGSXmh1Vv+soK0b2CbXj/WxuA3hOaFt4cT60R7QmNlVoYDrRNOQ60OEOB/nO8 pm/grbM2ECFn1CpaRWJfp3BDJ9/3tfbvDh/hFa1IDMaWhf6QkJlEpYpzYVDVxrL6 m9SGtPA4RQ1d/FYUJWU3xMf0k6gSe9tLSBz/D2SQ38THDO9+035I85To7aChtav5 AVdWob4OCBLwOKsp594uQkyVHuHKS3d3rf2Piu+hOtioBRcPfJJlUvCgERx6dRoY VOtU+YhlDyso81qzvq4s+oLptmOjf1inRQ== =J/MM -----END PGP SIGNATURE----- --=_MailMate_A00A7A58-F35D-4F7C-AEB5-82B656D8CD52_=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6BDE831C-48AC-4FA3-B0EC-C4B7D275AFFE>