Re: [PATCH] powerpc/security: Fix debugfs data leak on 32-bit

2019-11-14 Thread Michael Ellerman
On Mon, 2019-10-21 at 14:23:09 UTC, Geert Uytterhoeven wrote: > "powerpc_security_features" is "unsigned long", i.e. 32-bit or 64-bit, > depending on the platform (PPC_FSL_BOOK3E or PPC_BOOK3S_64). Hence > casting its address to "u64 *", and calling debugfs_create_x64() is > wrong, and leaks

[PATCH] powerpc/security: Fix debugfs data leak on 32-bit

2019-10-21 Thread Geert Uytterhoeven
"powerpc_security_features" is "unsigned long", i.e. 32-bit or 64-bit, depending on the platform (PPC_FSL_BOOK3E or PPC_BOOK3S_64). Hence casting its address to "u64 *", and calling debugfs_create_x64() is wrong, and leaks 32-bit of nearby data to userspace on 32-bit platforms. While all