linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
@ 2020-03-04  6:39 zhe.he
  2020-04-16  8:40 ` He Zhe
  0 siblings, 1 reply; 9+ messages in thread
From: zhe.he @ 2020-03-04  6:39 UTC (permalink / raw)
  To: tony.luck, bp, tglx, mingo, hpa, x86, linux-edac, linux-kernel, zhe.he

From: He Zhe <zhe.he@windriver.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@windriver.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,
 };
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-20 19:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04  6:39 [PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system zhe.he
2020-04-16  8:40 ` He Zhe
2020-04-27 18:19   ` Luck, Tony
2020-05-02 14:18     ` He Zhe
     [not found]   ` <59d52031-f4e8-e754-c8b6-ca1130bf0cf1@EyeKnowHow.de>
2021-03-16 17:55     ` EDAC list as Trojan Horse distribution ?? Hermann Ruckerbauer
2021-03-16 18:03       ` Borislav Petkov
     [not found]         ` <3a2cbcf1-388c-4524-907d-0592438320fc@email.android.com>
2021-03-16 19:51           ` Luck, Tony
2021-03-18  8:58             ` Enrico Weigelt, metux IT consult
2021-03-20 19:22       ` Trojan horses on various lists was " Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).