Re: [PATCH v3 03/16] spi: dw: Discard static DW DMA slave structures

2020-05-21 Thread Andy Shevchenko
On Thu, May 21, 2020 at 6:58 PM Serge Semin wrote: > On Thu, May 21, 2020 at 04:51:43PM +0100, Mark Brown wrote: > > On Thu, May 21, 2020 at 03:12:28PM +0300, Serge Semin wrote: > > > > > Well, for me both solutions are equal except mine consumes less stack > > > memory. > > > The only reason why

Re: [PATCH v8 13/14] media: platform: Rename jpeg dec file name

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:32PM +0800, Xia Jiang wrote: > Rename the files which are for decode feature. This is preparing > path since the jpeg enc patch will be added later. > > Signed-off-by: Xia Jiang > --- > v8: no changes > > v7: no changes > > v6: no changes > > v5: no chang

Re: [PATCH v8 11/14] media: dt-bindings: Add jpeg enc device tree node document

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:30PM +0800, Xia Jiang wrote: > Add jpeg enc device tree node document > > Reviewed-by: Rob Herring > Signed-off-by: Xia Jiang > --- > v8: no changes > > v7: no changes > > v6: no changes > > v5: no changes > > v4: no changes > > v3: change compatible t

Re: [RFC PATCH 2/2] init: Allow multi-line output of kernel command line

2020-05-21 Thread Arvind Sankar
On Tue, May 19, 2020 at 12:42:35PM -0700, Joe Perches wrote: > ARM may have its longest possible command line larger than the longest > possible printk. > > If necessary, emit the commend line on multiple lines. > > Signed-off-by: Joe Perches > --- > > compiled, untested > > init/main.c | 31

Re: Re: [PATCH] wlcore: fix runtime pm imbalance in wl1271_op_suspend

2020-05-21 Thread Tony Lindgren
* dinghao@zju.edu.cn [200521 04:55]: > There is a check against ret after out_sleep tag. If > wl1271_configure_suspend_ap() > returns an error code, ret will be caught by this check and a warning will be > issued. OK thanks for checking. In that case this one too: Acked-by: Tony Lindgren

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2020-05-21 Thread Andy Shevchenko
On Thu, May 21, 2020 at 6:55 PM Andy Shevchenko wrote: > On Mon, Jan 20, 2020 at 02:16:45PM +0200, Andy Shevchenko wrote: > > On Fri, Dec 02, 2016 at 09:54:14PM +0200, Andy Shevchenko wrote: > > > Until now DMI information is lost when kexec'ing. Fix this in the same > > > way as > > > it has bee

Re: [PATCH v3 03/16] spi: dw: Discard static DW DMA slave structures

2020-05-21 Thread Serge Semin
On Thu, May 21, 2020 at 04:51:43PM +0100, Mark Brown wrote: > On Thu, May 21, 2020 at 03:12:28PM +0300, Serge Semin wrote: > > > Well, for me both solutions are equal except mine consumes less stack > > memory. > > The only reason why your solution might be better is that if DW DMA driver > > or

Re: [PATCH 0/4] Update K3 DSP remoteproc driver for C71x DSPs

2020-05-21 Thread Suman Anna
On 3/25/20 3:46 PM, Suman Anna wrote: Hi All, This series adds support for a new next generation 64-bit TI DSP based on the TMS320C71x CorePac processor subsystem called the C71x. The support is enabled through couple of enhancements to the remoteproc core (primarily to support a 64-bit trace re

Re: [PATCH v10 00/26] Control-flow Enforcement: Shadow Stack

2020-05-21 Thread Yu-cheng Yu
On Thu, 2020-05-21 at 10:15 -0500, Josh Poimboeuf wrote: > On Wed, Apr 29, 2020 at 03:07:06PM -0700, Yu-cheng Yu wrote: > > Control-flow Enforcement (CET) is a new Intel processor feature that blocks > > return/jump-oriented programming attacks. Details can be found in "Intel > > 64 and IA-32 Arch

Re: [PATCH v3 03/16] spi: dw: Discard static DW DMA slave structures

2020-05-21 Thread Andy Shevchenko
On Thu, May 21, 2020 at 6:51 PM Mark Brown wrote: > On Thu, May 21, 2020 at 03:12:28PM +0300, Serge Semin wrote: > > > Well, for me both solutions are equal except mine consumes less stack > > memory. > > The only reason why your solution might be better is that if DW DMA driver > > or > > the D

Re: [PATCH] soc: imx: Add power domain driver support for i.mx8m family

2020-05-21 Thread Tim Harvey
On Mon, May 4, 2020 at 2:19 AM Lucas Stach wrote: > > Am Montag, den 27.04.2020, 15:37 + schrieb Jacky Bai: > > > -Original Message- > > > From: Lucas Stach > > > Sent: Monday, April 27, 2020 11:11 PM > > > To: Abel Vesa ; Jacky Bai ; Shawn > > > Guo ; Sascha Hauer ; Liam > > > Girdwo

Re: [RFC v1 2/3] drivers: nvmem: Add driver for QTI qfprom-efuse support

2020-05-21 Thread Srinivas Kandagatla
On 21/05/2020 16:10, Doug Anderson wrote: On 20/05/2020 23:48, Doug Anderson wrote: Is this only applicable for corrected address space? I guess I was proposing a two dts-node / two drive approach here. dts node #1:just covers the memory range for accessing the FEC-corrected data driver #1:

Re: [PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 11:53 AM Joel Fernandes (Google) wrote: > > On a modern Linux distro, compiling the following program fails: > #include > #include > #include > #include > > void main() { > struct sched_attr sa; > > return; > } > > with: > /usr/include/linux/sched/ty

Re: [PATCH v2] x86/kvm: Disable KVM_ASYNC_PF_SEND_ALWAYS

2020-05-21 Thread Vivek Goyal
On Wed, Apr 08, 2020 at 12:07:22AM +0200, Paolo Bonzini wrote: > On 07/04/20 23:41, Andy Lutomirski wrote: > > 2. Access to bad memory results in #MC. Sure, #MC is a turd, but > > it’s an *architectural* turd. By all means, have a nice simple PV > > mechanism to tell the #MC code exactly what went

Re: [PATCH 1/4] perf metrictroup: Fix memory leak of metric_events

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 09:32:15PM +0800, Wei Li escreveu: > From: Hongbo Yao > > Fix memory leak of metric_events in function metricgroup__setup_events() The leak is there but this code has changed a lot recently, please take a look at my perf/core branch and keep Ian Rogers in the loop, - Arn

Re: [PATCHv3 2/2] dt-bindings: arm: coresight: Add support to skip trace unit power up

2020-05-21 Thread Mathieu Poirier
On Fri, 15 May 2020 at 10:23, Sai Prakash Ranjan wrote: > > From: Tingwei Zhang > > Add "qcom,skip-power-up" property to identify systems which can > skip powering up of trace unit since they share the same power > domain as their CPU core. This is required to identify such > systems with hardwar

[PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-21 Thread Joel Fernandes (Google)
On a modern Linux distro, compiling the following program fails: #include #include #include #include void main() { struct sched_attr sa; return; } with: /usr/include/linux/sched/types.h:8:8: \ error: redefinition of ‘struct sched_param’ 8 | str

Re: [PATCH v1 0/2] firmware: dmi_scan: Make it work in kexec'ed kernel

2020-05-21 Thread Andy Shevchenko
On Mon, Jan 20, 2020 at 02:16:45PM +0200, Andy Shevchenko wrote: > On Fri, Dec 02, 2016 at 09:54:14PM +0200, Andy Shevchenko wrote: > > Until now DMI information is lost when kexec'ing. Fix this in the same way > > as > > it has been done for ACPI RSDP. > > > > Series has been tested on Galileo G

Re: [PATCH] mm/compaction: Fix the incorrect hole in fast_isolate_freepages()

2020-05-21 Thread Baoquan He
On 05/21/20 at 12:26pm, Mike Rapoport wrote: > > For this kind of e820 reserved range, it won't be added to memblock > > allocator. > > However, init_unavailable_mem() will initialize to add them into node 0, > > zone 0. Before that commit, later, memmap_init() will add e820 reserved > > ranges in

Re: [PATCH v3 03/16] spi: dw: Discard static DW DMA slave structures

2020-05-21 Thread Mark Brown
On Thu, May 21, 2020 at 03:12:28PM +0300, Serge Semin wrote: > Well, for me both solutions are equal except mine consumes less stack memory. > The only reason why your solution might be better is that if DW DMA driver or > the DMA engine subsystem changed the dw_dma_slave structure instance passed

Re: [PATCH v2] perf: arm_dsu: Support DSU ACPI devices.

2020-05-21 Thread Tuan Phan
> On May 21, 2020, at 6:55 AM, Sudeep Holla wrote: > > On Mon, May 11, 2020 at 01:32:40PM -0700, Tuan Phan wrote: >> Add ACPI node probing device support. Each DSU ACPI node >> defines a "cpus" package with a per cpu MPIDR element. >> >> Signed-off-by: Tuan Phan >> --- >> Changes in v2: >> -

Re: [PATCH v8 10/14] media: platform: Delete redundant code for improving code quality

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:29PM +0800, Xia Jiang wrote: > Delete unused member variables annotation. > Delete unused variable definition. > Delete redundant log print, because V4L2 debug logs already print it. > > Signed-off-by: Xia Jiang > --- > v8: no changes > --- > drivers/media/

Re: [Kgdb-bugreport] [PATCH v3] kdb: Remove the misfeature 'KDBFLAGS'

2020-05-21 Thread Daniel Thompson
On Thu, May 21, 2020 at 03:21:25PM +0800, Wei Li wrote: > Currently, 'KDBFLAGS' is an internal variable of kdb, it is combined > by 'KDBDEBUG' and state flags. It will be shown only when 'KDBDEBUG' > is set, and the user can define an environment variable named 'KDBFLAGS' > too. These are puzzling

Re: [PATCH v3 11/14] bus: cdmm: Add MIPS R5 arch support

2020-05-21 Thread Sergei Shtylyov
On 21.05.2020 15:58, Serge Semin wrote: CDMM may be available not only MIPS R2 architectures, but also in ^ on -re, it's singular Thanks, Sergey. Got it. I'll fix it in the next revision. newer MIPS R5 chips. For instance our P5600 chip has one.

Re: [PATCH v8 09/14] media: platform: Change MTK_JPEG_COMP_MAX macro definition location

2020-05-21 Thread Tomasz Figa
On Fri, Apr 03, 2020 at 05:40:28PM +0800, Xia Jiang wrote: > Move MTK_JPEG_COMP_MAX definition to mtk_jpeg_core.h file, because it > is used by mtk_jpeg_core.c file. > > Signed-off-by: Xia Jiang > --- > v8: no changes > --- > drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 2 ++ > drivers/medi

Re: [PATCH v2] exfat: add the dummy mount options to be backward compatible with staging/exfat

2020-05-21 Thread Eric Sandeen
On 5/21/20 9:05 AM, Namjae Jeon wrote: > As Ubuntu and Fedora release new version used kernel version equal to or > higher than v5.4, They started to support kernel exfat filesystem. > > Linus Torvalds reported mount error with new version of exfat on Fedora. > > exfat: Unknown parameter 'n

Re: [PATCH v2 5/7] mm: parallelize deferred_init_memmap()

2020-05-21 Thread Daniel Jordan
On Thu, May 21, 2020 at 08:00:31AM -0700, Alexander Duyck wrote: > So I was thinking about my suggestion further and the loop at the end > isn't quite correct as I believe it could lead to gaps. The loop on > the end should probably be: > for_each_free_mem_pfn_range_in_zone_from(i,

Re: [PATCH] mm/compaction: Fix the incorrect hole in fast_isolate_freepages()

2020-05-21 Thread Baoquan He
On 05/21/20 at 10:36am, Mel Gorman wrote: > On Thu, May 21, 2020 at 09:44:07AM +0800, Baoquan He wrote: > > After investigation, it turns out that this is introduced by commit of > > linux-next: commit f6edbdb71877 ("mm: memmap_init: iterate over memblock > > regions rather that check each PFN"). >

Re: [PATCH v8 07/14] media: platform: Use kernel native functions for improving code quality

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:26PM +0800, Xia Jiang wrote: Thank you for the patch. Please see my comments inline. nit: I'd remove "for improving code quality" from the subject, as it's obvious that we don't intend to make the code quality worse. ;) On the contrary, I'd make it more spec

[PATCH v7 0/2] Add USB DWC3 support for SC7180

2020-05-21 Thread Sandeep Maheswaram
Converting dt binding to yaml. Adding compatible for SC7180 in dt bindings. Changes in v7: Solved the dt binding check error by adding soc field in example. Changes in v6: Addressed the comments from Stephen on interrupts. Added ranges property and dropped maxItems field for assigned-clock-rates.

[PATCH v7 2/2] dt-bindings: usb: qcom,dwc3: Add compatible for SC7180

2020-05-21 Thread Sandeep Maheswaram
Add compatible for SC7180 in usb dwc3 bindings. Signed-off-by: Sandeep Maheswaram Reviewed-by: Douglas Anderson Acked-by: Rob Herring Reviewed-by: Stephen Boyd --- Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

Re: [PATCH v2 5/7] mm: parallelize deferred_init_memmap()

2020-05-21 Thread Daniel Jordan
On Wed, May 20, 2020 at 06:29:32PM -0700, Alexander Duyck wrote: > On Wed, May 20, 2020 at 11:27 AM Daniel Jordan > > @@ -1814,16 +1815,44 @@ deferred_init_maxorder(u64 *i, struct zone *zone, > > unsigned long *start_pfn, > > return nr_pages; > > } > > > > +struct definit_args { > > +

[PATCH v7 1/2] dt-bindings: usb: qcom,dwc3: Convert USB DWC3 bindings

2020-05-21 Thread Sandeep Maheswaram
Convert USB DWC3 bindings to DT schema format using json-schema. Signed-off-by: Sandeep Maheswaram --- .../devicetree/bindings/usb/qcom,dwc3.txt | 104 - .../devicetree/bindings/usb/qcom,dwc3.yaml | 167 + 2 files changed, 167 insertions(+), 104 d

Re: [PATCH v10 1/5] usb: xhci: Change the XHCI link order in the Makefile

2020-05-21 Thread Florian Fainelli
On 5/20/2020 11:09 PM, Greg Kroah-Hartman wrote: > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > A: No. > Q: Should I include quotations after my reply? > > h

Re: [PATCH 2/4] arm: dts: mt2712: add uart APDMA to device tree

2020-05-21 Thread Matthias Brugger
On 27/04/2019 05:36, Long Cheng wrote: > 1. add uart APDMA controller device node > 2. add uart 0/1/2/3/4/5 DMA function > > Signed-off-by: Long Cheng Queued now for v5.7-next/dts64 Thanks! > --- > arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 > + > 1 file

Re: [PATCH v3 01/16] spi: dw: Add Tx/Rx finish wait methods to the MID DMA

2020-05-21 Thread Serge Semin
On Thu, May 21, 2020 at 10:55:20PM +0800, Feng Tang wrote: > Hi Serge, > > On Thu, May 21, 2020 at 02:47:36PM +0300, Serge Semin wrote: > > Hello Feng, > > > > On Thu, May 21, 2020 at 11:09:24AM +0800, Feng Tang wrote: > > > Hi Serge, > > > > > > On Thu, May 21, 2020 at 04:21:51AM +0300, Serge S

Re: [PATCH v8 06/14] media: platform: Improve the implementation of the system PM ops

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:25PM +0800, Xia Jiang wrote: > Cancel reset hw operation in suspend and resume function because this > will be done in device_run(). This and... > Add spin_lock and unlock operation in irq and resume function to make > sure that the current frame is processe

Re: [PATCH v3 0/7] Introduce features and debugfs/sysfs entries for MHI

2020-05-21 Thread Manivannan Sadhasivam
On Thu, May 21, 2020 at 06:53:18PM +0530, Manivannan Sadhasivam wrote: > Hi, > > On Mon, May 18, 2020 at 01:03:54PM -0700, Bhaumik Bhatt wrote: > > Introduce independent bus and device voting mechanism for clients and save > > hardware information from BHI. > > Allow reading and modifying some MHI

Re: [PATCH 00/14] MHI patches for v5.8

2020-05-21 Thread Manivannan Sadhasivam
On Thu, May 21, 2020 at 08:55:26PM +0530, m...@kernel.org wrote: > From: Manivannan Sadhasivam > > Hi Greg, > > Here is the set of MHI patches for v5.8. Most of the patches are cleanup and > refactoring ones. All of them are reviewed by myself and Jeff and also > verified on x86 and ARM64 archit

[PATCH 14/14] bus: mhi: core: Handle syserr during power_up

2020-05-21 Thread mani
From: Jeffrey Hugo The MHI device may be in the syserr state when we attempt to init it in power_up(). Since we have no local state, the handling is simple - reset the device and wait for it to transition out of the reset state. Signed-off-by: Jeffrey Hugo Reviewed-by: Hemant Kumar Reviewed-b

[PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly

2020-05-21 Thread Steven Price
By switching the x86 page table dump code to use the generic code the effective permissions are no longer calculated correctly because the note_page() function is only called for *leaf* entries. To calculate the actual effective permissions it is necessary to observe the full hierarchy of the page

[PATCH 13/14] bus: mhi: core: Handle write lock properly in mhi_pm_m0_transition

2020-05-21 Thread mani
From: Hemant Kumar Take write lock only to protect db_mode member of mhi channel. This allows rest of the mhi channels to just take read lock which fine grains the locking. It prevents channel readers to starve if they try to enter critical section after a writer. Signed-off-by: Hemant Kumar Re

[PATCH 12/14] bus: mhi: core: Do not process SYS_ERROR if RDDM is supported

2020-05-21 Thread mani
From: Hemant Kumar Devices that support RDDM do not require processing SYS_ERROR as it is deemed redundant. Avoid SYS_ERROR processing if RDDM is supported by the device. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasi

[PATCH 08/14] bus: mhi: core: Ensure non-zero session or sequence ID values are used

2020-05-21 Thread mani
From: Bhaumik Bhatt While writing any sequence or session identifiers, it is possible that the host could write a zero value, whereas only non-zero values should be supported writes to those registers. Ensure that the host does not write a non-zero value for them and also log them in debug messag

[PATCH 07/14] bus: mhi: core: Improve debug logs for loading firmware

2020-05-21 Thread mani
From: Bhaumik Bhatt Add log messages to track boot flow errors and timeouts in SBL or AMSS firmware loading to aid in debug. Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/boot.c | 21 ++

[PATCH 04/14] bus: mhi: core: Read transfer length from an event properly

2020-05-21 Thread mani
From: Hemant Kumar When MHI Driver receives an EOT event, it reads xfer_len from the event in the last TRE. The value is under control of the MHI device and never validated by Host MHI driver. The value should never be larger than the real size of the buffer but a malicious device can set the val

[PATCH 10/14] bus: mhi: core: Handle disable transitions in state worker

2020-05-21 Thread mani
From: Hemant Kumar Mission mode transition is handled by state worker thread but power off is not. There is a possibility while mission mode transition is in progress which calls MHI client driver probe, power off is issued by MHI controller. This results into client driver probe and remove runni

[PATCH 06/14] bus: mhi: core: Return appropriate error codes for AMSS load failure

2020-05-21 Thread mani
From: Bhaumik Bhatt When loading AMSS firmware using BHIe protocol, return -ETIMEDOUT if no response is received within the timeout or return -EIO in case of a protocol returned failure or an MHI error state. Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhas

[PATCH 09/14] bus: mhi: core: Remove the system error worker thread

2020-05-21 Thread mani
From: Hemant Kumar Remove the system error worker thread and instead have the execution environment worker handle that transition to serialize processing and avoid any possible race conditions during shutdown. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhas

[PATCH 05/14] bus: mhi: core: Handle firmware load using state worker

2020-05-21 Thread mani
From: Bhaumik Bhatt Upon power up, driver queues firmware worker thread if the execution environment is PBL. Firmware worker is blocked with a timeout until state worker gets a chance to run and unblock firmware worker. An endpoint power up failure can be seen if state worker gets a chance to run

[PATCH 11/14] bus: mhi: core: Skip handling BHI irq if MHI reg access is not allowed

2020-05-21 Thread mani
From: Hemant Kumar Driver continues handling of BHI interrupt even if MHI register access is not allowed. By doing so it calls the status call back and performs early notification for the MHI client. This is not needed when MHI register access is not allowed. Hence skip the handling in this case

[PATCH 03/14] bus: mhi: core: Add range check for channel id received in event ring

2020-05-21 Thread mani
From: Hemant Kumar MHI data completion handler function reads channel id from event ring element. Value is under the control of MHI devices and can be any value between 0 and 255. In order to prevent out of bound access add a bound check against the max channel supported by controller and skip pr

Re: [PATCH] [v2] PCI: tegra194: Fix runtime PM imbalance on error

2020-05-21 Thread Rafael J. Wysocki
On Thu, May 21, 2020 at 5:16 PM Bjorn Helgaas wrote: > > [+cc Rafael, linux-pm] > > On Thu, May 21, 2020 at 11:13:49AM +0800, Dinghao Liu wrote: > > pm_runtime_get_sync() increments the runtime PM usage counter even > > when it returns an error code. Thus a pairing decrement is needed on > > the e

[PATCH 03/23] maccess: remove duplicate kerneldoc comments

2020-05-21 Thread Christoph Hellwig
Many of the maccess routines have a copy of the kerneldoc comment in the header. Remove it as it is not useful and will get out of sync sooner or later. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 38 -- 1 file changed, 38 deletions(-) dif

[PATCH 01/14] bus: mhi: core: Refactor mhi queue APIs

2020-05-21 Thread mani
From: Hemant Kumar Move all the common code to generate TRE from mhi_queue_buf, mhi_queue_dma and mhi_queue_skb to mhi_gen_tre. This helps to centralize the TRE generation code which makes any future bug fixing easier to manage in these APIs. Suggested-by: Jeffrey Hugo Signed-off-by: Hemant Kum

[PATCH 02/14] bus: mhi: core: Cache intmod from mhi event to mhi channel

2020-05-21 Thread mani
From: Hemant Kumar Driver is using zero initialized intmod value from mhi channel when configuring TRE for bei field. This prevents interrupt moderation to take effect in case it is supported by an event ring. Fix this by copying intmod value from associated event ring to mhi channel upon registe

[PATCH 00/14] MHI patches for v5.8

2020-05-21 Thread mani
From: Manivannan Sadhasivam Hi Greg, Here is the set of MHI patches for v5.8. Most of the patches are cleanup and refactoring ones. All of them are reviewed by myself and Jeff and also verified on x86 and ARM64 architectures for functionality. Here is the short summary:

Re: [PATCH v2] relay: handle alloc_percpu returning NULL in relay_open

2020-05-21 Thread Salvatore Bonaccorso
Hi, On Fri, Dec 20, 2019 at 11:00:56AM -0800, David Rientjes wrote: > On Thu, 19 Dec 2019, Daniel Axtens wrote: > > > alloc_percpu() may return NULL, which means chan->buf may be set to > > NULL. In that case, when we do *per_cpu_ptr(chan->buf, ...), we > > dereference an invalid pointer: > > >

[PATCH 10/23] maccess: unify the probe kernel arch hooks

2020-05-21 Thread Christoph Hellwig
Currently architectures have to override every routine that probes kernel memory, which includes a pure read and strcpy, both in strict and not strict variants. Just provide a single arch hooks instead to make sure all architectures cover all the cases. Signed-off-by: Christoph Hellwig --- arch

[PATCH 15/23] maccess: remove strncpy_from_unsafe

2020-05-21 Thread Christoph Hellwig
All users are gone now. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 1 - mm/maccess.c| 39 +-- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 65a37ae3b8871.

[PATCH 04/23] maccess: clarify kerneldoc comments

2020-05-21 Thread Christoph Hellwig
Add proper kerneldoc comments for probe_kernel_read_strict and probe_kernel_read strncpy_from_unsafe_strict and explain the different versus the non-strict version. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 61 1 file changed, 43 ins

[PATCH 06/23] maccess: rename strncpy_from_unsafe_user to strncpy_from_user_nofault

2020-05-21 Thread Christoph Hellwig
This matches the naming of strncpy_from_user, and also makes it more clear what the function is supposed to do. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 4 ++-- kernel/trace/bpf_trace.c| 4 ++-- kernel/trace/trace_kprobe.c | 2 +- mm/maccess.c| 4 ++-

[PATCH 09/23] maccess: remove probe_read_common and probe_write_common

2020-05-21 Thread Christoph Hellwig
Each of the helpers has just two callers, which also different in dealing with kernel or userspace pointers. Just open code the logic in the callers. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 63 1 file changed, 29 insertions(+), 34

[PATCH 2/2] mm: ptdump: Expand type of 'val' in note_page()

2020-05-21 Thread Steven Price
The page table entry is passed in the 'val' argument to note_page(), however this was previously an "unsigned long" which is fine on 64-bit platforms. But for 32 bit x86 it is not always big enough to contain a page table entry which may be 64 bits. Change the type to u64 to ensure that it is alwa

[PATCH 16/23] maccess: always use strict semantics for probe_kernel_read

2020-05-21 Thread Christoph Hellwig
Except for historical confusion in the kprobes/uprobes and bpf tracers, which has been fixed now, there is no good reason to ever allow user memory accesses from probe_kernel_read. Switch probe_kernel_read to only read from kernel memory. Signed-off-by: Christoph Hellwig --- arch/parisc/lib/mem

[PATCH V2 3/3] mmc: sdhci: Allow platform controlled voltage switching

2020-05-21 Thread Veerabhadrarao Badiganti
From: Vijay Viswanath If vendor platform drivers are controlling whole logic of voltage switching, then sdhci driver no need control vqmmc regulator. So skip enabling/disable vqmmc from SDHC driver. Signed-off-by: Vijay Viswanath Signed-off-by: Veerabhadrarao Badiganti --- drivers/mmc/host/sd

[PATCH V2 1/3] dt-bindings: mmc: Supply max load for mmc supplies

2020-05-21 Thread Veerabhadrarao Badiganti
Supply the max load needed for driving the mmc supplies. Signed-off-by: Veerabhadrarao Badiganti --- .../devicetree/bindings/mmc/mmc-controller.yaml | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documen

[PATCH v2] x86/boot: Add .text.startup to setup.ld

2020-05-21 Thread Arvind Sankar
gcc puts the main function into .text.startup when compiled with -Os (or -O2). This results in arch/x86/boot/main.c having a .text.startup section which is currently not included explicitly in the linker script setup.ld in the same directory. The BFD linker places this orphan section immediately a

[PATCH 20/23] maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault

2020-05-21 Thread Christoph Hellwig
Better describe what these functions do. Suggested-by: Linus Torvalds Signed-off-by: Christoph Hellwig --- arch/arm/kernel/ftrace.c | 3 +- arch/arm/kernel/kgdb.c | 2 +- arch/arm64/kernel/insn.c | 4 +-- arch/csky/kernel/ftrace.c | 5 +-- arch/ia64/

[PATCH V2 0/3] Internal voltage control for qcom SDHC

2020-05-21 Thread Veerabhadrarao Badiganti
On qcom SD host controllers voltage switching be done after the HW is ready for it. The HW informs its readiness through power irq. The voltage switching should happen only then. So added support to register voltage regulators from the msm driver and use them. This patchset was posted long back b

[PATCH V2 2/3] mmc: sdhci-msm: Use internal voltage control

2020-05-21 Thread Veerabhadrarao Badiganti
On qcom SD host controllers voltage switching be done after the HW is ready for it. The HW informs its readiness through power irq. The voltage switching should happen only then. Use the internal voltage switching and then control the voltage switching using power irq. Set the regulator load as w

[PATCH 19/23] x86: use non-set_fs based maccess routines

2020-05-21 Thread Christoph Hellwig
Provide arch_kernel_read and arch_kernel_write routines to implement the maccess routines without messing with set_fs and without stac/clac that opens up access to user space. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/uaccess.h | 16 1 file changed, 16 insertions

[PATCH 21/23] maccess: rename probe_user_{read,write} to copy_{from,to}_user_nofault

2020-05-21 Thread Christoph Hellwig
Better describe what these functions do. Suggested-by: Linus Torvalds Signed-off-by: Christoph Hellwig --- arch/powerpc/kernel/process.c | 3 ++- arch/powerpc/kvm/book3s_64_mmu_radix.c | 4 ++-- arch/powerpc/mm/fault.c| 2 +- arch/powerpc/oprofile/backtrace.c |

[PATCH 23/23] maccess: return -ERANGE when copy_from_kernel_nofault_allowed fails

2020-05-21 Thread Christoph Hellwig
Allow the callers to distinguish a real unmapped address vs a range that can't be probed. Suggested-by: Masami Hiramatsu Signed-off-by: Christoph Hellwig Reviewed-by: Masami Hiramatsu --- mm/maccess.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mm/macce

[PATCH 22/23] maccess: rename probe_kernel_address to get_kernel_nofault

2020-05-21 Thread Christoph Hellwig
Better describe what this helper does, and match the naming of copy_from_kernel_nofault. Signed-off-by: Christoph Hellwig --- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/alignment.c | 4 ++-- arch/arm64/kernel/traps.c | 2 +- arch/ia64/include/asm/sections.h

[PATCH 07/23] maccess: rename strncpy_from_unsafe_strict to strncpy_from_kernel_nofault

2020-05-21 Thread Christoph Hellwig
This matches the naming of strncpy_from_user_nofault, and also makes it more clear what the function is supposed to do. Signed-off-by: Christoph Hellwig --- arch/x86/mm/maccess.c| 2 +- include/linux/uaccess.h | 4 ++-- kernel/trace/bpf_trace.c | 4 ++-- mm/maccess.c | 6 +++---

[PATCH 08/23] maccess: rename strnlen_unsafe_user to strnlen_user_nofault

2020-05-21 Thread Christoph Hellwig
This matches the naming of strnlen_user, and also makes it more clear what the function is supposed to do. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 2 +- kernel/trace/trace_kprobe.c | 2 +- mm/maccess.c| 4 ++-- 3 files changed, 4 insertions(+), 4 deleti

[PATCH 12/23] bpf: handle the compat string in bpf_trace_copy_string better

2020-05-21 Thread Christoph Hellwig
User the proper helper for kernel or userspace addresses based on TASK_SIZE instead of the dangerous strncpy_from_unsafe function. Signed-off-by: Christoph Hellwig --- kernel/trace/bpf_trace.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trace/bpf_trace.c b/k

[PATCH 11/23] bpf: factor out a bpf_trace_copy_string helper

2020-05-21 Thread Christoph Hellwig
Split out a helper to do the fault free access to the string pointer to get it out of a crazy indentation level. Signed-off-by: Christoph Hellwig --- kernel/trace/bpf_trace.c | 42 +++- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/kernel/tra

[PATCH 05/23] maccess: update the top of file comment

2020-05-21 Thread Christoph Hellwig
This file now also contains several helpers for accessing user memory. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/maccess.c b/mm/maccess.c index 747581ac50dc9..65880ba2ca376 100644 --- a/mm/maccess.c +++ b/mm/maccess.c

[PATCH 02/23] maccess: remove various unused weak aliases

2020-05-21 Thread Christoph Hellwig
maccess tends to define lots of underscore prefixed symbols that then have other weak aliases. But except for two cases they are never actually used, so remove them. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 3 --- mm/maccess.c| 19 +++ 2 files

[PATCH 14/23] tracing/kprobes: handle mixed kernel/userspace probes better

2020-05-21 Thread Christoph Hellwig
Instead of using the dangerous probe_kernel_read and strncpy_from_unsafe helpers, rework probes to try a user probe based on the address if the architecture has a common address space for kernel and userspace. Signed-off-by: Christoph Hellwig --- kernel/trace/trace_kprobe.c | 72

clean up and streamline probe_kernel_* and friends v4

2020-05-21 Thread Christoph Hellwig
Hi all, this series start cleaning up the safe kernel and user memory probing helpers in mm/maccess.c, and then allows architectures to implement the kernel probing without overriding the address space limit and temporarily allowing access to user memory. It then switches x86 over to this new mec

[PATCH 18/23] maccess: allow architectures to provide kernel probing directly

2020-05-21 Thread Christoph Hellwig
Provide alternative versions of probe_kernel_read, probe_kernel_write and strncpy_from_kernel_unsafe that don't need set_fs magic, but instead use arch hooks that are modelled after unsafe_{get,put}_user to access kernel memory in an exception safe way. Signed-off-by: Christoph Hellwig --- mm/ma

[PATCH 01/23] maccess: unexport probe_kernel_write and probe_user_write

2020-05-21 Thread Christoph Hellwig
These two functions are not used by any modular code. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/maccess.c b/mm/maccess.c index 3ca8d97e50106..cf21e604f78cb 100644 --- a/mm/maccess.c +++ b/mm/maccess.c @@ -121,7 +121,6 @@ long __prob

[PATCH 17/23] maccess: move user access routines together

2020-05-21 Thread Christoph Hellwig
Move kernel access vs user access routines together to ease upcoming ifdefs. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 110 +-- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/mm/maccess.c b/mm/maccess.c index 81a85c1e7116

[PATCH 0/2] Fix W+X debug feature on x86

2020-05-21 Thread Steven Price
Jan alert me[1] that the W+X detection debug feature was broken in x86 by my change[2] to switch x86 to use the generic ptdump infrastructure. Fundamentally the approach of trying to move the calculation of effective permissions into note_page() was broken because note_page() is only called for 'l

[PATCH 13/23] bpf: rework the compat kernel probe handling

2020-05-21 Thread Christoph Hellwig
Instead of using the dangerous probe_kernel_read and strncpy_from_unsafe helpers, rework the compat probes to check if an address is a kernel or userspace one, and then use the low-level kernel or user probe helper shared by the proper kernel and user probe helpers. This slightly changes behavior

Re: [PATCH v8 05/14] media: platform: Improve power on and power off flow

2020-05-21 Thread Tomasz Figa
Hi Xia, On Fri, Apr 03, 2020 at 05:40:24PM +0800, Xia Jiang wrote: > Call pm_runtime_get_sync() before starting a frame and then > pm_runtime_put() after completing it. This can save power for the time > between processing two frames. > > Signed-off-by: Xia Jiang > --- > .../media/platform/mtk-

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-21 Thread Rafael J. Wysocki
On Thu, May 21, 2020 at 11:15 AM Dan Carpenter wrote: > > On Thu, May 21, 2020 at 11:42:55AM +0800, dinghao@zju.edu.cn wrote: > > Hi, Dan, > > > > I agree the best solution is to fix __pm_runtime_resume(). But there are > > also > > many cases that assume pm_runtime_get_sync() will change PM

Re: [PATCH] files: Use rcu lock to get the file structures for better performance

2020-05-21 Thread Matthew Wilcox
On Thu, May 21, 2020 at 08:38:35PM +0800, Muchun Song wrote: > There is another safe way to get the file structure without > holding the files->file_lock. That is rcu lock, and this way > has better performance. So use the rcu lock instead of the > files->file_lock. What makes you think this is sa

Re: [PATCH 0/1] x86/boot: lld fix

2020-05-21 Thread Arvind Sankar
On Wed, May 20, 2020 at 07:12:17PM -0700, Fangrui Song wrote: > On 2020-05-20, Arvind Sankar wrote: > >On Wed, May 20, 2020 at 06:56:53PM -0400, Arvind Sankar wrote: > >> arch/x86/boot/setup.elf currently has an orphan section .text.startup, > >> and lld git as of ebf14d9b6d8b is breaking on 64-bit

Re: [PATCH] firmware: smccc: Fix missing prototype warning for arm_smccc_version_init

2020-05-21 Thread Will Deacon
On Thu, 21 May 2020 12:08:36 +0100, Sudeep Holla wrote: > Commit f2ae97062a48 ("firmware: smccc: Refactor SMCCC specific bits into > separate file") introduced the following build warning: > > drivers/firmware/smccc/smccc.c:14:13: warning: no previous prototype for > function 'arm_smccc_vers

Re: [PATCH V4 00/17] arm64/cpufeature: Introduce ID_PFR2, ID_DFR1, ID_MMFR5 and other changes

2020-05-21 Thread Will Deacon
On Tue, 19 May 2020 15:10:37 +0530, Anshuman Khandual wrote: > This series is primarily motivated from an adhoc list from Mark Rutland > during our previous ID_ISAR6 discussion [1]. The current proposal also > accommodates some more suggestions from Will and Suzuki. > > This series adds missing 32

[PATCH v2 2/2] remoteproc/k3-dsp: Add support for C71x DSPs

2020-05-21 Thread Suman Anna
The Texas Instrument's K3 J721E SoCs have a newer next-generation C71x DSP Subsystem in the MAIN voltage domain in addition to the previous generation C66x DSP subsystems. The C71x DSP subsystem is based on the TMS320C71x DSP CorePac module. The C71x CPU is a true 64-bit machine including 64-bit me

Re: [PATCH v10 00/26] Control-flow Enforcement: Shadow Stack

2020-05-21 Thread Josh Poimboeuf
On Wed, Apr 29, 2020 at 03:07:06PM -0700, Yu-cheng Yu wrote: > Control-flow Enforcement (CET) is a new Intel processor feature that blocks > return/jump-oriented programming attacks. Details can be found in "Intel > 64 and IA-32 Architectures Software Developer's Manual" [1]. > > This series depe

[PATCH v2 1/2] dt-bindings: remoteproc: k3-dsp: Update bindings for C71x DSPs

2020-05-21 Thread Suman Anna
Some Texas Instruments K3 family of SoCs have one of more newer generation TMS320C71x CorePac processor subsystem in addition to the existing TMS320C66x CorePac processor subsystems. Update the device tree bindings document for the C71x DSP devices. The example is also updated to show the single C

[PATCH v2 0/2] Update K3 DSP remoteproc driver for C71x DSPs

2020-05-21 Thread Suman Anna
Hi All, This series is an updated version of the enhancements to the K3 DSP remoteproc driver to support the 64-bit TI DSP called C71x. The series is on top of the K3 DSP remoteproc driver v2 [1], and includes only the platform driver portions. Please see the v1 cover-letter [2] for a summary of s

Re: [PATCH] [v2] PCI: tegra194: Fix runtime PM imbalance on error

2020-05-21 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Thu, May 21, 2020 at 11:13:49AM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > when it returns an error code. Thus a pairing decrement is needed on > the error handling path to keep the counter balanced. I didn't realize

Re: [PATCH] ASoC: Intel: kbl_rt5663_rt5514_max98927: Split be_hw_params_fixup function

2020-05-21 Thread Pierre-Louis Bossart
On 5/21/20 9:43 AM, Łukasz Majczak wrote: Pierre Sorry, I didn't get it for the first time, you are suggesting to not use DMIC01 as it is used by PCH-attached dmics by other drivers. Yes, it's confusing and it also took me time during the initial reviews of this driver to figure out it's d

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