Re: [PATCH 1/3] dt-bindings: serial: amlogic, meson-uart: add amlogic, uart-fifosize property

2021-03-23 Thread Martin Blumenstingl
Hi Neil, On Mon, Mar 15, 2021 at 9:37 AM Neil Armstrong wrote: > > On most of the Amlogic SoCs, the first UART controller in the > "Everything-Else" > power domain has 128bytes of RX & TX FIFO, so add an optional property to > describe do we still need wrapping of long lines in commit

Re: [PATCH v3 1/3] input: gpio-keys: Remove extra call to input_sync

2021-03-23 Thread Dmitry Torokhov
On Sun, Mar 07, 2021 at 10:22:38PM +, Paul Cercueil wrote: > The input_sync() function is already called after the loop in > gpio_keys_report_state(), so it does not need to be called after each > iteration within gpio_keys_gpio_report_event(). > > Signed-off-by: Paul Cercueil Applied,

Re: [PATCH next v1 1/3] printk: track/limit recursion

2021-03-23 Thread John Ogness
On 2021-03-22, Petr Mladek wrote: > On Wed 2021-03-17 00:33:24, John Ogness wrote: >> Track printk() recursion and limit it to 3 levels per-CPU and per-context. > > Please, explain why it is added. I mean that it will > allow remove printk_safe that provides recursion protection at the > moment.

Re: [PATCH v5] rtc: rx6110: add ACPI bindings to I2C

2021-03-23 Thread Alexandre Belloni
On 17/03/2021 10:32:39+0100, Claudius Heine wrote: > Hi Andy, > > On 2021-03-17 10:28, Andy Shevchenko wrote: > > On Wed, Mar 17, 2021 at 9:56 AM Claudius Heine wrote: > > > > > > From: Johannes Hahn > > > > > > This allows the RX6110 driver to be automatically assigned to the right > > >

Re: [PATCH v5] mm: cma: support sysfs

2021-03-23 Thread Dmitry Osipenko
24.03.2021 00:19, Dmitry Osipenko пишет: >> +if (!kobj) >> +goto out; >> + >> +kobj->cma = cma; >> +cma->kobj = kobj; >> +if (kobject_init_and_add(>kobj->kobj, _ktype, >> + cma_kobj_root, "%s",

Re: [PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-23 Thread Nick Desaulniers
On Tue, Mar 23, 2021 at 1:40 PM Sami Tolvanen wrote: > > list_sort() internally casts the comparison function passed to it > to a different type with constant struct list_head pointers, and > uses this pointer to call the functions, which trips indirect call > Control-Flow Integrity (CFI)

Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF

2021-03-23 Thread Song Liu
> On Mar 23, 2021, at 2:10 PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Mar 19, 2021 at 04:14:42PM +, Song Liu escreveu: >>> On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote: >>> On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo >>> wrote: Em Fri, Mar 19, 2021 at

Re: [PATCH v5] rtc: rx6110: add ACPI bindings to I2C

2021-03-23 Thread Alexandre Belloni
On Wed, 17 Mar 2021 08:52:27 +0100, Claudius Heine wrote: > This allows the RX6110 driver to be automatically assigned to the right > device on the I2C bus. Applied, thanks! [1/1] rtc: rx6110: add ACPI bindings to I2C commit: 8d69f62fddf6c1a8c7745120c4d6aab9322b001a Best regards, --

Re: [PATCH 1/4] dt-bindings: mmc: iproc-sdhci: Convert to json-schema

2021-03-23 Thread Nicolas Saenz Julienne
On Tue, 2021-03-23 at 15:08 -0600, Rob Herring wrote: > On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote: > > On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote: > > > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema > > > > > > Signed-off-by: Nicolas

linux-next: Fixes tag needs some work in the devfreq tree

2021-03-23 Thread Stephen Rothwell
Hi all, n commit e5171e6d46fc ("PM / devfreq: Use more accurate returned new_freq as resume_freq") Fixes tag Fixes: 83f8ca45afbf0 ("PM / devfreq: add support for suspend/resume of a has these problem(s): - Subject has leading but no trailing parentheses - Subject has leading but no

Re: [PATCH 1/6] sched: migration changes for core scheduling

2021-03-23 Thread Josh Don
On Mon, Mar 22, 2021 at 8:54 PM Li, Aubrey wrote: > > On 2021/3/22 20:56, Peter Zijlstra wrote: > > On Mon, Mar 22, 2021 at 08:31:09PM +0800, Li, Aubrey wrote: > >> Please let me know if I put cookie match check at the right position > >> in task_hot(), if so, I'll obtain some performance data of

Re: [PATCH v2 2/2] remoteproc: stm32: add capability to detach

2021-03-23 Thread Mathieu Poirier
Good day Arnaud, On Mon, Mar 22, 2021 at 10:26:51AM +0100, Arnaud Pouliquen wrote: > From: Arnaud Pouliquen > > A mechanism similar to the shutdown mailbox signal is implemented to > detach a remote processor. > > Upon detachment, a signal is sent to the remote firmware, allowing it > to

Re: [PATCH v5] mm: cma: support sysfs

2021-03-23 Thread Dmitry Osipenko
23.03.2021 22:50, Minchan Kim пишет: > Since CMA is getting used more widely, it's more important to > keep monitoring CMA statistics for system health since it's > directly related to user experience. > > This patch introduces sysfs statistics for CMA, in order to provide > some basic monitoring

[PATCH] Bluetooth: Always call advertising disable before setting params

2021-03-23 Thread Daniel Winkler
In __hci_req_enable_advertising, the HCI_LE_ADV hdev flag is temporarily cleared to allow the random address to be set, which exposes a race condition when an advertisement is configured immediately (<10ms) after software rotation starts to refresh an advertisement. In normal operation, the

Re: [PATCH] drivers/block: Goodbye BLK_DEV_UMEM

2021-03-23 Thread NeilBrown
On Tue, Mar 23 2021, Davidlohr Bueso wrote: > I'm also Ccing Neil, who is one of the authors. Thanks! I have no objection to the removal. The driver served its purpose at the time, but technology has moved on. Add Acked-by: NeilBrown if you like (not necessary). Thanks, NeilBrown > > On

Re: [PATCH 2/6] dt-bindings: i2c: convert i2c-mpc to json-schema

2021-03-23 Thread Rob Herring
On Tue, Mar 23, 2021 at 05:33:27PM +1300, Chris Packham wrote: > Convert i2c-mpc to YAML. > > Signed-off-by: Chris Packham > --- > .../devicetree/bindings/i2c/i2c-mpc.txt | 62 > .../devicetree/bindings/i2c/i2c-mpc.yaml | 99 +++ > 2 files changed, 99

Re: GTE - The hardware timestamping engine

2021-03-23 Thread Dipen Patel
On 3/23/21 3:06 AM, Thierry Reding wrote: > On Tue, Mar 23, 2021 at 10:08:00AM +0100, Linus Walleij wrote: >> On Mon, Mar 22, 2021 at 9:17 PM Dipen Patel wrote: >> >>> My follow-up concerns on both Linus's and Kent's feedback: >>> >>> 1. Please correct me if I am wrong, lineevent in the

linux-next: Signed-off-by missing for commit in the arm64 tree

2021-03-23 Thread Stephen Rothwell
Hi all, Commits b17f265bb4cc ("kselftest/arm64: mte: Fix MTE feature detection") 4dfc9d30a8ab ("kselftest/arm64: mte: common: Fix write() warnings") are missing a Signed-off-by from their author. -- Cheers, Stephen Rothwell pgp81E91at3uD.pgp Description: OpenPGP digital signature

[PATCH] iommu/amd: page-specific invalidations for more than one page

2021-03-23 Thread Nadav Amit
From: Nadav Amit Currently, IOMMU invalidations and device-IOTLB invalidations using AMD IOMMU fall back to full address-space invalidation if more than a single page need to be flushed. Full flushes are especially inefficient when the IOMMU is virtualized by a hypervisor, since it requires the

Re: [PATCH 2/6] dt-bindings: i2c: convert i2c-mpc to json-schema

2021-03-23 Thread Rob Herring
On Tue, Mar 23, 2021 at 08:22:00PM +, Chris Packham wrote: > Hi Rob, > > On 24/03/21 9:16 am, Rob Herring wrote: > > On Tue, 23 Mar 2021 17:33:27 +1300, Chris Packham wrote: > >> Convert i2c-mpc to YAML. > >> > >> Signed-off-by: Chris Packham > >> --- > >>

Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 04:14:42PM +, Song Liu escreveu: > > On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote: > > On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo > > wrote: > >> Em Fri, Mar 19, 2021 at 09:54:59AM +0900, Namhyung Kim escreveu: > >>> On Fri, Mar 19, 2021 at 9:22 AM

[ANNOUNCE] 4.19.182-rt74

2021-03-23 Thread Tom Zanussi
Hello RT Folks! I'm pleased to announce the 4.19.182-rt74 stable release. This release is just an update to the new stable 4.19.182 version and no RT specific changes have been made. You can get this release via the git tree at:

Re: [PATCH 1/4] dt-bindings: mmc: iproc-sdhci: Convert to json-schema

2021-03-23 Thread Rob Herring
On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote: > On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote: > > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema > > > > Signed-off-by: Nicolas Saenz Julienne > > --- > >

[patch V5 2/2] signal: Allow tasks to cache one sigqueue struct

2021-03-23 Thread Thomas Gleixner
The idea for this originates from the real time tree to make signal delivery for realtime applications more efficient. In quite some of these application scenarios a control tasks signals workers to start their computations. There is usually only one signal per worker on flight. This works nicely

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Sven Peter
Hi Mark, On Tue, Mar 23, 2021, at 21:00, Mark Kettenis wrote: > The problem with both #1 and #2 is that you end up with two references > to (effectively) different iommu's in the dwc3 device node. I don't > see how that is compatible with the idea of using a single translation > table for both

[PATCH v1 2/2] memory: tegra20: Protect debug code with a lock

2021-03-23 Thread Dmitry Osipenko
Simultaneous accesses to MC_STAT h/w shouldn't be allowed since one collection process stomps on another. There is no good reason for polling stats in parallel in practice, nevertheless let's add a protection lock, just for consistency. Signed-off-by: Dmitry Osipenko ---

[PATCH v1 1/2] memory: tegra20: Correct comment to MC_STAT registers writes

2021-03-23 Thread Dmitry Osipenko
The code was changed multiple times and the comment to MC_STAT registers writes became slightly outdated. The MC_STAT programming now isn't hardcoded to the "bandwidth" mode, let's clarify this in the comment. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20.c | 5 ++--- 1 file

Re: [RFC PATCH v2 5/8] arm64: Detect an FTRACE frame and mark a stack trace unreliable

2021-03-23 Thread Madhavan T. Venkataraman
Thanks for all the input - Mark Rutland and Mark Brown. I will send out the stack termination patch next. Since I am splitting the original series into 3 separate series, I will change the titles and start with version 1 in each case, if there is no objection. Again, Thanks. Madhavan On

Re: [PATCH v23 00/28] Control-flow Enforcement: Shadow Stack

2021-03-23 Thread Yu, Yu-cheng
On 3/23/2021 1:49 PM, Peter Zijlstra wrote: On Fri, Mar 19, 2021 at 02:43:04PM -0700, Yu, Yu-cheng wrote: On 3/16/2021 2:15 PM, Peter Zijlstra wrote: On Tue, Mar 16, 2021 at 08:10:26AM -0700, Yu-cheng Yu wrote: Control-flow Enforcement (CET) is a new Intel processor feature that blocks

[PATCH] x86/cpu/amd: Remove duplicate definition of MSRC001_1029

2021-03-23 Thread Venkatesh Srinivas
MSRC001_1029 had duplicate definitions in msr-index.h and amd.c. Remove the local definition in favor of the more widely used version. Signed-off-by: Venkatesh Srinivas --- arch/x86/kernel/cpu/amd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c

Re: [PATCH v4 14/22] x86/fpu/xstate: Expand the xstate buffer on the first use of dynamic user state

2021-03-23 Thread Len Brown
> I have an obnoxious question: do we really want to use the XFD mechanism? Obnoxious questions are often the most valuable! :-) > Right now, glibc, and hence most user space code, blindly uses > whatever random CPU features are present for no particularly good > reason, which means that all

Re: [PATCH 2/3] dt-bindings: phy: qcom,usb-snps-femto-v2: Add bindings for SC7280

2021-03-23 Thread Stephen Boyd
Quoting Sandeep Maheswaram (2021-03-17 04:01:40) > Add the compatible string for sc7280 SoC from Qualcomm > > Signed-off-by: Sandeep Maheswaram > --- Reviewed-by: Stephen Boyd

[PATCH v3] platform/x86: asus-wmi: Add param to turn fn-lock mode on by default

2021-03-23 Thread Luca Stefani
* On recent ZenBooks the fn-lock is disabled by default on boot while running Windows. * Add a module param ( fnlock_default ) that allows changing the default at probe time Signed-off-by: Luca Stefani --- drivers/platform/x86/asus-wmi.c | 5 - 1 file changed, 4 insertions(+), 1

Re: [PATCH 1/3] dt-bindings: usb: qcom,dwc3: Add bindings for SC7280

2021-03-23 Thread Stephen Boyd
Quoting Sandeep Maheswaram (2021-03-17 04:01:39) > Add the compatible string for sc7280 SoC from Qualcomm. > > Signed-off-by: Sandeep Maheswaram > --- Reviewed-by: Stephen Boyd

[PATCH v9 5/8] Reimplement RLIMIT_MSGQUEUE on top of ucounts

2021-03-23 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Signed-off-by: Alexey Gladkov ---

[PATCH v9 7/8] Reimplement RLIMIT_MEMLOCK on top of ucounts

2021-03-23 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Changelog v8: * Fix issues found by lkp-tests project. v7: *

[PATCH v9 8/8] kselftests: Add test to check for rlimit changes in different user namespaces

2021-03-23 Thread Alexey Gladkov
The testcase runs few instances of the program with RLIMIT_NPROC=1 from user uid=6, in different user namespaces. Signed-off-by: Alexey Gladkov --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/rlimits/.gitignore| 2 +

[PATCH v9 0/8] Count rlimits in each user namespace

2021-03-23 Thread Alexey Gladkov
Preface --- These patches are for binding the rlimit counters to a user in user namespace. This patch set can be applied on top of: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v5.12-rc4 Problem --- The RLIMIT_NPROC, RLIMIT_MEMLOCK, RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE

[PATCH v9 4/8] Reimplement RLIMIT_NPROC on top of ucounts

2021-03-23 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. To illustrate the impact of rlimits, let's say there is a

[PATCH v9 3/8] Use atomic_t for ucounts reference counting

2021-03-23 Thread Alexey Gladkov
The current implementation of the ucounts reference counter requires the use of spin_lock. We're going to use get_ucounts() in more performance critical areas like a handling of RLIMIT_SIGPENDING. Now we need to use spin_lock only if we want to change the hashtable. v9: * Use a negative value to

[PATCH v9 2/8] Add a reference to ucounts for each cred

2021-03-23 Thread Alexey Gladkov
For RLIMIT_NPROC and some other rlimits the user_struct that holds the global limit is kept alive for the lifetime of a process by keeping it in struct cred. Adding a pointer to ucounts in the struct cred will allow to track RLIMIT_NPROC not only for user in the system, but for user in the

[PATCH v9 6/8] Reimplement RLIMIT_SIGPENDING on top of ucounts

2021-03-23 Thread Alexey Gladkov
The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Signed-off-by: Alexey Gladkov --- fs/proc/array.c

[PATCH v9 1/8] Increase size of ucounts to atomic_long_t

2021-03-23 Thread Alexey Gladkov
RLIMIT_MSGQUEUE and RLIMIT_MEMLOCK use unsigned long to store their counters. As a preparation for moving rlimits based on ucounts, we need to increase the size of the variable to long. Signed-off-by: Alexey Gladkov --- include/linux/user_namespace.h | 4 ++-- kernel/ucount.c|

Re: linux-next: build failure after merge of the akpm-current tree

2021-03-23 Thread Stephen Rothwell
Hi all, On Thu, 18 Mar 2021 20:56:07 +1100 Stephen Rothwell wrote: > > After merging the akpm-current tree, today's linux-next build (sparc > defconfig) failed like this: > > In file included from arch/sparc/include/asm/pgtable_32.h:25:0, > from

Re: [PATCH v2] platform/x86: asus-wmi: Add param to turn fn-lock mode on by default

2021-03-23 Thread Hans de Goede
Hi, On 3/23/21 9:25 PM, Luca Stefani wrote: > * On recent ZenBooks the fn-lock is disabled > by default on boot while running Windows. > > * Add a module param ( fnlock_default ) that allows > changing the default at probe time > > Signed-off-by: Luca Stefani > --- >

Re: [PATCH v2 2/3] dt-bindings: Convert the rockchip power_domain to YAML and extend

2021-03-23 Thread Enric Balletbo Serra
Hi Elaine, Missatge de Johan Jonker del dia dt., 23 de març 2021 a les 12:06: > > Hi Elaine, > > Some comments. Have a look if it's useful or that you disagree > with...(part 1) > > == > There is currently already a patch proposal that does the same. > Could you read that review history and

Re: [PATCH v4 RESEND 3/5] perf/x86/lbr: Move cpuc->lbr_xsave allocation out of sleeping region

2021-03-23 Thread Liang, Kan
On 3/22/2021 2:06 AM, Like Xu wrote: If the kernel is compiled with the CONFIG_LOCKDEP option, the conditional might_sleep_if() deep in kmem_cache_alloc() will generate the following trace, and potentially cause a deadlock when another LBR event is added: [ 243.115549] BUG: sleeping

Re: [kbuild-all] Re: include/linux/compiler_types.h:315:38: error: call to '__compiletime_assert_536' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct can_frame, len) != offsetof(st

2021-03-23 Thread Rasmus Villemoes
On 23/03/2021 19.59, Oliver Hartkopp wrote: > > > On 23.03.21 15:00, Rasmus Villemoes wrote: >> Now what CONFIG_* knobs are responsible for putting -mabi=apcs-gnu in >> CFLAGS is left as an exercise for the reader. Regardless, it is not a >> bug in the compiler. The error is the assumption that

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Rob Herring
On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: > > Date: Sat, 20 Mar 2021 15:19:33 + > > From: Sven Peter > > > > Hi, > > > > After Hector's initial work [1] to bring up Linux on Apple's M1 it's time to > > bring up more devices. Most peripherals connected to the SoC are

Re: [PATCH v23 00/28] Control-flow Enforcement: Shadow Stack

2021-03-23 Thread Peter Zijlstra
On Fri, Mar 19, 2021 at 02:43:04PM -0700, Yu, Yu-cheng wrote: > On 3/16/2021 2:15 PM, Peter Zijlstra wrote: > > On Tue, Mar 16, 2021 at 08:10:26AM -0700, Yu-cheng Yu wrote: > > > Control-flow Enforcement (CET) is a new Intel processor feature that > > > blocks > > > return/jump-oriented

Re: [PATCH 2/2] mm/vmalloc: Use kvmalloc to allocate the table of pages

2021-03-23 Thread Uladzislau Rezki
On Tue, Mar 23, 2021 at 02:07:22PM +, Matthew Wilcox wrote: > On Tue, Mar 23, 2021 at 02:39:48PM +0100, Uladzislau Rezki wrote: > > On Tue, Mar 23, 2021 at 12:39:13PM +, Matthew Wilcox wrote: > > > On Tue, Mar 23, 2021 at 01:04:36PM +0100, Uladzislau Rezki wrote: > > > > On Mon, Mar 22,

[PATCH] macintosh: A typo fix

2021-03-23 Thread Bhaskar Chowdhury
s/coment/comment/ Signed-off-by: Bhaskar Chowdhury --- drivers/macintosh/windfarm_smu_controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index 79cb1ad09bfd..75966052819a 100644

[PATCH v2] ARM: dts: sun8i: h3: beelink-x2: Add power button

2021-03-23 Thread Jernej Skrabec
Beelink X2 has power button. Add node for it. Signed-off-by: Jernej Skrabec --- Changes from v1: - renamed node name so it doesn't contain underscores arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git

Re: [RFC PATCH 1/2] mm,drm/ttm: Block fast GUP to TTM huge pages

2021-03-23 Thread Intel
On 3/23/21 8:52 PM, Williams, Dan J wrote: On Sun, 2021-03-21 at 19:45 +0100, Thomas Hellström (Intel) wrote: TTM sets up huge page-table-entries both to system- and device memory, and we don't want gup to assume there are always valid backing struct pages for these. For PTEs this is handled

Re: [PATCH 17/17] auxdisplay: ht16k33: Add segment display LED support

2021-03-23 Thread Pavel Machek
Hi! > CC linux-leds (which I intended, but forgot to add) > > cover letter at > https://lore.kernel.org/linux-devicetree/20210322144848.1065067-1-ge...@linux-m68k.org/ Still does not tell me... riscv on fpga with 4 character display. What is this? :-). > On Tue, Mar 23, 2021 at 11:08 AM Robin

[PATCH v3 11/17] psci: use __pa_function for cpu_resume

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function pointers with jump table addresses, which results in __pa_symbol returning the physical address of the jump table entry. As the jump table contains an immediate jump to an EL1 virtual address, this typically won't work as intended. Use

[PATCH v3 12/17] arm64: implement __va_function

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This change implements the __va_function() macro, which returns the actual function address instead. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook ---

[PATCH v3 07/17] kallsyms: strip ThinLTO hashes from static functions

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG and ThinLTO, Clang appends a hash to the names of all static functions not marked __used. This can break userspace tools that don't expect the function name to change, so strip out the hash from the output. Suggested-by: Jack Pham Signed-off-by: Sami Tolvanen Reviewed-by:

[PATCH v3 13/17] arm64: use __pa_function

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function address references with the address of the function's CFI jump table entry. This means that __pa_symbol(function) returns the physical address of the jump table entry, which can lead to address space confusion as the jump table points to the

[PATCH v3 16/17] KVM: arm64: Disable CFI for nVHE

2021-03-23 Thread Sami Tolvanen
Disable CFI for the nVHE code to avoid address space confusion. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- arch/arm64/kvm/hyp/nvhe/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile

[PATCH v3 17/17] arm64: allow CONFIG_CFI_CLANG to be selected

2021-03-23 Thread Sami Tolvanen
Select ARCH_SUPPORTS_CFI_CLANG to allow CFI to be enabled. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5656e7aacd69..2eefdbc3e3c9 100644 --- a/arch/arm64/Kconfig +++

[PATCH v3 14/17] arm64: add __nocfi to functions that jump to a physical address

2021-03-23 Thread Sami Tolvanen
Disable CFI checking for functions that switch to linear mapping and make an indirect call to a physical address, since the compiler only understands virtual addresses and the CFI check for such indirect calls would always fail. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook ---

[PATCH v3 15/17] arm64: add __nocfi to __apply_alternatives

2021-03-23 Thread Sami Tolvanen
__apply_alternatives makes indirect calls to functions whose address is taken in assembly code using the alternative_cb macro. With non-canonical CFI, the compiler won't replace these function references with the jump table addresses, which trips CFI. Disable CFI checking in the function to work

[PATCH v3 10/17] lkdtm: use __va_function

2021-03-23 Thread Sami Tolvanen
To ensure we take the actual address of a function in kernel text, use __va_function. Otherwise, with CONFIG_CFI_CLANG, the compiler replaces the address with a pointer to the CFI jump table, which is actually in the module when compiled with CONFIG_LKDTM=m. Signed-off-by: Sami Tolvanen

[PATCH v3 09/17] treewide: Change list_sort to use const pointers

2021-03-23 Thread Sami Tolvanen
list_sort() internally casts the comparison function passed to it to a different type with constant struct list_head pointers, and uses this pointer to call the functions, which trips indirect call Control-Flow Integrity (CFI) checking. Instead of removing the consts, this change defines the

[PATCH v3 05/17] workqueue: use WARN_ON_FUNCTION_MISMATCH

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, a callback function passed to __queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function != delayed_work_timer_fn);

[PATCH v3 08/17] bpf: disable CFI in dispatcher functions

2021-03-23 Thread Sami Tolvanen
BPF dispatcher functions are patched at runtime to perform direct instead of indirect calls. Disable CFI for the dispatcher functions to avoid conflicts. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- include/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 04/17] module: ensure __cfi_check alignment

2021-03-23 Thread Sami Tolvanen
CONFIG_CFI_CLANG_SHADOW assumes the __cfi_check() function is page aligned and at the beginning of the .text section. While Clang would normally align the function correctly, it fails to do so for modules with no executable code. This change ensures the correct __cfi_check() location and

[PATCH v3 06/17] kthread: use WARN_ON_FUNCTION_MISMATCH

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, a callback function passed to __kthread_queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function !=

[PATCH v3 01/17] add support for Clang CFI

2021-03-23 Thread Sami Tolvanen
This change adds support for Clang’s forward-edge Control Flow Integrity (CFI) checking. With CONFIG_CFI_CLANG, the compiler injects a runtime check before each indirect function call to ensure the target is a valid function with the correct static type. This restricts possible call targets and

[PATCH v3 02/17] cfi: add __cficanonical

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces a function address taken in C code with the address of a local jump table entry, which passes runtime indirect call checks. However, the compiler won't replace addresses taken in assembly code, which will result in a CFI failure if we later jump to such

[PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This means that __pa_symbol(function) returns the physical address of the jump table entry instead of the actual function, which may not work as the jump table code will immediately

[PATCH v3 00/17] Add support for Clang CFI

2021-03-23 Thread Sami Tolvanen
This series adds support for Clang's Control-Flow Integrity (CFI) checking. With CFI, the compiler injects a runtime check before each indirect function call to ensure the target is a valid function with the correct static type. This restricts possible call targets and makes it more difficult for

Re: [PATCH 2/2] mm/vmalloc: Use kvmalloc to allocate the table of pages

2021-03-23 Thread Uladzislau Rezki
> On Tue, Mar 23, 2021 at 01:04:36PM +0100, Uladzislau Rezki wrote: > > On Mon, Mar 22, 2021 at 11:03:11PM +, Matthew Wilcox wrote: > > > I suspect the vast majority of the time is spent calling > > > alloc_pages_node() > > > 1024 times. Have you looked at Mel's patch to do ... well, exactly

Re: [PATCH] x86/pci: use true and false for bool variable

2021-03-23 Thread Krzysztof Wilczyński
Hi, Thank you for sending the patch over! > fixed the following coccicheck: > ./arch/x86/pci/mmconfig-shared.c:464:9-10: WARNING: return of 0/1 in > function 'is_mmconf_reserved' with return type bool > ./arch/x86/pci/mmconfig-shared.c:493:5-6: WARNING: return of 0/1 in > function

Re: [PATCH v2 4/6] dt-bindings: PCI: Add SiFive FU740 PCIe host controller

2021-03-23 Thread Rob Herring
On Thu, Mar 18, 2021 at 02:08:11PM +0800, Greentime Hu wrote: > Add PCIe host controller DT bindings of SiFive FU740. > > Signed-off-by: Greentime Hu > --- > .../bindings/pci/sifive,fu740-pcie.yaml | 119 ++ > 1 file changed, 119 insertions(+) > create mode 100644 >

Re: [PATCH 2/2] KVM: x86/mmu: Ensure TLBs are flushed when yielding during NX zapping

2021-03-23 Thread Ben Gardon
On Tue, Mar 23, 2021 at 11:58 AM Sean Christopherson wrote: > > On Tue, Mar 23, 2021, Ben Gardon wrote: > > On Mon, Mar 22, 2021 at 5:15 PM Sean Christopherson > > wrote: > > > > > > On Mon, Mar 22, 2021, Ben Gardon wrote: > > > > It could be fixed by forbidding kvm_tdp_mmu_zap_gfn_range from >

RE: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS EEPROMS

2021-03-23 Thread Don Bollinger
> > I have offered, in every response, to collaborate with the simple > > integration to use optoe as the default upstream driver to access the > > module EEPROMs. optoe would be superior to the existing default > > routines in sfp.c > > Actually, i'm not sure they would be. Since the KAPI

[PATCH] tracing: Trivial typo fixes

2021-03-23 Thread Bhaskar Chowdhury
Trivial spelling fixes. Signed-off-by: Bhaskar Chowdhury --- kernel/trace/trace_seq.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c index 1d84fcc78e3e..e03eae7a5577 100644 --- a/kernel/trace/trace_seq.c +++

Re: [RESEND PATCH V6 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-03-23 Thread Bjorn Helgaas
On Mon, Mar 22, 2021 at 05:18:31PM +0800, Chunyan Zhang wrote: > From: Hongtao Wu > > This series adds PCIe controller driver for Unisoc SoCs. > This controller is based on DesignWare PCIe IP. > > Signed-off-by: Hongtao Wu > Signed-off-by: Chunyan Zhang > --- >

Re: [PATCH v3 5/5] fs: unicode: Add utf8 module and a unicode layer

2021-03-23 Thread Eric Biggers
On Tue, Mar 23, 2021 at 03:51:44PM -0400, Gabriel Krisman Bertazi wrote: > > -int unicode_validate(const struct unicode_map *um, const struct qstr *str) > > -{ > > - const struct utf8data *data = utf8nfdi(um->version); > > - > > - if (utf8nlen(data, str->name, str->len) < 0) > > -

Re: [PATCH] arm64: dts: imx8mm: Fix pad control of SD1_DATA0

2021-03-23 Thread Fabio Estevam
Hi Oliver, On Tue, Mar 23, 2021 at 5:15 PM Oliver Stäbler wrote: > > Fix address of the pad control register > (IOMUXC_SW_PAD_CTL_PAD_SD1_DATA0) for SD1_DATA0_GPIO2_IO2. This seems > to be a typo but it leads to an exception when pinctrl is applied due to > wrong memory address access. > >

Re: [PATCH] scripts: stable: add script to validate backports

2021-03-23 Thread Nick Desaulniers
On Tue, Mar 23, 2021 at 12:05 PM Greg Kroah-Hartman wrote: > > The only time git gets involved is when we do a -rc release or when we > do a "real" release, and then we use 'git quiltimport' on the whole > stack. > > Here's a script that I use (much too slow, I know), for checking this > type of

Re: [net-next PATCH 0/8] configuration support for switch headers & phy

2021-03-23 Thread Andrew Lunn
On Tue, Mar 23, 2021 at 06:13:28PM +, Hariprasad Kelam wrote: > > Hi Andrew , > > Please see inline, No need to say that. That is the correct way to right emails. > > Hi Hariprasad > > > > Private flags sound very wrong here. I would expect to see some integration > > between the

[PATCH v2] platform/x86: asus-wmi: Add param to turn fn-lock mode on by default

2021-03-23 Thread Luca Stefani
* On recent ZenBooks the fn-lock is disabled by default on boot while running Windows. * Add a module param ( fnlock_default ) that allows changing the default at probe time Signed-off-by: Luca Stefani --- drivers/platform/x86/asus-wmi.c | 5 - 1 file changed, 4 insertions(+), 1

Re: [RFC PATCH v2 5/8] arm64: Detect an FTRACE frame and mark a stack trace unreliable

2021-03-23 Thread Madhavan T. Venkataraman
On 3/23/21 1:30 PM, Mark Rutland wrote: > On Tue, Mar 23, 2021 at 12:23:34PM -0500, Madhavan T. Venkataraman wrote: >> On 3/23/21 12:02 PM, Mark Rutland wrote: > > [...] > >> I think that I did a bad job of explaining what I wanted to do. It is not >> for any additional protection at all. >>

Re: [RFC PATCH v2 5/8] arm64: Detect an FTRACE frame and mark a stack trace unreliable

2021-03-23 Thread Madhavan T. Venkataraman
On 3/23/21 1:27 PM, Mark Brown wrote: > On Tue, Mar 23, 2021 at 12:23:34PM -0500, Madhavan T. Venkataraman wrote: >> On 3/23/21 12:02 PM, Mark Rutland wrote: > >>> 3. Figure out exception boundary handling. I'm currently working to >>>simplify the entry assembly down to a uniform set of

Re: [PATCH 2/6] dt-bindings: i2c: convert i2c-mpc to json-schema

2021-03-23 Thread Chris Packham
Hi Rob, On 24/03/21 9:16 am, Rob Herring wrote: > On Tue, 23 Mar 2021 17:33:27 +1300, Chris Packham wrote: >> Convert i2c-mpc to YAML. >> >> Signed-off-by: Chris Packham >> --- >> .../devicetree/bindings/i2c/i2c-mpc.txt | 62 >> .../devicetree/bindings/i2c/i2c-mpc.yaml

Re: [v3, 3/3] dt-bindings: thermal: Add binding document for mt6873 thermal controller

2021-03-23 Thread Rob Herring
On Fri, 12 Mar 2021 11:40:18 +0800, Michael Kao wrote: > This patch adds binding document for mt6873 thermal controller. > > Signed-off-by: Michael Kao > --- > This patch depends on [1]. > >

Re: [RFC PATCH 2/4] mm: shmem: Support case-insensitive file name lookups

2021-03-23 Thread Gabriel Krisman Bertazi
André Almeida writes: > This patch implements the support for case-insensitive file name lookups > in tmpfs, based on the encoding passed in the mount options. Thanks for doing this. > > +#ifdef CONFIG_UNICODE > +static const struct dentry_operations casefold_dentry_ops = { > + .d_hash =

Re: [PATCH 2/6] dt-bindings: i2c: convert i2c-mpc to json-schema

2021-03-23 Thread Rob Herring
On Tue, 23 Mar 2021 17:33:27 +1300, Chris Packham wrote: > Convert i2c-mpc to YAML. > > Signed-off-by: Chris Packham > --- > .../devicetree/bindings/i2c/i2c-mpc.txt | 62 > .../devicetree/bindings/i2c/i2c-mpc.yaml | 99 +++ > 2 files changed, 99

Re: [PATCH v13 1/7] dt-bindings: soc: mediatek: add mtk svs dt-bindings

2021-03-23 Thread Rob Herring
On Tue, 23 Mar 2021 21:56:51 +0800, Roger Lu wrote: > Document the binding for enabling mtk svs on MediaTek SoC. > > Signed-off-by: Roger Lu > --- > .../bindings/soc/mediatek/mtk-svs.yaml| 81 +++ > 1 file changed, 81 insertions(+) > create mode 100644 >

Re: [PATCH 1/4] dt-bindings: mmc: iproc-sdhci: Convert to json-schema

2021-03-23 Thread Rob Herring
On Mon, 22 Mar 2021 19:58:14 +0100, Nicolas Saenz Julienne wrote: > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema > > Signed-off-by: Nicolas Saenz Julienne > --- > .../bindings/mmc/brcm,iproc-sdhci.yaml| 58 +++ >

Re: [PATCH v2 2/3] dt-bindings: Convert the rockchip power_domain to YAML and extend

2021-03-23 Thread Rob Herring
On Tue, 23 Mar 2021 16:24:09 +0800, Elaine Zhang wrote: > This converts the rockchip power domain family bindings to YAML schema, > and add binding documentation for the power domains found on Rockchip > RK3568 SoCs. > > Signed-off-by: Elaine Zhang > --- >

Re: [RFC PATCH 1/4] Revert "libfs: unexport generic_ci_d_compare() and generic_ci_d_hash()"

2021-03-23 Thread Matthew Wilcox
On Tue, Mar 23, 2021 at 04:59:38PM -0300, André Almeida wrote: > This reverts commit 794c43f716845e2d48ce195ed5c4179a4e05ce5f. > > For implementing casefolding support at tmpfs, it needs to set dentry > operations at superblock level, given that tmpfs has no support for > fscrypt and we don't

Re: [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0

2021-03-23 Thread Hans de Goede
Hi, On 3/23/21 6:29 PM, David E. Box wrote: > On Tue, 2021-03-16 at 19:44 -0700, David E. Box wrote: >> Initialize the struct resource in intel_pmt_dev_register to zero to >> avoid a >> fault should the char *name field be non-zero. > > Hi Hans. Can these 2 patches be pulled as fixes for 5.12?

[PATCH] arm64: dts: imx8mm: Fix pad control of SD1_DATA0

2021-03-23 Thread Oliver Stäbler
Fix address of the pad control register (IOMUXC_SW_PAD_CTL_PAD_SD1_DATA0) for SD1_DATA0_GPIO2_IO2. This seems to be a typo but it leads to an exception when pinctrl is applied due to wrong memory address access. Signed-off-by: Oliver Stäbler --- arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h |

Re: [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0

2021-03-23 Thread Hans de Goede
Hi, On 3/17/21 3:44 AM, David E. Box wrote: > Initialize the struct resource in intel_pmt_dev_register to zero to avoid a > fault should the char *name field be non-zero. > > Signed-off-by: David E. Box Thank you for your patch-series, I've applied the series to my review-hans branch:

Re: [PATCH] mm: page_alloc: fix memcg accounting leak in speculative cache lookup

2021-03-23 Thread Hugh Dickins
On Tue, 23 Mar 2021, Johannes Weiner wrote: > From f6f062a3ec46f4fb083dcf6792fde9723f18cfc5 Mon Sep 17 00:00:00 2001 > From: Johannes Weiner > Date: Fri, 19 Mar 2021 02:17:00 -0400 > Subject: [PATCH] mm: page_alloc: fix allocation imbalances from speculative > cache lookup > > When the freeing

Re: [PATCH] perf tools: Fix various typos in comments

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 02:59:57PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Mar 23, 2021 at 05:10:10PM +0100, Ingo Molnar escreveu: > > > > Here's the delta between -v1 and -v2, in case you already have -v1 or > > want to review the changes only: > > I had not pushed out it, so I

<    1   2   3   4   5   6   7   8   9   10   >