[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171015065851.GB3916@xo-6d-61-c0.localdomain>
Date: Sun, 15 Oct 2017 08:58:51 +0200
From: Pavel Machek <pavel@....cz>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Kyle Huey <me@...ehuey.com>,
open list <linux-kernel@...r.kernel.org>,
Robert O'Callahan <robert@...llahan.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [git pull] vfs.git regression fix Re: Regression related to ipc
shmctl compat
On Tue 2017-09-26 02:00:36, Al Viro wrote:
> 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 *...
up is quite short and not-specific for global symbol. Rename to mutex_up?
Pavel
Powered by blists - more mailing lists