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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2UTND+F83k2uQ+f=o1GWV=oa5coshy8Hy+cKHUGuNzEg@mail.gmail.com>
Date:   Tue, 19 Jul 2022 13:55:03 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Stafford Horne <shorne@...il.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Christoph Hellwig <hch@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>, Guo Ren <guoren@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Richard Weinberger <richard@....at>,
        Anton Ivanov <anton.ivanov@...bridgegreys.com>,
        Johannes Berg <johannes@...solutions.net>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-csky@...r.kernel.org,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        linux-um <linux-um@...ts.infradead.org>,
        linux-pci <linux-pci@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] asm-generic: Add new pci.h and use it

On Tue, Jul 19, 2022 at 12:55 PM Stafford Horne <shorne@...il.com> wrote:

> diff --git a/drivers/comedi/drivers/comedi_isadma.c b/drivers/comedi/drivers/comedi_isadma.c
> index 700982464c53..508421809128 100644
> --- a/drivers/comedi/drivers/comedi_isadma.c
> +++ b/drivers/comedi/drivers/comedi_isadma.c
> @@ -104,8 +104,10 @@ unsigned int comedi_isadma_poll(struct comedi_isadma *dma)
>
>         flags = claim_dma_lock();
>         clear_dma_ff(desc->chan);
> +#ifdef CONFIG_X86_32
>         if (!isa_dma_bridge_buggy)
>                 disable_dma(desc->chan);
> +#endif

There is a logic mistake here: if we are on something other than x86-32,
this always needs to call the disable_dma()/enable_dma().

Not sure how to best express this in a readable way, something like this
would work:

#ifdef CONFIG_X86_32
        if (!isa_dma_bridge_buggy)
#endif
               disable_dma(desc->chan);


or possibly at the start of this file, a

#ifndef CONFIG_X86_32
#define isa_dma_bridge_buggy 0
#endif

Or we could try to keep the generic definition in a global header
like linux/isa-dma.h.

> --- a/sound/core/isadma.c
> +++ b/sound/core/isadma.c
> @@ -73,8 +73,10 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size)
>
>         flags = claim_dma_lock();
>         clear_dma_ff(dma);
> +#ifdef CONFIG_X86_32
>         if (!isa_dma_bridge_buggy)
>                 disable_dma(dma);
> +#endif
>         result = get_dma_residue(dma);
>         /*

Same here.

         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ