[PATCH v2 01/36] syscalls: define goal to not call sys_xyzzy() from within the kernel

2018-03-15 Thread Dominik Brodowski
which currently need to pretend to be userspace in order to make use of syscalls. Signed-off-by: Dominik Brodowski --- Documentation/process/adding-syscalls.rst | 14 -- include/linux/syscalls.h | 7 +++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git

[PATCH v2 17/36] fs: add ksys_chroot() helper; remove-in kernel calls to sys_chroot()

2018-03-15 Thread Dominik Brodowski
Using this helper allows us to avoid the in-kernel calls to the sys_chroot() syscall. Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c| 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init

[PATCH v2 07/36] fs: add do_renameat2() helper; remove internal call to sys_renameat2()

2018-03-15 Thread Dominik Brodowski
Using this helper removes in-kernel calls to the sys_renameat2() syscall. Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/namei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 921ae32dbc80..524e829ffc7d 100644 --- a

[PATCH v2 27/36] fs: add do_mkdirat() helper and ksys_mkdir() wrapper; remove in-kernel calls to syscall

2018-03-15 Thread Dominik Brodowski
Using the fs-internal do_mkdirat() helper allows us to get rid of fs-internal calls to the sys_mkdirat() syscall. Introducing the ksys_mkdir() wrapper allows us to avoid the in-kernel calls to the sys_mkdir() syscall. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs

[PATCH v2 28/36] fs: add do_symlinkat() helper and ksys_symlink() wrapper; remove in-kernel calls to syscall

2018-03-15 Thread Dominik Brodowski
Using the fs-internal do_symlinkat() helper allows us to get rid of internal calls to the sys_symlinkat() syscall. Introducing the ksys_symlink() wrapper allows us to avoid the in-kernel calls to the sys_symlink() syscall. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs

[PATCH v2 26/36] fs: add ksys_rmdir() wrapper; remove in-kernel calls to sys_rmdir()

2018-03-15 Thread Dominik Brodowski
Using this wrapper allows us to avoid the in-kernel calls to the sys_rmdir() syscall. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- fs/internal.h| 1 + fs/namei.c | 2 +- include/linux/syscalls.h | 7 +++ init/initramfs.c | 4 ++-- 4

[PATCH v2 02/36] kernel: use kernel_wait4() instead of sys_wait4()

2018-03-15 Thread Dominik Brodowski
All call sites of sys_wait4() set *rusage to NULL. Therefore, there is no need for the copy_to_user() handling of *rusage, and we can use kernel_wait4() directly. Cc: Luis R. Rodriguez Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- kernel/exit.c | 2 +- kernel

[PATCH v2 22/36] fs: add ksys_chdir() helper; remove in-kernel calls to sys_chdir()

2018-03-15 Thread Dominik Brodowski
Using this helper allows us to avoid the in-kernel calls to the sys_chdir() syscall. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- drivers/base/devtmpfs.c | 2 +- fs/open.c| 7 ++- include/linux/syscalls.h | 1 + init/do_mounts.c | 2 +- init

[PATCH v2 21/36] mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff()

2018-03-15 Thread Dominik Brodowski
Using this helper allows us to avoid the in-kernel calls to the sys_mmap_pgoff() syscall. Cc: Andrew Morton Cc: linux...@kvack.org Signed-off-by: Dominik Brodowski --- arch/alpha/kernel/osf_sys.c | 2 +- arch/arm64/kernel/sys.c | 2 +- arch/ia64/kernel/sys_ia64.c

[PATCH v2 33/36] fs: add ksys_ftruncate() wrapper; remove in-kernel calls to sys_ftruncate()

2018-03-15 Thread Dominik Brodowski
Using the ksys_ftruncate() wrapper allows us to get rid of in-kernel calls to the sys_ftruncate() syscall. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Dominik Brodowski --- arch/mips/kernel/linux32.c | 2 +- arch/parisc/kernel/sys_parisc.c | 4 ++-- arch/powerpc/kernel/sys_ppc32.c | 2

Re: [PATCH v2 00/36] remove in-kernel syscall invocations (part 1)

2018-03-16 Thread Dominik Brodowski
On Fri, Mar 16, 2018 at 09:01:11AM +, Zhang, Ning A wrote: > 在 2018-03-15四的 20:04 +0100,Dominik Brodowski写道: > > Here is a re-spin of the first set of patches which reduce the number of > > syscall invocations from within the kernel; the RFC may be found at > > >

Re: [PATCH v2 13/36] x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()

2018-03-16 Thread Dominik Brodowski
On Fri, Mar 16, 2018 at 01:43:08AM -0700, Christoph Hellwig wrote: > On Thu, Mar 15, 2018 at 08:05:06PM +0100, Dominik Brodowski wrote: > > Using this helper allows us to avoid the in-kernel calls to the sys_ioperm() > > syscall. > > Why not do_ioperm or kernel_ioperm as fo

Re: [PATCH v2 13/36] x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()

2018-03-16 Thread Dominik Brodowski
On Fri, Mar 16, 2018 at 01:00:48PM +0100, Thomas Gleixner wrote: > On Thu, 15 Mar 2018, Dominik Brodowski wrote: > > > Using this helper allows us to avoid the in-kernel calls to the sys_ioperm() > > syscall. > > > > Cc: Thomas Gleixner > > Cc: Ingo M

Re: [PATCH] tracing/x86: Update syscall trace events to handle new x86 syscall func names

2018-04-17 Thread Dominik Brodowski
Steven, On Tue, Apr 17, 2018 at 11:54:40AM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Arnaldo noticed that the latest kernel is missing the syscall event system > directory in x86. I bisected it down to d5a00528b58c ("syscalls/core, > syscalls/x86: Rename struct pt_regs-b

Re: [PATCH] tracing/x86: Update syscall trace events to handle new x86 syscall func names

2018-04-17 Thread Dominik Brodowski
On Tue, Apr 17, 2018 at 12:39:27PM -0400, Steven Rostedt wrote: > > > names, they do not match the default compare algorithm. As this was a > > > problem for power pc, the algorithm can be overwritten by the > > > architecture. > > > The solution is to have x86 have its own algorithm to do the com

Re: [PATCH v2] tracing/x86: Update syscall trace events to handle new x86 syscall func names

2018-04-17 Thread Dominik Brodowski
> Added back original compare to not miss 32bit kernel syscalls s/32bit/32bit and 0-parameter syscalls. Looks good otherwise. Thanks, Dominik

Re: [PATCH v3] tracing/x86: Update syscall trace events to handle new prefixed syscall func names

2018-04-18 Thread Dominik Brodowski
uot;syscalls/core, syscalls/x86: Rename struct > pt_regs-based sys_*() to __x64_sys_*()") > Signed-off-by: Steven Rostedt (VMware) Acked-by: Dominik Brodowski

Re: [PATCH] Lock down drivers that can have io ports, io mem, irqs and dma changed

2016-11-21 Thread Dominik Brodowski
On Mon, Nov 21, 2016 at 11:10:52PM +, David Howells wrote: > One Thousand Gnomes wrote: > > > You need to filter or lock down kernel module options because a lot of > > modules let you set the I/O port or similar (eg mmio) which means you can > > hack the entire machine with say the 8250 driv

Re: [PATCH] Lock down drivers that can have io ports, io mem, irqs and dma changed

2016-11-23 Thread Dominik Brodowski
On Wed, Nov 23, 2016 at 12:58:26PM +, David Howells wrote: > Dominik Brodowski wrote: > > > You might also need to disable CIS overrides and CIS firmware loading for > > PCMCIA drivers, I presume. That needs two changes: > > > > - Abort in drivers/pcmcia/d

Re: [PATCH] Lock down drivers that can have io ports, io mem, irqs and dma changed

2016-11-24 Thread Dominik Brodowski
On Thu, Nov 24, 2016 at 05:34:45PM +, David Howells wrote: > Dominik Brodowski wrote: > > > > > - Abort in drivers/pcmcia/cistpl.c::pccard_store_cis() or remove > > > > write access to the "cis" file in > > > >

Re: [PATCH] pcmcia: ds: fix suspend/resume

2016-08-27 Thread Dominik Brodowski
Russell, On Sun, Aug 21, 2016 at 12:05:30AM +0100, Russell King wrote: > PCMCIA suspend/resume no longer works since the commit mentioned below, > as the callbacks are no longer made. Convert the driver to the new > dev_pm_ops, which restores the suspend/resume functionality. Tested on > the arm

Re: [PATCH 27/43] MAINTAINERS: update git URL for PCMCIA

2015-12-19 Thread Dominik Brodowski
On Fri, Dec 18, 2015 at 03:51:50PM +0800, Fengguang Wu wrote: > CC: linux-pcm...@lists.infradead.org > CC: Dominik Brodowski > Signed-off-by: Fengguang Wu Acked-by: Dominik Brodowski Thanks! Dominik > --- > MAINTAINERS |2 +- > 1 file changed, 1 insert

[GIT PULL] pcmcia updates for v5.8

2020-06-04 Thread Dominik Brodowski
pccard_loop_tuple() static (2020-05-18 11:16:39 +0200) Two minor PCMCIA odd fixes, one replacing zero-length arrays with a flexible-array member, and one making a local function static. Thanks, Dominik Dominik Brodowski (1

Re: [RESEND PATCH] sys_personality: Add optional arch hook arch_check_personality

2020-06-08 Thread Dominik Brodowski
On Mon, Jun 08, 2020 at 10:46:41AM +0100, Catalin Marinas wrote: > On Mon, Jun 08, 2020 at 10:49:25AM +0800, Wang ShaoBo wrote: > > Currently arm64 personality syscall uses wrapper __arm64_sys_personality > > to redirect to __arm64_sys_arm64_personality, it's easily confused, > > Whereas using an n

Re: [PATCH 1/3] dma-mapping: remove DMA_MASK_NONE

2020-09-22 Thread Dominik Brodowski
On Tue, Sep 22, 2020 at 03:40:00PM +0200, Christoph Hellwig wrote: > This value is only used by a PCMCIA driver and not very useful. > > Signed-off-by: Christoph Hellwig Acked-by: Dominik Brodowski

Re: [PATCH] pcmcia: Replace zero-length array with flexible-array

2020-05-18 Thread Dominik Brodowski
On Thu, May 07, 2020 at 02:05:49PM -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced i

Re: 4.12.0-rc6+: WQ_MEM_RECLAIM hci0:hci_power_off is flushing !WQ_MEM_RECLAIM events:btusb_work

2017-06-28 Thread Dominik Brodowski
Hej Tejun and Marcel, On Tue, Jun 27, 2017 at 01:39:46PM -0400, Tejun Heo wrote: > Hello, Marcel. > > On Tue, Jun 27, 2017 at 07:28:40PM +0200, Marcel Holtmann wrote: > > >> On my Dell XPS 13 9343 (x86_64), the following warning was logged right > > >> after a resume from suspend-to-mem (not on *

Re: [RFC V2 1/6] cpufreq: Replace "max_transition_latency" with "dynamic_switching"

2017-07-14 Thread Dominik Brodowski
On Thu, Jul 13, 2017 at 06:19:53PM +0200, Rafael J. Wysocki wrote: > On Thu, Jul 13, 2017 at 7:40 AM, Viresh Kumar wrote: > > There is no limitation in the ondemand or conservative governors which > > disallow the transition_latency to be greater than 10 ms. > > > > The max_transition_latency fiel

Re: [RFC V2 1/6] cpufreq: Replace "max_transition_latency" with "dynamic_switching"

2017-07-14 Thread Dominik Brodowski
On Sat, Jul 15, 2017 at 12:06:24AM +0200, Rafael J. Wysocki wrote: > On Friday, July 14, 2017 01:11:58 PM Rafael J. Wysocki wrote: > > On Fri, Jul 14, 2017 at 9:01 AM, Dominik Brodowski > > wrote: > > > On Thu, Jul 13, 2017 at 06:19:53PM +0200, Rafael J. Wysocki wrote: >

Re: [PATCH 3/6] cpufreq: governor: Drop min_sampling_rate

2017-06-29 Thread Dominik Brodowski
On Thu, Jun 29, 2017 at 04:29:06PM +0530, Viresh Kumar wrote: > The cpufreq core and governors aren't supposed to set a limit on how > fast we want to try changing the frequency. This is currently done for > the legacy governors with help of min_sampling_rate. > > At worst, we may end up setting t

Re: [PATCH 3/6] cpufreq: governor: Drop min_sampling_rate

2017-06-29 Thread Dominik Brodowski
On Fri, Jun 30, 2017 at 09:04:25AM +0530, Viresh Kumar wrote: > On 29-06-17, 20:01, Dominik Brodowski wrote: > > On Thu, Jun 29, 2017 at 04:29:06PM +0530, Viresh Kumar wrote: > > > The cpufreq core and governors aren't supposed to set a limit on how > > > fast we wa

Re: [PATCH] cpufreq: speedstep: remove unnecessary static in speedstep_detect_chipset()

2017-07-05 Thread Dominik Brodowski
e you are the same > Dominic with a different email id) and I don't think we need it to be static > here. Anyway, Dominic can respond on that. > > commit 1673f3b404bd ("[PATCH] CPUfreq i386 drivers update") > > (Note: You can find it in history kernel git repo, not the current one). > > Acked-by: Viresh Kumar indeed, that's me, and the patch seems to be valid and therefore is a useful improvement: Acked-by: Dominik Brodowski Thanks, Dominik

Re: [PATCH] x86/microcode: Document the three loading methods

2017-07-17 Thread Dominik Brodowski
Thanks for the nice write-up! A few comments below: On Mon, Jul 17, 2017 at 11:43:28AM +0200, Borislav Petkov wrote: > new file mode 100644 > index ..6ab130c6ca45 > --- /dev/null > +++ b/Documentation/x86/microcode.txt > @@ -0,0 +1,133 @@ > + The Linux Microcode Loader > + > +Autho

Re: [PATCH V3 8/9] cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag

2017-07-19 Thread Dominik Brodowski
There shouldn't be any functional change after this patch. > > Signed-off-by: Viresh Kumar Looks good to me, so feel free to add: Reviewed-by: Dominik Brodowski Best, Dominik signature.asc Description: PGP signature

[RFC PATCH v3 3/6] x86/entry/64: move switch_to_thread_stack to interrupt_entry

2018-02-20 Thread Dominik Brodowski
.o-orig 16882 0 0 1688241f2 entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 66 ++- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S

[RFC PATCH v3 0/6] x86/entry/64: interrupt entry size reduction

2018-02-20 Thread Dominik Brodowski
Brian Gerst) - improve (?) UNWIND hints [*] http://lkml.kernel.org/r/CA+55aFwLTF3EtaQ4OpDv2UM41J=EU7gfemv=evq+uqi31-u...@mail.gmail.com Dominik Brodowski (6): x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function x86/entry/64: move ENTER_IRQ_STACK from

[RFC PATCH v3 4/6] x86/entry/64: remove interrupt macro

2018-02-20 Thread Dominik Brodowski
It is now trivial to call interrupt_entry and then the actual worker. Therefore, remove the interrupt macro. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch

[RFC PATCH v3 1/6] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function

2018-02-20 Thread Dominik Brodowski
885260 entry_64.o-orig 18006 0 0 180064656 entry_64.o Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/

[RFC PATCH v3 6/6] x86/entry/64: open-code switch_to_thread_stack

2018-02-20 Thread Dominik Brodowski
: Dominik Brodowski --- arch/x86/entry/entry_64.S| 76 +--- arch/x86/entry/entry_64_compat.S | 17 +++-- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 42a4b652469d..d5c7f18f79ac

[RFC PATCH v3 2/6] x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to interrupt_entry

2018-02-20 Thread Dominik Brodowski
text size (it would be more except for the additional unwind hints): textdata bss dec hex filename 18006 0 0 180064656 entry_64.o-orig 17158 0 0 171584306 entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/e

[RFC PATCH v3 5/6] x86/entry/64: move ASM_CLAC to interrupt_entry

2018-02-20 Thread Dominik Brodowski
0 1662340ef entry_64.o Suggested-by: Brian Gerst Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 8ea03cf94a2d..42a4b652469d 100644 --- a

Re: [PATCH] PCMCIA / PM: Combine system resume callbacks

2018-02-20 Thread Dominik Brodowski
On Tue, Feb 20, 2018 at 12:47:27PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There is a problem with PCMCIA system resume callbacks with respect > to suspend-to-idle in which the ->suspend_noirq() callback may be > invoked after the ->resume_noirq() one without resuming the sy

Re: [PATCH] PCMCIA / PM: Avoid noirq suspend aborts during suspend-to-idle

2018-02-22 Thread Dominik Brodowski
been discovered in the first place), but admittedly I have no PCMCIA cards to test along with the socket itself. Fixes: 33e4f80ee69b (ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle) Signed-off-by: Rafael J. Wysocki [li...@dominikbrodowski.net: follow same codepaths for both

[PATCH 1/2] x86/entry: reduce static footprint of idtentry

2018-02-14 Thread Dominik Brodowski
nificantly: textdata bss dec hex filename 24307 0 0 243075ef3 entry_64.o-orig 20987 0 0 2098751fb entry_64.o Co-developed-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 11 ++- arch/x86/entry/entry

[PATCH 2/2] x86/entry/64: use xorl for register clearing

2018-02-14 Thread Dominik Brodowski
4.1.1, the result of 32-bit operands are "zero- extended to a 64-bit result in the destination general-purpose register." The AMD64 Architecture Programmer’s Manual Volume 3, Appendix B.1, describes the same behaviour. Suggested-by: Denys Vlasenko Signed-off-by: Dominik Brodo

[PATCH 0/2] x86/entry: xorq->xorl; idtentry size reduction

2018-02-14 Thread Dominik Brodowski
eries, cf. http://lkml.kernel.org/r/20180211104949.12992-9-li...@dominikbrodowski.net The other one replaces the xorq-based register cleaning with an equivalent xorl-based version, which is supposed to be faster on some architectures. Thanks, Dominik Dominik Brodowski (2): x86/entry: reduce stat

[RFC PATCH 3/4] x86/entry/64: move switch_to_thread_stack to interrupt helper function

2018-02-14 Thread Dominik Brodowski
entry_64.o With CONFIG_IA32_EMULATION disabled (-0.27k): textdata bss dec hex filename 16897 0 0 168974201 entry_64.o-orig 16622 0 0 1662240ee entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 65

[RFC PATCH 0/4] x86/entry/64: interrupt entry size reduction

2018-02-14 Thread Dominik Brodowski
steps to easen the review. Another advantage is that we can decide whether each additional step is really worth it in relation to an increase in code complexity. NOTE / WARNING: As usual, please be extremely stringent in reviewing these patches. Thanks, Dominik Dominik Brodowski (4

[RFC PATCH 4/4] x86/entry/64: remove interrupt macro

2018-02-14 Thread Dominik Brodowski
It is now trivial to call the interrupt helper function and then the actual worker. Therefore, remove the interrupt macro. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff

[RFC PATCH 1/4] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function

2018-02-14 Thread Dominik Brodowski
8751fb entry_64.o-orig 17905 0 0 1790545f1 entry_64.o Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/

[RFC PATCH 2/4] x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper function

2018-02-14 Thread Dominik Brodowski
text size: textdata bss dec hex filename 17905 0 0 1790545f1 entry_64.o-orig 16897 0 0 168974201 entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 53 +++ 1 file ch

Re: [PATCH 2/2] x86/entry/64: use xorl for register clearing

2018-02-14 Thread Dominik Brodowski
On Wed, Feb 14, 2018 at 09:21:12PM +0300, Alexey Dobriyan wrote: > > - xorq%r8, %r8/* nospec r8 */ > > + xorl%r8d, %r8d /* nospec r8 */ > > The suffix should be simply dropped as operand size is unambigious. > It is just one more character than necessary on the screen.

Re: [RFC PATCH 3/4] x86/entry/64: move switch_to_thread_stack to interrupt helper function

2018-02-14 Thread Dominik Brodowski
On Wed, Feb 14, 2018 at 01:57:15PM -0500, Brian Gerst wrote: > On Wed, Feb 14, 2018 at 1:21 PM, Dominik Brodowski > wrote: > > We can also move the SWAPGS and the switch_to_thread_stack to the > > interrupt helper function. As we do not want call depths of two, > > conver

Re: [RFC v2 PATCH 6/7] x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS

2018-02-07 Thread Dominik Brodowski
e comes from in my patch set, though. I *hope* that the CS-ORIG_RAX(%rsp) testb is correct; again, excercise an extremely stringent review of this patch, please. Thanks, Dominik -------- From: Dominik Brodowski Date: Wed, 7 Feb 2018 20:56:

[GIT PULL] pcmcia: odd fixes for v4.16

2018-02-08 Thread Dominik Brodowski
Arvind Yadav (1): pcmcia: soc_common: Handle return value of clk_prepare_enable Dominik Brodowski (2): pcmcia: remove mailing list, update MAINTAINERS pcmcia: use proper printk format for resource MAINTAINERS | 6

[PATCH v3 7/7] x86/entry: indent PUSH_AND_CLEAR_REGS and POP_REGS properly

2018-02-11 Thread Dominik Brodowski
... same as the other macros in arch/x86/entry/calling.h Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index 59675010c9a0..6985440c68fa 100644 --- a

[PATCH v3 2/7] x86/entry: merge POP_C_REGS and POP_EXTRA_REGS

2018-02-11 Thread Dominik Brodowski
The two special, opencoded cases for POP_C_REGS can be handled by ASM macros. Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 15 +++ arch/x86/entry/entry_64.S | 26 -- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/arch/x86

[PATCH v3 0/7] x86/entry: simplify and unify SAVE/POP_REGS

2018-02-11 Thread Dominik Brodowski
*extremely* stringent in reviewing these patches, *especially* concerning patch 6/7 (x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS). Dominik Brodowski (7): x86/entry: merge SAVE_C_REGS and SAVE_EXTRA_REGS, remove unused extensions x86/entry: merge POP_C_REGS and

[PATCH v3 1/7] x86/entry: merge SAVE_C_REGS and SAVE_EXTRA_REGS, remove unused extensions

2018-02-11 Thread Dominik Brodowski
Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 57 +-- arch/x86/entry/entry_64.S | 12 -- 2 files changed, 19 insertions(+), 50 deletions(-) diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index

[PATCH v3 4/7] x86/entry: introduce PUSH_AND_CLEAN_REGS

2018-02-11 Thread Dominik Brodowski
Those instances where ALLOC_PT_GPREGS_ON_STACK is called just before SAVE_AND_CLEAR_REGS can trivially be replaced by PUSH_AND_CLEAN_REGS. This macro uses PUSH instead of MOV and should therefore be faster, at least on newer CPUs. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski

[PATCH v3 5/7] x86/entry: use PUSH_AND_CLEAN_REGS in more cases

2018-02-11 Thread Dominik Brodowski
: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 6 ++--- arch/x86/entry/entry_64.S | 65 +++ 2 files changed, 6 insertions(+), 65 deletions(-) diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index

[PATCH v3 8/7] TESTING_ONLY x86/entry: reduce static footprint of idtentry

2018-02-11 Thread Dominik Brodowski
nificantly. NOTE: It still needs to be evaluated whether the reduced static footprint at the cost of code readability is really needed here. Co-developed-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 11 ++- arch/x86/entry/entry_64.S | 21 ++

[PATCH v3 3/7] x86/entry: interleave XOR register clearing with PUSH instructions

2018-02-11 Thread Dominik Brodowski
Same as is done for syscalls, interleave XOR with PUSH instructions for exceptions/interrupts, in order to minimize the cost of the additional instructions required for register clearing. Signed-off-by: Dominik Brodowski --- arch/x86/entry/calling.h | 40

[PATCH v3 6/7] x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS

2018-02-11 Thread Dominik Brodowski
e testb $3, CS(%rsp) instruction in the idtentry macro does not need modification. Previously, %rsp was manually decreased by 15*8; with this patch, %rsp is decreased by 15 pushq instructions. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski [jpoim...@redhat.com: unwind hint improvem

[PATCH 3/5] selftests/x86: do not rely on int $0x80 in test_mremap_vdso.c

2018-02-11 Thread Dominik Brodowski
-off-by: Dominik Brodowski --- tools/testing/selftests/x86/test_mremap_vdso.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/x86/test_mremap_vdso.c b/tools/testing/selftests/x86/test_mremap_vdso.c index bf0d687c7db7..64f11c8d9b76 100644 --- a/tools/testing/selftests

[PATCH 0/5] selftests/x86: fixes for !CONFIG_IA32_EMULATION and vsyscall=none

2018-02-11 Thread Dominik Brodowski
On systems with CONFIG_IA32_EMULATION disabled and vsyscall disabled, a couple of selftests fail spectacularly. Also throw in a fix for the Makefile, which still wants to build the moved 5lvl test. Dominik Brodowski (5): selftests/x86: 5lvl test has been moved selftests/x86: fix vDSO

[PATCH] selftest/vDSO: fix O=

2018-02-11 Thread Dominik Brodowski
The vDSO selftests ignored the O= or KBUILD_OUTPUT= parameters. Fix it. Signed-off-by: Dominik Brodowski --- tools/testing/selftests/vDSO/Makefile | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests

[PATCH 4/5] selftests/x86: do not rely on int $0x80 in single_step_syscall.c

2018-02-11 Thread Dominik Brodowski
be a good approximation for that). CC: Dmitry Safonov CC: Andy Lutomirski Signed-off-by: Dominik Brodowski --- tools/testing/selftests/x86/Makefile | 2 ++ tools/testing/selftests/x86/single_step_syscall.c | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/too

[PATCH 2/5] selftests/x86: fix vDSO selftest segfault for vsyscall=none

2018-02-11 Thread Dominik Brodowski
: Dominik Brodowski --- tools/testing/selftests/x86/test_vdso.c | 50 - 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/x86/test_vdso.c b/tools/testing/selftests/x86/test_vdso.c index 29973cde06d3..558c8207e7b9 100644 --- a

[PATCH 5/5] selftests/x86: disable tests requiring 32bit support on pure 64bit systems

2018-02-11 Thread Dominik Brodowski
approximation for CONFIG_IA32_EMULATION being enabled). CC: Dmitry Safonov CC: Andy Lutomirski Signed-off-by: Dominik Brodowski --- tools/testing/selftests/x86/Makefile | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/x86/Makefile b

[PATCH 1/5] selftests/x86: 5lvl test has been moved

2018-02-11 Thread Dominik Brodowski
Fixes: 235266b8e11c "selftests/vm: move 128TB mmap boundary test to generic directory" Signed-off-by: Dominik Brodowski --- tools/testing/selftests/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing

Re: [PATCH 2/5] selftests/x86: fix vDSO selftest segfault for vsyscall=none

2018-02-11 Thread Dominik Brodowski
On Sun, Feb 11, 2018 at 12:21:53PM +0100, Ingo Molnar wrote: > > * Dominik Brodowski wrote: > > > + char name[128]; > > + if (sscanf(line, "%p-%p %c-%cp %*x %*x:%*x %*u %s", > > + &start, &end, &r, &x,

Re: [PATCH 2/5] selftests/x86: fix vDSO selftest segfault for vsyscall=none

2018-02-11 Thread Dominik Brodowski
On Sun, Feb 11, 2018 at 01:17:14PM +0100, Dominik Brodowski wrote: > On Sun, Feb 11, 2018 at 12:21:53PM +0100, Ingo Molnar wrote: > > > > * Dominik Brodowski wrote: > > > > > + char name[128]; > > > + if (sscanf

[PATCH] selftests/x86: clarify that there is no buffer overflow on sscanf usage

2018-02-11 Thread Dominik Brodowski
Suggested-by: Ingo Molnar CC: Andy Lutomirski Signed-off-by: Dominik Brodowski --- > Yeah, probably - but still, this connection and the sscanf() guarantee is not > obvious at first sight, so please improve this to derive from the same value > (define a LINE_MAX size or such), p

Re: [tip:x86/pti] x86/speculation: Use Indirect Branch Prediction Barrier in context switch

2018-02-04 Thread Dominik Brodowski
On Thu, Feb 01, 2018 at 08:31:53AM +, David Woodhouse wrote: > On Wed, 2018-01-31 at 08:03 +0100, Dominik Brodowski wrote: > > Whether a process needs protection by IBPB on context switches is a > > different question to whether a process should be allowed to be dumped, > &

[RFC PATCH 0/3] pcmcia: odd fixes for v4.16-rc1

2018-02-04 Thread Dominik Brodowski
to this patch set. Arvind Yadav (1): pcmcia: soc_common: Handle return value of clk_prepare_enable Dominik Brodowski (2): pcmcia: remove mailing list, update MAINTAINERS pcmcia: use proper printk format for resource MAINTAINERS | 6 ++ drivers/pcmcia

[RFC PATCH 3/3] pcmcia: soc_common: Handle return value of clk_prepare_enable

2018-02-04 Thread Dominik Brodowski
From: Arvind Yadav clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav CC: Russell King Signed-off-by: Dominik Brodowski --- drivers/pcmcia/soc_common.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia

[RFC PATCH 1/3] pcmcia: remove mailing list, update MAINTAINERS

2018-02-04 Thread Dominik Brodowski
In recent years, the linux-pcmcia mailing list gained a pretty bad signal-to-noise ratio. It does not seem worth the hassle to keep it any longer. Thanks to David for hosting the list for the last couple of years! Acked-by: David Woodhouse CC: Russell King Signed-off-by: Dominik Brodowski

[RFC PATCH 2/3] pcmcia: use proper printk format for resource

2018-02-04 Thread Dominik Brodowski
Even though it is just in a dev_dbg statement, improve the printk format to use %pr instead of plain %p. Signed-off-by: Dominik Brodowski --- drivers/pcmcia/rsrc_nonstatic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia

Re: [tip:x86/pti] x86/entry: Reduce the code footprint of the 'idtentry' macro

2018-02-17 Thread Dominik Brodowski
On Sat, Feb 17, 2018 at 03:40:13AM -0800, tip-bot for Dominik Brodowski wrote: > Commit-ID: 9e809d15d6b692fa061d74be7aaab1c79f6784b8 > Gitweb: > https://git.kernel.org/tip/9e809d15d6b692fa061d74be7aaab1c79f6784b8 > Author: Dominik Brodowski > AuthorDate: Wed, 14 Feb 2018

i2c-designware: sound and s2ram broken on Broadwell-U system since commit ca382f5b38f367b6 (add i2c gpio recovery option)

2018-02-17 Thread Dominik Brodowski
Dear all, on v4.16-rc1+, sound does not work any more on my Dell XPS 13; suspend-to-RAM hangs as well. I have bisected this problem down to commit ca382f5b38f3; reverting this on top of Linus' latest (1e3510b2b053) fixes these issues. A bit info on the system (from a working kernel): 00:00.0 Host

Re: i2c-designware: sound and s2ram broken on Broadwell-U system since commit ca382f5b38f367b6 (add i2c gpio recovery option)

2018-02-17 Thread Dominik Brodowski
On Sat, Feb 17, 2018 at 05:09:40PM +0200, Andy Shevchenko wrote: > On Sat, 2018-02-17 at 17:02 +0200, Andy Shevchenko wrote: > > On Sat, 2018-02-17 at 14:25 +0100, Dominik Brodowski wrote: > > > > > on v4.16-rc1+, sound does not work any more on my Dell XPS 13; > >

Re: i2c-designware: sound and s2ram broken on Broadwell-U system since commit ca382f5b38f367b6 (add i2c gpio recovery option)

2018-02-18 Thread Dominik Brodowski
On Sat, Feb 17, 2018 at 10:57:01PM +0200, Andy Shevchenko wrote: > On Sat, 2018-02-17 at 17:58 +0100, Dominik Brodowski wrote: > > On Sat, Feb 17, 2018 at 05:09:40PM +0200, Andy Shevchenko wrote: > > > This patch fixes the issue, thanks. > > I will send it soon out. >

[RFC PATCH v2 2/5] x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper function

2018-02-18 Thread Dominik Brodowski
text size (it would be more except for the additional unwind hints): textdata bss dec hex filename 18006 0 0 180064656 entry_64.o-orig 17158 0 0 171584306 entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/e

[RFC PATCH v2 4/5] x86/entry/64: remove interrupt macro

2018-02-18 Thread Dominik Brodowski
It is now trivial to call the interrupt helper function and then the actual worker. Therefore, remove the interrupt macro. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff

[RFC PATCH v2 0/5] x86/entry/64: interrupt entry size reduction

2018-02-18 Thread Dominik Brodowski
) - improve (?) UNWIND hints Dominik Brodowski (5): x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function x86/entry/64: move ENTER_IRQ_STACK from interrupt macro to helper function x86/entry/64: move switch_to_thread_stack to interrupt helper function x86/entry

[RFC PATCH v2 5/5] x86/entry/64: open-code switch_to_thread_stack

2018-02-18 Thread Dominik Brodowski
Open-code the two instances which used switch_to_thread_stack. This allows us to remove the wrapper around DO_SWITCH_TO_THREAD_STACK. While at it, update the UNWIND hint to reflect where the IRET frame is. Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S| 59

[RFC PATCH v2 1/5] x86/entry/64: move PUSH_AND_CLEAR_REGS from interrupt macro to helper function

2018-02-18 Thread Dominik Brodowski
885260 entry_64.o-orig 18006 0 0 180064656 entry_64.o Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/

[RFC PATCH v2 3/5] x86/entry/64: move switch_to_thread_stack to interrupt helper function

2018-02-18 Thread Dominik Brodowski
16883 0 0 1688341f3 entry_64.o Signed-off-by: Dominik Brodowski --- arch/x86/entry/entry_64.S | 64 +++ 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index

Re: i2c-designware: sound and s2ram broken on Broadwell-U system since commit ca382f5b38f367b6 (add i2c gpio recovery option)

2018-02-18 Thread Dominik Brodowski
On Sun, Feb 18, 2018 at 04:23:41PM +0200, Andy Shevchenko wrote: > On Sun, Feb 18, 2018 at 11:41 AM, Dominik Brodowski > wrote: > > On Sat, Feb 17, 2018 at 10:57:01PM +0200, Andy Shevchenko wrote: > >> On Sat, 2018-02-17 at 17:58 +0100, Dominik Brodowski wrote: > >

Re: i2c-designware: sound and s2ram broken on Broadwell-U system since commit ca382f5b38f367b6 (add i2c gpio recovery option)

2018-02-19 Thread Dominik Brodowski
On Sat, Feb 17, 2018 at 05:09:40PM +0200, Andy Shevchenko wrote: > On Sat, 2018-02-17 at 17:02 +0200, Andy Shevchenko wrote: > > On Sat, 2018-02-17 at 14:25 +0100, Dominik Brodowski wrote: > > > > > on v4.16-rc1+, sound does not work any more on my Dell XPS 13; > >

v4.15-rc5 warning: suspicious RCU usage in net/wireless/util.c:778

2017-12-30 Thread Dominik Brodowski
On Fri, Dec 22, 2017 at 08:20:12AM +0100, Dominik Brodowski wrote: > Dear all, > > once the (wifi) link becomes ready, the following warning is emitted on > mainline (v4.15-rc4-202-gead68f216110) on my notebook: ... and it is still present as of v4.15-rc5-149-g5aa90a845892 > [

x86/pti: smp_processor_id() called while preemptible in resume-from-sleep

2017-12-30 Thread Dominik Brodowski
Dear all, resume-from-sleep (mem/S3) on v4.15-rc5-149-g5aa90a845892 triggers the following bug. If I boot with "pti=off", the kernel does not show this issue, and neither did kernels before pti was merged: [0.00] microcode: microcode updated early to revision 0x25, date = 2017-01-27 [

Re: x86/pti: smp_processor_id() called while preemptible in resume-from-sleep

2017-12-30 Thread Dominik Brodowski
On Sat, Dec 30, 2017 at 04:03:07PM +0100, Thomas Gleixner wrote: > On Sat, 30 Dec 2017, Dominik Brodowski wrote: > > resume-from-sleep (mem/S3) on v4.15-rc5-149-g5aa90a845892 triggers the > > following bug. If I boot with "pti=off", the kernel does not show this > >

Re: [PATCH v3 2/3] x86/entry: Clear registers for 64bit exceptions/interrupts

2018-02-06 Thread Dominik Brodowski
On Mon, Feb 05, 2018 at 05:18:11PM -0800, Dan Williams wrote: > @@ -1178,6 +1180,7 @@ ENTRY(paranoid_entry) > cld > SAVE_C_REGS 8 > SAVE_EXTRA_REGS 8 > + CLEAR_REGS_NOSPEC > ENCODE_FRAME_POINTER 8 > movl$1, %ebx > movl$MSR_GS_BASE, %ecx > @@ -1185,7 +

Re: [PATCH v3 2/3] x86/entry: Clear registers for 64bit exceptions/interrupts

2018-02-06 Thread Dominik Brodowski
On Mon, Feb 05, 2018 at 05:18:11PM -0800, Dan Williams wrote: > From: Andi Kleen > > Clear the 'extra' registers on entering the 64bit kernel for exceptions > and interrupts. The common registers are not cleared since they are > likely clobbered well before they can be exploited in a speculative

Re: [PATCH v3 2/3] x86/entry: Clear registers for 64bit exceptions/interrupts

2018-02-06 Thread Dominik Brodowski
On Tue, Feb 06, 2018 at 11:51:39AM +0100, Ingo Molnar wrote: > > * Dominik Brodowski wrote: > > > On Mon, Feb 05, 2018 at 05:18:11PM -0800, Dan Williams wrote: > > > From: Andi Kleen > > > > > > Clear the 'extra' registers on entering the 6

[PATCH tip-pti 2/2] x86/entry: interleave XOR register clearing with PUSH/MOV instructions

2018-02-06 Thread Dominik Brodowski
Same as is done for syscalls, interleave XOR with PUSH or MOV instructions for exceptions/interrupts, in order to minimize the cost of the additional instructions required for register clearing. Signed-off-by: Dominik Brodowski diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h

[PATCH tip-pti 1/2] x86/entry: remove SAVE_C_REGS_EXCEPT_* macros

2018-02-06 Thread Dominik Brodowski
The macros which save all but specific registers have been unused for a long time. Remove them and the SAVE_C_REGS_HELPER macro, but instead provide the SAVE_C_REGS macro directly. Signed-off-by: Dominik Brodowski diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index

[RFC v2 PATCH 4/7] x86/entry: introduce PUSH_AND_CLEAN_REGS

2018-02-07 Thread Dominik Brodowski
Those instances where ALLOC_PT_GPREGS_ON_STACK is called just before SAVE_AND_CLEAR_REGS can trivially be replaced by PUSH_AND_CLEAN_REGS. This macro uses PUSH instead of MOV and should therefore be faster, at least on newer CPUs. Suggested-by: Linus Torvalds Signed-off-by: Dominik Brodowski

<    1   2   3   4   5   6   7   >