Description of problem: The new version of ia32-el does not set "current->personality" to PER_LINUX32. Our 64-bit kernel modules rely on this to determine whether the calling process is 32-bit or 64-bit. This was getting set in earlier RHEL4 drops. Version-Release number of selected component (if applicable): ia32el-1.1-8.ia64.rpm How reproducible: Very. Steps to Reproduce: 1. build a 32-bit app that calls an ioctl into a 64-bit kernel module. 2. run the 32-bit app on IA64 using the ia32EL. 3. check inside the kernel that current->personality is not set to PER_LINUX32. Actual results: current->personality is not set. Expected results: current->personality = PER_LINUX32 for 32-bit calling processes. Additional info: Is this a bug, or an intended change. If intended, what will be the new method for determining whether the calling process is 32-bit or 64-bit? Ideally, we'd like this to be the same across all 64-bit platforms (ie: on x86_64 we also check current->personality).
I doubt ia32el calling personality (PER_LINUX32) will make any difference on RHEL4 - as the kernel is compiled without CONFIG_IA32_SUPPORT, that personality is simply not registered, so likely the syscall will fail. I believe the right solution would be to add an interface for external ioctl/syscall translation modules to ia32el and let say Veritas build/ship an ia32el module that would do the translation. How should Veritas test for 32-bit process is a question for the kernel team, but testing PER_LINUX32 sounds wrong, one can change the personality. On x86-64, the right way is IMHO test_thread_flag(TIF_IA32). On IA-64 with ia32el, this is very questionable, as the process is really 64-bit, not 32-bit.
*** Bug 139698 has been marked as a duplicate of this bug. ***
*** Bug 139567 has been marked as a duplicate of this bug. ***
I also expected that a "personality(PER_LINUX32)" call would fail on RHEL4 ... but I tried it and it works just fine. So this does provide a simple and convenient way for ia32-el to leave a footprint that an in-kernel module can test to determine how to interpret the format of a binary structure passed between usermode and kernel. Ia32-el can't make the conversion ... it has no idea what the structures look like. A plug-in interface sounds complex/cumbersome (some sort of extra shared libraries that ia32-el would load if they are present, and then feed all ioctl's through??)
I was wrong, personality (PER_LINUX32) in ia32el-1.1-11 succeeds (the difference from CONFIG_IA32_SUPPORT times is just that this call doesn't change exec domain and therefore doesn't change e.g. altroot). So I guess checking current->personality == PER_LINUX32 is something that Veritas can use in their module.