<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/tile/kernel/compat.c, branch v3.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-03-04T18:37:32Z</updated>
<entry>
<title>tile: properly use COMPAT_SYSCALL_DEFINEx</title>
<updated>2013-03-04T18:37:32Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2013-03-04T18:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87c319a2c3c2efd397281089b9cdce3050febeff'/>
<id>urn:sha1:87c319a2c3c2efd397281089b9cdce3050febeff</id>
<content type='text'>
This was pointed out by Al Viro.  Using the correct wrappers
properly does sign extension as necessary on syscall arguments.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>tile: work around bug in the generic sys_llseek</title>
<updated>2013-03-04T16:19:09Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2013-03-04T16:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a114b98661e3aaa0ac085eb931584dce3b0ef9b'/>
<id>urn:sha1:5a114b98661e3aaa0ac085eb931584dce3b0ef9b</id>
<content type='text'>
sys_llseek should specify the high and low 32-bit seek values as "unsigned
int" but instead it specifies "unsigned long".  Since compat syscall
arguments are always sign-extended on tile, this means that a seek value
of 0xffffffff will be incorrectly interpreted as a value of -1ULL.

To avoid the risk of breaking binary compatibility on architectures
that already use sys_llseek this way, we follow the same path as MIPS
and provide a wrapper override.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: stable@kernel.org [v3.6 onwards]
</content>
</entry>
<entry>
<title>compat: generic compat_sys_sched_rr_get_interval() implementation</title>
<updated>2012-12-18T01:15:18Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2012-12-18T00:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ad50c3896afbb3c103409a18260e601b87a744c'/>
<id>urn:sha1:0ad50c3896afbb3c103409a18260e601b87a744c</id>
<content type='text'>
This function is used by sparc, powerpc tile and arm64 for compat support.
 The patch adds a generic implementation with a wrapper for PowerPC to do
the u32-&gt;int sign extension.

The reason for a single patch covering powerpc, tile, sparc and arm64 is
to keep it bisectable, otherwise kernel building may fail with mismatched
function declarations.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;  [for tile]
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h</title>
<updated>2012-11-29T04:43:27Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-11-29T04:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24465a40ba452bd81fdc9eecb2d75bb903aafdf6'/>
<id>urn:sha1:24465a40ba452bd81fdc9eecb2d75bb903aafdf6</id>
<content type='text'>
now it can be done...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>arch/tile: eliminate pt_regs trampolines for syscalls</title>
<updated>2012-10-23T20:23:58Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2012-10-23T17:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b14e4198c729b748a7f6d22059e6a101d2b241a'/>
<id>urn:sha1:6b14e4198c729b748a7f6d22059e6a101d2b241a</id>
<content type='text'>
Using the new current_pt_regs() model, we can remove some trampolines
from assembly code and call directly to the C syscall implementations.
rt_sigreturn() and clone() still need some assembly wrapping, but no
longer are passed a pt_regs pointer.  sigaltstack() and the
tilepro-specific cmpxchg_badaddr() syscalls are now just straight C.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>Drop struct pt_regs * argument in compat_sys_execve()</title>
<updated>2012-10-20T17:13:11Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-10-20T17:13:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=733deca197143857f938b41d671cd7ce9c53c4bc'/>
<id>urn:sha1:733deca197143857f938b41d671cd7ce9c53c4bc</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[PATCH v3] ipc: provide generic compat versions of IPC syscalls</title>
<updated>2012-03-15T17:13:38Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2012-03-15T17:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48b25c43e6eebb6c0edf72935e8720385beca76b'/>
<id>urn:sha1:48b25c43e6eebb6c0edf72935e8720385beca76b</id>
<content type='text'>
When using the "compat" APIs, architectures will generally want to
be able to make direct syscalls to msgsnd(), shmctl(), etc., and
in the kernel we would want them to be handled directly by
compat_sys_xxx() functions, as is true for other compat syscalls.

However, for historical reasons, several of the existing compat IPC
syscalls do not do this.  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_OLD_COMPAT_IPC config option that can be
set to preserve this behavior for ports that use it (x86, sparc, powerpc,
s390, and mips).  No actual semantics are changed for those architectures,
and there is only a minimal amount of code refactoring in ipc/compat.c.

Newer architectures like tile (and perhaps future architectures such
as arm64 and unicore64) should not select this option, and thus can
avoid having any IPC-specific code at all in their architecture-specific
compat layer.  In the same vein, if this option is not selected, IPC_64
mode is assumed, since that's what the &lt;asm-generic&gt; headers expect.

The workaround code in "tile" for msgsnd() and msgrcv() is removed
with this change; it also fixes the bug that shmat() and semctl() were
not being properly handled.

Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: cleanups for tilegx compat mode</title>
<updated>2011-05-20T02:56:13Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2011-05-17T19:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=818d8462bb7c717706bcfe994258e2c3710d1fd0'/>
<id>urn:sha1:818d8462bb7c717706bcfe994258e2c3710d1fd0</id>
<content type='text'>
These changes make the syscall table line up correctly for
tilegx compat mode, and remove the stale sys32_fadvise64() function,
which isn't actually used by any syscall table.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>compat: fixes to allow working with tile arch</title>
<updated>2011-05-12T19:51:36Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2011-05-09T17:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be84cb43833ee40a42e08f5425d20310f16229c7'/>
<id>urn:sha1:be84cb43833ee40a42e08f5425d20310f16229c7</id>
<content type='text'>
The existing &lt;asm-generic/unistd.h&gt; mechanism doesn't really provide
enough to create the 64-bit "compat" ABI properly in a generic way,
since the compat ABI is a mix of things were you can re-use the 64-bit
versions of syscalls and things where you need a compat wrapper.

To provide this in the most direct way possible, I added two new macros
to go along with the existing __SYSCALL and __SC_3264 macros: __SC_COMP
and SC_COMP_3264.  These macros take an additional argument, typically a
"compat_sys_xxx" function, which is passed to __SYSCALL if you define
__SYSCALL_COMPAT when including the header, resulting in a pointer to
the compat function being placed in the generated syscall table.

The change also adds some missing definitions to &lt;linux/compat.h&gt; so that
it actually has declarations for all the compat syscalls, since the
"[nr] = ##call" approach requires proper C declarations for all the
functions included in the syscall table.

Finally, compat.c defines compat_sys_sigpending() and
compat_sys_sigprocmask() even if the underlying architecture doesn't
request it, which tries to pull in undefined compat_old_sigset_t defines.
We need to guard those compat syscall definitions with appropriate
__ARCH_WANT_SYS_xxx ifdefs.

Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>BKL: remove extraneous #include &lt;smp_lock.h&gt;</title>
<updated>2010-11-17T16:59:32Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-11-17T15:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=451a3c24b0135bce54542009b5fde43846c7cf67'/>
<id>urn:sha1:451a3c24b0135bce54542009b5fde43846c7cf67</id>
<content type='text'>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
