From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbcABWlE (ORCPT ); Sat, 2 Jan 2016 17:41:04 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51240 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbcABWlB (ORCPT ); Sat, 2 Jan 2016 17:41:01 -0500 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Sudip Mukherjee , gregkh@linuxfoundation.org, broonie@kernel.org, Bamvor Jian Zhang , linux-kernel@vger.kernel.org Subject: Re: [Y2038] [PATCH v2 2/2] ppdev: add support for compat ioctl Date: Sat, 02 Jan 2016 23:40:51 +0100 Message-ID: <5335761.T8zu0iijAy@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160102062929.GA10432@sudip-pc> References: <1450346332-31830-1-git-send-email-bamvor.zhangjian@linaro.org> <9555229.aJQNyGf9cL@wuerfel> <20160102062929.GA10432@sudip-pc> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:4OLZpg5Gr8io2ysXHNRI8gLC44vZY5Yitae0l7tvxgVxNoNbnGg 4mntt3dZzEate1A3AEHiP2jFbQMQcQhoIIDuoP8PoJaRh0PAuMv2jfZUI/dX/w04klpg6ZU emv1ZPIUFOzSZqJl7ZR3Aa2L9/IgkiYgmwUtxk/06lZ/IT0IN5wuig/iqNXJE21M5qDJSRK Inm/H6H8ELh4TMjZOhP0A== X-UI-Out-Filterresults: notjunk:1;V01:K0:aueU6P305Wk=:PvKO/zb6P8MaFydKZOUpce E7pGvpzGxufc8ZebMR+93yn742LPYE2TdebLA7IhZQYrE1NVBG9gnGAHBVzlzq4KGq8JKGZwo mHLFnDxCVF8UHT5JZyIYkVmdpKluwNJtv2DJ6ioJHPZUz0lPO4kL4RQv+bb6wwUiXyBUH/kLG xI8lrc64oj4KJmnQZ/JQewpVJ4/cvxcXQAi6OKGYgdrm6muJ4d2Q4Mo7UpD68XDlrMhpEvsRJ z1Uim4I7PuNbAqBg42R8EbVCXWUYzCJ5e99vIFVLpEO0bArxZzy5NmiXmBE9aKhfgHrXrZEdw 6id3LMxZ55aVKXprZivCexX/6v/gXF0r1bAhNXGZ3siUCT8+jCMMPCBVHJuDnWPcU9WGWTSLW K4qKyqeDHRkttc22RREf3UsoosZzDgoiVtUnrnargVf64qPoD4JOavvuhuCJYDFJdXz+8KD1n nZhFM2JnCK4GyEhw2qRdqvRttTYdJItW/tytF87t9Sf8EFVeOUAIxq5kaTO87c6NubYhT7+QW YuIPJlnIYFTTtpouz9p0SpiTUy2qqPQ1WaIG/Kg+emGb3FISoik+kuxrXtOcv38CFjYLBxuZt /ey/pvGPCUQSUBAsjwYT9Xm/88l4KfoUS0ORQ+C9eNeFxQVQMQ8Y8r/YZNc/enOP+0lAG5/JH nvGT0zHSn9AkDDmRc31Rx6fUNzfVova5R3P8cQpnmYfjOKa0ABisI3zWw/R2ItRF4WM94bGPK yg5EEG6r6tRsde1E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 02 January 2016 11:59:29 Sudip Mukherjee wrote: > > > > Just to be sure we are talking about the same thing: you mean running a 64-bit > > kernel in a kvm guest with a 32-bit file system, right? Running a 32-bit > > kvm guest on a 64-bit host would not be interesting of course. > > The kvm (actually qemu, started from virt-manager with -enable-kvm) that > I just configured shows the following: > > lscpu shows: > > Architecture: i686 > CPU op-mode(s): 32-bit, 64-bit > Byte Order: Little Endian > CPU(s): 1 > On-line CPU(s) list: 0 > Thread(s) per core: 1 > Core(s) per socket: 1 > Socket(s): 1 > Vendor ID: GenuineIntel > CPU family: 6 > Model: 6 > Stepping: 3 > CPU MHz: 2993.200 > BogoMIPS: 5986.40 > Virtualization: VT-x > Hypervisor vendor: KVM > Virtualization type: full > L1d cache: 32K > L1i cache: 32K > L2 cache: 4096K > > uname -i shows: > i686 > > > Will it be ok to test in this one? If 'uname -i' reports i686, that usually means you have configured the kernel for 32-bit. Try rebuilding the kernel with 'CONFIG_64BIT' and 'CONFIG_IA32_EMULATION' enabled to test that the 32-bit user space now also works under a 64-bit kernel. That reminds me, we should now remove the code from fs/compat_ioctl.c that was handling emulating the other ioctl commands, the new .compat_ioctl callback in ppdev takes care of that along with the PPGETTIME/PPSETTIME calls, see below Arnd diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index dcf26537c935..e65e7d932566 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -1019,28 +1019,6 @@ COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS) /* PPPOX */ COMPATIBLE_IOCTL(PPPOEIOCSFWD) COMPATIBLE_IOCTL(PPPOEIOCDFWD) -/* ppdev */ -COMPATIBLE_IOCTL(PPSETMODE) -COMPATIBLE_IOCTL(PPRSTATUS) -COMPATIBLE_IOCTL(PPRCONTROL) -COMPATIBLE_IOCTL(PPWCONTROL) -COMPATIBLE_IOCTL(PPFCONTROL) -COMPATIBLE_IOCTL(PPRDATA) -COMPATIBLE_IOCTL(PPWDATA) -COMPATIBLE_IOCTL(PPCLAIM) -COMPATIBLE_IOCTL(PPRELEASE) -COMPATIBLE_IOCTL(PPYIELD) -COMPATIBLE_IOCTL(PPEXCL) -COMPATIBLE_IOCTL(PPDATADIR) -COMPATIBLE_IOCTL(PPNEGOT) -COMPATIBLE_IOCTL(PPWCTLONIRQ) -COMPATIBLE_IOCTL(PPCLRIRQ) -COMPATIBLE_IOCTL(PPSETPHASE) -COMPATIBLE_IOCTL(PPGETMODES) -COMPATIBLE_IOCTL(PPGETMODE) -COMPATIBLE_IOCTL(PPGETPHASE) -COMPATIBLE_IOCTL(PPGETFLAGS) -COMPATIBLE_IOCTL(PPSETFLAGS) /* Big A */ /* sparc only */ /* Big Q for sound/OSS */