Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1472758ybh; Sun, 8 Mar 2020 05:15:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vslMVEGx1AwvbBfNrLHZQSRvSnTAE7CaCI9p3J55aLFJDZ0lrJ1MWCjI/V1GJCMm3QKMqqS X-Received: by 2002:a9d:6411:: with SMTP id h17mr9572707otl.332.1583669709140; Sun, 08 Mar 2020 05:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583669709; cv=none; d=google.com; s=arc-20160816; b=yvzQ26PLkPJGDPFsvwroINLikAqa7Kx5vg+MKnqok+eakBRCEl0CYKFLnzh3K9sTsr 54aedDqA7hMvARPj6kCQzaP6iX6E0/CbJJm3ljFkQ+g+t1N++iQKm7MuNjQ8TYwdGt7E JT1eydrXk83CjX5BpH8ZwrOZXBADCxzwX7vBSpcOV+Rl+ZlogGA/RxB6nLX+ivy4vqgO nViMFAIrGoG9sL+fU0Q47gP8cqR9zuTYYO+5i/zDaXEQifrhY05vmcZrKvPYwJOyNud9 NWmqCUAdrqIDCTF5/kxmVx1UrmOPFz6Mg95sj8TtpMhgXfq8GvP3glfkGdDp2U6ejJuL dxVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=PODgalNWhxLYuWOhCXUiAEQjge/9TJZSY2U1XO89fwo=; b=TfdfqR3u4pk5k3BTtdBQIMeEB5g/I0uZdHGkv8tzjPTP585MjeuVd+Ut1JgWyX/Ciq QyU4qi4s0FlQyoWqJdxX9iwIgbcRa3ySS6iAu3Zx57O5C3gl7pnZ/iwpiNpdo6Lldjh6 U6w/v2gzZ+5D53gKOapEvpVPmwK/bakszGuKbNpy8M85vBvZcewzlcOOi2tSGMLghdPT VJEKvsZ7DgV+GbtUGeqBQa9kUV+HyIGBF97nGr6i7wdSKmTYzt2OtQXVkaSoVh5wXVy/ 9EndQKOvxb8YQsyrZdzFMZGUGkwcqrCk1pv03j2n7W6vNFAqTrmr3Qs631l9ZS14MGa1 ZgHQ== 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 g25si5324976oti.250.2020.03.08.05.14.58; Sun, 08 Mar 2020 05:15:09 -0700 (PDT) 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 S1726318AbgCHMOO (ORCPT + 99 others); Sun, 8 Mar 2020 08:14:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56572 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbgCHMOO (ORCPT ); Sun, 8 Mar 2020 08:14:14 -0400 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jAuor-0005jp-I8; Sun, 08 Mar 2020 13:14:09 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 0841F104096; Sun, 8 Mar 2020 13:14:09 +0100 (CET) From: Thomas Gleixner To: Joe Jin , Marc Zyngier Cc: linux-kernel@vger.kernel.org, Greg KH Subject: Re: [PATCH] genirq/debugfs: add new config option for trigger interrupt from userspace In-Reply-To: <84d0b879-cd4b-57c4-5ad3-57eab7694d45@oracle.com> References: <44a7007d-9624-8ac7-e0ab-fab8bdd39848@oracle.com> <006a08b8bfb991853ede8c9d1e29d6a7@kernel.org> <84d0b879-cd4b-57c4-5ad3-57eab7694d45@oracle.com> Date: Sun, 08 Mar 2020 13:14:08 +0100 Message-ID: <87r1y382nj.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joe, Joe Jin writes: > On 2/28/20 11:54 AM, Marc Zyngier wrote: >> On 2020-02-28 19:13, Joe Jin wrote: >>>> On 2020-02-28 05:42, Joe Jin wrote: >>>>> commit 536e2e34bd00 ("genirq/debugfs: Triggering of interrupts from >>>>> userspace") is allowed developer inject interrupts via irq debugfs, which >>>>> is very useful during development phase, but on a production system, this >>>>> is very dangerous, add new config option, developers can enable it as >>>>> needed instead of enabling it by default when irq debugfs is enabled. >>>> >>>> I don't really mind the patch (although it could be more elegant), but in >>>> general I object to most debugfs options being set on a production kernel. >>>> There is way too much information in most debugfs backends to be comfortable >>>> with it, and you can find things like page table dumps, for example... >>> >>> We should not enable any debug option on production system, actual customer >>> want to resize their BM or VM, cpu offline may lead system not works properly, >>> and if we knew more details of IRQ info it will be very help to identify >>> if it caused by IRQ/vectors, this is the motivation of we want to enable it >>> on production kernel. >> >> If something doesn't work properly, then you are still debugging, AFAICT. > > Yes you're right, there are various reasons to led the problem such like > bad mapping, interrupts lost, vectors used up .... irq debugfs is help to > identify which part caused the problem, and it help to save troubleshooting > time :-) Just picking out individual interfaces is going to create a whack a mole game and a boat load of config options to disable these. That's really not the way to go. The right thing to do is to have ONE config switch which disables all write interfaces at once by refusing the write right in the debugfs entry point. Of course there might be a few debugfs files which need write access even in that case, but that's easy enough to fix by marking them as explicitely allowed. Thanks, tglx