- 06 3月, 2012 2 次提交
-
-
由 H. Peter Anvin 提交于
clock_t is used mainly to give the number of jiffies a certain process has burned. It is entirely feasible for a long-running process to consume more than 2^32 jiffies especially in a multiprocess system. As such, switch to a 64-bit clock_t for x32, just as we already switched to a 64-bit time_t. clock_t is only used in a handful of places, and as such it is really not a very significant change. The one that has the biggest impact is in struct siginfo, but since the *size* of struct siginfo doesn't change (it is padded to the hilt) it is fairly easy to make this a localized change. This also gets rid of sys_x32_times, however since this is a pretty late change don't compactify the system call numbers; we can reuse system call slot 521 next time we need an x32 system call. Reported-by: NGregory M. Lueck <gregory.m.lueck@intel.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/1329696488-16970-1-git-send-email-hpa@zytor.com
-
由 H. Peter Anvin 提交于
The is_compat_task() test is composed of two predicates already, so make each of them available separately. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/1329696488-16970-1-git-send-email-hpa@zytor.com
-
- 02 3月, 2012 1 次提交
-
-
由 H. Peter Anvin 提交于
Specify the data structures for the 64-bit ioctls with explicit sizing and padding so that the x32 kernel will correctly use the 64-bit forms of these ioctls. Note that these ioctls are bogus in both forms on both 32 and 64 bits; even on 64 bits the maximum MTRR size is only 44 bits long. Note that nothing really is supposed to use these ioctls and that the preferred interface is text strings on /proc/mtrr, or better yet, nothing at all (use /sys/bus/pci/devices/*/resource*_wc for write combining; that uses PAT not MTRRs.) Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com> Cc: H. J. Lu <hjl.tools@gmail.com> Tested-by: NNitin A. Kamble <nitin.a.kamble@intel.com> Link: http://lkml.kernel.org/n/tip-vwvnlu3hjmtkwvij4qxtm90l@git.kernel.orgSigned-off-by: NH. Peter Anvin <hpa@zytor.com>
-
- 28 2月, 2012 2 次提交
-
-
由 Ingo Molnar 提交于
Fix: arch/x86/Makefile:96: *** recipe commences before first target. Stop. Cc: H. Peter Anvin <hpa@linux.intel.com> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/1329696488-16970-1-git-send-email-hpa@zytor.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
-
由 H. Peter Anvin 提交于
If X32 is enabled in .config, but the binutils can't build it, issue a warning and disable the feature rather than erroring out. In order to support this, have CONFIG_X86_X32 be the option set in Kconfig, and CONFIG_X86_X32_ABI be the option set by the Makefile when it is enabled and binutils has been found to be functional. Requested-by: NIngo Molnar <mingo@elte.hu> Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/1329696488-16970-1-git-send-email-hpa@zytor.com
-
- 26 2月, 2012 3 次提交
-
-
由 H. Peter Anvin 提交于
-
由 Bobby Powers 提交于
Commits bb212724 and d1a797f3 both added a call to clear_thread_flag(TIF_X32) under set_personality_64bit() - only one is needed. Signed-off-by: NBobby Powers <bobbypowers@gmail.com> Link: http://lkml.kernel.org/r/1330228774-24223-1-git-send-email-bobbypowers@gmail.comSigned-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 Bobby Powers 提交于
If a process has a non-x32 ia32 personality and changes to x32, the process would keep its TS_COMPAT flag. x32 uses the presence of the x32 flag on a syscall to determine compat status, so make sure TS_COMPAT is cleared. Signed-off-by: NBobby Powers <bobbypowers@gmail.com> Link: http://lkml.kernel.org/r/1330230338-25077-1-git-send-email-bobbypowers@gmail.comSigned-off-by: NH. Peter Anvin <hpa@zytor.com>
-
- 24 2月, 2012 3 次提交
-
-
由 David Howells 提交于
Stephen Rothwell reported that the following commit broke the linux-next build: 1fd36adc: Replace the fd_sets in struct fdtable with an array of unsigned longs Fix places where ->fds_bits needed to be removed as the core kernel no longer uses fd_set internally for file descriptor table management. There are two places: (1) drivers/staging/android/binder.c (2) arch/mips/kernel/kspd.c Question: Should sp_cleanup() in the MIPS arch be using find_next_bit() or fls()? Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NDavid Howells <dhowells@redhat.com> cc: Ralf Bächle <ralf@linux-mips.org> cc: Arve Hjønnevåg <arve@android.com> Link: http://lkml.kernel.org/r/20120224105707.32170.11550.stgit@warthog.procyon.org.ukSigned-off-by: NIngo Molnar <mingo@elte.hu>
-
由 H. Peter Anvin 提交于
-
由 Bobby Powers 提交于
alloc_fdtable allocates space for the open_fds and close_on_exec bitfields together, as 2 * nr / BITS_PER_BYTE. close_on_exec needs to point to open_fds + nr / BITS_PER_BYTE, not open_fds + nr / BITS_PER_LONG, as introducted in 1fd36adc: Replace the fd_sets in struct fdtable with an array of unsigned longs. Signed-off-by: NBobby Powers <bobbypowers@gmail.com> Link: http://lkml.kernel.org/r/1329888587-3087-1-git-send-email-bobbypowers@gmail.comAcked-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
- 23 2月, 2012 1 次提交
-
-
由 H. Peter Anvin 提交于
Drop the legacy weak symbols that don't carry the __vdso prefix from the x32 VDSO. This is a new ABI and we don't need to support that legacy; the actual libc will export the proper symbols. Suggested-by: NAndy Lutomirski <luto@mit.edu> Link: http://lkml.kernel.org/r/4F42E171.9080005@mit.edu Cc: H. J. Lu <hjl.tools@gmail.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
- 22 2月, 2012 1 次提交
-
-
由 H. Peter Anvin 提交于
Move the prototype for x32_setup_additional_pages() to a header file, and adjust the coding style to match standard. Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com> Cc: H. J. Lu <hjl.tools@gmail.com>
-
- 21 2月, 2012 27 次提交
-
-
由 H. J. Lu 提交于
Add support for the x32 VDSO. The x32 VDSO takes advantage of the similarity between the x86-64 and the x32 ABIs to contain the same content, only the container is different, as the x32 VDSO obviously is an x32 shared object. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
At this point, one should be able to build an x32 kernel. Note that for now we depend on CONFIG_IA32_EMULATION. Long term, x32 and IA32 should be detangled. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
If CONFIG_X86_X32_ABI is defined, add the x32 system calls to the system call tables. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Allow an x32 process to be started. Originally-by: NH. J. Lu <hjl.tools@gmail.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
-
由 H. Peter Anvin 提交于
x32 uses the 64-bit signal frame format, obviously, but there are some structures which mixes that with pointers or sizeof(long) types, as such we have to create a handful of system calls specific to x32. By and large these are a mixture of the 64-bit and the compat system calls. Originally-by: NH. J. Lu <hjl.tools@gmail.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Unfortunately a lot of the compat types are guarded with CONFIG_COMPAT or the equivalent, so add a similar guard to <asm/sys_ia32.h> to avoid compilation failures when CONFIG_COMPAT=n. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
x32 shares most system calls with x86-64, but unfortunately some subsystem (the input subsystem is the chief offender) which require is_compat() when operating with a 32-bit userspace. The input system actually has text files in sysfs whose meaning is dependent on sizeof(long) in userspace! We could solve this by having two completely disjoint system call tables; requiring that each system call be duplicated. This patch takes a different approach: we add a flag to the system call number; this flag doesn't affect the system call dispatch but requests compat treatment from affected subsystems for the duration of the system call. The change of cmpq to cmpl is safe since it immediately follows the and. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Add rt_sigframe_x32 to <asm/sigframe.h>. Unfortunately we can't just define all the data structures unconditionally, due to the #ifdef CONFIG_COMPAT in <linux/compat.h> and its trickle-down effects, hence the #ifdef mess. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
Add a definition for struct ucontext_x32; this is inherently a mix of the 32- and 64-bit versions. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Export setup_sigcontext() and restore_sigcontext() from signal.c, so we can use the 64-bit versions verbatim for x32. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
There are some definitions which are duplicated between kernel/signal.c and ia32/ia32_signal.c; move them to a common header file. Rather than adding stuff to existing header files which contain data structures, create a new header file; hence the slightly odd name ("all the good ones were taken.") Note: nothing relied on signal_fault() being defined in <asm/ptrace.h>. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Generate macros for the *kernel* code to use to refer to x32 system calls. These have an __NR_x32_ prefix and do not include __X32_SYSCALL_BIT. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Generate <asm/unistd_x32.h>; this exports x32 system call numbers to user space. [ v2: Enclose all arguments to syshdr in '' so empty arguments aren't dropped on the floor. ] Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Split the 64-bit system calls into "64" (64-bit only) and "common" (64-bit or x32) and add the x32 system call numbers. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
On x86, the only difference between sys_rt_sigprocmask and sys32_rt_sigprocmask is the alignment of the data structures. However, x86 allows data accesses with arbitrary alignment, and therefore there is no reason for this code to be different. Reported-by: NGregory M. Lueck <gregory.m.lueck@intel.com> Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
An x32 process is *almost* the same thing as a 64-bit process with a 32-bit address limit, but there are a few minor differences -- in particular core dumps are 32 bits and signal handling is different. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
So far this has only been used in process_64.c, but the x32 code will need it in additional code. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
Allow some core dump-related fields to be overridden. This allows core dumps to work correctly for x32. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com>
-
由 H. J. Lu 提交于
For 32-bit ABIs which have real 64-bit registers, we don't want to break the position argument into two. However, we still need compat support to deal with 32-bit pointers, so we can't just use sys_p{read,write} directly. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. Peter Anvin 提交于
Rather than using "unsigned long" which is ABI-dependent, use __kernel_ulong_t to define the externally visible type aio_context_t. Note: the change in this form will cause unsigned long/unsigned int differences on existing ABIs. If that is unacceptable we may have to define a new type. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Benjamin LaHaise <bcrl@kvack.org>
-
由 H. Peter Anvin 提交于
Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
Handle 64-bit time structures in the networking core compat code. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: David S. Miller <davem@davemloft.net>
-
由 H. J. Lu 提交于
Enable the Bluetooth subsystem to be used with a compat ABI with 64-bit time. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo F. Padovan <padovan@profusion.mobi> Cc: David S. Miller <davem@davemloft.net>
-
由 H. J. Lu 提交于
Enable the input system to be used with a compat ABI with 64-bit time. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
由 H. Peter Anvin 提交于
Enable the lp driver to be used with a compat ABI with 64-bit time. Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <greg@kroah.com>
-
由 H. Peter Anvin 提交于
Add helper functions to read and write struct timeval and struct timespec from userspace. We already had helper functions for reading and writing struct compat_timespec; add a set of functions to do the same with struct timeval, and add a second suite of functions which can be sensitive to COMPAT_USE_64BIT_TIME and access either 32- or 64-bit time structures. This also exports these helper functions to modules. Rename the existing inlines for converting between struct compat_timeval and native struct timespec so we can have a saner naming convention for the exported functions. Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-
由 H. J. Lu 提交于
Allow a compatibility ABI to use a 64-bit time_t and 64-bit members in struct timeval and struct timespec to avoid the Y2038 problem. This will be used for the x32 ABI. Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
-