From owner-freebsd-current@freebsd.org Tue Oct 17 21:26:50 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9F9E47E59 for ; Tue, 17 Oct 2017 21:26:50 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0081.outbound.protection.outlook.com [104.47.37.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86282843D5; Tue, 17 Oct 2017 21:26:49 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM (52.132.46.161) by YTOPR0101MB0955.CANPRD01.PROD.OUTLOOK.COM (52.132.44.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 17 Oct 2017 21:26:49 +0000 Received: from YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM ([fe80::50ab:b8bf:bbb9:81f4]) by YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM ([fe80::50ab:b8bf:bbb9:81f4%13]) with mapi id 15.20.0077.022; Tue, 17 Oct 2017 21:26:48 +0000 From: Rick Macklem To: Mateusz Guzik , Ian Lepore CC: "freebsd-current@freebsd.org" , "fabian.freyer@physik.tu-berlin.de" , "mjoras@freebsd.org" Subject: Re: pfind_locked(pid) fails when in a jail? Thread-Topic: pfind_locked(pid) fails when in a jail? Thread-Index: AQHTRsy4PlPkoH+r1k6i+VZl2ipOV6LnEU+AgAALmQCAAAVwgIAABEedgAELXQCAABYcAIAARZy3 Date: Tue, 17 Oct 2017 21:26:48 +0000 Message-ID: References: <1508195986.74236.6.camel@freebsd.org> <20171016233912.7n6rosak5a5tzcbz@mguzik> <1508255488.74236.29.camel@freebsd.org>, <20171017171034.dyo74lrye6ds6ggp@mguzik> In-Reply-To: <20171017171034.dyo74lrye6ds6ggp@mguzik> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB0955; 6:cg7yc0NbX91KdyWfZpuYjo5x5ZKGf3ZeU2wWNO+zBFzsGmAleBaJuatzSMD9AlqcjPzZb6Zob8yoEzHr8GnF8zqiZmHjGzS7GzaHBmZZAOCL0Ob6ME8O8fy9C70fKmU0CmIyUs4qjsDb/l1g5H2k1frnsFXc5EeFHd/YAkvgzmyCu5SU8XM/qg1T8W901WNYTFGfgGCnfl/qzg36tkkGA+MumwNOjA/D7Kk7W7DCcp4lhG4qgC+dO5+QHloskEp8NsZqtfcthLFKfquM5x0GbVZlK7C2seknm6HBCLjtXG01aZA4XMNf8nPytVcrU4L0YBshSmdXENTtalc/FPO8EA==; 5:Xcy+g7FguV0p7WDD5dKZrFld34q700+wFUyR6yurZOFBC8MOuc+jWk5Hdl3u0w86U5iiMqRDIF+727jMqmiU+3GS6ztYHkLM+0P7m56MW1C5ILyG0Z8BXeMg8As62vgWc9MEAWqIxfryo0ORvz+7QIF2pZaHAaosKA1dOpebUAA=; 24:qK4yD9xD3hNvrwDFg+XCMaIrCi1qY8IkX7WISbgxMpAEsk9hoW/W2cR5nqeAGCwG3gVFsrh+l1UBghOWj7hyZt6SIHfCt+hv8EMqrW+T6PM=; 7:EyfREY7lxSvYITejqqS/qn6AfomPrBKHvfMkhfw3UlKc44Wi3wLgv1gK5ZfPsHabxItUqUjVAo31AkefwBVpdlxk9jHgW9/yE9mwT6SZGXYZ3F/Ukj4GEKk/ZCkyFddbpqgkoj81aCMzrhlJHA8VCiSu6emqRJzUcV4Sxfp//KRCfA7BpGqYHB8oQhxg5TXk4SXxoLsjkrtjvRLj3Ce3JQFp4Ahr0ZiXJj0V/Z5QjoY= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 7625e8bb-1638-4866-0ceb-08d515a5c69c x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:YTOPR0101MB0955; x-ms-traffictypediagnostic: YTOPR0101MB0955: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTOPR0101MB0955; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTOPR0101MB0955; x-forefront-prvs: 04631F8F77 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(376002)(346002)(24454002)(199003)(189002)(7696004)(14454004)(189998001)(3660700001)(2950100002)(2906002)(74316002)(39060400002)(54356999)(8936002)(81156014)(305945005)(106356001)(81166006)(50986999)(74482002)(4326008)(97736004)(76176999)(6436002)(8676002)(101416001)(5250100002)(102836003)(53936002)(68736007)(6506006)(2900100001)(55016002)(86362001)(6246003)(478600001)(93886005)(3280700002)(105586002)(5660300001)(25786009)(110136005)(229853002)(54906003)(33656002)(786003)(9686003)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB0955; H:YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2017 21:26:48.7914 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB0955 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 21:26:51 -0000 Mateusz Guzik wrote: [lots of stuff snipped] > I proposed registration of per-process callbacks, not filtering. > The code would just walk the list/table/whatever and call everything on > it - they asked for it. Yep, this would work for the NFSv4 client. Way back when, all I did in OpenBSD was add a function pointer to "struct p= roc" that was normally NULL, but set to a function in the NFS client when an NFS= v4 Open was done for the process. I suspect you'd want something like a linked list, so that multiple "users"= could register callback functions upon exit or ... rick=