[PATCH] filesystems: remove unnecessary unlikely()

2018-09-07 Thread Igor Stoppa
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- fs/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/open.c b

Re: BUG: bad usercopy in __check_object_size (2)

2018-09-07 Thread Tetsuo Handa
On 2018/09/08 0:29, syzbot wrote: > syzbot has found a reproducer for the following crash on: > > HEAD commit:    28619527b8a7 Merge git://git.kernel.org/pub/scm/linux/kern.. > git tree:   bpf > console output: https://syzkaller.appspot.com/x/log.txt?x=124e64d140 > kernel config:  https://

Re: [PATCH V3] spi: spi-geni-qcom: Add SPI driver support for GENI based QUP

2018-09-07 Thread Doug Anderson
Hi, On Fri, Sep 7, 2018 at 3:00 AM, wrote: >> In v2, I said: >> >>> I'm not sure where to comment about this, so adding it to the end: >>> >>> Between v1 and v2 you totally removed all the locking. Presumably >>> this is because you didn't want to hold the lock in >>> handle_fifo_timeout() whil

Re: [patch 02/10] x86/mm/cpa: Rework static_protections()

2018-09-07 Thread Dave Hansen
On 09/07/2018 08:01 AM, Thomas Gleixner wrote: > +static inline pgprot_t static_protections(pgprot_t prot, unsigned long > address, > + unsigned long pfn) > +{ > + pgprotval_t forbidden; > + > + /* Operate on the virtual address */ > + forbidden =

Re: [PATCH V3] spi: spi-geni-qcom: Add SPI driver support for GENI based QUP

2018-09-07 Thread Doug Anderson
Hi, On Fri, Sep 7, 2018 at 3:00 AM, wrote: >> In v2, I said: >> >>> I'm not sure where to comment about this, so adding it to the end: >>> >>> Between v1 and v2 you totally removed all the locking. Presumably >>> this is because you didn't want to hold the lock in >>> handle_fifo_timeout() whil

RE: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

2018-09-07 Thread Suman Tripathi
Hi Jens With regards, Suman >-Original Message- >From: Jens Axboe >Sent: Friday, September 7, 2018 7:26 AM >To: Suman Tripathi ; Hans de Goede >; t...@kernel.org; linux-...@vger.kernel.org; linux- >arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; >j...@perches.com; a...@ar

Re: [PATCH v3] ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

2018-09-07 Thread Jens Axboe
On 9/7/18 10:35 AM, Suman Tripathi wrote: >> I can apply it manually while you work out the kinks in your email >> setup. It might even be your company MTA mangling it, I've seen all >> sorts of crazy like that. > > Thanks for the support. We are working with IT to fix this issue. Good luck! If al

Re: [PATCH] apparmor: Fix network performance issue in aa_label_sk_perm

2018-09-07 Thread John Johansen
On 09/06/2018 09:33 PM, Tony Jones wrote: > The netperf benchmark shows a 5.73% reduction in throughput for > small (64 byte) transfers by unconfined tasks. > > DEFINE_AUDIT_SK() in aa_label_sk_perm() should not be performed > unconditionally, rather only when the label is confined. > > netperf

Re: [PATCH RFC LKMM 1/7] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-07 Thread Daniel Lustig
On 9/7/2018 9:09 AM, Will Deacon wrote: > On Fri, Sep 07, 2018 at 12:00:19PM -0400, Alan Stern wrote: >> On Thu, 6 Sep 2018, Andrea Parri wrote: >> Have you noticed any part of the generic code that relies on ordinary acquire-release (rather than atomic RMW acquire-release) in order to

Re: [PATCH v2 3/3] x86/pti/64: Remove the SYSCALL64 entry trampoline

2018-09-07 Thread Josh Poimboeuf
On Mon, Sep 03, 2018 at 03:59:44PM -0700, Andy Lutomirski wrote: > The SYSCALL64 trampoline has a couple of nice properties: > > - The usual sequence of SWAPGS followed by two GS-relative accesses to >set up RSP is somewhat slow because the GS-relative accesses need >to wait for SWAPGS to

Re: [PATCH v4 0/3] mtd: rawnand: ams-delta: Cleanups and optimizations

2018-09-07 Thread Tony Lindgren
Hi, * Janusz Krzysztofik [180905 20:56]: > On Wednesday, September 5, 2018 8:47:57 AM CEST Miquel Raynal wrote: > > Patch 2/3 does not apply on nand/next. Indeed the driver does not look > > the same as in the diff. > > That's because I built it on top of my former series from the mid of July,

Re: [PATCH] ARM: qcom_defconfig: Enable MAILBOX

2018-09-07 Thread Bjorn Andersson
On Thu 06 Sep 21:44 PDT 2018, frowand.l...@gmail.com wrote: > From: Frank Rowand > > Problem: > ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" > added a "depends on MAILBOX") to RPMSG_QCOM_SMD, thus RPMSG_QCOM_SMD > becomes unset since MAILBOX was not enabled in qcom_defc

[PATCH 1/4] 9p: acl: fix uninitialized iattr access

2018-09-07 Thread Dominique Martinet
From: Dominique Martinet iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable") Signed-off

[PATCH 3/4] 9p: p9dirent_read: check network-provided name length

2018-09-07 Thread Dominique Martinet
From: Dominique Martinet strcpy to dirent->d_name could overflow the buffer, use strscpy to check the provided string length and error out if the size was too big. While we are here, make the function return an error when the pdu parsing failed, instead of returning the pdu offset as if it had b

[PATCH 2/4] 9p/rdma: remove useless check in cm_event_handler

2018-09-07 Thread Dominique Martinet
From: Dominique Martinet the client c is always dereferenced to get the rdma struct, so c has to be a valid pointer at this point. Gcc would optimize that away but let's make coverity happy... Addresses-Coverity-ID: 102778 ("Dereference before null check") Signed-off-by: Dominique Martinet ---

[PATCH 0/4] 9p coverity fixes

2018-09-07 Thread Dominique Martinet
From: Dominique Martinet Since we already had one coverity fix for 9p, I figured I could request an account and look at stuff that actually could matter. The leak of glock.client_id wasn't found by coverity but when I was looking at a false positive there, of the rest the rdma one is useless but

[PATCH 4/4] 9p locks: fix glock.client_id leak in do_lock

2018-09-07 Thread Dominique Martinet
From: Dominique Martinet the 9p client code overwrites our glock.client_id pointing to a static buffer by an allocated string holding the network provided value which we do not care about; free and reset the value as appropriate. This is almost identical to the leak in v9fs_file_getlock() fixed

Re: [PATCH 01/12] blkcg: fix ref count issue with bio_blkcg using task_css

2018-09-07 Thread Tejun Heo
On Thu, Sep 06, 2018 at 05:10:34PM -0400, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > The accessor function bio_blkcg either returns the blkcg associated with > the bio or finds one in the current context. This can cause an issue > when trying to associate a bio with a blkcg. Particul

[PATCH] firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings

2018-09-07 Thread Sudeep Holla
Replace all the memcpy() for copying name strings from the firmware with strlcpy() to make sure we are bounded by the source buffer size and we also always have NULL-terminated strings. This is needed to avoid out of bounds accesses if the firmware returns a non-terminated string. Reported-by: Ol

[PATCH 1/2] Fix cg_read_strcmp()

2018-09-07 Thread jgkamat
From: Jay Kamat Fix a couple issues with cg_read_strcmp(), to improve correctness of cgroup tests - Fix cg_read_strcmp() always returning 0 for empty "needle" strings - Fix a memory leak in cg_read_strcmp() Fixes: 84092dbcf901 ("selftests: cgroup: add memory controller self-tests") Signed-off-b

kselftests for memory.oom.group

2018-09-07 Thread jgkamat
Here is an amended patch which fixes those issues. Please let me know if you see anything else that could be improved. Changes since the last patchset: - Use if statement to check for empty string in cgroup_util.c - Cleanup and return properly when failing to kill process in test_memcg_oom_gro

[PATCH 2/2] Add tests for memory.oom.group

2018-09-07 Thread jgkamat
From: Jay Kamat Add tests for memory.oom.group for the following cases: - Killing all processes in a leaf cgroup, but leaving the parent untouched - Killing all processes in a parent and leaf cgroup - Keeping processes marked by OOM_SCORE_ADJ_MIN alive when considered for being killed by the

Re: [PATCH 0/3] ARM: OMAP1: ams-delta: Clean up GPIO setup for MODEM

2018-09-07 Thread Tony Lindgren
* Janusz Krzysztofik [180820 11:16]: > > Convert modem related GPIO setup from integer space to GPIO descriptors. > Also, restore original initialization order of the MODEM device and its > related GPIO pins. > > Cleanup of MODEM relaated regulator setup is postponed while waiting for > upcoming

[PATCH 1/6] openvswitch: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
There was no real need for this code to be using flexarrays, it's just implementing a hash table - ideally it would be using rhashtables, but that conversion would be significantly more complicated. Signed-off-by: Kent Overstreet Cc: Pravin B Shelar Cc: d...@openvswitch.org --- net/openvswitch/

[PATCH 0/6] flex_arrays -> genradix; prep work for bcachefs

2018-09-07 Thread Kent Overstreet
Generic radix trees are a dead simple radix tree implementation that can store types of different sizes, needed for bcachefs. The patch series was sent out previously and was pretty uncontroversial - this is a respin that converts most users to just use kvmalloc. Kent Overstreet (6): openvswitc

[PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The code really just wants a big flat buffer, so just do that. Signed-off-by: Kent Overstreet Cc: Shaohua Li Cc: linux-r...@vger.kernel.org --- drivers/md/raid5-ppl.c | 7 ++-- drivers/md/raid5.c | 82 +++--- drivers/md/raid5.h | 9 ++--- 3 files ch

[PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The flex arrays were being used for constant sized arrays, so there's no benefit to using flex_arrays over something simpler. Signed-off-by: Kent Overstreet Cc: linux-security-mod...@vger.kernel.org --- security/selinux/ss/avtab.c | 40 +- security/selinux/ss/avtab.h | 4 +

[PATCH 4/6] Generic radix trees

2018-09-07 Thread Kent Overstreet
Very simple radix tree implementation that supports storing arbitrary size entries, up to PAGE_SIZE - upcoming patches will convert existing flex_array users to genradixes. The new genradix code has a much simpler API and implementation, and doesn't have a hard limit on the number of elements like

[PATCH 6/6] Drop flex_arrays

2018-09-07 Thread Kent Overstreet
All existing users have been converted to generic radix trees Signed-off-by: Kent Overstreet Acked-by: Dave Hansen --- Documentation/core-api/flexible-arrays.rst | 130 --- Documentation/flexible-arrays.txt | 123 --- include/linux/flex_array.h | 149 i

[PATCH 5/6] proc: commit to genradix

2018-09-07 Thread Kent Overstreet
the new generic radix trees have a simpler API and implementation, and no limitations on number of elements, so all flex_array users are being converted Signed-off-by: Kent Overstreet Cc: Al Viro --- fs/proc/base.c | 43 +++ 1 file changed, 15 insertions(

Re: [PATCH 2/2] Add tests for memory.oom.group

2018-09-07 Thread Roman Gushchin
On Fri, Sep 07, 2018 at 09:49:24AM -0700, jgka...@fb.com wrote: > From: Jay Kamat > > Add tests for memory.oom.group for the following cases: > - Killing all processes in a leaf cgroup, but leaving the > parent untouched > - Killing all processes in a parent and leaf cgroup > - Keeping processe

Re: [PATCH v1 0/5] CPUFREQ OPP's and Tegra30 support by tegra20-cpufreq driver

2018-09-07 Thread Dmitry Osipenko
On 9/6/18 3:35 PM, Marcel Ziswiler wrote: On Thu, 2018-08-30 at 22:43 +0300, Dmitry Osipenko wrote: Hello, This series adds support for CPU frequency scaling on Tegra30 and device tree support that allows to implement thermal throttling and customize available CPU frequencies per-board. The teg

Re: [PATCH 1/2] Fix cg_read_strcmp()

2018-09-07 Thread Roman Gushchin
On Fri, Sep 07, 2018 at 09:49:23AM -0700, jgka...@fb.com wrote: > From: Jay Kamat > > Fix a couple issues with cg_read_strcmp(), to improve correctness of > cgroup tests > - Fix cg_read_strcmp() always returning 0 for empty "needle" strings > - Fix a memory leak in cg_read_strcmp() > > Fixes: 84

Re: [PATCH v3 0/4] pci-dra7xx: Enable errata i870 workaround for RC mode

2018-09-07 Thread Tony Lindgren
* Vignesh R [180810 10:10]: > > > On Wednesday 08 August 2018 10:27 PM, Lorenzo Pieralisi wrote: > > On Tue, Jul 24, 2018 at 11:01:46PM +0530, Vignesh R wrote: > >> Make workaround for errata i870 applicable in Host mode as > >> well(previously it was enabled only for EP mode) as per errata > >>

Re: [PATCH v13 11/13] platform/x86: Intel SGX driver

2018-09-07 Thread Sean Christopherson
On Thu, Sep 06, 2018 at 05:50:01PM -0700, Joe Perches wrote: > On Thu, 2018-09-06 at 19:35 +0200, Miguel Ojeda wrote: > > > Which one is right and why the kernel tree is polluted with C99-headers > > > when they do not pass checkpatch.pl? > > checkpatch ignores c99 headers since 2016. Jarkko was

Re: [PATCH 4.4 31/43] mm: fix cache mode tracking in vm_insert_mixed()

2018-09-07 Thread Ben Hutchings
On Tue, 2018-08-14 at 19:18 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > -- > > From: Dan Williams > > commit 87744ab3832b83ba71b931f86f9cfdb000d07da5 upstream > > vm_insert_mixed() unlike vm_insert_pfn_prot(

Re: [PATCH 1/2] Fix cg_read_strcmp()

2018-09-07 Thread Shuah Khan
On 09/07/2018 10:49 AM, jgka...@fb.com wrote: > From: Jay Kamat > > Fix a couple issues with cg_read_strcmp(), to improve correctness of > cgroup tests > - Fix cg_read_strcmp() always returning 0 for empty "needle" strings > - Fix a memory leak in cg_read_strcmp() > > Fixes: 84092dbcf901 ("selft

[GIT PULL] Ceph updates for 4.19-rc3

2018-09-07 Thread Ilya Dryomov
Hi Linus, The following changes since commit 57361846b52bc686112da6ca5368d11210796804: Linux 4.19-rc2 (2018-09-02 14:37:30 -0700) are available in the Git repository at: https://github.com/ceph/ceph-client.git tags/ceph-for-4.19-rc3 for you to fetch changes up to e92c0eaf754310f9f31e9229a3

Re: [PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Tetsuo Handa
On 2018/09/08 1:56, Kent Overstreet wrote: > @@ -329,8 +328,7 @@ int avtab_alloc(struct avtab *h, u32 nrules) > nslot = MAX_AVTAB_HASH_BUCKETS; > mask = nslot - 1; > > - h->htable = flex_array_alloc(sizeof(struct avtab_node *), nslot, > - G

[PATCH] usb: octeon-hcd: remove unnecessary unlikely()

2018-09-07 Thread Igor Stoppa
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Cc: Aaro Koskinen Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 ins

Re: [PATCH v2] ARM: omap: Convert to using %pOFn instead of device_node.name

2018-09-07 Thread Tony Lindgren
* Rob Herring [180828 08:48]: > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. > > Cc: "Benoît Cousson" > Cc: Paul Walmsley > Cc: Tony Lindgren > Cc: linux-o...@vger.kernel.org > Cc: linux-arm-ker...@lists.infra

Re: [PATCH] firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings

2018-09-07 Thread Olof Johansson
Hi, On Fri, Sep 7, 2018 at 9:52 AM, Sudeep Holla wrote: > Replace all the memcpy() for copying name strings from the firmware with > strlcpy() to make sure we are bounded by the source buffer size and we > also always have NULL-terminated strings. > > This is needed to avoid out of bounds accesse

Re: [PATCH 1/6] openvswitch: convert to kvmalloc

2018-09-07 Thread Matthew Wilcox
On Fri, Sep 07, 2018 at 12:56:30PM -0400, Kent Overstreet wrote: > There was no real need for this code to be using flexarrays, it's just > implementing a hash table - ideally it would be using rhashtables, but > that conversion would be significantly more complicated. > > Signed-off-by: Kent Over

Re: [PATCH] mfd: ti-lmu: constify mfd_cell tables

2018-09-07 Thread Dan Murphy
Pavel On 09/07/2018 04:39 AM, Pavel Machek wrote: > On Wed 2018-08-29 11:31:08, Pavel Machek wrote: >> From: Sebastian Reichel >> >> mfd: ti-lmu: constify mfd_cell tables >> >> Add const attribute to all mfd_cell structures. >> >> Signed-off-by: Sebastian Reichel >> Signed-off-by: Pave

Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")

2018-09-07 Thread Nick Desaulniers
On Fri, Sep 7, 2018 at 7:34 AM Christophe LEROY wrote: > > Cc linux-spa...@vger.kernel.org > > Le 07/09/2018 à 14:22, Christophe Leroy a écrit : > > Since commit cafa0010cd51f ("Raise the minimum required gcc version to > > 4.6"), sparse check fails as follows: > > > > [root@pc16082vm linux-powerp

Re: [PATCH 4.4 105/124] xen-netfront: wait xenbus state change when load module manually

2018-09-07 Thread Boris Ostrovsky
On 09/06/2018 08:21 PM, Ben Hutchings wrote: > On Sat, 2018-08-04 at 11:01 +0200, Greg Kroah-Hartman wrote: >> 4.4-stable review patch.  If anyone has any objections, please let me know. >> >> -- >> >> From: Xiao Liang >> >> [ Upstream commit 822fb18a82abaf4ee7058793d95d340f5dab7bf

Re: [PATCH 1/3] ARM: dts: am571x-idk: Add tricolor Industrial LED support

2018-09-07 Thread Tony Lindgren
* Andrew F. Davis [180831 12:38]: > AM571x-IDK rev 1.2A has tricolor RGB LEDs that can be controlled using > GPIO. Expose these to userspace for usage as necessary. Thanks applying all three into omap-for-v4.20/dt. Regards, Tony

Re: [PATCH v2 00/32] Device Tree Updates for GTA04 (A3/A4/A5 variants)

2018-09-07 Thread Tony Lindgren
* Tony Lindgren [180829 19:40]: > * H. Nikolaus Schaller [180829 07:24]: > > Hi OMAP3 DTS Maintainers, > > is there any progress in merging this patch series? > > Looks good to me in general, I'll be getting into applying > patches for v4.20 in few days. Applying all into omap-for-v4.20/dt fina

Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops

2018-09-07 Thread Marcel Holtmann
Hi James, >> Here's a set of patches that does the following, if you could pull it please: > > Thanks, it would be good to see more review / acks, though. so I have reviewed and tested this code. In addition, we have test cases for it in ELL (embedded linux library). Tested-by: Marcel Holtmann

Re: [PATCH] infiniband: nes: add unlikely() to assert()

2018-09-07 Thread Leon Romanovsky
On Fri, Sep 07, 2018 at 06:25:03PM +0300, Igor Stoppa wrote: > On 07/09/18 18:13, Doug Ledford wrote: > > > This patch was part of a larger series on lkml. In that context, I > > acked it so that the series could be applied by whomever took it (it > > didn't belong on rdma-list as a series since o

Re: [PATCH AUTOSEL 4.18 69/88] xen-netfront: fix queue name setting

2018-09-07 Thread Boris Ostrovsky
On 09/06/2018 08:36 PM, Sasha Levin wrote: > From: Vitaly Kuznetsov > > [ Upstream commit 2d408c0d4574b01b9ed45e02516888bf925e11a9 ] > > Commit f599c64fdf7d ("xen-netfront: Fix race between device setup and > open") changed the initialization order: xennet_create_queues() now > happens before we d

Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops

2018-09-07 Thread James Morris
On Fri, 7 Sep 2018, Marcel Holtmann wrote: > Hi James, > > >> Here's a set of patches that does the following, if you could pull it > >> please: > > > > Thanks, it would be good to see more review / acks, though. > > so I have reviewed and tested this code. In addition, we have test cases for

Re: [PATCH 6/7] HID: logitech-hidpp: support the G700 over wireless

2018-09-07 Thread Harry Cutts
Hi Benjamin, On Fri, 7 Sep 2018 at 03:35, Benjamin Tissoires wrote: > > The G700 is using a non unifying receiver, so it's easy to add its support > in hid-logitech-hidpp now. > [snip] > @@ -3671,6 +3671,9 @@ static const struct hid_device_id hidpp_devices[] = { > { /* Solar Keyboard Logi

Re: [PATCH] Input: reserve 2 events code because of HID

2018-09-07 Thread Dmitry Torokhov
On Fri, Sep 07, 2018 at 10:51:15AM +0200, Benjamin Tissoires wrote: > From: Benjamin Tissoires > > Prior to commit 190d7f02ce8e ("HID: input: do not increment usages when > a duplicate is found") from the v4.18 kernel, HID used to shift the > event codes if a duplicate usage was found. This ended

Re: Regression in next with filesystem context concept

2018-09-07 Thread Andreas Kemnade
Hi, On Fri, 7 Sep 2018 09:10:23 -0700 Tony Lindgren wrote: > * David Howells [180907 08:51]: > > Tony Lindgren wrote: > > > > > Looks like next-20180906 now has a regression where mounting > > > root won't work with commit fd0002870b45 ("vfs: Implement a > > > filesystem superblock creation

Re: [PATCH V2 6/8] input: stpmic1: add stpmic1 onkey driver

2018-09-07 Thread dmitry.torok...@gmail.com
Hi Pascal, On Fri, Sep 07, 2018 at 12:59:45PM +, Pascal PAILLET-LME wrote: > From: pascal paillet > > The stpmic1 pmic is able to manage an onkey button. This driver exposes > the stpmic1 onkey as an input device. It can also be configured to > shut-down the power supplies on a long key-pres

Re: [PATCH RFC LKMM 1/7] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-07 Thread Alan Stern
On Fri, 7 Sep 2018, Daniel Lustig wrote: > On 9/7/2018 9:09 AM, Will Deacon wrote: > > On Fri, Sep 07, 2018 at 12:00:19PM -0400, Alan Stern wrote: > >> On Thu, 6 Sep 2018, Andrea Parri wrote: > >> > Have you noticed any part of the generic code that relies on ordinary > acquire-release

[PATCH v2 1/3] mtd: core: add get_mtd_device_by_node

2018-09-07 Thread Bernhard Frauendienst
Add function to retrieve a mtd device by its OF node. Since drivers can assign arbitrary names to mtd devices in the absence of a label property, there is no other reliable way to retrieve a mtd device for a given OF node. Signed-off-by: Bernhard Frauendienst Reviewed-by: Miquel Raynal --- driv

[PATCH v2 3/3] mtd: mtdconcat: add dt driver for concat devices

2018-09-07 Thread Bernhard Frauendienst
Some mtd drivers like physmap variants have support for concatenating multiple mtd devices, but there is no generic way to define such a concat device from within the device tree. This is useful for some SoC boards that use multiple flash chips as memory banks of a single mtd device, with partitio

[PATCH v2 0/3] mtd concat device driver

2018-09-07 Thread Bernhard Frauendienst
Hi everybody, when porting my router board from a mach-file based OpenWRT target to a device-tree based target, I found that there is no generic way to create a mtd_concat device from within the dts. The following patches attempt to provide that possibility. This is a second roll of that patch se

[REGRESSION] Commit 5745392e0c2b ("PCI: Apply the new generic I/O management on PCI IO hosts") breaks PCI for legacy virtio devices with kvmtool on arm64

2018-09-07 Thread Will Deacon
Hi all, I'm seeing a regression in Linux guests since 4.17 under kvmtool, where legacy virtio devices using the PCI transport fail to probe. Legacy virtio PCI devices must be accessed via "I/O space" (e.g. BAR0, which is IORESOURCE_IO) and kvmtool assigns this to the guest physical range 0x0 - 0x1

Re: [PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Matthew Wilcox
On Fri, Sep 07, 2018 at 12:56:31PM -0400, Kent Overstreet wrote: > @@ -165,7 +164,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct > raid5_percpu *percpu, > struct dma_async_tx_descriptor *tx) > { > int disks = sh->disks; > - struct page **srcs = flex_arra

[PATCH v2 2/3] dt-bindings: add bindings for mtd-concat devices

2018-09-07 Thread Bernhard Frauendienst
Signed-off-by: Bernhard Frauendienst --- .../devicetree/bindings/mtd/mtd-concat.txt| 36 +++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/mtd-concat.txt diff --git a/Documentation/devicetree/bindings/mtd/mtd-concat.txt b/Document

Re: [PATCH 8/9] psi: pressure stall information for CPU, memory, and IO

2018-09-07 Thread Johannes Weiner
On Fri, Sep 07, 2018 at 04:58:58PM +0200, Peter Zijlstra wrote: > On Fri, Sep 07, 2018 at 10:44:22AM -0400, Johannes Weiner wrote: > > > > This does the whole seqcount thing 6x, which is a bit of a waste. > > > > [...] > > > > > It's a bit cumbersome, but that's because of C. > > > > I was actu

Re: [PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Sat, Sep 08, 2018 at 02:08:03AM +0900, Tetsuo Handa wrote: > On 2018/09/08 1:56, Kent Overstreet wrote: > > @@ -329,8 +328,7 @@ int avtab_alloc(struct avtab *h, u32 nrules) > > nslot = MAX_AVTAB_HASH_BUCKETS; > > mask = nslot - 1; > > > > - h->htable = flex_array_alloc(sizeof

Re: [GIT PULL] arm64: fix for -rc3

2018-09-07 Thread Linus Torvalds
On Fri, Sep 7, 2018 at 8:45 AM Will Deacon wrote: > > Just one small fix here, preventing a VM_WARN_ON when a !present PMD/PUD > is "freed" as part of a huge ioremap() operation. The correct behaviour > is to skip the free silently in this case, which is a little weird (the > function is a bit of

Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

2018-09-07 Thread Grant Grundler
[resending as plain/text - sorry] On Fri, Sep 7, 2018 at 10:52 AM Grant Grundler wrote: > > > > On Fri, Sep 7, 2018 at 5:11 AM Mark Brown wrote: >> >> On Thu, Sep 06, 2018 at 05:27:28PM -0700, Grant Grundler wrote: >> > Commit ca917f9fe1a0fab added use of usleep_range() but not >> > the correspon

Re: [PATCH] mm: hugepage: mark splitted page dirty when needed

2018-09-07 Thread Jerome Glisse
On Fri, Sep 07, 2018 at 12:35:24PM +0800, Peter Xu wrote: > On Thu, Sep 06, 2018 at 05:08:42PM +0300, Kirill A. Shutemov wrote: > > On Thu, Sep 06, 2018 at 07:39:33PM +0800, Peter Xu wrote: > > > On Wed, Sep 05, 2018 at 03:55:22PM +0300, Kirill A. Shutemov wrote: > > > > On Wed, Sep 05, 2018 at 03:

Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

2018-09-07 Thread Mark Brown
On Fri, Sep 07, 2018 at 10:52:24AM -0700, Grant Grundler wrote: > On Fri, Sep 7, 2018 at 5:11 AM Mark Brown wrote: > > Note that this isn't causing a warning upstream, presumably due to an > > implicit inclusion that isn't present in the v4.4 kernel that you appear > > to be using, or gets missed

[PATCH v6 0/5] x86: Fix SEV guest regression

2018-09-07 Thread Brijesh Singh
The following commit " x86/kvmclock: Remove memblock dependency https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=368a540e0232ad446931f5a4e8a5e06f69f21343 " introduced SEV guest regression. The guest physical address holding the wall_clock and hv_clock_boot are share

[PATCH v6 1/5] x86/mm: Restructure sme_encrypt_kernel()

2018-09-07 Thread Brijesh Singh
Re-arrange the sme_encrypt_kernel() by moving the workarea map/unmap logic in a separate static function. There are no logical changes in this patch. The restructuring will allow us to expand the sme_encrypt_kernel in future. Signed-off-by: Brijesh Singh Reviewed-by: Tom Lendacky Cc: Tom Lendack

[PATCH v6 2/5] x86/mm: fix sme_populate_pgd() to update page flags

2018-09-07 Thread Brijesh Singh
Fix sme_populate_pgd() to update page flags if the PMD/PTE entry already exists. Signed-off-by: Brijesh Singh Reviewed-by: Tom Lendacky Cc: Tom Lendacky Cc: k...@vger.kernel.org Cc: Thomas Gleixner Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org Cc: Paolo Bonzini C

[PATCH v6 5/5] x86/kvm: Avoid dynamic allocation of pvclock data when SEV is active

2018-09-07 Thread Brijesh Singh
Currently, the per-cpu pvclock data is allocated dynamically when cpu > HVC_BOOT_ARRAY_SIZE. The physical address of this variable is shared between the guest and the hypervisor hence it must be mapped as unencrypted (ie. C=0) when SEV is active. The C-bit works on a page, hence we will be require

[PATCH v6 3/5] x86/mm: add .data..decrypted section to hold shared variables

2018-09-07 Thread Brijesh Singh
kvmclock defines few static variables which are shared with the hypervisor during the kvmclock initialization. When SEV is active, memory is encrypted with a guest-specific key, and if guest OS wants to share the memory region with hypervisor then it must clear the C-bit before sharing it. Current

[PATCH v6 4/5] x86/kvm: use __decrypted attribute in shared variables

2018-09-07 Thread Brijesh Singh
Commit: 368a540e0232 (x86/kvmclock: Remove memblock dependency) caused SEV guest regression. When SEV is active, we map the shared variables (wall_clock and hv_clock_boot) with C=0 to ensure that both the guest and the hypervisor are able to access the data. To map the variables we use kernel_physi

Re: [PATCH] orangefs: rate limit the client not running info message

2018-09-07 Thread Mike Marshall
Thanks... I've applied your patch to 4.19-rc2 and run it through xfstests. It is in my linux-next tree now. I put that in there because I'm really just an old system administrator, and I would always be happy when I could tail dmesg and see some hint at why something wasn't doing as I expected. I

[PATCH] mips: bug: add unlikely() to BUG_ON()

2018-09-07 Thread Igor Stoppa
Add a hint to the compiler that probably it won't be necessary to BUG() Signed-off-by: Igor Stoppa Cc: David Daney Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-m...@linux-mips.org Cc: linux-kernel@vger.kernel.org --- arch/mips/include/asm/bug.h | 2 +- 1 file changed, 1 inserti

Re: [PATCH v2 2/9] nios2: build .dtb files in dts directory

2018-09-07 Thread Rob Herring
On Thu, Sep 6, 2018 at 9:21 PM Ley Foon Tan wrote: > > On Wed, 2018-09-05 at 18:53 -0500, Rob Herring wrote: > > Align nios2 with other architectures which build the dtb files in the > > same directory as the dts files. This is also in line with most other > > build targets which are located in th

[RESEND PATCH] mm: percpu: remove unnecessary unlikely()

2018-09-07 Thread Igor Stoppa
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Acked-by: Dennis Zhou Cc: Tejun Heo Cc: zijun_hu Cc: Christoph Lameter Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/percpu.c | 2 +- 1 file changed, 1 inserti

Re: [PATCH v2 0/3] mtd concat device driver

2018-09-07 Thread Bernhard Frauendienst
Apologies, again, I seem not to be able to handle git-send-mail correctly, the cover letter got lost in operation (using get_maintainers on a cover letter is not a good idea). Here it is again: Hi everybody, when porting my router board from a mach-file based OpenWRT target to a device-tree bas

Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")

2018-09-07 Thread Luc Van Oostenryck
On Fri, Sep 07, 2018 at 10:22:56AM -0700, Nick Desaulniers wrote: > On Fri, Sep 7, 2018 at 7:34 AM Christophe LEROY > wrote: > > > > Cc linux-spa...@vger.kernel.org > > > > Le 07/09/2018 à 14:22, Christophe Leroy a écrit : > > > Since commit cafa0010cd51f ("Raise the minimum required gcc version

Re: [PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Fri, Sep 07, 2018 at 10:49:42AM -0700, Matthew Wilcox wrote: > On Fri, Sep 07, 2018 at 12:56:31PM -0400, Kent Overstreet wrote: > > @@ -165,7 +164,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct > > raid5_percpu *percpu, > >struct dma_async_tx_descriptor *tx) > >

Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")

2018-09-07 Thread Nick Desaulniers
On Fri, Sep 7, 2018 at 11:13 AM Luc Van Oostenryck wrote: > > On Fri, Sep 07, 2018 at 10:22:56AM -0700, Nick Desaulniers wrote: > > On Fri, Sep 7, 2018 at 7:34 AM Christophe LEROY > > wrote: > > > > > > Cc linux-spa...@vger.kernel.org > > > > > > Le 07/09/2018 à 14:22, Christophe Leroy a écrit :

[PATCH] ring-buffer: Allow for rescheduling when removing pages

2018-09-07 Thread Vaibhav Nagarnaik
When reducing ring buffer size, pages are removed by scheduling a work item on each CPU for the corresponding CPU ring buffer. After the pages are removed from ring buffer linked list, the pages are free()d in a tight loop. The loop does not give up CPU until all pages are removed. In a worst case

Re: [PATCH 1/2] Fix cg_read_strcmp()

2018-09-07 Thread Jay Kamat
Shuah Khan writes: > On 09/07/2018 10:49 AM, jgka...@fb.com wrote: >> From: Jay Kamat >> >> Fix a couple issues with cg_read_strcmp(), to improve correctness of >> cgroup tests >> - Fix cg_read_strcmp() always returning 0 for empty "needle" strings >> - Fix a memory leak in cg_read_strcmp() >>

Re: [PATCH] ring-buffer: Allow for rescheduling when removing pages

2018-09-07 Thread Steven Rostedt
On Fri, 7 Sep 2018 11:21:31 -0700 Vaibhav Nagarnaik wrote: > When reducing ring buffer size, pages are removed by scheduling a work > item on each CPU for the corresponding CPU ring buffer. After the pages > are removed from ring buffer linked list, the pages are free()d in a > tight loop. The l

Re: [PATCH] of: Split up name & type in modalias generation

2018-09-07 Thread Frank Rowand
On 09/07/18 07:22, Thierry Reding wrote: > From: Thierry Reding > > The kernel's vsnprintf() implementation discards all alpha-numeric > characters following a %p conversion specifier. This is done in order to > generically skip any of the various modifiers that the kernel supports. > Unfortunate

Re: Patch "arm64: mm: always enable CONFIG_HOLES_IN_ZONE" has been added to the 4.9-stable tree

2018-09-07 Thread Nathan Chancellor
On Fri, Sep 07, 2018 at 02:57:51PM +0200, gre...@linuxfoundation.org wrote: > > This is a note to let you know that I've just added the patch titled > > arm64: mm: always enable CONFIG_HOLES_IN_ZONE > > to the 4.9-stable tree which can be found at: > > http://www.kernel.org/git/?p=linux

[GIT PULL] MD update for 4.19-rc2

2018-09-07 Thread Shaohua Li
Hi, Please pull MD fixes for 4.19-rc2: - Fix a locking issue for md-cluster from Guoqing - Fix a sync crash for raid10 from Ni - Fix a reshape bug with raid5 cache enabled from Me Thanks, Shaohua The following changes since commit 420f51f4ab6bce6e580390729fadb89c31123636: Merge tag 'arm64-fixe

Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")

2018-09-07 Thread Luc Van Oostenryck
On Fri, Sep 07, 2018 at 11:19:43AM -0700, Nick Desaulniers wrote: > On Fri, Sep 7, 2018 at 11:13 AM Luc Van Oostenryck wrote: > > > > Sparse expand these macros to the same version than the compiler used > > to compile GCC. I find a bit strange though to have sparse v0.5.2 but > > using an old comp

[PATCH v2] optee: allow to work without static shared memory

2018-09-07 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- Changes from v1: Patch is now can be applied to vani

Re: [RESEND PATCH] mm: percpu: remove unnecessary unlikely()

2018-09-07 Thread Dennis Zhou
Hi Igor, On Fri, Sep 07, 2018 at 09:10:35PM +0300, Igor Stoppa wrote: > WARN_ON() already contains an unlikely(), so it's not necessary to > wrap it into another. > > Signed-off-by: Igor Stoppa > Acked-by: Dennis Zhou > Cc: Tejun Heo > Cc: zijun_hu > Cc: Christoph Lameter > Cc: linux...@kvac

Re: [PATCH 6/6] Drop flex_arrays

2018-09-07 Thread Randy Dunlap
On 09/07/2018 09:56 AM, Kent Overstreet wrote: > All existing users have been converted to generic radix trees > > Signed-off-by: Kent Overstreet > Acked-by: Dave Hansen > --- > Documentation/core-api/flexible-arrays.rst | 130 --- > Documentation/flexible-arrays.txt | 123 ---

Re: [PATCH] of: Split up name & type in modalias generation

2018-09-07 Thread Rob Herring
On Fri, Sep 7, 2018 at 9:22 AM Thierry Reding wrote: > > From: Thierry Reding > > The kernel's vsnprintf() implementation discards all alpha-numeric > characters following a %p conversion specifier. This is done in order to > generically skip any of the various modifiers that the kernel supports.

Re: [PATCH 1/2] Fix cg_read_strcmp()

2018-09-07 Thread Shuah Khan
On 09/07/2018 12:28 PM, Jay Kamat wrote: > > Shuah Khan writes: > >> On 09/07/2018 10:49 AM, jgka...@fb.com wrote: >>> From: Jay Kamat >>> >>> Fix a couple issues with cg_read_strcmp(), to improve correctness of >>> cgroup tests >>> - Fix cg_read_strcmp() always returning 0 for empty "needle" st

[PATCH 2/2] MIPS: Fix CONFIG_CMDLINE handling

2018-09-07 Thread Paul Burton
Commit 8ce355cf2e38 ("MIPS: Setup boot_command_line before plat_mem_setup") fixed a problem for systems which have CONFIG_CMDLINE_BOOL=y & use a DT with a chosen node that has either no bootargs property or an empty one. In this configuration early_init_dt_scan_chosen() copies CONFIG_CMDLINE into b

[PATCH 1/2] of/fdt: Allow architectures to override CONFIG_CMDLINE logic

2018-09-07 Thread Paul Burton
The CONFIG_CMDLINE-related logic in early_init_dt_scan_chosen() falls back to copying CONFIG_CMDLINE into boot_command_line/data if the DT has a /chosen node but that node has no bootargs property or a bootargs property of length zero. This is problematic for the MIPS architecture because we suppo

[PATCH] cpuidle: enter_state: Don't needlessly calculate diff time

2018-09-07 Thread Fieah Lim
ktime_us_delta() is not that cheap on some platform, and I think this is also the right thing to do. While at it, fix some coding style as well. Signed-off-by: Fieah Lim --- drivers/cpuidle/cpuidle.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/cp

Re: [PATCH v2 0/3] mtd concat device driver

2018-09-07 Thread Bernhard Frauendienst
Hello, it looks like I didn't even manage to correctly CC the device tree maintainers and list, which was the main reason for sending out this second roll. This is getting embarrassing, but I guess I will simply prepare a 3rd roll and try even harder to send it to the right people this time (with

Re: x86/apic: MSI address malformed for "flat" driver

2018-09-07 Thread Thomas Gleixner
On Thu, 6 Sep 2018, Philipp Eppelt wrote: > > The "flat" driver defines the MSI addressing scheme to be used as > logical addressing in flat mode. The MSI msg address is composed > accordingly, but sets MSI_ADDR_REDIRECTION_CPU which is a zero at bit[3]. Correct. That's what it means: * When R

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