Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp761284ybx; Thu, 7 Nov 2019 02:18:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwmZhqeU/aNWAYTAImEfqHkJ6SvmOTVjur/5ToxSGdpB75g+fI/U0yi2YK5DMvS7v6wKAAN X-Received: by 2002:a17:906:70d2:: with SMTP id g18mr2261059ejk.18.1573121888791; Thu, 07 Nov 2019 02:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573121888; cv=none; d=google.com; s=arc-20160816; b=A+XfXCmo7YMkS9ffxDRxzPux4I6xpQPsUiMMs5NX9I817OhfkDaD9/dTEbc2jUND2+ 2vCWHIp4HNsck9oYRc+lMZBFw8cqQ42OpZnaW73hcW2AoqiBriRMElQbk20N2CEzyW0y PQ/gylalsq8/4En7eAiIXHB+uPPYkmRCIdYOdgEXzqIubjCmtUd4fW+PoIDBIAvTbXmG uQk6CkoLErcwrtdpxZymbBm7XZdZ9mGsljicLvnhRDWOlDkr7cuXfItZalRp5rn2jTmv dtIk+pYV0llwhX5GiRLlA1pGpA/ah6Bn8lohAH3EocL15ebeigmQKqH7k4pqyXj6gy+d c7gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eSKtdQNdZkyR1ISeKsavqG6KxpqhGhB4q5qZi2mYs54=; b=F459Ven2mzgZEd1fWBwhAXneocpRLLK65m4YLGyPvcGucyfztcCt/8zKRpuPw5ZPRR g1xabRTcuzZhmVfDiPp9GijKBP0ZCL3C/6qNCYyqqBujictJvwEs9kY7kR8j/npBAWc3 VQu6wIjeQ3pqF+pm11fPiO3jr2SxufAQ7VADdLGU/6gzvMjTrlQxSH1AzmwYdainDe0y +ELft2xVGb9twJ8/Yg5ggmeRzQDlTp3l868Y2qjLwyzSCNGOsHW1MphjwWmYcZ/+cRna DD6M3Wy6QVSBZAqw/J8+h2Ym8v0wBdd1ohT6/E8wkX+P6Qk9v7eE2Vq5CyIEdqeQXeul 3zWg== ARC-Authentication-Results: i=1; mx.google.com; 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 g19si1130244ejj.120.2019.11.07.02.17.45; Thu, 07 Nov 2019 02:18:08 -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; 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 S2387831AbfKGKOv (ORCPT + 99 others); Thu, 7 Nov 2019 05:14:51 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:14650 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727434AbfKGKOv (ORCPT ); Thu, 7 Nov 2019 05:14:51 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id xA7ADvMK015622; Thu, 7 Nov 2019 11:13:57 +0100 Date: Thu, 7 Nov 2019 11:13:57 +0100 From: Willy Tarreau To: Thomas Gleixner Cc: Ingo Molnar , Linus Torvalds , LKML , the arch/x86 maintainers , Stephen Hemminger , Juergen Gross , Sean Christopherson , "H. Peter Anvin" Subject: Re: [patch 5/9] x86/ioport: Reduce ioperm impact for sane usage further Message-ID: <20191107101357.GC15536@1wt.eu> References: <20191106193459.581614484@linutronix.de> <20191106202806.241007755@linutronix.de> <20191107082541.GF30739@gmail.com> <20191107091704.GA15536@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 11:00:27AM +0100, Thomas Gleixner wrote: > Changing ioperm(single port, port range) to be ioperm(all) is going to > break a bunch of test cases which actually check whether the permission is > restricted to a single I/O port or the requested port range. But out of curiosity, are these solely test cases or things that real applications do ? We could imagine having a sysctl entry to indicate whether or not we want strict compatibility with older code in which case we'd take the slow path, or a modernized behavior using only the fast path. If we managed to deal with mmap_min_addr over time, I think it should be manageable to deal with the rare applications using ioperm(). Willy