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]
Date:   Tue, 9 May 2023 08:38:45 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Niklas Schnelle <schnelle@...ux.ibm.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-kernel@...r.kernel.org,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-pci@...r.kernel.org, Arnd Bergmann <arnd@...nel.org>,
        linux-rtc@...r.kernel.org,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: [PATCH v3 28/38] rtc: add HAS_IOPORT dependencies

Hi Arnd,

On Mon, May 8, 2023 at 10:01 PM Arnd Bergmann <arnd@...db.de> wrote:
> On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote:
> > On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote:
> >> On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote:
> >> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> >> > not being declared. We thus need to add HAS_IOPORT as dependency for
> >> > those drivers using them.
> >> >
> >> > Co-developed-by: Arnd Bergmann <arnd@...nel.org>
> >> > Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> >> > ---
> >> >  drivers/rtc/Kconfig | 4 +++-
> >> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> >> > index 5a71579af0a1..20aa77bf0a9f 100644
> >> > --- a/drivers/rtc/Kconfig
> >> > +++ b/drivers/rtc/Kconfig
> >> > @@ -956,6 +956,7 @@ comment "Platform RTC drivers"
> >> >  config RTC_DRV_CMOS
> >> >    tristate "PC-style 'CMOS'"
> >> >    depends on X86 || ARM || PPC || MIPS || SPARC64
> >> > +  depends on HAS_IOPORT
> >>
> >> Did you check that this will not break platforms that doesn't have RTC_PORT defined?
> >> >
> >
> > From what I can tell the CMOS_READ() macro this driver relies on uses
> > some form of inb() style I/O port access in all its definitions. So my
> > understanding is that this device is always accessed via I/O ports even
> > if the variants differ slightly and would make no sense on a platform
> > without any way of accessing I/O ports which is what lack of HAS_IOPORT
> > means. From what I can see even without RTC_PORT being defined the
> > CMOS_READ is still used. Hope that answers your question?
>
> I think the m68k/atari and mips/dec variants don't necessarily
> qualify as PIO, those are really just pointer dereferences, and
> they don't use the actual inb/outb functions.
>
> On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA
> is, but on dec it's never enabled.

Atari does not use RTC_DRV_CMOS, but still relies on generic RTC
instead.

Last time (in 2013?) I tried converting to RTC_DRV_CMOS by registering
an "rtc_cmos" platform device, I couldn't get it to work.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ