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: <zQCmpTJgh3DStTAOFOYXmO44eMRsagV7uM-pCHjc3YlsFmTQuG2GNK9ELGBQZsFn44kr91MRGZ3U7z45D79XHNvCuMTuA6PltlSDx379ws0=@protonmail.ch>
Date:   Fri, 30 Aug 2019 09:33:17 +0000
From:   Tamás Szűcs <tszucs@...tonmail.ch>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux MMC List <linux-mmc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH v2] mmc: sdhi: fill in actual_clock

Hi Geert,

You are correct, there is no way to distinguish between the old and new kernels just by mmc ios output when the bus is down. I don't think it's an issue. I find it more helpful to have this information available.
Yes, actual_clock should only display when non-zero and it should be zero when the bus is down. I fixed this in v2.

Kind regards,
Tamas


Tamás Szűcs
tszucs@...tonmail.ch

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, August 30, 2019 9:21 AM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

> Hi Tamás,
>
> On Thu, Aug 29, 2019 at 8:37 PM Tamás Szűcs tszucs@...tonmail.ch wrote:
>
> > Save set clock in mmc_host actual_clock enabling exporting it via debugfs.
> > This will indicate the precise SD clock in I/O settings rather than only the
> > sometimes misleading requested clock.
> > Signed-off-by: Tamás Szűcs tszucs@...tonmail.ch
>
> Thanks for the update!
>
> Reviewed-by: Geert Uytterhoeven geert+renesas@...der.be
>
> However, one question below.
>
> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -166,10 +166,13 @@ static void renesas_sdhi_set_clock(struct tmio_mmc_host *host,
> > sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~CLK_CTL_SCLKEN &
> > sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
> >
> > -         if (new_clock == 0)
> >
> >
> >
> > -         if (new_clock == 0) {
> >
> >
> > -                 host->mmc->actual_clock = 0;
> >
> >
>
> The actual clock is present in the debugfs output only when non-zero.
> Hence userspace cannot distinguish between an old kernel where the
> Renesas SDHI driver didn't fill in actual_clock, and a new kernel when
> the SDHI controller is powered down.
> Could that be an issue? Should the old value be retained?
> Probably it's OK, as this is debugfs, not an official ABI.
>
> 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