lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201112091602.31325.arnd@arndb.de>
Date:	Fri, 9 Dec 2011 16:02:31 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	Chris Metcalf <cmetcalf@...era.com>
Cc:	linux-kernel@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"J. Bruce Fields" <bfields@...hat.com>, NeilBrown <neilb@...e.de>
Subject: Re: [PATCH] ipc: provide generic compat versions of IPC syscalls

On Friday 09 December 2011, Chris Metcalf wrote:
> 
> Several of the existing compat IPC syscalls are really just i386
> compatibility, not generic compatibility.  semctl() expects a
> pointer to the fourth argument, instead of the fourth argument itself.
> msgsnd(), msgrcv() and shmat() expect arguments in different order.
> 
> This change adds an __ARCH_WANT_GENERIC_COMPAT_IPC define that
> can be set in <asm/compat.h> to indicate that the IPC compat code
> should provide exactly the same APIs to "compat" users as the
> regular IPC code does to regular users.  In addition, it sets up
> to always request the IPC_64 mode, since that's what the <asm-generic>
> APIs always use.
> 
> The workaround code in "tile" for msgsnd() and msgrcv() is removed
> with this change; it fixes the bug that shmat() and semctl() were
> not also being properly converted to expect generic compat IPC.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@...era.com>

I like the patch, but I think the __ARCH_WANT_GENERIC_COMPAT_IPC
should be defined as the opposite, so all "old" architectures
have to set it while tile (and future architectures like arm64
and unicore64) just get the default.

> Finding the shmat/semctl bugs in tilegx finally motivated me to go and
> do the thing he suggested 18 months ago. :-)  Whether someone wants to
> go a step further and actually move the i386-ish versions into arch/x86
> I will leave to the x86 platform maintainers; I also don't know whether,
> perhaps, some other platforms are actually using the i386 convention.

I don't see them as x86 specific. We have powerpc, mips, s390, sparc and
x86 using the legacy method, while only parisc and tile get it right
and use the syscalls directly.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ