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: <c438aa7e-2c96-8c11-bb87-204929a01a20@arm.com>
Date:   Fri, 21 Feb 2020 14:48:29 +0000
From:   Vincenzo Frascino <vincenzo.frascino@....com>
To:     Marc Zyngier <maz@...nel.org>
Cc:     linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, catalin.marinas@....com,
        will.deacon@....com, linux@...linux.org.uk, luto@...nel.org,
        tglx@...utronix.de, m.szyprowski@...sung.com, mark.rutland@....com
Subject: Re: [PATCH] clocksource: Fix arm_arch_timer clockmode when vDSO
 disabled

Hi Marc,

On 21/02/2020 13:34, Marc Zyngier wrote:
> Vincenzo,
> 
> Please include Mark and myself for anything that touches the arch timers
> (get_maintainer.pl will tell you who you need to cc).
> 

Sorry about that, I posted it too quickly without the proper Cc on the patch.

> On 2020-02-21 13:03, Vincenzo Frascino wrote:

[...]

> 
> This feels pretty clunky.
> 
> I'd extect VDSO_ARCH_CLOCKMODES (or some similar architecture-specific
> symbol) to be used for vdso_default, and that symbol to be defined as
> VDSO_CLOCKMODE_NONE when CONFIG_GENERIC_GETTIMEOFDAY isn't selected.
>

My understanding is that currently VDSO_ARCH_CLOCKMODES depending on the
architecture can identify one or more clocks. In the case of arm and the
arm_arch_timer the arch specific symbol is VDSO_CLOCKMODE_ARCHTIMER (used for
vdso_default), which as you are correctly stating has to be defined as
VDSO_CLOCKMODE_NONE when CONFIG_GENERIC_GETTIMEOFDAY isn't selected.

> Otherwise, you'll end-up replicating the same pattern in every
> clock-source that gets used by the VDSO.

Based on my investigation this fix should be replicated for all the clocksources
used by architectures supported by Unified VDSO and of which VDSOs can be
disabled (otherwise the current solution works). After a quick grep on the
kernel tree:

 $ grep -nr "config VDSO" *

arch/arm/mm/Kconfig:895:config VDSO

Since the only clocksource that falls into these conditions seems to be
arm_arch_timer I modified its driver.

Please feel free to correct me if I missed or misunderstood something.

> 
>         M.

-- 
Regards,
Vincenzo

Download attachment "pEpkey.asc" of type "application/pgp-keys" (14072 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ