[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f449e01-3207-b699-b91f-d1c04626a447@windriver.com>
Date: Thu, 16 Apr 2020 16:40:31 +0800
From: He Zhe <zhe.he@...driver.com>
To: tony.luck@...el.com, bp@...en8.de, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, x86@...nel.org,
linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/mce: Add compat_ioctl assignment to make it
compatible with 32-bit system
Can this be considered for the moment?
Thanks,
Zhe
On 3/4/20 2:39 PM, zhe.he@...driver.com wrote:
> From: He Zhe <zhe.he@...driver.com>
>
> 32-bit user-space program would get errors like the following from ioctl
> syscall due to missing compat_ioctl.
> MCE_GET_RECORD_LEN: Inappropriate ioctl for device
>
> compat_ptr_ioctl is provided as a generic implementation of .compat_ioctl
> file operation to ioctl functions that either ignore the argument or pass
> a pointer to a compatible data type.
>
> Signed-off-by: He Zhe <zhe.he@...driver.com>
> ---
> arch/x86/kernel/cpu/mce/dev-mcelog.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c
> index 7c8958d..6c9b91b7 100644
> --- a/arch/x86/kernel/cpu/mce/dev-mcelog.c
> +++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c
> @@ -328,6 +328,7 @@ static const struct file_operations mce_chrdev_ops = {
> .write = mce_chrdev_write,
> .poll = mce_chrdev_poll,
> .unlocked_ioctl = mce_chrdev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = no_llseek,
> };
>
Powered by blists - more mailing lists