Messages in this thread | | | Date | Tue, 26 Sep 2017 02:00:36 +0100 | From | Al Viro <> | Subject | [git pull] vfs.git regression fix Re: Regression related to ipc shmctl compat |
| |
On Mon, Sep 25, 2017 at 03:18:29PM -0700, Kyle Huey wrote: > Beginning with 553f770ef71b, the following program fails when compiled > for 32 bit and executed on a 64 bit kernel and succeeds when compiled > for and executed on a 64 bit. It continues to fail even after > 58aff0af7573. When compiled as 32 bit, an shmctl call fails with > EBADR (see the XXX comment).
Egads...
static int put_compat_shm_info(struct shm_info *ip, struct compat_shm_info __user *uip) { struct compat_shm_info info;
memset(&info, 0, sizeof(info)); info.used_ids = ip->used_ids; info.shm_tot = ip->shm_tot; info.shm_rss = ip->shm_rss; info.shm_swp = ip->shm_swp; info.swap_attempts = ip->swap_attempts; info.swap_successes = ip->swap_successes; return copy_to_user(up, &info, sizeof(info)); ^^ This.
I really wish gcc warned about conversions from pointer to function into void *...
Linus, could you pull that?
The following changes since commit 58aff0af757356065f33290d96a9cd46dfbcae88:
ipc/shm: Fix order of parameters when calling copy_compat_shmid_to_user (2017-09-20 23:27:48 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus
for you to fetch changes up to b776e4b1a990045a7c70798f1f353c3160c26594:
fix a typo in put_compat_shm_info() (2017-09-25 20:41:46 -0400)
---------------------------------------------------------------- Al Viro (1): fix a typo in put_compat_shm_info()
ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
| |