The check against lastcomm is racy, and the message it produces isn't
necessary. vm86 support can be disabled on a 32-bit kernel also, and
doesn't have this message. Switch to sys_ni_syscall instead.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/ia32/sys_ia32.c | 14
compat_ni_syscall() does the same thing as sys_ni_syscall().
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/ia32/Makefile | 2 +-
arch/x86/ia32/nosyscall.c| 7 ---
arch/x86/ia32/syscall_ia32.c | 4 ++--
3 files changed, 3 insertions(+), 10 deletions(-)
delete mode
Combine the 32-bit syscall tables into one file.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/ia32/Makefile | 1 -
arch/x86/ia32/syscall_ia32.c | 25 -
arch/x86/kernel/Makefile | 1 +
arch/x86/kernel/syscall_32.c | 16
4 files
The ia32/ subdirectory is only entered if CONFIG_IA32_EMULATION is
set. There is no need to depend on it in ia32/Makefile.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/ia32/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/ia32/Makefile b/arch
On Thu, Feb 26, 2015 at 10:32 AM, Andy Lutomirski l...@amacapital.net wrote:
On Tue, Feb 24, 2015 at 7:23 PM, Brian Gerst brge...@gmail.com wrote:
On Tue, Feb 24, 2015 at 3:08 PM, Denys Vlasenko
vda.li...@googlemail.com wrote:
On Tue, Feb 24, 2015 at 9:02 PM, Andy Lutomirski l
a kernel
entry (with a few exceptions, like signals). If the test is failing,
then it is a different issue from what this patch addresses.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo
but does
support sysret to compatibility mode.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org
, the processor
zero-extends the 16-bit selector to 64 bits.
So I think it's safe to assume zero-extension on 64-bit, but not 32-bit.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info
the opportunistic
check for those cases (ptrace, audit, exec, sigreturn, etc.), and skip
it for interrupts.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Thu, Apr 2, 2015 at 11:20 AM, Denys Vlasenko dvlas...@redhat.com wrote:
On 04/02/2015 05:01 PM, Brian Gerst wrote:
On Thu, Apr 2, 2015 at 10:36 AM, Denys Vlasenko dvlas...@redhat.com wrote:
stub_sigreturn ignores old values of pt_regs-REG for all general-purpose
registers, it sets them
of exposure so far. It only affects AMD cpus, and
it was just merged. Wine is probably the most common 32-bit app
people will run on a 64-bit kernel. I'll test something other than
Wine that is 32-bit when I get home tonight.
--
Brian Gerst
--
To unsubscribe from this list: send the line
impacting 64-bit processes
at all.
It works with Wine. Tested on an AMD Phenom II.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please
on interrupt
entry if it's NULL.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Tue, Apr 21, 2015 at 12:03 PM, Denys Vlasenko dvlas...@redhat.com wrote:
Siggested by Brian Gerst.
Suggested
Run-tested.
Signed-off-by: Denys Vlasenko dvlas...@redhat.com
CC: Linus Torvalds torva...@linux-foundation.org
CC: Steven Rostedt rost...@goodmis.org
CC: Ingo Molnar mi
On Fri, Apr 24, 2015 at 1:41 PM, Linus Torvalds
torva...@linux-foundation.org wrote:
On Fri, Apr 24, 2015 at 10:33 AM, Brian Gerst brge...@gmail.com wrote:
To clarify, I was thinking of the CONFIG_PREEMPT case. A nested
interrupt wouldn't change SS, and IST interrupts can't schedule.
It has
On Fri, Apr 24, 2015 at 12:25 PM, Linus Torvalds
torva...@linux-foundation.org wrote:
On Fri, Apr 24, 2015 at 5:00 AM, Brian Gerst brge...@gmail.com wrote:
So actually this isn't a preemption issue, as the NULL SS is coming
from an interrupt from userspace (timer tick, etc
state left by
sysretl. Unfortunately we may have to put it back in, and then NOP it
out on Intel.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
and cannot
reproduce it there. Note that on Intel CPUs, we use the sysenter VDSO
but return with sysret.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Thu, Apr 23, 2015 at 5:20 AM, Denys Vlasenko dvlas...@redhat.com wrote:
On 04/23/2015 09:37 AM, Brian Gerst wrote:
On Tue, Mar 31, 2015 at 8:38 AM, tip-bot for Denys Vlasenko
tip...@zytor.com wrote:
Commit-ID: e7d6eefaaa443130079d73cd05039d90b3db7a4a
Gitweb:
http://git.kernel.org
On Thu, Apr 23, 2015 at 7:46 AM, Denys Vlasenko dvlas...@redhat.com wrote:
On 04/23/2015 01:28 PM, Brian Gerst wrote:
Looking at the error message:
Unhandled exception: stack overflow in 32-bit code (0xf779bc07).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:f779bc07
could revert it.
--Andy
Another alternative is to do the canonical check in the paths that can
set user RIP with an untrusted value, ie, sigreturn and exec.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
The invalidate_interrupt* functions no longer exist.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/hw_irq.h | 35 ---
1 file changed, 35 deletions(-)
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index e9571dd
Move irq_regs and irq_stat definitions to irq.c.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/irq.c| 6 ++
arch/x86/kernel/irq_32.c | 6 --
arch/x86/kernel/irq_64.c | 6 --
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/irq.c b
Since the ISA irqs are in a single block, use ISA_IRQ_VECTOR(irq)
instead of individual macros.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/irq_vectors.h | 18 +-
arch/x86/kernel/apic/io_apic.c | 4 ++--
arch/x86/kernel/apic/vector.c | 2
The following are a few simple cleanups to the x86 IRQ code.
arch/x86/include/asm/hw_irq.h | 35 ---
arch/x86/include/asm/irq_vectors.h | 21 +
arch/x86/kernel/apic/io_apic.c | 4 ++--
arch/x86/kernel/apic/vector.c | 2 +-
Use IA32_SYSCALL_VECTOR for both compat and native.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/irq_vectors.h | 3 ---
arch/x86/kernel/traps.c| 4 ++--
arch/x86/lguest/boot.c | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git
is to do the trimming in get_model_name(). It already trims
leading spaces for Intel.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please
Merge common values for 32-bit native and compat.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/asm-offsets.c| 19 +++
arch/x86/kernel/asm-offsets_32.c | 15 ---
arch/x86/kernel/asm-offsets_64.c | 21 -
3 files changed, 19
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/asm-offsets_32.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index 628bfd4c..6ce3902 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel
of these are supported on x86-64. The first two are for embedded
MMU-less systems. a.out is only supported for a few old arches
(x86-32, alpha, m68k). ia32_aout.c does explicitly clear the extra
registers.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
On Mon, Apr 6, 2015 at 3:03 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
I'm wondering what the original reason for adding the extra
handling of regs-ax was. Maybe something changed regs-ax - but I
cannot find such code path anymore.
It would be nice
to restore all registers on return.
* This cannot be done with SYSRET, so use the IRET return path instead.
The X32 and IA32 stubs are now identical and should be merged.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
The pax argument is unnecesary. Instead, store the RAX value directly
in regs.
Signed-off-by: Brian Gerst brge...@gmail.com
Cc: Ingo Molnar mi...@kernel.org
Cc: H. Peter Anvin h...@zytor.com
Cc: Andy Lutomirski l...@amacapital.net
Cc: Denys Vlasenko dvlas...@redhat.com
Cc: Linus Torvalds torva
On Sat, Apr 4, 2015 at 10:14 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
The pax argument is unnecesary. Instead, store the RAX value directly
in regs.
Signed-off-by: Brian Gerst brge...@gmail.com
Cc: Ingo Molnar mi...@kernel.org
Cc: H. Peter Anvin h
the syscall will not return there and
will go off into the weeds.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http
On Sat, Apr 4, 2015 at 10:14 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
The pax argument is unnecesary. Instead, store the RAX value directly
in regs.
Signed-off-by: Brian Gerst brge...@gmail.com
Cc: Ingo Molnar mi...@kernel.org
Cc: H. Peter Anvin h
dave.han...@linux.intel.com
Cc: Igor Mammedov imamm...@redhat.com
Cc: Fenghua Yu fenghua...@intel.com
Cc: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/cpu/common.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch
# 64-bit binaries on 64-bit kernels
entry_64_compat_32.S # 32-bit binaries on 64-bit kernels
That's too long. How about just merging it into entry_64.S? That
could also allow moving some of the obscure macros from calling.h into
entry_64.S where they are more visible.
--
Brian Gerst
On Mon, Jun 8, 2015 at 3:25 PM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c
index 3777189..e398d03 100644
--- a/arch/x86/entry/syscall_32.c
+++ b/arch/x86/entry/syscall_32.c
@@ -10,7
__NR_ia32_syscall_max __NR_syscall_max
+#define __NR_entry_INT80_compat_max __NR_syscall_max
#endif
This change doesn't look intended. __NR_ia32_syscall_max is used by
all compat entry points, not just INT80,
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
(or CONFIG_COMPAT_X86_32) as a new name.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Mon, Jun 22, 2015 at 12:19 PM, Andy Lutomirski l...@amacapital.net wrote:
On Mon, Jun 22, 2015 at 4:55 AM, Brian Gerst brge...@gmail.com wrote:
Change this to CONFIG_COMPAT so both 32-bit compat and x32 will do the
check.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/entry
ia32.h should only contain the code for 32-bit compatability.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/ia32.h | 9 -
arch/x86/include/asm/sigframe.h | 10 ++
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/x86/include/asm
x32 does not need ARCH_WANT_OLD_COMPAT_IPC.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c4f27a8..94afa69 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
This function is shared between the 32-bit compat and x32 ABIs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/elf.h | 4 ++--
arch/x86/kernel/process_64.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/elf.h b/arch/x86
The x32 ABI is now independent of the ia32 compat ABI. Common code is
now conditional on CONFIG_COMPAT, but unshared code like syscall entry,
signal handling, and the VDSO are under separate config options.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/Kconfig | 2 +-
1 file changed
Merge the 32-bit compat config setting for HAVE_UID16 with the 32-bit
native one.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 94afa69..9236bed 100644
--- a/arch
TIF_ADDR32 is set for both ia32 and x32 tasks, so change from
CONFIG_IA32_EMULATION to CONFIG_COMPAT. Use config_enabled()
to make the function more readable.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/elf.h | 11 +++
1 file changed, 3 insertions(+), 8
Move the ia32-specific code in compat_arch_ptrace() into its
own function.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/ptrace.c | 138 +--
1 file changed, 74 insertions(+), 64 deletions(-)
diff --git a/arch/x86/kernel/ptrace.c b
perf_callchain_user32() is not needed for x32.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/cpu/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 5801a14..1924fad 100644
Build the 32-bit vdso only for native 32-bit or 32-bit compat is
enabled. x32 should not force it to build.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/entry/vdso/Makefile | 6 +++---
arch/x86/entry/vdso/vma.c| 7 +--
arch/x86/include/asm/elf.h | 2 +-
3 files changed, 9
Change this to CONFIG_COMPAT so both 32-bit compat and x32 will do the
check.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/entry/vsyscall/vsyscall_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c
b/arch/x86/entry
Including sys_ia32.h is not needed in signal.c.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/signal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 206996c..6c22aad 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch
copy_siginfo_to_user32() and copy_siginfo_from_user32() are used by
both the 32-bit compat and x32 ABIs. Move them to signal_compat.c.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/ia32/ia32_signal.c | 93
arch/x86/kernel/Makefile
This patch series makes it possible to enable the X32 ABI support
without the dependency on 32-bit compatability. Code that is shared
between X32 and 32-bit compat is marked with CONFIG_COMPAT, but
non-shared code like syscall entries, signal handling, and the
VDSO are kept under separate config
/bace7117d3fb59a6ed7ea1aa6c8994df6a28a72a
Author: Ingo Molnar mi...@kernel.org
AuthorDate: Mon, 8 Jun 2015 21:20:26 +0200
Committer: Ingo Molnar mi...@kernel.org
CommitDate: Mon, 8 Jun 2015 23:43:38 +0200
x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to
__NR_syscall_compat_max
Brian Gerst noticed
On Thu, Jun 18, 2015 at 5:13 PM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
The original one wasn't really a misnomer, as it referred to the ia32
system
calls specifically, but this works too.
It was a misnomer, because what are the 'ia32 system calls
unrestricted read access to all MSRs is wrong. Some MSRs
contain addresses of kernel data structures, which can be used in
security exploits.
The proper way to do this is to write a driver to only expose the MSRs
that the user tools need, and nothing else.
--
Brian Gerst
--
To unsubscribe from
On Sat, Jun 13, 2015 at 2:23 PM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 13, 2015 at 12:03 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
On Fri, Jun 12, 2015 at 4:36 AM, Ingo Molnar mi...@kernel.org wrote:
* H. Peter Anvin h...@zytor.com
we are in
the kernel, fs is fixed at __KERNEL_PERCPU, and gs is either
__KERNEL_STACK_CANARY or user's gs.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Wed, Jul 29, 2015 at 11:50 AM, Andy Lutomirski l...@amacapital.net wrote:
On Tue, Jul 28, 2015 at 10:41 PM, Brian Gerst brge...@gmail.com wrote:
Change to use the normal pt_regs area to enter and exit vm86 mode. This is
done by increasing the padding at the top of the stack to make room
On Wed, Jul 29, 2015 at 1:16 PM, Linus Torvalds
torva...@linux-foundation.org wrote:
On Wed, Jul 29, 2015 at 10:14 AM, Brian Gerst brge...@gmail.com wrote:
I think it was causing signal handling to fail, but I can't remember
exactly.
Ugh.
If that hunk made a difference
On Fri, Jul 31, 2015 at 9:50 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
On Fri, Jul 31, 2015 at 4:57 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
Allow disabling hardware interrupt support for vm86.
Signed-off
: ‘CPU_586’ undeclared (first use in
this function)
due to the include file changes.
I fixed this up too.
Thanks,
Ingo
I'll admit that I forgot to test the 64-bit build, but the SCSI
driver... WTF is it doing with the cpu type?
--
Brian Gerst
--
To unsubscribe from this list: send
On Fri, Jul 31, 2015 at 4:57 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
Allow disabling hardware interrupt support for vm86.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/Kconfig | 8
arch/x86/include/asm
On Fri, Jul 31, 2015 at 10:04 AM, tip-bot for Brian Gerst
tip...@zytor.com wrote:
Commit-ID: ba3e127ec105e790eeec4034d9769e018e4a1b54
Gitweb: http://git.kernel.org/tip/ba3e127ec105e790eeec4034d9769e018e4a1b54
Author: Brian Gerst brge...@gmail.com
AuthorDate: Wed, 29 Jul 2015 01:41:21
opcode map with no explanation at
all.
Thanks, CPU vendors.
--Andy
Some Windows programs (running in Wine) use this opcode for
anti-debugging code. See commit
a1e80fafc9f0742a1776a0490258cb64912411b0.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
vm86.h was being implicitly included in alot of places via processor.h, which
in turn got it from math_emu.h. Break that chain and explicitly include vm86.h
in all files that need it. Also remove unused vm86 field from math_emu_info.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86
The goal of this set of patches is to change vm86 support to return to
userspace with the normal exit paths instead of leaving data on the kernel
stack and jumping directly into the exit asm routines. This fixes issues
like ptrace and syscall auditing not working with vm86, and makes possible
Allocate a separate structure for the vm86 fields.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/processor.h | 11 +++---
arch/x86/include/asm/vm86.h | 19 -
arch/x86/kernel/process.c| 3 +++
arch/x86/kernel/vm86_32.c| 46
Make it clearer that this is the pointer to the userspace vm86 state area.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 2 +-
arch/x86/kernel/vm86_32.c | 70 +++--
2 files changed, 37 insertions(+), 35 deletions
to
32-bit mode does the reverse. This allows removing the hacks to jump directly
into the exit asm code due to having to change the stack pointer. Returning
normally from the vm86 syscall and the exception handlers allows things like
ptrace and auditing to work properly.
Signed-off-by: Brian
Now there is no vm86-specific data left on the kernel stack while in
userspace, except for the 32-bit regs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 25 +---
arch/x86/kernel/vm86_32.c | 95 +++--
2 files
Allow disabling hardware interrupt support for vm86.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/Kconfig | 8
arch/x86/include/asm/irq_vectors.h | 10 --
arch/x86/include/asm/vm86.h| 20 ++--
arch/x86/kernel/vm86_32.c
Move the non-regs fields to the off-stack data.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 16
arch/x86/kernel/vm86_32.c | 42 ++
2 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/arch
Rename v86flags to veflags, and v86mask to veflags_mask.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 4 ++--
arch/x86/kernel/vm86_32.c | 20 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/vm86.h b
, at least how it is currently set
up. 16-bit support is only in the 32-bit build. The 64-bit build
only supports Win64 apps, and will call the 32-bit version (installed
in parallel) to run 32 and 16-bit apps.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
On Tue, Jul 21, 2015 at 3:11 AM, Ingo Molnar mi...@kernel.org wrote:
* Brian Gerst brge...@gmail.com wrote:
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -110,6 +110,13 @@ void exit_thread(void)
kfree(bp);
}
+#ifdef CONFIG_VM86
+ if (t-vm86
if the LDT is
reallocated, but on every update seems unnecessary.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ
On Tue, Jul 21, 2015 at 10:12 PM, Andy Lutomirski l...@amacapital.net wrote:
On Tue, Jul 21, 2015 at 7:01 PM, Brian Gerst brge...@gmail.com wrote:
On Tue, Jul 21, 2015 at 3:59 PM, Andy Lutomirski l...@kernel.org wrote:
modify_ldt has questionable locking and does not synchronize
threads
On Tue, Jul 21, 2015 at 4:34 PM, Andy Lutomirski l...@amacapital.net wrote:
On Tue, Jul 21, 2015 at 1:28 PM, Brian Gerst brge...@gmail.com wrote:
On Tue, Jul 21, 2015 at 3:59 PM, Andy Lutomirski l...@kernel.org wrote:
The modify_ldt syscall exposes a large attack surface and is
unnecessary
still uses the LDT for thread-local data, even for 32
and 64-bit programs. This is separate from the Linux runtime TLS.
--
Brian Gerst
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
it? Another option
would be to remove the _safe from the 32-bit version.
There is an erratum with SEP being advertised but not available on
early P6 models, but we already check for that in the cpu setup code.
There shouldn't be a problem with a fault.
--
Brian Gerst
--
To unsubscribe from
On Thu, Jul 23, 2015 at 2:56 PM, Andy Lutomirski l...@kernel.org wrote:
native_load_sp0 relies on this. I'm not sure why we haven't seen
reports of crashes. Maybe no one tests new kernels on non-SEP CPUs.
It's already statically initialized in cpu_tss.
--
Brian Gerst
--
To unsubscribe from
Allocate a separate structure for the vm86 fields.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/processor.h | 12 ++
arch/x86/include/asm/vm86.h | 11 +
arch/x86/kernel/process.c| 7 ++
arch/x86/kernel/vm86_32.c| 51
Move the userspace accesses down into the common function in
preparation for the next set of patches.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/processor.h | 2 +-
arch/x86/kernel/vm86_32.c| 176 +++
2 files changed, 89
Move the non-regs fields to the off-stack data.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 16
arch/x86/kernel/vm86_32.c | 40 +---
2 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/arch/x86
Now there is no vm86-specific data left on the kernel stack while in
userspace, except for the 32-bit regs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 25 +
arch/x86/kernel/vm86_32.c | 91 +++--
2 files
There is no legitimate reason for usermode to modify the orig_ax field on
entry to vm86 mode, so copy it from the 32-bit regs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/vm86_32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86
to
32-bit mode does the reverse. This allows removing the hacks to jump directly
into the exit asm code due to having to change the stack pointer. Returning
normally from the vm86 syscall and the exception handlers allows things like
ptrace and auditing to work properly.
Signed-off-by: Brian
The goal of this set of patches is to change vm86 support to return to
userspace with the normal exit paths instead of leaving data on the kernel
stack and jumping directly into the exit asm routines. This fixes issues
like ptrace and syscall auditing not working with vm86, and makes possible
There is no need to save FS and non-lazy GS outside the 32-bit regs. Lazy GS
still needs to be saved because it wasn't saved on syscall entry.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/processor.h | 3 ++-
arch/x86/kernel/vm86_32.c| 6 ++
2 files changed
On Thu, Jul 16, 2015 at 11:45 AM, Andy Lutomirski l...@amacapital.net wrote:
On Thu, Jul 16, 2015 at 4:46 AM, Brian Gerst brge...@gmail.com wrote:
There is no need to save FS and non-lazy GS outside the 32-bit regs. Lazy GS
still needs to be saved because it wasn't saved on syscall entry.
I
On Thu, Jul 16, 2015 at 11:42 AM, Andy Lutomirski l...@amacapital.net wrote:
On Thu, Jul 16, 2015 at 4:46 AM, Brian Gerst brge...@gmail.com wrote:
Move the userspace accesses down into the common function in
preparation for the next set of patches.
Nice!
Could you improve the changelog
to
32-bit mode does the reverse. This allows removing the hacks to jump directly
into the exit asm code due to having to change the stack pointer. Returning
normally from the vm86 syscall and the exception handlers allows things like
ptrace and auditing to work properly.
Signed-off-by: Brian
Now there is no vm86-specific data left on the kernel stack while in
userspace, except for the 32-bit regs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 25 +---
arch/x86/kernel/vm86_32.c | 93 +++--
2 files
Move the non-regs fields to the off-stack data.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm/vm86.h | 16
arch/x86/kernel/vm86_32.c | 42 ++
2 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/arch
The goal of this set of patches is to change vm86 support to return to
userspace with the normal exit paths instead of leaving data on the kernel
stack and jumping directly into the exit asm routines. This fixes issues
like ptrace and syscall auditing not working with vm86, and makes possible
There is no legitimate reason for usermode to modify the orig_ax field on
entry to vm86 mode, so copy it from the 32-bit regs.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/kernel/vm86_32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86
Move the userspace accesses down into the common function in preparation for
the next set of patches. Also change to copying the fields explicitly instead
of assuming a fixed order in pt_regs and the kernel data structures.
Signed-off-by: Brian Gerst brge...@gmail.com
---
arch/x86/include/asm
201 - 300 of 1225 matches
Mail list logo