From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 17 19:30:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 963A710656FC; Sat, 17 Mar 2012 19:30:11 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 42E0A8FC16; Sat, 17 Mar 2012 19:30:09 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so4925805bkc.13 for ; Sat, 17 Mar 2012 12:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:sender:date:message-id:user-agent:mime-version :content-type; bh=E7uV0r+60TX/kcP247akN1+fHMWohwhsrd0K00zHIoQ=; b=07iIbFzW9U2Mz4WQ5lSAewWFFgqmDAqi6liBSoWNKmPF0A23t+q8yaG1AZK6W5V24K /dypsUBnxmm1ZepBGnLDZSUsDTN+9rEODZ/C2NsiO+DiOGYK57phW3fMR4h/2PrDa+8o dFZChCvIC+c64/EWmOUJK9+RAkAW/5YOsLRCUStxaNczkM91SY1eesOI5Tr+3WtFNpgZ BDBh6+ulSqU72OvKVVNcsIOUjV64cuXCJOZNySSr+evuvk2du9eemOU7Tuy+i+LfTGcg Nwz7SxEizXo+JQbtjFfGeIPP7DKxp3RtJ3nywjnPnZ1dmlovMX9/ldVaNSM7Lhb3Dn7z BOcw== Received: by 10.204.155.143 with SMTP id s15mr2535306bkw.44.1332012609236; Sat, 17 Mar 2012 12:30:09 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id u5sm16297722bka.5.2012.03.17.12.30.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Mar 2012 12:30:08 -0700 (PDT) From: Mikolaj Golub To: freebsd-hackers@freebsd.org Sender: Mikolaj Golub Date: Sat, 17 Mar 2012 21:30:05 +0200 Message-ID: <8662e3m3eq.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Robert Watson , Kostik Belousov Subject: a sysctl for process binary osreldate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 19:30:17 -0000 Hi, Currently we can check and change binary osreldate of another process via procfs(5). Kostik suggested to add a new sysctl for the same purpose and also extend procstat to show osrel. Here are patches I am going to commit if there are no objections or suggestions. http://people.freebsd.org/~trociny/kern_proc_osrel.1.patch http://people.freebsd.org/~trociny/procstat.osrel.1.patch I set the same permissions as for procfs(5) osrel -- so only user can read it, but may be this is too restrictive and p_cansee on read would be ok? I added osrel output to procstat -b option: kopusha:~% procstat -b 2975 PID COMM OSREL PATH 2975 emacs 1000001 /usr/local/bin/emacs-23.3 Would this be ok or someone see a better way? -- Mikolaj Golub