Re: [PATCH 00/18] Allow architectures to override __READ_ONCE()

2020-07-01 Thread Josh Triplett
On Tue, Jun 30, 2020 at 06:37:16PM +0100, Will Deacon wrote: > The patches allow architectures to provide their own implementation of > __READ_ONCE(). This serves two main purposes: > > 1. It finally allows us to remove [smp_]read_barrier_depends() from the > Linux memory model and make it

Re: [PATCH v4 10/10] x86: Support compiling out userspace IO (iopl and ioperm)

2014-11-03 Thread Josh Triplett
On Mon, Nov 03, 2014 at 12:10:49PM +, One Thousand Gnomes wrote: > On Sun, 2 Nov 2014 09:33:01 -0800 > Josh Triplett wrote: > > > On the vast majority of modern systems, no processes will use the > > userspsace IO syscalls, iopl and ioperm. Add a new config option, >

[PATCH v4 08/10] x86: process: Introduce helper for IO-related bits of exit_thread

2014-11-02 Thread Josh Triplett
This makes the two major functions of exit_thread (IO and FPU) more obvious, and will make it easier to make IO optional later. Signed-off-by: Josh Triplett --- arch/x86/kernel/process-io.h | 20 arch/x86/kernel/process.c| 20 +++- 2 files changed, 23

[PATCH v4 07/10] x86: process: Introduce helper to switch iopl mask

2014-11-02 Thread Josh Triplett
This simplifies __switch_to a bit, and will make it easier to make iopl optional later. Signed-off-by: Josh Triplett --- arch/x86/kernel/process-io.h | 13 + arch/x86/kernel/process_32.c | 9 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel

[PATCH v4 10/10] x86: Support compiling out userspace IO (iopl and ioperm)

2014-11-02 Thread Josh Triplett
8576 384 -8192 Signed-off-by: Josh Triplett --- arch/x86/Kconfig | 10 ++ arch/x86/include/asm/paravirt.h | 2 ++ arch/x86/include/asm/paravirt_types.h | 4 arch/x86/include/asm/processor.h | 19 ++- arch/x86/include/asm

[PATCH v4 09/10] x86: process: Introduce helper to switch IO bitmap

2014-11-02 Thread Josh Triplett
This simplifies __switch_to_xtra, and will make it easier to make IO optional later. Signed-off-by: Josh Triplett --- arch/x86/kernel/process-io.h | 23 +++ arch/x86/kernel/process.c| 14 +- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a

[PATCH v4 06/10] x86: process: Introduce helper to clear a thread's IO bitmap

2014-11-02 Thread Josh Triplett
This will make it easier to make the io_bitmap_ptr field optional later. Signed-off-by: Josh Triplett --- arch/x86/kernel/process-io.h | 5 + arch/x86/kernel/process_32.c | 4 ++-- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86

[PATCH v4 05/10] x86: cpu: Add helper function unifying 32-bit and 64-bit IO init in cpu_init

2014-11-02 Thread Josh Triplett
-related fields optional later. Signed-off-by: Josh Triplett --- arch/x86/include/asm/processor.h | 14 ++ arch/x86/kernel/cpu/common.c | 12 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h

[PATCH v4 03/10] x86: processor.h: Introduce macros to initialize IO fields of thread and TSS

2014-11-02 Thread Josh Triplett
No functional change, just splitting out parts of the existing INIT_THREAD and INIT_TSS macros. This will simplify making those fields optional later. Signed-off-by: Josh Triplett --- arch/x86/include/asm/processor.h | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions

[PATCH v4 04/10] x86: paravirt: Wrap initialization of set_iopl_mask in a macro

2014-11-02 Thread Josh Triplett
This will allow making set_iopl_mask optional later. Signed-off-by: Josh Triplett --- arch/x86/include/asm/paravirt_types.h | 1 + arch/x86/kernel/paravirt.c| 2 +- arch/x86/xen/enlighten.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH v4 01/10] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling

2014-11-02 Thread Josh Triplett
; move the resulting identical code to a static inline in a common header. Signed-off-by: Josh Triplett Acked-by: Kees Cook --- arch/x86/kernel/process-io.h | 22 ++ arch/x86/kernel/process_32.c | 28 arch/x86/kernel/process_64.c | 25

[PATCH v4 02/10] x86: tss: Eliminate fragile calculation of TSS segment limit

2014-11-02 Thread Josh Triplett
That then removes the last use of IO_BITMAP_OFFSET, so delete it. Signed-off-by: Josh Triplett Acked-by: Alexander van Heukelum --- arch/x86/include/asm/desc.h | 11 +-- arch/x86/include/asm/processor.h | 4 +++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/x

[PATCH v4 00/10] x86: Support compiling out userspace IO (iopl and ioperm)

2014-11-02 Thread Josh Triplett
, as requested by Thomas Gleixner. I've verified that this compiles after each patch. Josh Triplett (10): x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling x86: tss: Eliminate fragile calculation of TSS segment limit x86: processor.h: Introduce macros to initiali

Re: [PATCH v3 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2014-11-01 Thread Josh Triplett
On Wed, Oct 29, 2014 at 10:00:54PM +0100, Thomas Gleixner wrote: > On Wed, 29 Oct 2014, Josh Triplett wrote: > > v3: Eliminated several #ifdefs, and in particular almost all #ifdefs in > > .c files, by adding a macro INIT_SET_IOPL_MASK to use in place of > >

[PATCH v3 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2014-10-29 Thread Josh Triplett
257-107 __switch_to_xtra 234 123-111 sys_ioperm 240 --240 init_tss8576 384 -8192 Signed-off-by: Josh Triplett --- v3: Eliminated several #ifdefs, and in particular almost all

[PATCH v3 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling

2014-10-29 Thread Josh Triplett
; move the resulting identical code to a static inline in a common header. Signed-off-by: Josh Triplett Acked-by: Kees Cook --- v3: No changes in this patch, only in patch 3/3. arch/x86/kernel/process-io.h | 22 ++ arch/x86/kernel/process_32.c | 28

[PATCH v3 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2014-10-29 Thread Josh Triplett
That then removes the last use of IO_BITMAP_OFFSET, so delete it. Signed-off-by: Josh Triplett Acked-by: Alexander van Heukelum --- v3: No changes in this patch, only in patch 3/3. arch/x86/include/asm/desc.h | 11 +-- arch/x86/include/asm/processor.h | 4 +++- 2 files changed, 4

[PATCHv2 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling

2014-03-11 Thread Josh Triplett
; move the resulting identical code to a static inline in a common header. Signed-off-by: Josh Triplett Acked-by: Kees Cook --- v2: Rebased and updated for changes to copy_thread; no other changes in patch 1/3. arch/x86/kernel/process-io.h | 22 ++ arch/x86/kernel/process_32

[PATCHv2 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2014-03-11 Thread Josh Triplett
129 --129 copy_thread 598 455-143 sys_ioperm 442 --442 init_tss8896 640 -8256 Signed-off-by: Josh Triplett --- v2: Rebased. Updated bloat-o-meter

[PATCHv2 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2014-03-11 Thread Josh Triplett
That then removes the last use of IO_BITMAP_OFFSET, so delete it. Signed-off-by: Josh Triplett Acked-by: Alexander van Heukelum --- v2: Rebased. Added a comment explaining the -1 in the calculation. arch/x86/include/asm/desc.h | 11 +-- arch/x86/include/asm/processor.h | 4 +++

Re: [PATCH] drivers: virtio: Mark function virtballoon_migratepage() as static in virtio_balloon.c

2013-12-16 Thread Josh Triplett
:372:5: warning: no previous prototype for > ‘virtballoon_migratepage’ [-Wmissing-prototypes] > > Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett > drivers/virtio/virtio_balloon.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drive

Re: [PATCH 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2013-11-01 Thread Josh Triplett
On Thu, Oct 31, 2013 at 09:04:42PM +0100, Alexander van Heukelum wrote: > On Tue, Oct 22, 2013, at 3:35, Josh Triplett wrote: > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -976,6 +976,16 @@ config VM86 > > XFree86 to initialize some video car

Re: [PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2013-11-01 Thread Josh Triplett
On Thu, Oct 31, 2013 at 09:02:14PM +0100, Alexander van Heukelum wrote: > Hi Josh, > > On Tue, Oct 22, 2013, at 3:34, Josh Triplett wrote: > > __set_tss_desc has a complex calculation of the TSS segment limit, > > duplicating the quirky details of the I/O bitmap array length

Re: [PATCH 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling

2013-11-01 Thread Josh Triplett
On Thu, Oct 31, 2013 at 09:01:30PM +0100, Alexander van Heukelum wrote: > On Tue, Oct 22, 2013, at 3:34, Josh Triplett wrote: > > The 32-bit and 64-bit versions of copy_thread have functionally > > identical handling for copying the I/O bitmap, modulo differences in > > erro

Re: [PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2013-10-31 Thread Josh Triplett
t above, which goes away now that TSS_LIMIT uses the offset of the *following* field rather than recalculating the size of the iobitmap. - Josh Triplett ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2013-10-31 Thread Josh Triplett
On Wed, Oct 30, 2013 at 03:22:33PM -0700, Kees Cook wrote: > On Mon, Oct 21, 2013 at 7:34 PM, Josh Triplett wrote: > > __set_tss_desc has a complex calculation of the TSS segment limit, > > duplicating the quirky details of the I/O bitmap array length, and > > requiring

[PATCH 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2013-10-22 Thread Josh Triplett
SyS_iopl 137 --137 copy_thread 694 520-174 sys_ioperm 473 --473 init_tss8896 640 -8256 Signed-off-by: Josh Triplett

[PATCH 0/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2013-10-22 Thread Josh Triplett
473 --473 init_tss8896 640 -8256 Josh Triplett (3): x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling x86: tss: Eliminate fragile calculation of TSS segment limit x86: Support compiling out userspace I/O

[PATCH 1/3] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling

2013-10-22 Thread Josh Triplett
; move the resulting identical code to a static inline in a common header. Signed-off-by: Josh Triplett --- arch/x86/kernel/process-io.h | 22 ++ arch/x86/kernel/process_32.c | 29 - arch/x86/kernel/process_64.c | 26 +- 3 files

[PATCH 2/3] x86: tss: Eliminate fragile calculation of TSS segment limit

2013-10-22 Thread Josh Triplett
That then removes the last use of IO_BITMAP_OFFSET, so delete it. Signed-off-by: Josh Triplett --- arch/x86/include/asm/desc.h | 11 +-- arch/x86/include/asm/processor.h | 3 ++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/desc.h b/arch/x86/i