Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1217539ybx; Thu, 7 Nov 2019 08:54:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzOl99O4g+hoem/s1o5CkzabN8y4oiyu23EduMpo6D9z/OXt/IukQyNQBgLnJmhzAfNZ2zk X-Received: by 2002:a17:906:4d58:: with SMTP id b24mr3933155ejv.277.1573145697254; Thu, 07 Nov 2019 08:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573145697; cv=none; d=google.com; s=arc-20160816; b=1Ey9fnPS/3zsD0xG2TpIbLJZFVJOVjPuIJjrRKlCaemLJE8fI43ZBjTvBuedBs48+a DvsZNQmeuBR40IxT1E+96tYVxMP7cxBQEw1qwOt9+vS1eaUO2IXxy1f6GS9hBJnI0iw4 wRpR0tnRLg99nZ3fBbdM5v8vrvGCi3HsJJIfapBn4nzFhAu11J26YC33KA/+eEo3cB5R IzHmsOAD+9rfDfqrLSA33HoYc1JBR2ITEKrpBovDX4Fb8fmN4i8iW52DwZhvR5G0B2hu zRtUu8ghjYi58KUpKDxYTJ8pJ+l/yW5JgUTEmh1TGFN6Apmoh++zrdu4GFK1hhl1cZi0 Mndw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xmFpAJn0hM4hCADfxgFlNxkJRJWoCVfKXlrufraJ+m8=; b=XUmo2RvqBnvTQoOBVSvCK5fIDeczRU/qrBTV0iviBGs71IgSIAqM5GDGeUG0FkpMqw G27xbNrdb/e5DKrL0mlqnonMBEt1uRK1DfcBFyOvpDQsYVSf0huafHx9FZHW25zQmxu1 trRsrt3tQl8gKRcdciUEEwF3KQOdX/HSs92rsxicOaE09yZJdqv1A/95WJsxfCis4zLy 8jG4xSC2fBoQ5VPAS/IR0TKHnIqht5QOglD/xTcvhBQMc3f8dk2KlnPg7/qjg4I0yq8E JVFZ/r2hAJ8+tKNorUIKixsgeyV0RiAhtXPSPOXSbSu41ROFStQHuwWfGJk9Pksf9q8t flYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UzYB1aPj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v29si1748114edc.436.2019.11.07.08.54.32; Thu, 07 Nov 2019 08:54:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=UzYB1aPj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729970AbfKGQxr (ORCPT + 99 others); Thu, 7 Nov 2019 11:53:47 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38504 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729701AbfKGQxr (ORCPT ); Thu, 7 Nov 2019 11:53:47 -0500 Received: by mail-lf1-f68.google.com with SMTP id q28so2140515lfa.5 for ; Thu, 07 Nov 2019 08:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xmFpAJn0hM4hCADfxgFlNxkJRJWoCVfKXlrufraJ+m8=; b=UzYB1aPjPzc7eAqp/cNTEIY689LK/ItFnEl4Q27cI/u5BBjFKhbFMixDDvWFx++y98 zNaFXfSm5iPweqOkjDXGeR4QXg4Es67aIbQxktg5/1Jwiv4NA+ob0UcqBWDQdCCC44xI O8lPeMI595A+1KifyBbibn5DCPW50PRPZ8I90= 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:from:date :message-id:subject:to:cc; bh=xmFpAJn0hM4hCADfxgFlNxkJRJWoCVfKXlrufraJ+m8=; b=ASycn4sprWYd/o+SX0MB7f17nCyx2G/jVX+BNuQJLpJtScNwYtsZOye80eZ9rnMJAf 8VY89xu/wyvTm5wLi3/Ab2ukIBoemv83ZtMLiSZHD22IMkmhK7GtfPzIEWPsoJ5ucLBK pvq0LVlBgwX35WxCpQYJWlEb8wLL7z4X9QyxdJDJpSb0BZ4gv582jxVVgqSGe8JRazSY ka2rChN3WaKnV2iLXe0uX7wIL8AcSNVoA9efKAFW10Jjr8wcH+kc8vXFUhBHMu3o2Hj/ YlXsnW6GSAyTJTh5VfhXBYBJQCkZzRlcpaH4E4hCkiTEAyd+X+hXv83C0l6XllC8doHX CZ3w== X-Gm-Message-State: APjAAAU5i1MS9O7UP5wAmDVPqXocBZY+rxmTaXBWuY9yGWL6zRAPrtQH kS6KUcjQ4qOxcUL0RXeqryK10+VHb60= X-Received: by 2002:ac2:569c:: with SMTP id 28mr2828211lfr.139.1573145623412; Thu, 07 Nov 2019 08:53:43 -0800 (PST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id b23sm1415694lfj.49.2019.11.07.08.53.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Nov 2019 08:53:42 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id m9so3048967ljh.8 for ; Thu, 07 Nov 2019 08:53:42 -0800 (PST) X-Received: by 2002:a2e:8809:: with SMTP id x9mr3208604ljh.82.1573145621882; Thu, 07 Nov 2019 08:53:41 -0800 (PST) MIME-Version: 1.0 References: <20191106193459.581614484@linutronix.de> <20191106202806.241007755@linutronix.de> <20191107082541.GF30739@gmail.com> <20191107091704.GA15536@1wt.eu> <71DE81AC-3AD4-47B3-9CBA-A2C7841A3370@zytor.com> <20191107102756.GD15536@1wt.eu> <5AAEF116-EC9D-4C58-878F-9D27189E123A@zytor.com> <20191107125638.GB15642@1wt.eu> <87h83fd4a2.fsf@x220.int.ebiederm.org> In-Reply-To: <87h83fd4a2.fsf@x220.int.ebiederm.org> From: Linus Torvalds Date: Thu, 7 Nov 2019 08:53:25 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 5/9] x86/ioport: Reduce ioperm impact for sane usage further To: "Eric W. Biederman" Cc: Willy Tarreau , Peter Anvin , Thomas Gleixner , Ingo Molnar , LKML , "the arch/x86 maintainers" , Stephen Hemminger , Juergen Gross , Sean Christopherson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 7, 2019 at 8:45 AM Eric W. Biederman wrote: > > Further a quick look shows that dosemu uses ioperm in a fine grained > manner. From memory it would allow a handful of ports to allow directly > accessing a device and depended on the rest of the port accesses to be > disallowed so it could trap and emulate them. Yes. Making ioperm() some all-or-nothing thing would be horribly bad, and has no real advantages that I can see. Linus