[PATCH v5 10/14] arm64: dts: qcom: pm8005: add interrupt controller properties

2019-01-16 Thread Brian Masney
Add interrupt controller properties now that spmi-gpio is a proper hierarchical IRQ chip. The interrupts property is no longer needed so remove it. This change was not tested on any hardware but the same change was tested on qcom-pm8941.dtsi using a LG Nexus 5 (hammerhead) phone with no issues.

[PATCH v5 09/14] ARM: dts: qcom: pma8084: add interrupt controller properties

2019-01-16 Thread Brian Masney
Add interrupt controller properties now that spmi-gpio is a proper hierarchical IRQ chip. The interrupts property is no longer needed so remove it. This change was not tested on any hardware but the same change was tested on qcom-pm8941.dtsi using a LG Nexus 5 (hammerhead) phone with no issues.

[PATCH v5 11/14] arm64: dts: qcom: pm8998: add interrupt controller properties

2019-01-16 Thread Brian Masney
Add interrupt controller properties now that spmi-gpio is a proper hierarchical IRQ chip. The interrupts property is no longer needed so remove it. This change was not tested on any hardware but the same change was tested on qcom-pm8941.dtsi using a LG Nexus 5 (hammerhead) phone with no issues.

[PATCH v5 14/14] spmi: pmic-arb: revert "disassociate old virq if hwirq mapping already exists"

2019-01-16 Thread Brian Masney
Now that spmi-gpio is a proper hierarchical IRQ chip, and all in-tree users of device tree have been updated, we can now drop the hack that was introduced to disassociate the old Linux virq if a hwirq mapping already exists. That patch was introduced to not break git bisect for any existing

[PATCH v5 04/14] spmi: pmic-arb: convert to v2 irq interfaces to support hierarchical IRQ chips

2019-01-16 Thread Brian Masney
Convert the spmi-pmic-arb IRQ code to use the version 2 IRQ interface in order to support hierarchical IRQ chips. This is necessary so that spmi-gpio can be setup as a hierarchical IRQ chip with pmic-arb as the parent. IRQ chips in device tree should be usable from the start without the consumer

[PATCH v5 02/14] pinctrl: qcom: spmi-gpio: add support for three new variants

2019-01-16 Thread Brian Masney
Add support for qcom,pm8005-gpio, qcom,pm8998-gpio, and qcom,pmi8998-gpio. These three variants are already in use in some arm64 dtsi files. Those boards work since the generic binding qcom,spmi-gpio is also specified. Signed-off-by: Brian Masney Reviewed-by: Stephen Boyd Reviewed-by: Bjorn

[PATCH v5 03/14] pinctrl: qcom: spmi-gpio: hardcode IRQ counts

2019-01-16 Thread Brian Masney
The probing of this driver calls platform_irq_count, which will setup all of the IRQs that are configured in device tree. In preparation for converting this driver to be a hierarchical IRQ chip, hardcode the IRQ count based on the hardware type so that all the IRQs are not configured immediately

[PATCH v5 08/14] ARM: dts: qcom: pm8941: add interrupt controller properties

2019-01-16 Thread Brian Masney
Add interrupt controller properties now that spmi-gpio is a proper hierarchical IRQ chip. The interrupts property is no longer needed so remove it. Code was tested on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson ---

[PATCH v5 06/14] spmi: pmic-arb: disassociate old virq if hwirq mapping already exists

2019-01-16 Thread Brian Masney
Check to see if the hwirq is already associated with another virq on this IRQ domain. If so, then disassociate it before associating the hwirq with the new virq. This is a temporary hack that is needed in order to not break git bisect for existing boards. The next patch in this series converts

[PATCH v5 05/14] gpio: add irq domain activate/deactivate functions

2019-01-16 Thread Brian Masney
This adds the two new functions gpiochip_irq_domain_activate and gpiochip_irq_domain_deactivate that can be used as the activate and deactivate functions in the struct irq_domain_ops. This is for situations where only gpiochip_{lock,unlock}_as_irq needs to be called. SPMI and SSBI GPIO are two

[PATCH v5 00/14] qcom: spmi: add support for hierarchical IRQ chip

2019-01-16 Thread Brian Masney
This patch series adds hierarchical IRQ chip support to spmi-gpio so that device tree consumers can request an IRQ directly from the GPIO block rather than having to request an IRQ from the underlying PMIC. For more background information, see the email thread with Linus Walleij's excellent

Re: [PATCH v2 3/3] x86/umwait: Control umwait maximum time

2019-01-16 Thread Andy Lutomirski
On Wed, Jan 16, 2019 at 4:13 PM Fenghua Yu wrote: > > On Wed, Jan 16, 2019 at 04:00:29PM -0800, Andy Lutomirski wrote: > > On Wed, Jan 16, 2019 at 1:24 PM Fenghua Yu wrote: > > > > > > IA32_UMWAIT_CONTROL[31:2] determines the maximum time in TSC-quanta > > > that processor can stay in C0.1 or

Re: Linux 5.0-rc2 seccomp_bpf user_notification_basic test hangs

2019-01-16 Thread Kees Cook
On Wed, Jan 16, 2019 at 4:01 PM shuah wrote: > > Hi Kees and James, > > seccomp_bpf test hangs right after the following test passes > with EBUSY. Please see log at the end. > > /* Installing a second listener in the chain should EBUSY */ > EXPECT_EQ(user_trap_syscall(__NR_getpid, >

Re: powerpc: PCI does not require PowerNV

2019-01-16 Thread Michael Ellerman
On Tue, 2019-01-15 at 00:47:45 UTC, "Jason A. Donenfeld" wrote: > Commit 0e759bd75285 moved around the declaration of pnv_npu2_init, but > did not conditionalize it inside of the PCI pSeries driver. This meant > that CONFIG_PCI && CONFIG_PPC_PSERIES && !CONFIG_PPC_POWERNV resulted > in: > >

[PATCH v2] lib/test_rhashtable: Make test_insert_dup() allocate its hash table dynamically

2019-01-16 Thread Bart Van Assche
The test_insert_dup() function from lib/test_rhashtable.c passes a pointer to a stack object to rhltable_init(). Allocate the hash table dynamically to avoid that the following is reported with object debugging enabled: ODEBUG: object (ptrval) is on stack (ptrval), but NOT annotated. WARNING:

Re: [PATCH] sb1000: fix a couple of indentation issues

2019-01-16 Thread Joe Perches
On Thu, 2019-01-17 at 00:13 +, Colin King wrote: > From: Colin Ian King > > There is an if statement and a return statement that are incorrectly > indented. Fix these. [] > diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c [] > @@ -540,12 +540,12 @@ sb1000_activate(const int ioaddr[],

Re: [RFC PATCH v7 14/16] EXPERIMENTAL: xpfo, mm: optimize spin lock usage in xpfo_kmap

2019-01-16 Thread Laura Abbott
On 1/10/19 1:09 PM, Khalid Aziz wrote: From: Julian Stecklina We can reduce spin lock usage in xpfo_kmap to the 0->1 transition of the mapcount. This means that xpfo_kmap() can now race and that we get spurious page faults. The page fault handler helps the system make forward progress by

Re: [PATCH v2 3/3] x86/umwait: Control umwait maximum time

2019-01-16 Thread Fenghua Yu
On Wed, Jan 16, 2019 at 04:00:29PM -0800, Andy Lutomirski wrote: > On Wed, Jan 16, 2019 at 1:24 PM Fenghua Yu wrote: > > > > IA32_UMWAIT_CONTROL[31:2] determines the maximum time in TSC-quanta > > that processor can stay in C0.1 or C0.2. > > > > The maximum time value in IA32_UMWAIT_CONTROL[31-2]

[PATCH] sb1000: fix a couple of indentation issues

2019-01-16 Thread Colin King
From: Colin Ian King There is an if statement and a return statement that are incorrectly indented. Fix these. Signed-off-by: Colin Ian King --- drivers/net/sb1000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index

[PATCH v3 2/2] kbuild: merge KBUILD_VMLINUX_{INIT,MAIN} into KBUILD_VMLINUX_OBJS

2019-01-16 Thread Masahiro Yamada
The top Makefile does not need to export KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN separately. Put every built-in.a into KBUILD_VMLINUX_OBJS. The order of $(head-y), $(init-y), $(core-y), ... is still retained. Signed-off-by: Masahiro Yamada --- Changes in v3: - update the document Changes

[PATCH v3 1/2] kbuild: remove top-level built-in.a

2019-01-16 Thread Masahiro Yamada
The symbol table in the final archive is unneeded; the linker does not require the symbol table after the --whole-archive option. Every object file in the archive is included in the link anyway. Pass thin archives from subdirectories directly to the linker, and remove the final archiving step.

Re: [PATCH v3] x86-64/Xen: fix stack switching

2019-01-16 Thread Andy Lutomirski
On Tue, Jan 15, 2019 at 8:58 AM Jan Beulich wrote: > > While in the native case entry into the kernel happens on the trampoline > stack, PV Xen kernels get entered with the current thread stack right > away. Hence source and destination stacks are identical in that case, > and special care is

Re: [PATCH v2 2/2] docs-rst: userspace: update verbs API details

2019-01-16 Thread Mike Rapoport
Hi Jon, On Tue, Jan 15, 2019 at 02:38:59PM -0700, Jonathan Corbet wrote: > On Tue, 15 Jan 2019 22:37:01 +0200 > > I'd rather see you put the new stuff under Documentation/driver-api, either > in a standalone file or in a new subdirectory. > > Thanks for your patience with this! We really do

[PATCH] net: jme: fix indentation issues

2019-01-16 Thread Colin King
From: Colin Ian King There are two lines that have indentation issues, fix these. Also remove an empty line. Signed-off-by: Colin Ian King --- drivers/net/ethernet/jme.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/jme.c

Linux 5.0-rc2 seccomp_bpf user_notification_basic test hangs

2019-01-16 Thread shuah
Hi Kees and James, seccomp_bpf test hangs right after the following test passes with EBUSY. Please see log at the end. /* Installing a second listener in the chain should EBUSY */ EXPECT_EQ(user_trap_syscall(__NR_getpid,

Re: [PATCH v2 3/3] x86/umwait: Control umwait maximum time

2019-01-16 Thread Andy Lutomirski
On Wed, Jan 16, 2019 at 1:24 PM Fenghua Yu wrote: > > IA32_UMWAIT_CONTROL[31:2] determines the maximum time in TSC-quanta > that processor can stay in C0.1 or C0.2. > > The maximum time value in IA32_UMWAIT_CONTROL[31-2] is set as zero which > means there is no global time limit for UMWAIT and

[PATCH] net: vxge: fix indentation issue

2019-01-16 Thread Colin King
From: Colin Ian King There is a goto statement that indented too deeply, fix it. Signed-off-by: Colin Ian King --- drivers/net/ethernet/neterion/vxge/vxge-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c

Re: [Xen-devel] [PATCH v5 2/2] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront

2019-01-16 Thread Dongli Zhang
On 2019/1/17 上午12:32, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 08, 2019 at 04:24:32PM +0800, Dongli Zhang wrote: >> oops. Please ignore this v5 patch. >> >> I just realized Linus suggested in an old email not use BUG()/BUG_ON() in >> the code. >> >> I will switch to the WARN() solution and

Re: [PATCH 3/7] coresight: Use event attributes for sink selection

2019-01-16 Thread Mathieu Poirier
On Wed, 16 Jan 2019 at 03:36, Suzuki K Poulose wrote: > > Hi Mathieu, > > On 15/01/2019 23:07, Mathieu Poirier wrote: > > This patch uses the information conveyed by perf_event::attr::config2 > > to select a sink to use for the session. That way a sink can easily be > > selected to be used by

Re: [PATCH v2 2/3] x86/umwait: Setup umwait C0.2 state

2019-01-16 Thread Andy Lutomirski
On Wed, Jan 16, 2019 at 1:24 PM Fenghua Yu wrote: > > UMWAIT or TPAUSE called by user process makes processor to reside in > a light-weight power/performance optimized state (C0.1 state) or an > improved power/performance optimized state (C0.2 state). > > IA32_UMWAIT_CONTROL MSR register allows

Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file

2019-01-16 Thread Florian Fainelli
On 1/16/19 3:06 PM, Florian Fainelli wrote: > On 1/16/19 2:29 PM, Andrew Lunn wrote: >>> diff --git a/include/net/dsa.h b/include/net/dsa.h >>> index b3eefe8e18fd..6178b648d08a 100644 >>> --- a/include/net/dsa.h >>> +++ b/include/net/dsa.h >>> @@ -21,6 +21,7 @@ >>> #include >>> #include >>>

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-16 Thread Jonathan Neuschäfer
On Wed, Jan 16, 2019 at 02:34:53PM +0100, Christophe Leroy wrote: > Le 16/01/2019 à 14:16, Jonathan Neuschäfer a écrit : > > On Wed, Jan 16, 2019 at 07:55:29AM +0100, Christophe Leroy wrote: > > > Le 16/01/2019 à 01:35, Jonathan Neuschäfer a écrit : > > > > Thinning the kernel down a bit actually

[PATCH v2 1/2] kbuild: remove top-level built-in.a

2019-01-16 Thread Masahiro Yamada
The symbol table in the final archive is unneeded; the linker does not require the symbol table after the --whole-archive option. Every object file in the archive is included in the link anyway. Pass thin archives from subdirectories directly to the linker, and remove the final archiving step.

[PATCH v2 2/2] kbuild: merge KBUILD_VMLINUX_{INIT,MAIN} into KBUILD_VMLINUX_OBJS

2019-01-16 Thread Masahiro Yamada
The top Makefile does not need to export KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN separately. Put every built-in.a into KBUILD_VMLINUX_OBJS. The order of $(head-y), $(init-y), $(core-y), ... is still retained. Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile

Re: [PATCH 2/7] coresight: perf: Add "sinks" group to PMU directory

2019-01-16 Thread Mathieu Poirier
Good evening Suzuki, On Wed, 16 Jan 2019 at 03:29, Suzuki K Poulose wrote: > > > > On 15/01/2019 23:07, Mathieu Poirier wrote: > > Add a "sinks" directory entry so that users can see all the sinks > > available in the system in a single place. Individual sink are added > > as they are

Re: WARNING in apparmor_cred_free

2019-01-16 Thread James Morris
On Fri, 11 Jan 2019, Casey Schaufler wrote: > >From 47134986133c822e1d88860fa2b108f92c97a7ff Mon Sep 17 00:00:00 2001 > From: Casey Schaufler > Date: Fri, 11 Jan 2019 17:31:50 -0800 > Subject: [PATCH 1/2] LSM: Check for NULL cred-security on free > > Check that the cred security blob has been

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

2019-01-16 Thread Stephen Rothwell
Hi all, After merging the akpm-current tree, today's linux-next build (any sh config) failed like this: make[2]: *** No rule to make target '/kisskb/src/scripts/syscalltbl.sh', needed by 'arch/sh/include/generated/asm/syscall_table.h'. Stop. make[1]: *** [arch/sh/Makefile:232: archheaders]

[PATCH] arm64: dts: sdm845: Add CPU capacity values

2019-01-16 Thread Matthias Kaehlcke
Specify the relative CPU capacity of all SDM845 AP cores. The values were provided by Qualcomm engineers. Signed-off-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi

Re: [PATCH] mm: hwpoison: use do_send_sig_info() instead of force_sig() (Re: PMEM error-handling forces SIGKILL causes kernel panic)

2019-01-16 Thread Naoya Horiguchi
Hi Jane, On Wed, Jan 16, 2019 at 09:56:02AM -0800, Jane Chu wrote: > Hi, Naoya, > > On 1/16/2019 1:30 AM, Naoya Horiguchi wrote: > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index 7c72f2a95785..831be5ff5f4d 100644 > --- a/mm/memory-failure.c > +++

Re: [PATCH 2/4] mm/memory-hotplug: allow memory resources to be children

2019-01-16 Thread Jerome Glisse
On Wed, Jan 16, 2019 at 03:01:39PM -0800, Dave Hansen wrote: > On 1/16/19 11:16 AM, Jerome Glisse wrote: > >> We also rework the old error message a bit since we do not get > >> the conflicting entry back: only an indication that we *had* a > >> conflict. > > We should keep the device private

Re: [PATCH v2 2/2] leds: lp50xx: Add the LP50XX family of the RGB LED driver

2019-01-16 Thread Dan Murphy
Hello On 1/16/19 4:04 PM, Pavel Machek wrote: > Hi! > > ..snip. Let me read it and reply when I have a time. > >>> You know what? First, submit driver with similar functionality to >>> existing RGB drivers, using same interface existing drivers are >>> using. When that is accepted, we can talk

Re: [PATCH v2 1/2] drm/msm: Fix A6XX support for opp-level

2019-01-16 Thread Rob Clark
s On Wed, Jan 16, 2019 at 1:46 PM Douglas Anderson wrote: > > The bindings for Qualcomm opp levels changed after being Acked but > before landing. Thus the code in the GPU driver that was relying on > the old bindings is now broken. > > Let's change the code to match the new bindings by

Re: [PATCH net-next] virtio_net: bulk free tx skbs

2019-01-16 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 14 Jan 2019 20:34:26 -0500 > Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is > safe to call in a non-napi context as long as the napi_budget flag is > correct. > > Signed-off-by: Michael S. Tsirkin > --- > > My perf testing setup

Re: [PATCH] clk: mmp2: avoid disabling the SP clock when unused

2019-01-16 Thread Stephen Boyd
Quoting Lubomir Rintel (2019-01-16 09:26:31) > On Wed, 2019-01-16 at 08:37 -0800, Stephen Boyd wrote: > > Quoting Lubomir Rintel (2019-01-16 01:35:05) > > > There could be vital functionality running on the SP PJ1 core it can not > > > be > > > restarted just by turning the clock back on. > > >

[PATCH] MAINTAINERS: email address update in MAINTAINERS entries

2019-01-16 Thread shuah
From: Shuah Khan Update email address in MAINTAINERS entries. Signed-off-by: Shuah Khan --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4d04cebb4a71..6ca780f24808 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3979,6 +3979,7 @@ F:

Re: [PATCH 5/7] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

2019-01-16 Thread Lina Iyer
On Thu, Dec 20 2018 at 13:03 -0700, Stephen Boyd wrote: Quoting Lina Iyer (2018-12-19 14:11:03) + +static int msm_gpio_domain_alloc(struct irq_domain *domain, unsigned int virq, +unsigned int nr_irqs, void *arg) +{ + int ret; + irq_hw_number_t hwirq;

Re: [PATCH v1] selftests: add binderfs selftests

2019-01-16 Thread shuah
Hi Christian, On 1/16/19 3:27 PM, Christian Brauner wrote: This adds the promised selftest for binderfs. It will verify the following things: - binderfs mounting works - binder device allocation works - performing a binder ioctl() request through a binderfs device works - binder device removal

[PATCH v8 3/3] mm: Maintain randomization of page free lists

2019-01-16 Thread Dan Williams
When freeing a page with an order >= shuffle_page_order randomly select the front or back of the list for insertion. While the mm tries to defragment physical pages into huge pages this can tend to make the page allocator more predictable over time. Inject the front-back randomness to preserve

[PATCH v8 1/3] mm: Shuffle initial free memory to improve memory-side-cache utilization

2019-01-16 Thread Dan Williams
Randomization of the page allocator improves the average utilization of a direct-mapped memory-side-cache. Memory side caching is a platform capability that Linux has been previously exposed to in HPC (high-performance computing) environments on specialty platforms. In that instance it was a

[PATCH v8 0/3] mm: Randomize free memory

2019-01-16 Thread Dan Williams
Changes since v7 [1]: * Make the functionality available to non-ACPI_NUMA builds (Kees) * Mark the shuffle_state configuration variable __ro_after_init, since it is not meant to be changed after boot. (Kees) * Collect Reviewed-by tag from Kees on patch1 and patch3 [1]:

[PATCH v8 2/3] mm: Move buddy list manipulations into helpers

2019-01-16 Thread Dan Williams
In preparation for runtime randomization of the zone lists, take all (well, most of) the list_*() functions in the buddy allocator and put them in helper functions. Provide a common control point for injecting additional behavior when freeing pages. Cc: Michal Hocko Cc: Dave Hansen

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

2019-01-16 Thread David Miller
From: lepton Date: Wed, 16 Jan 2019 14:27:45 -0800 > I sent another version with signed off serveral days ago: > > https://www.spinics.net/lists/netdev/msg543829.html > > So for some reason it got missed? I didn't see it before I applied the initial patch because I was heavily backlogged, I

Re: [PATCH v8 3/3] Bluetooth: hci_qca: Disable IBS state machine and flush Tx buffer

2019-01-16 Thread Matthias Kaehlcke
On Wed, Jan 16, 2019 at 05:16:03PM +0530, Balakrishna Godavarthi wrote: > During hci down we observed IBS sleep commands are queued in the Tx > buffer and hci_uart_write_work is sending data to the chip which is > not required as the chip is powered off. This patch will disable IBS > and flush the

Re: [PATCH net-next] svcrdma: Use struct_size() in kmalloc()

2019-01-16 Thread Bruce Fields
On Tue, Jan 15, 2019 at 04:49:16PM -0500, Chuck Lever wrote: > > > On Jan 15, 2019, at 4:11 PM, Gustavo A. R. Silva > wrote: > > > One of the more common cases of allocation size calculations is finding > > the size of a structure that has a zero-sized array at the end, along > > with memory

Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file

2019-01-16 Thread Florian Fainelli
On 1/16/19 2:29 PM, Andrew Lunn wrote: >> diff --git a/include/net/dsa.h b/include/net/dsa.h >> index b3eefe8e18fd..6178b648d08a 100644 >> --- a/include/net/dsa.h >> +++ b/include/net/dsa.h >> @@ -21,6 +21,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >

Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver

2019-01-16 Thread Pavel Machek
Hi! > Yeah the scripts in droid4-sms-tools git repo work for me for sending > and receiving. They do not work with cdma currently as the format is > different. > > Maybe you've managed to change the mode of the modem to queue the > messages with the at commands to the usb port? I did not have

[PATCH 04/16] block: sed-opal: close parameter list in cmd_finalize

2019-01-16 Thread David Kozub
Every step ends by calling cmd_finalize (via finalize_and_send) yet every step adds the token OPAL_ENDLIST on its own. Moving this into cmd_finalize decreases code duplication. Co-authored-by: Jonas Rabenstein Signed-off-by: David Kozub Signed-off-by: Jonas Rabenstein --- block/sed-opal.c |

[PATCH 06/16] block: sed-opal: unify error handling of responses

2019-01-16 Thread David Kozub
response_get_{string,u64} include error handling for argument resp being NULL but response_get_token does not handle this. Make all three of response_get_{string,u64,token} handle NULL resp in the same way. Co-authored-by: Jonas Rabenstein Signed-off-by: David Kozub Signed-off-by: Jonas

[PATCH 13/16] block: sed-opal: check size of shadow mbr

2019-01-16 Thread Jonas Rabenstein
Check whether the shadow mbr does fit in the provided space on the target. Also a proper firmware should handle this case and return an error we may prevent problems or even damage with crappy firmwares. Signed-off-by: Jonas Rabenstein --- block/opal_proto.h | 16

[PATCH 15/16] block: sed-opal: don't repeat opal_discovery0 in each steps array

2019-01-16 Thread David Kozub
Originally each of the opal functions that call next include opal_discovery0 in the array of steps. This is superfluous and can be done always inside next. Signed-off-by: David Kozub --- block/sed-opal.c | 88 +++- 1 file changed, 42 insertions(+), 46

[PATCH 01/16] block: sed-opal: fix typos and formatting

2019-01-16 Thread David Kozub
This should make no change in functionality. The formatting changes were triggered by checkpatch.pl. Signed-off-by: David Kozub --- block/sed-opal.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/block/sed-opal.c b/block/sed-opal.c index

[PATCH 03/16] block: sed-opal: unify space check in add_token_*

2019-01-16 Thread Jonas Rabenstein
All add_token_* functions have a common set of conditions that have to be checked. Use a common function for those checks in order to avoid different behaviour as well as code duplication. Co-authored-by: David Kozub Signed-off-by: Jonas Rabenstein Signed-off-by: David Kozub ---

[PATCH 05/16] block: sed-opal: unify cmd start

2019-01-16 Thread David Kozub
Every step starts with resetting the cmd buffer as well as the comid and constructs the appropriate OPAL_CALL command. Consequently, those actions may be combined into one generic function. On should take care that the opening and closing tokens for the argument list are already emitted by

[PATCH 12/16] block: sed-opal: unify retrieval of table columns

2019-01-16 Thread Jonas Rabenstein
Instead of having multiple places defining the same argument list to get a specific column of a sed-opal table, provide a generic version and call it from those functions. Signed-off-by: Jonas Rabenstein --- block/opal_proto.h | 2 + block/sed-opal.c | 132

[PATCH 08/16] block: sed-opal: print failed function address

2019-01-16 Thread Jonas Rabenstein
Add function address (and if available its symbol) to the message if a step function fails. Signed-off-by: Jonas Rabenstein --- block/sed-opal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/sed-opal.c b/block/sed-opal.c index 1332547e5a99..4225f23b2165 100644

[PATCH 00/16] block: sed-opal: support shadow MBR done flag and write

2019-01-16 Thread David Kozub
This patch series extends OPAL support: it adds IOCTL for setting the shadow MBR done flag which can be useful for unlocking an OPAL disk on boot and it adds IOCTL for writing to the shadow MBR. Also included are some minor fixes and improvements. This series is based on the original work done by

[PATCH 10/16] block: sed-opal: add ioctl for done-mark of shadow mbr

2019-01-16 Thread Jonas Rabenstein
Enable users to mark the shadow mbr as done without completely deactivating the shadow mbr feature. This may be useful on reboots, when the power to the disk is not disconnected in between and the shadow mbr stores the required boot files. Of course, this saves also the (few) commands required to

[PATCH 02/16] block: sed-opal: use correct macro for method length

2019-01-16 Thread Jonas Rabenstein
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same, it is weird to use OPAL_UID_LENGTH for the definition of the methods. Signed-off-by: Jonas Rabenstein --- block/sed-opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sed-opal.c

[PATCH 07/16] block: sed-opal: reuse response_get_token to decrease code duplication

2019-01-16 Thread David Kozub
response_get_token had already been in place, its functionality had been duplicated within response_get_{u64,bytestring} with the same error handling. Unify the handling by reusing response_get_token within the other functions. Co-authored-by: Jonas Rabenstein Signed-off-by: David Kozub

[PATCH 09/16] block: sed-opal: split generation of bytestring header and content

2019-01-16 Thread Jonas Rabenstein
Split the header generation from the (normal) memcpy part if a bytestring is copied into the command buffer. This allows in-place generation of the bytestring content. For example, copy_from_user may be used without an intermediate buffer. Signed-off-by: Jonas Rabenstein --- block/sed-opal.c |

[PATCH 14/16] block: sed-opal: pass steps via argument rather than via opal_dev

2019-01-16 Thread David Kozub
The steps argument is only read by the next function, so it can be passed directly as an argument rather than via opal_dev. Normally, the steps is an array on the stack, so the pointer stops being valid then the function that set opal_dev.steps returns. If opal_dev.steps was not set to NULL

Re: [PATCH v1 02/10] cpufreq: Add a flag to auto-register a cooling device

2019-01-16 Thread Rafael J. Wysocki
On Monday, January 14, 2019 5:34:54 PM CET Amit Kucheria wrote: > All cpufreq drivers do similar things to register as a cooling device. > Provide a cpufreq driver flag so drivers can just ask the cpufreq core > to register the cooling device on their behalf. This allows us to get > rid of

[PATCH 11/16] block: sed-opal: ioctl for writing to shadow mbr

2019-01-16 Thread Jonas Rabenstein
Allow modification of the shadow mbr. If the shadow mbr is not marked as done, this data will be presented read only as the device content. Only after marking the shadow mbr as done and unlocking a locking range the actual content is accessible. Co-authored-by: David Kozub Signed-off-by: Jonas

Re: [PATCH v3] arm64: dts: qcom: sdm845: Expand soc bus address range

2019-01-16 Thread Stephen Boyd
Quoting Stephen Boyd (2019-01-16 14:49:58) > > > > > > Do we need #size-cells = <2>? Maybe it could be #size-cells = <1> and we > > > can avoid having to specify a second size entry that's always going to > > > be 0 because we don't have devices with huge IO regions in the SoC. Or > > > does it

Re: [PATCH 2/4] mm/memory-hotplug: allow memory resources to be children

2019-01-16 Thread Dave Hansen
On 1/16/19 11:16 AM, Jerome Glisse wrote: >> We also rework the old error message a bit since we do not get >> the conflicting entry back: only an indication that we *had* a >> conflict. > We should keep the device private check (moving it in __request_region) > as device private can try to

Re: [alsa-devel] [PATCH v3 3/3] ASoC: cros_ec_codec: Add codec driver for Cros EC

2019-01-16 Thread Guenter Roeck
On Tue, Jan 15, 2019 at 10:18:02PM -0800, Guenter Roeck wrote: > On Wed, Dec 26, 2018 at 03:03:19PM +0800, Cheng-Yi Chiang wrote: > > Add a codec driver to control ChromeOS EC codec. > > > > Use EC Host command to enable/disable I2S recording and control other > > configurations. > > > >

Re: [PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy

2019-01-16 Thread Rafael J. Wysocki
On Monday, January 14, 2019 5:34:53 PM CET Amit Kucheria wrote: > Several cpufreq drivers register themselves as thermal cooling devices. > Adding a pointer to struct cpufreq_policy removes the need for them to > store this pointer in a private data structure. > > We can then auto-register the

Re: [PATCH v1 03/10] cpufreq: Replace open-coded << with BIT()

2019-01-16 Thread Rafael J. Wysocki
On Monday, January 14, 2019 5:34:55 PM CET Amit Kucheria wrote: > Minor clean-up to use BIT() and keep checkpatch happy. Clean up the > comment formatting while we're at it to make it easier to read. > > Signed-off-by: Amit Kucheria Can you please do this cleanup as the first patch in the

Re: [PATCH 13/14] staging: android: ion: Do not sync CPU cache on map/unmap

2019-01-16 Thread Liam Mark
On Wed, 16 Jan 2019, Andrew F. Davis wrote: > On 1/16/19 9:19 AM, Brian Starkey wrote: > > Hi :-) > > > > On Tue, Jan 15, 2019 at 12:40:16PM -0600, Andrew F. Davis wrote: > >> On 1/15/19 12:38 PM, Andrew F. Davis wrote: > >>> On 1/15/19 11:45 AM, Liam Mark wrote: > On Tue, 15 Jan 2019,

Re: [PATCH,RESEND] selftests: add TPM 2.0 tests

2019-01-16 Thread Thiago Jung Bauermann
Hello, Jarkko Sakkinen writes: > Added the tests that I've been using for testing TPM 2.0 functionality > for long time but have out-of-tree so far residing in > > https://github.com/jsakkine-intel/tpm2-scripts > > Cc: Tadeusz Struk > Signed-off-by: Jarkko Sakkinen > Acked-By: Joey

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2019-01-16 Thread Dave Chinner
On Wed, Jan 16, 2019 at 09:50:16AM -0500, Jerome Glisse wrote: > On Wed, Jan 16, 2019 at 03:34:55PM +1100, Dave Chinner wrote: > > On Tue, Jan 15, 2019 at 09:23:12PM -0500, Jerome Glisse wrote: > > > On Tue, Jan 15, 2019 at 06:01:09PM -0800, Dan Williams wrote: > > > > On Tue, Jan 15, 2019 at 5:56

[PATCH v4 00/13] x86: Enable FSGSBASE instructions

2019-01-16 Thread Chang S. Bae
Update from v3 [3]: * Raise minimum binutils requirement to use the new instructions directly * Optimize FIND_PERCPU_BASE macro * Rename some helper functions, __{rd,wr}gsbase_inactive() * Use NOKPROBE_SYMBOL instead of __kprobes Update from v2 [2]: * Separate out the preparatory patches [11]

Re: [PATCH v3] arm64: dts: qcom: sdm845: Expand soc bus address range

2019-01-16 Thread Stephen Boyd
Quoting Bjorn Andersson (2019-01-16 14:10:03) > On Wed 16 Jan 13:28 PST 2019, Stephen Boyd wrote: > > > Quoting Bjorn Andersson (2019-01-15 23:19:39) > > > DMA addresses for devices on the soc bus must be constrained to the 36 > > > address bits that the bus provides. When no IOMMU is present

[PATCH v4 07/13] x86/fsgsbase/64: When copying a thread, use the FSGSBASE instructions if available

2019-01-16 Thread Chang S. Bae
Copy real FS/GSBASE values instead of approximation when FSGSBASE is enabled. Factoring out to save_fsgs() does not result in the same behavior because save_base_legacy() does not copy FS/GSBASE when the index is zero. Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: H. Peter Anvin Cc:

[PATCH v4 06/13] x86/fsgsbase/64: Preserve FS/GS state in __switch_to() if FSGSBASE is on

2019-01-16 Thread Chang S. Bae
From: Andy Lutomirski With the new FSGSBASE instructions, we can efficiently read and write the FSBASE and GSBASE in __switch_to(). Use that capability to preserve the full state. This will enable user code to do whatever it wants with the new instructions without any kernel-induced gotchas.

[PATCH v4 05/13] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2019-01-16 Thread Chang S. Bae
The helper functions will switch on faster accesses to FSBASE and GSBASE when the FSGSBASE feature is enabled. Accessing user GSBASE needs a couple of SWAPGS operations. It is avoidable if the user GSBASE is saved at kernel entry, being updated as changes, and restored back at kernel exit.

Re: [PATCH v1] selftests: add binderfs selftests

2019-01-16 Thread Christian Brauner
On Wed, Jan 16, 2019 at 11:40:50PM +0100, Greg KH wrote: > On Wed, Jan 16, 2019 at 11:27:45PM +0100, Christian Brauner wrote: > > This adds the promised selftest for binderfs. It will verify the following > > things: > > - binderfs mounting works > > - binder device allocation works > > -

[PATCH v4 08/13] x86/fsgsbase/64: Introduce the FIND_PERCPU_BASE macro

2019-01-16 Thread Chang S. Bae
GSBASE is used to find per-CPU data in the kernel. But when it is unknown, the per-CPU base can be found from the per_cpu_offset table with a CPU NR. The CPU NR is extracted from the limit field of the CPUNODE entry in GDT, or by the RDPID instruction. Also, add the GAS-compatible RDPID macro.

[PATCH v4 10/13] selftests/x86/fsgsbase: Test WRGSBASE

2019-01-16 Thread Chang S. Bae
From: Andy Lutomirski This validates that GS and GSBASE are independently preserved across context switches. [ chang: Use FSGSBASE instructions directly instead of .byte ] Signed-off-by: Andy Lutomirski Reviewed-by: Andi Kleen Signed-off-by: Chang S. Bae Cc: H. Peter Anvin Cc: Thomas

[PATCH v4 03/13] kbuild: Raise the minimum required binutils version to 2.21

2019-01-16 Thread Chang S. Bae
It helps to use some new instructions directly in inline assembly. Suggested-by: Andi Kleen Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: Linux Torvalds Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Dave Hansen --- Documentation/process/changes.rst | 6 ++ 1 file

[PATCH v4 11/13] x86/fsgsbase/64: Enable FSGSBASE by default and add a chicken bit

2019-01-16 Thread Chang S. Bae
From: Andy Lutomirski Now that FSGSBASE is fully supported, remove unsafe_fsgsbase, enable FSGSBASE by default, and add nofsgsbase to disable it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Reviewed-by: Andi Kleen Cc: H. Peter Anvin Cc: Thomas Gleixner Cc: Ingo Molnar Cc:

[PATCH v4 13/13] x86/fsgsbase/64: Add documentation for FSGSBASE

2019-01-16 Thread Chang S. Bae
From: Andi Kleen v2: Minor updates to documentation requested in review. v3: Update for new gcc and various improvements. [ chang: Fix some typo. Fix the example code. ] Signed-off-by: Andi Kleen Signed-off-by: Chang S. Bae Cc: Andy Lutomirski Cc: H. Peter Anvin Cc: Thomas Gleixner Cc:

[PATCH v4 02/13] x86/fsgsbase/64: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE

2019-01-16 Thread Chang S. Bae
From: Andy Lutomirski This is temporary. It will allow the next few patches to be tested incrementally. Setting unsafe_fsgsbase is a root hole. Don't do it. [ chang: Minor fix. Add the TAINT_INSECURE flag. ] Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Reviewed-by: Andi

[PATCH v4 04/13] x86/fsgsbase/64: Add intrinsics/macros for FSGSBASE instructions

2019-01-16 Thread Chang S. Bae
From: Andi Kleen Add C intrinsics and assembler macros for the new FSBASE and GSBASE instructions. Very straight forward. Used in followon patches. [ luto: Rename the variables from FS and GS to FSBASE and GSBASE and make safe to include on 32-bit kernels. ] v2: Use __always_inline [

[PATCH v4 01/13] taint: Introduce a new taint flag (insecure)

2019-01-16 Thread Chang S. Bae
For testing (or root-only) purposes, the new flag will serve to tag the kernel taint accurately. When adding a new feature support, patches need to be incrementally applied and tested with temporal parameters. Currently, there is no flag for this usage. Suggested-by: H. Peter Anvin

[PATCH v4 09/13] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry

2019-01-16 Thread Chang S. Bae
The FSGSBASE instructions allow fast accesses on GSBASE. Now, at the paranoid_entry, the per-CPU base value can be always copied to GSBASE. And the original GSBASE value will be restored at the exit. So far, GSBASE modification has not been directly allowed from userspace. So, swapping GSBASE

[PATCH v4 12/13] x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2

2019-01-16 Thread Chang S. Bae
From: Andi Kleen The kernel needs to explicitly enable FSGSBASE. So, the application needs to know if it can safely use these instructions. Just looking at the CPUID bit is not enough because it may be running in a kernel that does not enable the instructions. One way for the application would

[PATCH v2] scsi: be2iscsi: fix potential NULL pointer dereference

2019-01-16 Thread Dmitry Voytik
Fix potential NULL pointer dereference wich might happen in beiscsi_alloc_mem(). If kmalloc_array() fails and mem_descr->mem_array is set to NULL, then its dereferencing happens when passing mem_descr->mem_array[] to dma_free_coherent(). Signed-off-by: Dmitry Voytik --- Changes since v1: -

Re: [PATCH 13/14] staging: android: ion: Do not sync CPU cache on map/unmap

2019-01-16 Thread Liam Mark
On Wed, 16 Jan 2019, Andrew F. Davis wrote: > On 1/15/19 1:05 PM, Laura Abbott wrote: > > On 1/15/19 10:38 AM, Andrew F. Davis wrote: > >> On 1/15/19 11:45 AM, Liam Mark wrote: > >>> On Tue, 15 Jan 2019, Andrew F. Davis wrote: > >>> > On 1/14/19 11:13 AM, Liam Mark wrote: > > On Fri, 11

Re: [PATCH v1] selftests: add binderfs selftests

2019-01-16 Thread Greg KH
On Wed, Jan 16, 2019 at 11:27:45PM +0100, Christian Brauner wrote: > This adds the promised selftest for binderfs. It will verify the following > things: > - binderfs mounting works > - binder device allocation works > - performing a binder ioctl() request through a binderfs device works > -

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