Re: [PATCH] Compat signal fixes for 64-bit parisc.

Kyle McMartin <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
On Mon, Feb 12, 2007 at 09:14:28PM -0500, Carlos O'Donell wrote:
> @@ -505,17 +505,15 @@ asmlinkage long compat_sys_rt_sigqueuein
> 	struct compat_siginfo __user *uinfo)
> {
> 	siginfo_t info;
> +	int ret;
> +	mm_segment_t old_fs = get_fs();
> 
> 	if (copy_siginfo_from_user32(&info, uinfo))
> 		return -EFAULT;
> 
> -	/* Not even root can pretend to send signals from the kernel.
> -	   Nor can they impersonate a kill(), which adds source info.  */
> -	if (info.si_code >= 0)
> -		return -EPERM;
> -	info.si_signo = sig;
> -
> -	/* POSIX.1b doesn't mention process groups.  */
> -	return kill_proc_info(sig, &info, pid);
> +	set_fs (KERNEL_DS);
> +	ret = sys_rt_sigqueueinfo(pid, sig, &info);
> +	set_fs (old_fs);
> +	return ret;
> }
> 

Why? We replicate the code in sys_rt_sigqueueinfo here to avoid the nasty
set_fs/get_fs hacks. See my compat_sys_sysinfo changes for reference.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.