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: <20140209052230.GL12219@tassilo.jf.intel.com>
Date:	Sat, 8 Feb 2014 21:22:30 -0800
From:	Andi Kleen <ak@...ux.intel.com>
To:	stefani@...bold.net
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, aarcange@...hat.com, john.stultz@...aro.org,
	luto@...capital.net, xemul@...allels.com, gorcunov@...nvz.org,
	andriy.shevchenko@...ux.intel.com, Martin.Runge@...de-schwarz.com,
	Andreas.Brief@...de-schwarz.com
Subject: Re: [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel

> +notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
> +{
> +	long ret;
> +
> +	asm(
> +		"push %%ebx \n"
> +		"mov %2,%%ebx \n"
> +		"call VDSO32_vsyscall \n"
> +		"pop %%ebx \n"
> +		: "=a" (ret)
> +		: "0" (__NR_clock_gettime), "d" (clock), "c" (ts)
> +		: "memory");

The push/mov/pop could be just replaced with "b"?
Also I if this calls syscall.S:__kernel_vsyscall it clobbers more registers
(ecx at least?) and you need to describe that to gcc with a + 

Same in the other sys calls.

> @@ -310,6 +311,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
>  	unsigned long addr;
>  	int ret = 0;
>  	bool compat;
> +	struct vm_area_struct *vma;
> +	extern char __vvar_page;
> +#ifdef CONFIG_HPET_TIMER
> +	extern unsigned long hpet_address;
> +#endif

Put this into a header.

> +++ b/arch/x86/vdso/vdso32/vclock_gettime.c
> @@ -0,0 +1,16 @@
> +#define BUILD_VDSO32
> +
> +#ifdef CONFIG_X86_64
> +
> +#define _ASM_X86_PAGE_H
> +
> +#define __pa(x)                0
> +#define __va(x)                0
> +
> +#undef CONFIG_ILLEGAL_POINTER_VALUE
> +#define CONFIG_ILLEGAL_POINTER_VALUE   0

This needs some comments.

Why are the __pa/__va defines safe?

The rest of the patchkit looks reasonable to me from a quick read.
Much better than the first version.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ