From owner-svn-src-head@freebsd.org Sun Nov 10 19:48:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C2171BDC1A; Sun, 10 Nov 2019 19:48:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B4LH2HnCz4K10; Sun, 10 Nov 2019 19:48:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f41.google.com with SMTP id e17so9578038otk.6; Sun, 10 Nov 2019 11:48:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=eQDrYqvO+510gWvTPEkVX8VJT1lkKjfUhPzUot++ZZI=; b=LzA5f8Vbz6htEjLFCLf4MGmBDro3ZOUvqrztJa4gHP3ux8Dz7kE1dPB+mfsLrZ69ln uV4OGh9e7HNa5HRWdzZyYBNm/gh3hWPjZ7ixHwzYS26lky/0kIoYCXRwePS/jEAF5CJD BMYTtBZHakDxqlj8wQrczYlibNXB1U7dRiXM57YKT0l8WO49ZtrfsldNqhfFNMZJOUo3 QlhTH63pSX35WSP2wMZxn9ATZh6BTcHVjIU0PGzm99pbhdgdrjikAel0xSCgZAm2Mg2P KjQvlVbdYxEerCtNOg/S9UhwLHsEaJIGvwj8HjHtW3OjekZCDMqp7vqlBtN/gGBxi0Gd 4IfA== X-Gm-Message-State: APjAAAUmudM5eVEajLFboFdlUyfzWEd8epEvLKa1ECX7r9+4uZoTNlJ5 ocsgeTxOE8c97Px+MrLPbYCwkxYj X-Google-Smtp-Source: APXvYqzj2yXH0ozzfyAvsjdfekyRBX6wydbuHTbFzhO9OkyNc4u7ffdadWzPVO9hg2Xy+ztSuzqzxA== X-Received: by 2002:a9d:4c15:: with SMTP id l21mr19095114otf.204.1573415285700; Sun, 10 Nov 2019 11:48:05 -0800 (PST) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com. [209.85.167.176]) by smtp.gmail.com with ESMTPSA id 63sm4278011oty.58.2019.11.10.11.48.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Nov 2019 11:48:05 -0800 (PST) Received: by mail-oi1-f176.google.com with SMTP id 14so3715767oir.12; Sun, 10 Nov 2019 11:48:04 -0800 (PST) X-Received: by 2002:aca:6006:: with SMTP id u6mr8025126oib.137.1573415284500; Sun, 10 Nov 2019 11:48:04 -0800 (PST) MIME-Version: 1.0 References: <201911071815.xA7IFOhI070066@repo.freebsd.org> <20191109204958.Horde.B0ynnS_aur1OZimnDNObsAt@webmail.leidinger.net> <20191110160819.GA1095@brick> In-Reply-To: <20191110160819.GA1095@brick> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 10 Nov 2019 11:47:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r354458 - head/libexec/rc/rc.d To: svn-src-head@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org X-Rspamd-Queue-Id: 47B4LH2HnCz4K10 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.210.41 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-3.15 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_NONE(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[41.210.85.209.rep.mailspike.net : 127.0.0.18]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; HAS_REPLYTO(0.00)[cem@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[41.210.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.15)[ip: (-0.49), ipnet: 209.85.128.0/17(-3.19), asn: 15169(-2.00), country: US(-0.05)]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 19:48:08 -0000 Hi, Response inline below. On Sun, Nov 10, 2019 at 08:08 Edward Tomasz Napierala wrote: > On 1109T2049, Alexander Leidinger wrote: > > Quoting Edward Tomasz Napierala (from Thu, 7 Nov > > 2019 18:15:24 +0000 (UTC)): > > > > > Author: trasz > > > Date: Thu Nov 7 18:15:24 2019 > > > New Revision: 354458 > > > URL: https://svnweb.freebsd.org/changeset/base/354458 > > > > > > Log: > > > Extend the linux rc script to mount the neccessary file systems, > > > set ELF fallback brand, and load pty(4). > > > > We never did something like that. We have it documented everywhere > > that it needs to be done manually. So this is at least a POLA > > violation. It is great that the nocover option is used in the mount, > > but it's still some kind of layering violation (I may want to have > > only a subset mounted, or nothing at all). > > It is kind of a POLA violation, but previously the linux_enable > knob didn't do much apart from loading the linux{,64}.ko kernel > module and doing something weird with ldconfig, which I'm not > even sure is actually useful. In other words, the old behaviour > can be restored by just not using linux_enable, and instead > loading the kernel modules the same way all the others are loaded. > > Could you give me some use case why someone would want only a subset > of the filesystems? They=E2=80=99re an additional attack surface. If your few linux applicatio= ns get by with fewer vfs, you might want to avoid the others. I=E2=80=99m not part= icularly attached to this reason. And imo, linux64.ko kind of dwarf that attack surface concern, so it=E2=80=99s maybe a silly point. Another problem with the current code is (and I may be mistaken here) I think that it ignores mount options configured in the admin=E2=80=99s /etc/= fstab. Eg I configure my /tmp with a hard limit on memory use and if I were to mount a compat shm tmpfs, I=E2=80=99d also want its memory use bounded. =E2= =80=9CNocover=E2=80=9D protects from covering any existing =E2=80=9Cauto=E2=80=9C mounts, but one = can imagine specifying the linux compat mount =E2=80=9Cnoauto=E2=80=9D. I am on board with making this stuff more =E2=80=9Cbatteries included=E2=80= =9D and usable by default, but just echoing the request for configurable knobs (I don=E2= =80=99t care about the defaults). Best, Conrad > > > > I do not object to the functionality, but I think it needs to be > > configurable (an option to influence if the auto-mount is done or not, > > doesn't matter to me what the default behavior is, as long as it is > > configurable) and documented (UPDATING, handbook, man-pages, maybe > > even the release notes). > > Man page updates are pending review at https://reviews.freebsd.org/D22277= . > Good point about the Handbook and release notes; I'll take a look. > >