From owner-freebsd-arch@FreeBSD.ORG Tue Nov 13 23:04:39 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0343F22 for ; Tue, 13 Nov 2012 23:04:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 966288FC08 for ; Tue, 13 Nov 2012 23:04:38 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so2547719obc.13 for ; Tue, 13 Nov 2012 15:04:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=Oux6nAlF5foPj60PUMKaaH+yMgH/hgMnbHhsE3PUWQI=; b=kTWUuNoOlWoGR6lahhuVlF0BnNJk6P6LEDqa08p3G0nTSv35R+Br4RTK3sOCN6i0s8 968IT7tMcCCqp1NnXfKdfFkOtfFq8b2sFSNkcNmaDuZsMc9NkMeH4dh0kHBoIwBLeokP 7g/jSR/h5kxhTlaJaFBgi8UJK2yPc7I1Wx758+WRV31vvpIp2xkZqjUr2luMzYLXquyu y1DCJHQAEqgUFbEW1cRyRQQUCL5ak0BL7CBBmJ3mV5g32cOXLC2qd6cxsE6twZM8dApJ L1KthRkUimM3Y4hJh4gOlJLG9dRXFIUSj4UPO+UktnTlhqrlfzZzXhCFU6RDDGyfZIDm ZL8Q== Received: by 10.60.4.136 with SMTP id k8mr18805056oek.94.1352847877685; Tue, 13 Nov 2012 15:04:37 -0800 (PST) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id c18sm11263923obc.17.2012.11.13.15.04.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Nov 2012 15:04:35 -0800 (PST) Sender: Warner Losh Subject: Re: Increasing MAXLOGNAME from 17 to 33 Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121113225905.GB75103@ithaqua.etoilebsd.net> Date: Tue, 13 Nov 2012 16:04:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <75177878-EA36-4472-BAEA-984A59F91057@bsdimp.com> References: <20121113111806.GE62533@ithaqua.etoilebsd.net> <20121113115034.GJ73505@kib.kiev.ua> <20121113183412.GA75103@ithaqua.etoilebsd.net> <20121113184238.GO73505@kib.kiev.ua> <20121113184512.GP73505@kib.kiev.ua> <20121113225905.GB75103@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQl3qbZfe+y1o+7frU7uC/dGxMYKrYBjk3SOhiZo/JNAscBO5NzbQKlEw/mF4ojki0smu+UU Cc: Konstantin Belousov , arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 23:04:39 -0000 On Nov 13, 2012, at 3:59 PM, Baptiste Daroussin wrote: > On Tue, Nov 13, 2012 at 08:45:12PM +0200, Konstantin Belousov wrote: >> On Tue, Nov 13, 2012 at 08:42:38PM +0200, Konstantin Belousov wrote: >>> On Tue, Nov 13, 2012 at 07:34:12PM +0100, Baptiste Daroussin wrote: >>>> On Tue, Nov 13, 2012 at 01:50:34PM +0200, Konstantin Belousov = wrote: >>>>> On Tue, Nov 13, 2012 at 12:18:06PM +0100, Baptiste Daroussin = wrote: >>>>>> Hi, >>>>>>=20 >>>>>> I want to increase MAXLOGNAME in sys/param.h from 17 to 33 to = allow 32-character >>>>>> long usernames, the PR: misc/161091 and misc/133926 already = requested for it. >>>>>>=20 >>>>>> utmpx already allow 32 character long user names. >>>>>>=20 >>>>>> I plan to bump the __FreeBSD_version at the same time because of = the ABI >>>>>> breakage. >>>>>>=20 >>>>>> This is simplify life of lots administrator, this value, is a = common value for >>>>>> other operating systems. >>>>>>=20 >>>>>> Do anyone have objections about it? >>>>>=20 >>>>> Yes, I have. Do not break the ABI, it is plain prohibited. >>>>> You might consider increasing the constant only if providing ABI >>>>> compatibility shims. >>>>>=20 >>>>> In fact, the cursory look over the whole base system indicates = that ABI >>>>> breakage might be not that big and could be mitigated with = relatively >>>>> limited amount of the efforts. >>>>=20 >>>> Thanks cognet for the help on the following. >>>>=20 >>>> After auditing base, it seems like this patch is enough >>>> http://people.freebsd.org/~bapt/maxlogname-33.diff >>> Regarding the patch, the dereferencing of p->p_session should be = done >>> under the proc lock to guarantee stability of p_pgrp, and under = session >>> mutex to prevent s_login modifications. Altogether, this means that = the >>> if() shall be moved down right before bcopy and locks unlocked on = return. >>>=20 >> Sorry, sent the reply too early. >>=20 >> The alternative is to check for the length of the local 'login' = variable >> after unlocks, right before copyout. >>=20 > like this? > = http://people.freebsd.org/~bapt/report-erange-if-login-is-larger-then-MAXL= OGNAME.diff Isn't that check too late? Warner=