From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 20 07:55:52 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C0D4596; Wed, 20 Nov 2013 07:55:52 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A33C2423; Wed, 20 Nov 2013 07:55:50 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rAK7tXxw094013; Wed, 20 Nov 2013 09:55:33 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rAK7tXxw094013 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rAK7tVDp093989; Wed, 20 Nov 2013 09:55:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Nov 2013 09:55:31 +0200 From: Konstantin Belousov To: Doug Ambrisko Subject: Re: Re: Fix MNAMELEN or reimplement struct statfs Message-ID: <20131120075531.GE59496@kib.kiev.ua> References: <51B3B59B.8050903@erdgeist.org> <201306101152.17966.jhb@freebsd.org> <52854161.6080104@FreeBSD.org> <20131115010854.GA76106@ambrisko.com> <20131116183129.GD59496@kib.kiev.ua> <20131118190142.GA28210@ambrisko.com> <20131119074922.GY59496@kib.kiev.ua> <20131119174216.GA80753@ambrisko.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mC3NEAINQo/WgN2+" Content-Disposition: inline In-Reply-To: <20131119174216.GA80753@ambrisko.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-hackers@freebsd.org, Dirk Engling , Jase Thew , mdf@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 07:55:52 -0000 --mC3NEAINQo/WgN2+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 19, 2013 at 09:42:16AM -0800, Doug Ambrisko wrote: > I was talking about the more general case since the system tries to keep > the path in the stat structure. My prior approach which had more issues > was to modify the stat structure of which I was pointed to NetBSD and the= ir > change to statvfs which doesn't really solve the problem. They don't > have the check to see if the mount is longer then VFS_MNAMELEN (in their = case) > and just truncate things. >=20 > If we are just talking about adding it to the mount structure that > would be okay since it isn't exposed to user land. I can add that. Yes, this is exactly what I mean. Add a struct mount field, and use it for kernel only. In fact, it only matters for sys_unmount() and kern_jail.c, other locations in kernel use the path for warnings, and this could be postponed if you prefer to minimize the patch. --mC3NEAINQo/WgN2+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSjGrzAAoJEJDCuSvBvK1BNYIQAIk75V37Pla/9LCW62TXNEuI idymxdkG8Rnc0PKH3BfgtpJ+97qTZuI0GPFryyAuZjdT0DUFHni5LQ3lwsmlJJ5m lLjaMEkZbGumMocAI311l+5n9BYiSNivwHdeJFl3uBA9yZSbK98n2QJJDdqK6CMk LTaYCT0caoPacvJ8SbtfL0g9qqaGuE3t8ny+cBry+wSeS94PyDx+SzZ2vYLCyael yLCzELHUzklQGpTuSU4e+sudr9km1y5pu60VpKiI46EB6kZLAe679PzP9VIBwgA+ fHlR2Q7NkgiETH1acAe6a8Qja6V2x+ETUHsVMTljyFuVKtYQJrT0l7M8swJKjBtG PU16oCNPAfw6Rzz9+mFGqBAlFanoPVkb2l2C4fXzcPuyavlwJZQ2HE0b6i10uNFh y53zmJYLHz0VZtUTcSOBdRrBbS5eInEckZyLzUBL3c/GUcSeZbdy+kTc+3DEFiMh oSSQRsiwzebUB2woocbqFtxutySsUC9mNoA3o2JvPiWe+whj9PNPvlRK9+JJ4Wl/ i0oA1tBgC0AKuzp7M+jm6aIe8TnElxjirw/bfRU7+g1wsb3DPN5mEb85RHf2F3HB 49TIRCiJ/TzsSaeY1Vw6287QRU//xcZqus1NZV0d9grk9WxZ02gltnJ2SpqhTTUG EcKVtz963Ek1zy4+nq6l =WZx2 -----END PGP SIGNATURE----- --mC3NEAINQo/WgN2+--