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: <1209111858.7115.405.camel@twins>
Date:	Fri, 25 Apr 2008 10:24:18 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	David Miller <davem@...emloft.net>
Cc:	mingo@...e.hu, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	viro@...iv.linux.org.uk, alan@...rguk.ukuu.org.uk,
	tglx@...utronix.de
Subject: Re: [git pull] scheduler/misc fixes

On Fri, 2008-04-25 at 00:57 -0700, David Miller wrote:

> diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
> index 524b889..bf4ef84 100644
> --- a/arch/sparc64/kernel/smp.c
> +++ b/arch/sparc64/kernel/smp.c
> @@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
>  	void *info = call_data->info;
>  
>  	clear_softint(1 << irq);
> +
> +	irq_enter();
> +
> +	if (!call_data->wait) {
> +		/* let initiator proceed after getting data */
> +		atomic_inc(&call_data->finished);
> +	}
> +
> +	func(info);
> +
> +	irq_exit();
> +
>  	if (call_data->wait) {
>  		/* let initiator proceed only after completion */
> -		func(info);
> -		atomic_inc(&call_data->finished);
> -	} else {
> -		/* let initiator proceed after getting data */
>  		atomic_inc(&call_data->finished);
> -		func(info);
>  	}
>  }


FWIW I do think this is a valid 'bug' fix in that the called user func()
can now see its from interrupt context. in_interrupt() would have
reported false due to the missing irq_enter()/irq_exit() - not sure if
any smp_call_function() relies on it though.



--
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