From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 753F9C5DF61 for ; Thu, 7 Nov 2019 10:14:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 443832084D for ; Thu, 7 Nov 2019 10:14:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387932AbfKGKOw (ORCPT ); Thu, 7 Nov 2019 05:14:52 -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