Re: [PATCH v4 2/9] w1_therm: fix reset_select_slave at beginning of search process

2020-05-05 Thread Greg KH
On Thu, Apr 30, 2020 at 12:59:43AM +0200, Akira Shimahara wrote: > Fix reset_select_slave issue during devices discovery by the master on > bus. The w1_reset_select_slave() from w1_io.c, which was previously used, > assume that if the slave count is 1 there is only one slave attached on > the bus.

Re: [PATCH v4 1/9] w1_therm: creating w1_therm.h

2020-05-05 Thread Greg KH
On Thu, Apr 30, 2020 at 12:59:15AM +0200, Akira Shimahara wrote: > Creating w1_therm.h header to organize code. Organize the w1_therm.c file > to gather hardware functions, device specific functions, interface > functions and sysfs functions. > > Signed-off-by: Akira Shimahara > --- >

Re: [net-next PATCH v3 1/5] net: phy: Introduce phy related fwnode functions

2020-05-05 Thread Russell King - ARM Linux admin
On Tue, May 05, 2020 at 06:59:01PM +0530, Calvin Johnson wrote: > Define fwnode_phy_find_device() to iterate an mdiobus and find the > phy device of the provided phy fwnode. Additionally define > device_phy_find_device() to find phy device of provided device. > > Define fwnode_get_phy_node() to

Re: [PATCH] drm/amdgpu: Avoid integer overflow in amdgpu_device_suspend_display_audio

2020-05-05 Thread Alex Deucher
On Sat, May 2, 2020 at 4:35 AM Nathan Chancellor wrote: > > When building with Clang: > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4160:53: warning: overflow in > expression; result is -294967296 with type 'long' [-Winteger-overflow] > expires = ktime_get_mono_fast_ns() +

Re: [PATCH 2/4 v2] firmware: stratix10-svc: Unmap some previously memremap'ed memory

2020-05-05 Thread Greg KH
On Wed, Apr 29, 2020 at 08:52:43AM +0200, Christophe JAILLET wrote: > In 'svc_create_memory_pool()' we memremap some memory. This has to be > undone in case of error and if the driver is removed. > > The easiest way to do it is to use 'devm_memremap()'. > > Fixes: 7ca5ce896524 ("firmware: add

Re: [PATCH] ARM: use ARM unwinder for gcov

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 4:19 PM Russell King - ARM Linux admin wrote: > > On Tue, May 05, 2020 at 04:11:56PM +0200, Arnd Bergmann wrote: > > Using gcov on ARM fails when the frame pointer unwinder is used: > > > > arm-linux-gnueabi-ld: kernel/softirq.o:(.ARM.exidx+0x120): undefined > > reference

Re: [PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Gustavo A. R. Silva
On 5/5/20 09:30, Arnd Bergmann wrote: > gcc-10 warns about accesses into the f_handle[] zero-length array. > > fs/notify/fdinfo.c: In function 'show_mark_fhandle': > fs/notify/fdinfo.c:66:47: error: array subscript 'i' is outside the bounds of > an interior zero-length array 'unsigned

Re: [PATCH v3 2/5] bus: stm32: Introduce firewall controller helpers

2020-05-05 Thread Greg KH
On Tue, May 05, 2020 at 09:33:05AM +0200, Benjamin Gaignard wrote: > The goal of these helpers are to offer an interface for the > hardware blocks controlling bus accesses rights. > > Bus firewall controllers are typically used to control if a > hardware block can perform read or write operations

Re: [PATCH v2 1/1] fs/splice: add missing callback for inaccessible pages

2020-05-05 Thread Christian Borntraeger
On 05.05.20 16:34, Dave Hansen wrote: > On 5/5/20 7:31 AM, Christian Borntraeger wrote: >>> So, the requirements are: >>> >>> 1. Allow host-side DMA and CPU access to shared pages >>> 2. Stop host-side DMA and CPU access to encrypted pages >>> 3. Allow pages to be converted between the states

Re: [GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher

2020-05-05 Thread Lukasz Hawrylko
On Tue, 2020-05-05 at 01:21 +0200, Daniel Kiper wrote: > Hi, > > This is an RFC patchset for the GRUB introducing the Intel TXT secure > launcher. > This is a part of larger work known as the TrenchBoot. Patchset can be split > into two distinct parts: > - 01-12: preparatory patches, > -

Re: [PATCH v4 1/4] i2c: at91: Send bus clear command if SDA is down

2020-05-05 Thread Wolfram Sang
On Tue, Feb 25, 2020 at 05:50:09PM +0200, Codrin Ciubotariu wrote: > After a transfer timeout, some faulty I2C slave devices might hold down > the SDA pin. We can generate a bus clear command, hoping that the slave > might release the pins. > If the CLEAR command is not supported, we will use gpio

Re: [PATCH 4.19 STABLE 2/2] KVM: VMX: Mark RCX, RDX and RSI as clobbered in vmx_vcpu_run()'s asm blob

2020-05-05 Thread Sean Christopherson
On Tue, May 05, 2020 at 09:02:59AM +0200, Greg Kroah-Hartman wrote: > On Mon, May 04, 2020 at 11:27:31PM -0700, Sean Christopherson wrote: > > On Tue, May 05, 2020 at 08:15:02AM +0200, Greg Kroah-Hartman wrote: > > > On Mon, May 04, 2020 at 06:23:48PM -0700, Sean Christopherson wrote: > > > > Save

Re: [PATCH v2 2/3] lib kallsyms: parse using io api

2020-05-05 Thread Ian Rogers
On Tue, May 5, 2020 at 7:25 AM Jiri Olsa wrote: > > On Fri, May 01, 2020 at 03:13:14PM -0700, Ian Rogers wrote: > > SNIP > > > diff --git a/tools/lib/symbol/kallsyms.c b/tools/lib/symbol/kallsyms.c > > index 1a7a9f877095..e335ac2b9e19 100644 > > --- a/tools/lib/symbol/kallsyms.c > > +++

[PATCH v3 2/3] lib kallsyms: parse using io api

2020-05-05 Thread Ian Rogers
Perf record will call kallsyms__parse 4 times during startup and process megabytes of data. This changes kallsyms__parse to use the io library rather than fgets to improve performance of the user code by over 8%. Before: Running 'internals/kallsyms-parse' benchmark: Average kallsyms__parse

Re: [net-next PATCH v3 3/5] phylink: Introduce phylink_fwnode_phy_connect()

2020-05-05 Thread Russell King - ARM Linux admin
On Tue, May 05, 2020 at 06:59:03PM +0530, Calvin Johnson wrote: > Define phylink_fwnode_phy_connect() to connect phy specified by > a fwnode to a phylink instance. > > Signed-off-by: Calvin Johnson > --- > > Changes in v3: > remove NULL return check as it is invalid > remove unused

Re: [PATCH] ubsan, kcsan: don't combine sanitizer with kcov

2020-05-05 Thread Marco Elver
On Tue, 5 May 2020 at 16:23, Arnd Bergmann wrote: > > Clang does not allow -fsanitize-coverage=trace-{pc,cmp} together > with -fsanitize=bounds or with ubsan: > > clang: error: argument unused during compilation: > '-fsanitize-coverage=trace-pc' [-Werror,-Wunused-command-line-argument] > clang:

[PATCH v3 0/3] Improvements for kallsyms__parse

2020-05-05 Thread Ian Rogers
kallsyms__parse is called 4 times during perf record startup. Add a benchmark to measure its performance. Transition it to using the api io.h buffered reading, improving performance by ~8% or saving ~5% from perf record start up time. v3. Fixed a link error report in hex2u64 by jo...@redhat.com.

[PATCH v3 3/3] lib kallsyms: move hex2u64 out of header

2020-05-05 Thread Ian Rogers
hex2u64 is a helper that's out of place in kallsyms.h as not being kallsyms related. Move from kallsyms.h to the only user. Signed-off-by: Ian Rogers --- tools/lib/symbol/kallsyms.c | 13 - tools/lib/symbol/kallsyms.h | 2 -- tools/perf/util/symbol.c| 14 ++ 3 files

[PATCH v3 1/3] perf bench: add kallsyms parsing

2020-05-05 Thread Ian Rogers
Add a benchmark for kallsyms parsing. Example output: Running 'internals/kallsyms-parse' benchmark: Average kallsyms__parse took: 103.971 ms (+- 0.121 ms) Signed-off-by: Ian Rogers --- tools/perf/bench/Build| 1 + tools/perf/bench/bench.h | 1 +

Re: [PATCH v2 1/1] fs/splice: add missing callback for inaccessible pages

2020-05-05 Thread Dave Hansen
On 5/5/20 7:31 AM, Christian Borntraeger wrote: >> So, the requirements are: >> >> 1. Allow host-side DMA and CPU access to shared pages >> 2. Stop host-side DMA and CPU access to encrypted pages >> 3. Allow pages to be converted between the states at the request of the >>guest >> >> Stopping

[PATCH] wil6210: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Arnd Bergmann
gcc-10 warns about accesses inside of a zero-length array: drivers/net/wireless/ath/wil6210/cfg80211.c: In function 'wil_cfg80211_scan': drivers/net/wireless/ath/wil6210/cfg80211.c:970:23: error: array subscript 255 is outside the bounds of an interior zero-length array 'struct [0]'

Re: [PATCH] xenbus: avoid stack overflow warning

2020-05-05 Thread Jürgen Groß
On 05.05.20 16:15, Arnd Bergmann wrote: The __xenbus_map_ring() function has two large arrays, 'map' and 'unmap' on its stack. When clang decides to inline it into its caller, xenbus_map_ring_valloc_hvm(), the total stack usage exceeds the warning limit for stack size on 32-bit architectures.

Re: [PATCH v2 1/1] fs/splice: add missing callback for inaccessible pages

2020-05-05 Thread Ulrich Weigand
On Tue, May 05, 2020 at 04:03:00PM +0200, Christian Borntraeger wrote: > > Just looked at > > commit 88b1a17dfc3ed7728316478fae0f5ad508f50397 mm: add 'try_get_page()' > > helper function > > > > which says: > > Also like 'get_page()', you can't use this function unless you already > >

Re: WARNING: proc registration bug in snmp6_register_dev

2020-05-05 Thread Taehee Yoo
On Thu, 16 Apr 2020 at 07:46, syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:ab6f762f printk: queue wake_up_klogd irq_work only if per-.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1395613fe0 > kernel config:

Re: [v2] fs: jfs: fix a possible data race in metapage_writepage()

2020-05-05 Thread Markus Elfring
>>> This data race is found by our concurrency fuzzer. >> * How do you think about to replace the word “is” by “was”? > > Okay. Can such a positive feedback influence the change descriptions for any of your other patches? Regards, Markus

Re: [PATCH v2 1/1] fs/splice: add missing callback for inaccessible pages

2020-05-05 Thread Christian Borntraeger
On 05.05.20 16:24, Dave Hansen wrote: > On 5/5/20 7:00 AM, Christian Borntraeger wrote: >> We are certainly not married to our approach. I would happily extend/change >> this to anything that works for your case and the s390 case. So can you >> outline >> your requirements a bit more? > > For

[PATCH] fsnotify: avoid gcc-10 zero-length-bounds warning

2020-05-05 Thread Arnd Bergmann
gcc-10 warns about accesses into the f_handle[] zero-length array. fs/notify/fdinfo.c: In function 'show_mark_fhandle': fs/notify/fdinfo.c:66:47: error: array subscript 'i' is outside the bounds of an interior zero-length array 'unsigned char[0]' [-Werror=zero-length-bounds] 66 |

Re: [PATCH 1/1] epoll: call final ep_events_available() check under the lock

2020-05-05 Thread Jason Baron
On 5/5/20 4:40 AM, Roman Penyaev wrote: > The original problem was described here: >https://lkml.org/lkml/2020/4/27/1121 > > There is a possible race when ep_scan_ready_list() leaves ->rdllist > and ->obflist empty for a short period of time although some events > are pending. It is quite

Re: [PATCH] i2c: use my kernel.org address from now on

2020-05-05 Thread Wolfram Sang
On Sat, May 02, 2020 at 02:18:35PM +0200, Wolfram Sang wrote: > The old email is still active, but for easier handling, I am going to > use my kernel.org address from now on. Also, add a mailmap for the now > defunct Pengutronix address. > > Signed-off-by: Wolfram Sang Applied to for-current,

Re: [PATCH] ARM: omap1: fix irq setup

2020-05-05 Thread afzal mohammed
Hi, On Tue, May 05, 2020 at 04:13:48PM +0200, Arnd Bergmann wrote: > A recent cleanup introduced a bug on any omap1 machine that has > no wakeup IRQ, i.e. omap15xx: > Move this code into a separate function to deal with it cleanly. > > Fixes: b75ca5217743 ("ARM: OMAP: replace setup_irq() by

Re: [PATCH v2] fs: jfs: fix a possible data race in metapage_writepage()

2020-05-05 Thread Dave Kleikamp
On 5/5/20 9:15 AM, Markus Elfring wrote: >> This data race is found by our concurrency fuzzer. > > * How do you think about to replace the word “is” by “was”? > > * Is this analysis tool publicly available? > > > … >> --- >> fs/jfs/jfs_metapage.c | 11 +-- > > I suggest to omit the

Re: [PATCH] mmc: rtsx: Add SD Express mode support for RTS5261

2020-05-05 Thread Greg KH
On Sun, Apr 26, 2020 at 09:25:46AM +0800, rui_f...@realsil.com.cn wrote: > From: Rui Feng > > RTS5261 support legacy SD mode and SD Express mode. > In SD7.x, SD association introduce SD Express as a new mode. > SD Express mode is distinguished by CMD8. > Therefore, CMD8 has new bit for SD

Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-05-05 Thread Michael Ellerman
Christophe Leroy writes: > unsafe_put_user() is designed to take benefit of 'asm goto'. > > Instead of using the standard __put_user() approach and branch > based on the returned error, use 'asm goto' and make the > exception code branch directly to the error label. There is > no code anymore in

Re: [PATCH 5.6 00/73] 5.6.11-rc1 review

2020-05-05 Thread Naresh Kamboju
On Mon, 4 May 2020 at 23:36, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.6.11 release. > There are 73 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > >

Re: [PATCH 4/5] platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Portable" chassis-types

2020-05-05 Thread Andy Shevchenko
On Tue, May 5, 2020 at 5:22 PM wrote: > > > -Original Message- > > From: platform-driver-x86-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Hans de Goede > > Sent: Tuesday, May 5, 2020 4:06 AM > > To: Limonciello, Mario; dvh...@infradead.org; a...@infradead.org > > Cc:

Re: [PATCH] i2c: fix missing pm_runtime_put_sync in i2c_device_probe

2020-05-05 Thread Wolfram Sang
On Thu, Apr 30, 2020 at 05:43:21PM +0200, Alain Volmat wrote: > In case of the I2C client exposes the flag I2C_CLIENT_HOST_NOTIFY, > pm_runtime_get_sync is called in order to always keep active the > adapter. However later on, pm_runtime_put_sync is never called > within the function in case of an

Re: [PATCH v3 1/3] media: rkvdec: Fix .buf_prepare

2020-05-05 Thread Ezequiel Garcia
On Tue, 2020-05-05 at 16:05 +0200, Tomasz Figa wrote: > On Tue, May 5, 2020 at 3:59 PM Ezequiel Garcia wrote: > > On Tue, 2020-05-05 at 15:56 +0200, Tomasz Figa wrote: > > > Hi Ezequiel, > > > > > > On Tue, May 5, 2020 at 3:41 PM Ezequiel Garcia > > > wrote: > > > > The driver should only set

Re: [PATCH v4 1/2] sched/uclamp: Add a new sysctl to control RT default boost value

2020-05-05 Thread Qais Yousef
On 05/03/20 19:37, Patrick Bellasi wrote: [...] > > +static inline void uclamp_sync_util_min_rt_default(struct task_struct *p, > > + enum uclamp_id clamp_id) > > +{ > > + struct uclamp_se *uc_se; > > + > > + /* Only sync for UCLAMP_MIN and RT

Re: [PATCH] sched/fair: Fix nohz.next_balance update

2020-05-05 Thread Vincent Guittot
Le mardi 05 mai 2020 à 21:40:56 (+0800), Peng Liu a écrit : > On Mon, May 04, 2020 at 05:17:11PM +0200, Vincent Guittot wrote: > > On Sun, 3 May 2020 at 10:34, Peng Liu wrote: > > > > > > commit c5afb6a87f23 ("sched/fair: Fix nohz.next_balance update") > > > During idle load balance,

Re: [PATCH] arm64: disable patchable function entry on big-endian clang builds

2020-05-05 Thread Mark Rutland
On Tue, May 05, 2020 at 04:12:36PM +0200, Arnd Bergmann wrote: > Clang only supports the patchable_function_entry attribute on > little-endian arm64 builds, but not on big-endian: > > include/linux/kasan-checks.h:16:8: error: unknown attribute > 'patchable_function_entry' ignored

[PATCH] drm/amdgpu/dc: don't pass -mhard-float to clang

2020-05-05 Thread Arnd Bergmann
Clang does not appear to care, and instead prints a warning: clang: warning: argument unused during compilation: '-mhard-float' [-Wunused-command-line-argument] Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 5 +++--

Re: [PATCH v2 2/3] lib kallsyms: parse using io api

2020-05-05 Thread Jiri Olsa
On Fri, May 01, 2020 at 03:13:14PM -0700, Ian Rogers wrote: SNIP > diff --git a/tools/lib/symbol/kallsyms.c b/tools/lib/symbol/kallsyms.c > index 1a7a9f877095..e335ac2b9e19 100644 > --- a/tools/lib/symbol/kallsyms.c > +++ b/tools/lib/symbol/kallsyms.c > @@ -1,7 +1,9 @@ > //

[PATCH] iio: adc: ad7476: fix clang -Wpointer-bool-conversion warning

2020-05-05 Thread Arnd Bergmann
Checking the pointer value of st->chip_info->convst_channel is pointless since this this an array inside of a struct: even if st->chip_info is NULL, the pointer is non-zero. Clang warns about this: drivers/iio/adc/ad7476.c:312:40: warning: address of array 'st->chip_info->convst_channel' will

Re: RE: [PATCH net 0/2] Revert the 'socket_alloc' life cycle change

2020-05-05 Thread SeongJae Park
On Tue, 5 May 2020 13:44:42 +0100 Al Viro wrote: > CAUTION: This email originated from outside of the organization. Do not cli= > ck links or open attachments unless you can confirm the sender and know the= > content is safe. > > > > On Tue, May 05, 2020 at 09:28:39AM +0200, SeongJae Park

[patch V4 part 1 03/36] sched: Clean up scheduler_ipi()

2020-05-05 Thread Thomas Gleixner
The scheduler IPI has grown weird and wonderful over the years, time for spring cleaning. Move all the non-trivial stuff out of it and into a regular smp function call IPI. This then reduces the schedule_ipi() to most of it's former MOP glory and ensures to keep the interrupt vector lean and

Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist

2020-05-05 Thread shuah
On 5/5/20 7:09 AM, Steven Rostedt wrote: You keep forgetting to Cc Shuah's other email. On Tue, 5 May 2020 18:14:45 +0800 Po-Hsu Lin wrote: The UNRESOLVED state is much more apporiate than the UNSUPPORTED state for the absence of the test module, as it matches "test was set up incorrectly"

Re: [PATCH] serial: lantiq: Add x86 in Kconfig dependencies for Lantiq serial driver

2020-05-05 Thread Greg KH
On Mon, May 04, 2020 at 04:03:52PM +0800, Rahul Tanwar wrote: > Lantiq serial driver/IP is reused for a x86 based SoC as well. > Update the Kconfig accordingly. > > Signed-off-by: Rahul Tanwar > --- > drivers/tty/serial/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Dārgais Dieva izredzētais

2020-05-05 Thread Mrs. vivian Ouedrago
Dārgais Dieva izredzētais Es rakstu jums šo vēstuli ar smagām asarām acīs un sirdī ar lielām bēdām. Mans vārds ir vivian Ouedrago kundze, es esmu no Tunisijas un sazinājos ar jums no Burkinafaso slimnīcas, es gribu jums to pateikt, jo es Jums nav citas iespējas kā pateikt, kad mani uzrunāja

[patch V4 part 1 00/36] x86/entry: Entry/exception code rework, preparatory patches

2020-05-05 Thread Thomas Gleixner
Folks! This is the hopefully final version of the rework of the entry and exception code to ensure that instrumentation cannot touch the fragile parts of the hardware induced entry and exception code trainwreck. It further ensures correctness vs. RCU and moves quite some code out of the assembly

[patch V4 part 1 12/36] x86/kvm: Sanitize kvm_async_pf_task_wait()

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner While working on the entry consolidation I stumbled over the KVM async page fault handler and kvm_async_pf_task_wait() in particular. It took me a while to realize that the randomly sprinkled around rcu_irq_enter()/exit() invocations are just cargo cult programming. Several

[patch V4 part 1 09/36] x86/entry/64: Avoid pointless code when CONTEXT_TRACKING=n

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner GAS cannot optimize out the test and conditional jump when context tracking is disabled and CALL_enter_from_user_mode is an empty macro. Wrap it in #ifdeffery. Will go away once all this is moved to C. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre

[patch V4 part 1 07/36] locking/atomics: Flip fallbacks and instrumentation

2020-05-05 Thread Thomas Gleixner
Currently instrumentation of atomic primitives is done at the architecture level, while composites or fallbacks are provided at the generic level. The result is that there are no uninstrumented variants of the fallbacks. Since there is now need of such (see the next patch), invert this ordering.

[patch V4 part 1 20/36] vmlinux.lds.h: Create section for protection against instrumentation

2020-05-05 Thread Thomas Gleixner
Some code pathes, especially the low level entry code, must be protected against instrumentation for various reasons: - Low level entry code can be a fragile beast, especially on x86. - With NO_HZ_FULL RCU state needs to be established before using it. Having a dedicated section for such code

Re: [PATCH v2 1/1] fs/splice: add missing callback for inaccessible pages

2020-05-05 Thread Dave Hansen
On 5/5/20 7:00 AM, Christian Borntraeger wrote: > We are certainly not married to our approach. I would happily extend/change > this to anything that works for your case and the s390 case. So can you > outline > your requirements a bit more? For SEV, the guest define which pages are encrypted or

[patch V4 part 1 06/36] compiler: Simple READ/WRITE_ONCE() implementations

2020-05-05 Thread Thomas Gleixner
READ/WRITE_ONCE_NOCHECK() is required for atomics in code which cannot be instrumented like the x86 int3 text poke code. As READ/WRITE_ONCE() is undergoing a rewrite, provide __{READ,WRITE}_ONCE_SCALAR(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner ---

[patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-05 Thread Thomas Gleixner
Make sure task_work runs before any kind of userspace -- very much including signals -- is invoked. Suggested-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner --- arch/x86/entry/common.c |8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH] ubsan, kcsan: don't combine sanitizer with kcov

2020-05-05 Thread Arnd Bergmann
Clang does not allow -fsanitize-coverage=trace-{pc,cmp} together with -fsanitize=bounds or with ubsan: clang: error: argument unused during compilation: '-fsanitize-coverage=trace-pc' [-Werror,-Wunused-command-line-argument] clang: error: argument unused during compilation:

[patch V4 part 1 11/36] x86/kvm: Handle async page faults directly through do_page_fault()

2020-05-05 Thread Thomas Gleixner
From: Andy Lutomirski KVM overloads #PF to indicate two types of not-actually-page-fault events. Right now, the KVM guest code intercepts them by modifying the IDT and hooking the #PF vector. This makes the already fragile fault code even harder to understand, and it also pollutes call traces

[patch V4 part 1 04/36] sched: Make scheduler_ipi inline

2020-05-05 Thread Thomas Gleixner
Now that the scheduler IPI is trivial and simple again there is no point to have the little function out of line. This simplifies the effort of constraining the instrumentation nicely. Signed-off-by: Thomas Gleixner --- include/linux/sched.h | 10 +- kernel/sched/core.c | 10

[patch V4 part 1 08/36] x86/doublefault: Remove memmove() call

2020-05-05 Thread Thomas Gleixner
Use of memmove() in #DF is problematic considered tracing and other instrumentation. Remove the memmove() call and simply write out what needs doing; this even clarifies the code, win-win! The code copies from the espfix64 stack to the normal task stack, there is no possible way for that to

[patch V4 part 1 01/36] rcu: Add comments marking transitions between RCU watching and not

2020-05-05 Thread Thomas Gleixner
From: "Paul E. McKenney" It is not as clear as it might be just where in RCU's idle entry/exit code RCU stops and starts watching the current CPU. This commit therefore adds comments calling out the transitions. Reported-by: Thomas Gleixner Signed-off-by: Paul E. McKenney Signed-off-by:

[PATCH] net: wireguard: avoid unused variable warning

2020-05-05 Thread Arnd Bergmann
clang points out a harmless use of uninitialized variables that get passed into a local function but are ignored there: In file included from drivers/net/wireguard/ratelimiter.c:223: drivers/net/wireguard/selftest/ratelimiter.c:173:34: error: variable 'skb6' is uninitialized when used here

[patch V4 part 1 02/36] x86/hw_breakpoint: Prevent data breakpoints on cpu_entry_area

2020-05-05 Thread Thomas Gleixner
From: Andy Lutomirski A data breakpoint near the top of an IST stack will cause unresoverable recursion. A data breakpoint on the GDT, IDT, or TSS is terrifying. Prevent either of these from happening. Co-developed-by: Peter Zijlstra Signed-off-by: Andy Lutomirski Signed-off-by: Peter

Re: [PATCH V2] ASoC: Intel: boards: Use FS as nau8825 sysclk in nau88125_* machine

2020-05-05 Thread Radosław Biernacki
Thank you Pierre for the review! answers inline pt., 1 maj 2020 o 22:16 Pierre-Louis Bossart wrote: > > > > On 5/1/20 2:31 PM, Radoslaw Biernacki wrote: > > This single fix address two issues on machines with nau88125: > > 1) Audio distortion, due to lack of required clock rate on MCLK line > >

[patch V4 part 1 16/36] kprobes: Support __kprobes blacklist in modules

2020-05-05 Thread Thomas Gleixner
From: Masami Hiramatsu Support __kprobes attribute for blacklist functions in modules. The __kprobes attribute functions are stored in .kprobes.text section. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Link:

[patch V4 part 1 17/36] kprobes: Support NOKPROBE_SYMBOL() in modules

2020-05-05 Thread Thomas Gleixner
From: Masami Hiramatsu Support NOKPROBE_SYMBOL() in modules. NOKPROBE_SYMBOL() records only symbol address in "_kprobe_blacklist" section in the module. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Link:

[patch V4 part 2 02/18] x86/entry/32: Move non entry code into .text section

2020-05-05 Thread Thomas Gleixner
All ASM code which is not part of the entry functionality can move out into the .text section. No reason to keep it in the non-instrumentable entry section. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_32.S | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) ---

[patch V4 part 1 21/36] kprobes: Prevent probes in .noinstr.text section

2020-05-05 Thread Thomas Gleixner
Instrumentation is forbidden in the .noinstr.text section. Make kprobes respect this. Signed-off-by: Thomas Gleixner --- include/linux/module.h |2 ++ kernel/kprobes.c | 18 ++ kernel/module.c|3 +++ 3 files changed, 23 insertions(+) ---

Re: [PATCH v8 1/3] serial: samsung: Replace rd_regb/wr_regb with rd_reg/wr_reg

2020-05-05 Thread Greg Kroah-Hartman
On Mon, Apr 20, 2020 at 10:32:56AM +0900, Hyunki Koo wrote: > This patch change the name of macro for general usage. > > Signed-off-by: Hyunki Koo This patch series creates the following build error, which is not allowed: CC [M] drivers/tty/serial/samsung_tty.o

[patch V4 part 1 15/36] kprobes: Lock kprobe_mutex while showing kprobe_blacklist

2020-05-05 Thread Thomas Gleixner
From: Masami Hiramatsu Lock kprobe_mutex while showing kprobe_blacklist to prevent updating the kprobe_blacklist. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/158523417665.24735.10253198878535635600.stgit@devnote2 --- kernel/kprobes.c |

[patch V4 part 1 24/36] lockdep: Prepare for noinstr sections

2020-05-05 Thread Thomas Gleixner
From: Peter Zijlstra Force inlining and prevent instrumentation of all sorts by marking the functions which are invoked from low level entry code with 'noinstr'. Split the irqflags tracking into two parts. One which does the heavy lifting while RCU is watching and the final one which can be

[patch V4 part 2 06/18] x86/entry: Move irq flags tracing to prepare_exit_to_usermode()

2020-05-05 Thread Thomas Gleixner
This is another step towards more C-code and less convoluted ASM. Similar to the entry path, invoke the tracer before context tracking which might turn off RCU and invoke lockdep as the last step before going back to user space. Annotate the code sections in exit_to_user_mode() accordingly so

[PATCH] ARM: omap1: fix irq setup

2020-05-05 Thread Arnd Bergmann
A recent cleanup introduced a bug on any omap1 machine that has no wakeup IRQ, i.e. omap15xx: arch/arm/mach-omap1/pm.c:656:11: error: variable 'irq' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] else if (cpu_is_omap16xx())

[patch V4 part 2 01/18] x86/entry/64: Move non entry code into .text section

2020-05-05 Thread Thomas Gleixner
All ASM code which is not part of the entry functionality can move out into the .text section. No reason to keep it in the non-instrumentable entry section. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_64.S | 10 ++ arch/x86/kernel/ftrace_64.S |2 +- 2 files changed,

[patch V4 part 1 27/36] arm64: Prepare arch_nmi_enter() for recursion

2020-05-05 Thread Thomas Gleixner
From: Frederic Weisbecker Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Catalin Marinas --- arch/arm64/include/asm/hardirq.h | 78 +-- 1 file changed, 59 insertions(+), 19

[patch V4 part 1 19/36] x86/entry: Exclude low level entry code from sanitizing

2020-05-05 Thread Thomas Gleixner
The sanitizers are not really applicable to the fragile low level entry code. code. Entry code needs to carefully setup a normal 'runtime' environment. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner --- arch/x86/entry/Makefile |8 1 file changed, 8

Re: [PATCH v12 1/2] media: dt-bindings: media: xilinx: Add Xilinx MIPI CSI-2 Rx Subsystem

2020-05-05 Thread Laurent Pinchart
Hi Vishal, Thank you for the patch. On Thu, Apr 23, 2020 at 09:00:37PM +0530, Vishal Sagar wrote: > Add bindings documentation for Xilinx MIPI CSI-2 Rx Subsystem. > > The Xilinx MIPI CSI-2 Rx Subsystem consists of a CSI-2 Rx controller, a > D-PHY in Rx mode and a Video Format Bridge. > >

[patch V4 part 1 31/36] printk: Disallow instrumenting print_nmi_enter()

2020-05-05 Thread Thomas Gleixner
From: Peter Zijlstra It happens early in nmi_enter(), no tracing, probing or other funnies allowed. Specifically as nmi_enter() will be used in do_debug(), which would cause recursive exceptions when kprobed. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner ---

[patch V4 part 1 28/36] hardirq/nmi: Allow nested nmi_enter()

2020-05-05 Thread Thomas Gleixner
From: Peter Zijlstra Since there are already a number of sites (ARM64, PowerPC) that effectively nest nmi_enter(), make the primitive support this before adding even more. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Acked-by: Will Deacon Cc:

[patch V4 part 1 14/36] x86/entry: Get rid of ist_begin/end_non_atomic()

2020-05-05 Thread Thomas Gleixner
This is completely overengineered and definitely not an interface which should be made available to anything else than this particular MCE case. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/traps.h |2 -- arch/x86/kernel/cpu/mce/core.c |6 -- arch/x86/kernel/traps.c

[patch V4 part 1 25/36] rcu/tree: Mark the idle relevant functions noinstr

2020-05-05 Thread Thomas Gleixner
These functions are invoked from context tracking and other places in the low level entry code. Move them into the .noinstr.text section to exclude them from instrumentation. Mark the places which are safe to invoke traceable functions with instr_begin/end() so objtool won't complain.

[patch V4 part 2 05/18] x86/entry: Move irq tracing on syscall entry to C-code

2020-05-05 Thread Thomas Gleixner
Now that the C entry points are safe, move the irq flags tracing code into the entry helper: - Invoke lockdep before calling into context tracking - Use the safe trace_hardirqs_on_prepare() trace function after context tracking established state and RCU is watching. Signed-off-by:

[patch V4 part 2 07/18] context_tracking: Ensure that the critical path cannot be instrumented

2020-05-05 Thread Thomas Gleixner
context tracking lacks a few protection mechanisms against instrumentation: - While the core functions are marked NOKPROBE they lack protection against function tracing which is required as the function entry/exit points can be utilized by BPF. - static functions invoked from the

[PATCH] media: usb: ttusb-dec: avoid buffer overflow in ttusb_dec_handle_irq() when DMA failures/attacks occur

2020-05-05 Thread Jia-Ju Bai
In ttusb_dec_init_usb(): dec->irq_buffer = usb_alloc_coherent(...) Thus, "dec->irq_buffer" is a DMA value, and it is assigned to "buffer" in ttusb_dec_handle_irq(): char *buffer = dec->irq_buffer; When DMA failures or attacks occur, the value of buffer[4] can be changed at any time. In this

[patch V4 part 2 10/18] x86/entry/64: Check IF in __preempt_enable_notrace() thunk

2020-05-05 Thread Thomas Gleixner
The preempt_enable_notrace() ASM thunk is called from tracing, entry code RCU and other places which are already in or going to be in the noinstr section which protects sensitve code from being instrumented. Calls out of these sections happen with interrupts disabled, which is handled in C code,

Re: [net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-05-05 Thread Andy Shevchenko
On Tue, May 5, 2020 at 4:30 PM Calvin Johnson wrote: > > Introduce fwnode_mdiobus_register_phy() to register PHYs on the > mdiobus. From the compatible string, identify whether the PHY is > c45 and based on this create a PHY device instance which is > registered on the mdiobus. ... > +int

Re: [PATCH v2] fs: jfs: fix a possible data race in metapage_writepage()

2020-05-05 Thread Jia-Ju Bai
On 2020/5/5 22:15, Markus Elfring wrote: This data race is found by our concurrency fuzzer. * How do you think about to replace the word “is” by “was”? Okay. * Is this analysis tool publicly available? Not yet, because we are still developing this tool... … ---

[patch V4 part 3 01/29] x86/traps: Mark fixup_bad_iret() noinstr

2020-05-05 Thread Thomas Gleixner
This is called from deep entry ASM in a situation where instrumentation will cause more harm than providing useful information. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/traps.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) --- a/arch/x86/kernel/traps.c +++

[patch V4 part 2 13/18] x86/kvm: Move context tracking where it belongs

2020-05-05 Thread Thomas Gleixner
Context tracking for KVM happens way too early in the vcpu_run() code. Anything after guest_enter_irqoff() and before guest_exit_irqoff() cannot use RCU and should also be not instrumented. The current way of doing this covers way too much code. Move it closer to the actual vmenter/exit code.

[patch V4 part 3 10/29] x86/idtentry: Provide macros to define/declare IDT entry points

2020-05-05 Thread Thomas Gleixner
Provide DECLARE/DEFINE_IDTENTRY() macros. DEFINE_IDTENTRY() provides a wrapper which acts as the function definition. The exception handler body is just appended to it with curly brackets. The entry point is marked notrace/noprobe so that irq tracing and the enter_from_user_mode() can be moved

[patch V4 part 2 12/18] x86,objtool: Make entry_64_compat.S objtool clean

2020-05-05 Thread Thomas Gleixner
Currently entry_64_compat is exempt from objtool, but with vmlinux mode there is no hiding it. Make the following changes to make it pass: - change entry_SYSENTER_compat to STT_NOTYPE; it's not a function and doesn't have function type stack setup. - mark all STT_NOTYPE symbols with

RE: [PATCH 4/5] platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Portable" chassis-types

2020-05-05 Thread Mario.Limonciello
> -Original Message- > From: platform-driver-x86-ow...@vger.kernel.org ow...@vger.kernel.org> On Behalf Of Hans de Goede > Sent: Tuesday, May 5, 2020 4:06 AM > To: Limonciello, Mario; dvh...@infradead.org; a...@infradead.org > Cc: linux-a...@vger.kernel.org;

[patch V4 part 3 08/29] x86/entry/64: Provide sane error entry/exit

2020-05-05 Thread Thomas Gleixner
For gradual conversion provide a macro parameter and the required code which allows to handle instrumentation and interrupt flags tracking in C. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_64.S | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) ---

[patch V4 part 3 05/29] x86/traps: Split trap numbers out in a seperate header

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner So they can be used in ASM code. For this it is also necessary to convert them to defines. Will be used for the rework of the entry code. Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Reviewed-by: Alexandre Chartre --- arch/x86/include/asm/trapnr.h |

Re: [PATCH v2] arm64: cacheflush: Fix KGDB trap detection

2020-05-05 Thread Daniel Thompson
On Mon, May 04, 2020 at 09:48:04PM +0100, Will Deacon wrote: > On Mon, May 04, 2020 at 06:05:18PM +0100, Daniel Thompson wrote: > > flush_icache_range() contains a bodge to avoid issuing IPIs when the kgdb > > trap handler is running because issuing IPIs is unsafe (and not needed) > > in this

[patch V4 part 3 19/29] x86/entry: Convert Coprocessor segment overrun exception to IDTENTRY

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner Convert #OLD_MF to IDTENTRY: - Implement the C entry point with DEFINE_IDTENTRY - Emit the ASM stub with DECLARE_IDTENTRY - Remove the ASM idtentry in 64bit - Remove the open coded ASM entry code in 32bit - Fixup the XEN/PV code - Remove the old prototyoes No

[patch V4 part 3 15/29] x86/entry: Convert Overflow exception to IDTENTRY

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner Convert #OF to IDTENTRY: - Implement the C entry point with DEFINE_IDTENTRY - Emit the ASM stub with DECLARE_IDTENTRY - Remove the ASM idtentry in 64bit - Remove the open coded ASM entry code in 32bit - Fixup the XEN/PV code - Remove the old prototyoes No

[patch V4 part 3 16/29] x86/entry: Convert Bounds exception to IDTENTRY

2020-05-05 Thread Thomas Gleixner
From: Thomas Gleixner Convert #BR to IDTENTRY: - Implement the C entry point with DEFINE_IDTENTRY - Emit the ASM stub with DECLARE_IDTENTRY - Remove the ASM idtentry in 64bit - Remove the open coded ASM entry code in 32bit - Fixup the XEN/PV code - Remove the old prototyoes -

Re: [RFC net-next] net: phy: at803x: add cable diagnostics support

2020-05-05 Thread Michael Walle
Am 2020-05-05 15:07, schrieb Andrew Lunn: +static int at803x_cable_test_get_status(struct phy_device *phydev, + bool *finished) +{ + struct at803x_priv *priv = phydev->priv; + static const int ethtool_pair[] = { +

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-05 Thread Russell King - ARM Linux admin
On Tue, May 05, 2020 at 05:15:16PM +0300, Andy Shevchenko wrote: > On Tue, May 5, 2020 at 4:29 PM Calvin Johnson > > + if (sscanf(cp, "ethernet-phy-id%4x.%4x", > > + , ) == 2) { > > > + *phy_id = ((upper & 0x) << 16) | (lower & > >

<    4   5   6   7   8   9   10   11   12   13   >