Re: [linux-yocto][linux-yocto-dev standard/base][PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
On Thu, May 21, 2020 at 1:44 AM He Zhe wrote: > > Could you please merge this? This has been accepted but not in mainline > master. > You need to be more specific .. I assume you mean to linux-yocto-dev, since it is already in the other kernel versions. I've cherry picked it from v5.4 and pushed the branches. Bruce > Thanks, > Zhe > > On 3/4/20 2:48 PM, He Zhe wrote: > > From: He Zhe > > > > 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. > > > > https://lore.kernel.org/lkml/1583303947-49858-1-git-send-email-zhe...@windriver.com/ > > > > Signed-off-by: He Zhe > > --- > > 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, > > }; > > > > > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8710): https://lists.yoctoproject.org/g/linux-yocto/message/8710 Mute This Topic: https://lists.yoctoproject.org/mt/74368714/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [linux-yocto][linux-yocto-dev standard/base][PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
Could you please merge this? This has been accepted but not in mainline master. Thanks, Zhe On 3/4/20 2:48 PM, He Zhe wrote: > From: He Zhe > > 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. > > https://lore.kernel.org/lkml/1583303947-49858-1-git-send-email-zhe...@windriver.com/ > > Signed-off-by: He Zhe > --- > 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, > }; > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8708): https://lists.yoctoproject.org/g/linux-yocto/message/8708 Mute This Topic: https://lists.yoctoproject.org/mt/74368714/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [linux-yocto][linux-yocto-dev standard/base][PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
In message: [linux-yocto][linux-yocto-dev standard/base][PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system on 04/03/2020 zhe...@windriver.com wrote: > From: He Zhe > > 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. > > https://lore.kernel.org/lkml/1583303947-49858-1-git-send-email-zhe...@windriver.com/ I've merged this to the latest -dev, and the v5.2/5.4 kernels as well. Let me know if I've missed a version you care about. Cheers, Bruce > > Signed-off-by: He Zhe > --- > 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 > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8478): https://lists.yoctoproject.org/g/linux-yocto/message/8478 Mute This Topic: https://lists.yoctoproject.org/mt/71720850/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [linux-yocto][linux-yocto-dev standard/base][PATCH] x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
I haven't forgotten about this. I'm doing merges on Wednesday, and will consider this for 5.4/5.5/5.6 Cheers, Bruce On Wed, Mar 4, 2020 at 1:49 AM wrote: > > From: He Zhe > > 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. > > https://lore.kernel.org/lkml/1583303947-49858-1-git-send-email-zhe...@windriver.com/ > > Signed-off-by: He Zhe > --- > 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 > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8462): https://lists.yoctoproject.org/g/linux-yocto/message/8462 Mute This Topic: https://lists.yoctoproject.org/mt/71720850/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-