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: <00665546-4ad7-758c-d205-02f2fdca7e6e@yandex-team.ru>
Date:   Wed, 23 Oct 2019 16:05:47 +0300
From:   Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org
Cc:     Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 4.4 1/2] x86/vdso: Remove direct HPET mapping into
 userspace

On 23/10/2019 15.07, Konstantin Khlebnikov wrote:
> commit 1ed95e52d902035e39a715ff3a314a893a96e5b7 upstream.
> 
> Commit d96d87834d5b870402a4a5b565706a4869ebc020 in v4.4.190 which is
> backport of upstream commit 1ed95e52d902035e39a715ff3a314a893a96e5b7
> removed only HPET access from vdso but leaved HPET mapped in "vvar".
> So userspace still could read HPET directly and confuse hardware.
> 
> This patch removes mapping HPET page into userspace.
> 
> Fixes: d96d87834d5b ("x86/vdso: Remove direct HPET access through the vDSO") # v4.4.190
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
> Link: https://lore.kernel.org/lkml/6fd42b2b-e29a-1fd6-03d1-e9da9192e6c5@yandex-team.ru/
> ---
>   arch/x86/entry/vdso/vma.c |   14 --------------
>   1 file changed, 14 deletions(-)
> 
> diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
> index 6b46648588d8..cc0a3c16a95d 100644
> --- a/arch/x86/entry/vdso/vma.c
> +++ b/arch/x86/entry/vdso/vma.c
> @@ -18,7 +18,6 @@
>   #include <asm/vdso.h>
>   #include <asm/vvar.h>
>   #include <asm/page.h>
> -#include <asm/hpet.h>
>   #include <asm/desc.h>
>   #include <asm/cpufeature.h>
>   
> @@ -159,19 +158,6 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
>   	if (ret)
>   		goto up_fail;
>   
> -#ifdef CONFIG_HPET_TIMER
> -	if (hpet_address && image->sym_hpet_page) {

Probably this patch is not required.
It seems after removing symbol "hpet_page" from vdso code
image->sym_hpet_page always is NULL and this branch never executed.

> -		ret = io_remap_pfn_range(vma,
> -			text_start + image->sym_hpet_page,
> -			hpet_address >> PAGE_SHIFT,
> -			PAGE_SIZE,
> -			pgprot_noncached(PAGE_READONLY));
> -
> -		if (ret)
> -			goto up_fail;
> -	}
> -#endif
> -
>   	pvti = pvclock_pvti_cpu0_va();
>   	if (pvti && image->sym_pvclock_page) {
>   		ret = remap_pfn_range(vma,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ