lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhSdy1Xc9AjPKY0RzLL_qsBs6wax23fi2BTVtMhuS0mAoKZmQ@mail.gmail.com>
Date:   Wed, 24 Apr 2019 12:15:45 +0530
From:   Anup Patel <anup@...infault.org>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Anup Patel <Anup.Patel@....com>,
        Palmer Dabbelt <palmer@...ive.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Atish Patra <Atish.Patra@....com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v3 2/3] RISC-V: Add interrupt related SCAUSE defines in asm/csr.h

On Wed, Apr 24, 2019 at 11:59 AM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Mon, Apr 15, 2019 at 09:37:23AM +0000, Anup Patel wrote:
> > This patch adds SCAUSE interrupt flag and SCAUSE interrupt related
> > defines to asm/csr.h. We also use these defines in kernel/irq.c and
> > express SIE/SIP flags in-terms of SCAUSE interrupt causes.
>
> I'm not a fan of this.  For one this pollutes csr.h with bits not really
> needed by most users, and it makes adding the M-mode nommu port which has
> to use the M-mode causes much harder:

It's not polluting asm/csr.h because when we get interrupt numer in lower bits
of SCAUSE CSR.

These defines certainly belong to asm/csr.h because they represent possible
exception causes when we get interrupt.

We need these defines for programming HIDELEG CSR in KVM kernel module
so it will be used at multiple places.

>
> http://git.infradead.org/users/hch/misc.git/commitdiff/1221f5c32345ebe7ea2c1cd6e8a01ad4b422aaba

You can certainly use these defines in your nommu commit by using
"#ifdef CONFIG_M_MODE" in switch case of do_IRQ().

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ