[PATCH v3 10/14] iommu/ioasid: Introduce notification APIs

2020-09-28 Thread Jacob Pan
Relations among IOASID users largely follow a publisher-subscriber pattern. E.g. to support guest SVA on Intel Scalable I/O Virtualization (SIOV) enabled platforms, VFIO, IOMMU, device drivers, KVM are all users of IOASIDs. When a state change occurs, VFIO publishes the change event that needs to

[PATCH v3 14/14] iommu/vt-d: Store guest PASID during bind

2020-09-28 Thread Jacob Pan
IOASID core maintains the guest-host mapping in the form of SPID and IOASID. This patch assigns the guest PASID (if valid) as SPID while binding guest page table with a host PASID. This mapping will be used for lookup and notifications. Signed-off-by: Jacob Pan --- drivers/iommu/intel/svm.c | 2

[PATCH v3 12/14] iommu/vt-d: Remove mm reference for guest SVA

2020-09-28 Thread Jacob Pan
Now that IOASID core keeps track of the IOASID to mm_struct ownership in the forms of ioasid_set with IOASID_SET_TYPE_MM token type, there is no need to keep the same mapping in VT-d driver specific data. Native SVM usage is not affected by the change. Signed-off-by: Jacob Pan ---

[PATCH v3 08/14] iommu/ioasid: Add reference couting functions

2020-09-28 Thread Jacob Pan
There can be multiple users of an IOASID, each user could have hardware contexts associated with the IOASID. In order to align lifecycles, reference counting is introduced in this patch. It is expected that when an IOASID is being freed, each user will drop a reference only after its context is

[PATCH v3 05/14] iommu/ioasid: Redefine IOASID set and allocation APIs

2020-09-28 Thread Jacob Pan
ioasid_set was introduced as an arbitrary token that is shared by a group of IOASIDs. For example, two IOASIDs allocated via the same ioasid_set pointer belong to the same set. For guest SVA usages, system-wide IOASID resources need to be partitioned such that each VM can have its own quota and

[PATCH v3 13/14] iommu/vt-d: Listen to IOASID notifications

2020-09-28 Thread Jacob Pan
On Intel Scalable I/O Virtualization (SIOV) enabled platforms, IOMMU driver is one of the users of IOASIDs. In normal flow, callers will perform IOASID allocation, bind, unbind, and free in order. However, for guest SVA, IOASID free could come before unbind as guest is untrusted. This patch

[PATCH v3 02/14] iommu/ioasid: Rename ioasid_set_data()

2020-09-28 Thread Jacob Pan
Rename ioasid_set_data() to ioasid_attach_data() to avoid confusion with struct ioasid_set. ioasid_set is a group of IOASIDs that share a common token. Reviewed-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan --- drivers/iommu/intel/svm.c | 6 +++--- drivers/iommu/ioasid.c| 6 +++---

[PATCH v3 04/14] iommu/ioasid: Support setting system-wide capacity

2020-09-28 Thread Jacob Pan
IOASID is a system-wide resource that could vary on different systems. The default capacity is 20 bits as defined in the PCI-E specifications. This patch adds a function to allow adjusting system IOASID capacity. For VT-d this is set during boot as part of the Intel IOMMU initialization.

[PATCH v3 00/14] IOASID extensions for guest SVA

2020-09-28 Thread Jacob Pan
IOASID was introduced in v5.5 as a generic kernel allocator service for both PCIe Process Address Space ID (PASID) and ARM SMMU's Sub Stream ID. In addition to basic ID allocation, ioasid_set was defined as a token that is shared by a group of IOASIDs. This set token can be used for permission

Re: [PATCH v38 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 08:54:01AM -0700, H.J. Lu wrote: > On Mon, Sep 28, 2020 at 8:43 AM Yu, Yu-cheng wrote: > > > > On 9/25/2020 11:23 AM, Andrew Cooper wrote: > > > On 15/09/2020 12:28, Jarkko Sakkinen wrote: > > >> diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S > > >>

[PATCH v3 09/14] iommu/ioasid: Introduce ioasid_set private ID

2020-09-28 Thread Jacob Pan
When an IOASID set is used for guest SVA, each VM will acquire its ioasid_set for IOASID allocations. IOASIDs within the VM must have a host/physical IOASID backing, mapping between guest and host IOASIDs can be non-identical. IOASID set private ID (SPID) is introduced in this patch to be used as

[PATCH v3 03/14] iommu/ioasid: Add a separate function for detach data

2020-09-28 Thread Jacob Pan
IOASID private data can be cleared by ioasid_attach_data() with a NULL data pointer. A common use case is for a caller to free the data afterward. ioasid_attach_data() calls synchronize_rcu() before return such that free data can be sure without outstanding readers. However, since

[PATCH v3 01/14] docs: Document IO Address Space ID (IOASID) APIs

2020-09-28 Thread Jacob Pan
IOASID is used to identify address spaces that can be targeted by device DMA. It is a system-wide resource that is essential to its many users. This document is an attempt to help developers from all vendors navigate the APIs. At this time, ARM SMMU and Intel’s Scalable IO Virtualization (SIOV)

Re: [PATCH v6 07/10] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-09-28 Thread Sean V Kelley
On 27 Sep 2020, at 18:47, Bjorn Helgaas wrote: On Sun, Sep 27, 2020 at 06:45:45PM -0500, Bjorn Helgaas wrote: On Tue, Sep 22, 2020 at 02:38:56PM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo pci_dbg(dev, "broadcast error_detected message\n"); if (state ==

Re: [PATCH] time/sched_clock: mark sched_clock_read_begin as notrace

2020-09-28 Thread Steven Rostedt
On Mon, 28 Sep 2020 12:58:59 +0200 Peter Zijlstra wrote: > > -struct clock_read_data *sched_clock_read_begin(unsigned int *seq) > > +notrace struct clock_read_data *sched_clock_read_begin(unsigned int *seq) > > { > > *seq = raw_read_seqcount_latch(); > > return cd.read_data + (*seq &

Re: [net PATCH] octeontx2-af: Fix enable/disable of default NPC entries

2020-09-28 Thread Jakub Kicinski
On Sat, 26 Sep 2020 12:27:00 +0530 Geetha sowjanya wrote: > From: Subbaraya Sundeep > > Packet replication feature present in Octeontx2 > is a hardware linked list of PF and its VF > interfaces so that broadcast packets are sent > to all interfaces present in the list. It is > driver job to add

Re: [PATCH v3] Documentation: Chinese translation of Documentation/arm64/amu.rst

2020-09-28 Thread Jonathan Corbet
On Fri, 25 Sep 2020 08:17:58 -0700 Bailu Lin wrote: > This is a Chinese translated version of Documentation/arm64/amu.rst > > Signed-off-by: Bailu Lin > --- > Changes in v3: > - Remove Documentation/arm64/amu.rst's inappropriate License claim. > Changes in v2: > - Add index to arm64

Re: [PATCH v5] doc: zh_CN: index files in arm64 subdirectory

2020-09-28 Thread Jonathan Corbet
On Fri, 25 Sep 2020 19:25:58 -0700 Bailu Lin wrote: > Add arm64 subdirectory into the table of Contents for zh_CN, > then add other translations in arm64 conveniently. > > Signed-off-by: Bailu Lin > --- > Changes in v5: > - Remove zh_CN/arm64/index.rst's inappropriate License claim. > Changes

Re: ARC: allmodconfig: Error: inappropriate arguments for opcode 'mpyd'

2020-09-28 Thread Vineet Gupta
Hi Naresh, On 9/23/20 9:20 PM, Naresh Kamboju wrote: > arc:allmodconfig build failed with gcc-8, gcc-9 and gcc-10 on Linus's > mainline tree. > > Build log: > > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux ARCH=arc > CROSS_COMPILE=arc-elf32- HOSTCC=gcc CC="sccache arc-elf32-gcc"

Re: [PATCH] mailmap: add entry for

2020-09-28 Thread Jonathan Corbet
On Mon, 28 Sep 2020 18:39:59 + Mark Starovoytov wrote: > Map the address to my private mail, because my Marvell account has been > suspended. > > Signed-off-by: Mark Starovoytov > --- > .mailmap | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.mailmap b/.mailmap > index

Re: general protection fault in perf_misc_flags

2020-09-28 Thread Andy Lutomirski
> On Sep 28, 2020, at 1:52 PM, Nick Desaulniers wrote: > > On Mon, Sep 28, 2020 at 3:34 AM 'Dmitry Vyukov' via Clang Built Linux > wrote: >> >>> On Mon, Sep 28, 2020 at 10:54 AM Borislav Petkov wrote: >>> >>> On Mon, Sep 28, 2020 at 10:40:19AM +0200, Dmitry Vyukov wrote: I meant the

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Joel Fernandes
On Mon, Sep 28, 2020 at 01:34:31PM -0700, Kees Cook wrote: > On Sun, Sep 27, 2020 at 07:35:26PM -0400, Joel Fernandes wrote: > > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > > > This patch series is a result of discussion at the refcount_t BOF > > > the Linux Plumbers Conference.

Re: [PATCH v6 3/6] genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag

2020-09-28 Thread Doug Anderson
Hi, On Sun, Sep 27, 2020 at 9:32 PM Maulik Shah wrote: > > An interrupt that is disabled/masked but set for wakeup still needs to > be able to wake up the system from sleep states like "suspend to RAM". > > This change introduces IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag. If irqchip > have this flag

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 09:48:10AM -0700, Dave Hansen wrote: > On 9/28/20 9:19 AM, Jarkko Sakkinen wrote: > > On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: > >> EMODPE is virtually irrelevant for this whole thing. The x86 PTE > >> permissions still specify the most restrictive

RE: [PATCH v6] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-09-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@linutronix.de] > Sent: Tuesday, September 29, 2020 4:25 AM > To: Song Bao Hua (Barry Song) > Cc: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net; linux-cry...@vger.kernel.org;

Hello Dear,

2020-09-28 Thread Mrs.Romane Matheo
Hello Dear, Please forgive me for stressing you with my predicaments as I know that this letter may come to you as big surprise. Actually, I came across your E-mail from my personal search afterward I decided to email you directly believing that you will be honest to fulfill my final wish before

Re: [PATCH] memcg: introduce per-memcg reclaim interface

2020-09-28 Thread Johannes Weiner
Hello, I apologize for the late reply. The proposed interface has been an ongoing topic and area of experimentation within Facebook as well, which makes it a bit difficult to respond with certainty here. I agree with both your usecases. They apply to us as well. We currently make two small

Re: [PATCH v38 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 08:43:16AM -0700, Yu, Yu-cheng wrote: > On 9/25/2020 11:23 AM, Andrew Cooper wrote: > > On 15/09/2020 12:28, Jarkko Sakkinen wrote: > > > diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S > > > b/arch/x86/entry/vdso/vsgx_enter_enclave.S > > > new file mode 100644 > > >

Re: [PATCH v2] iommu/arm: Add module parameter to set msi iova address

2020-09-28 Thread Will Deacon
On Wed, Sep 23, 2020 at 08:32:43AM +0200, Auger Eric wrote: > On 9/21/20 10:45 PM, Will Deacon wrote: > > On Mon, Sep 14, 2020 at 11:13:07AM -0700, Vennila Megavannan wrote: > >> From: Srinath Mannam > >> > >> Add provision to change default value of MSI IOVA base to platform's > >> suitable IOVA

Re: [PATCH v1 3/5] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate()

2020-09-28 Thread Pankaj Gupta
> Page isolation doesn't actually touch the pages, it simply isolates > pageblocks and moves all free pages to the MIGRATE_ISOLATE freelist. > > We already place pages to the tail of the freelists when undoing > isolation via __putback_isolated_page(), let's do it in any case > (e.g., if order <=

Re: general protection fault in perf_misc_flags

2020-09-28 Thread Nick Desaulniers
On Mon, Sep 28, 2020 at 3:34 AM 'Dmitry Vyukov' via Clang Built Linux wrote: > > On Mon, Sep 28, 2020 at 10:54 AM Borislav Petkov wrote: > > > > On Mon, Sep 28, 2020 at 10:40:19AM +0200, Dmitry Vyukov wrote: > > > I meant the kernel self-corrupts itself, that just wasn't detected by > > > KASAN,

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Tyrel Datwyler
On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > wrote: >> >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules >> (descriptions taken from Kconfig file) >> >> Signed-off-by: Mamatha Inamdar >> --- >>

Re: [PATCH v8 0/6] Support running driver's probe for a device powered off

2020-09-28 Thread Sakari Ailus
Hi Tomasz, On Mon, Sep 28, 2020 at 06:49:22PM +0200, Tomasz Figa wrote: > On Mon, Sep 28, 2020 at 4:18 PM Rafael J. Wysocki wrote: > > > > On Sun, Sep 27, 2020 at 9:44 PM Tomasz Figa wrote: > > > > > > On Sun, Sep 27, 2020 at 9:39 PM Wolfram Sang wrote: > > > > > > > > > > > > > I think we

[PATCH v2 4/7] drm/msm/a5xx: Reset VBIF before PC only on A510 and A530

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno Resetting the VBIF before power collapse is done to avoid getting bogus FIFO entries during the suspend sequence or subsequent resume, but this is doable only on Adreno 510 and Adreno 530, as the other units will tendentially lock up. Especially on Adreno 508,

[PATCH v2 2/7] drm/msm/a5xx: Separate A5XX_PC_DBG_ECO_CNTL write from main branch

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno The "main" if branch where we program the other registers for the Adreno 5xx family of GPUs should not contain the PC_DBG_ECO_CNTL register programming because this has logical similarity differences from all the others. A later commit will show the entire sense

[PATCH v2 5/7] drm/msm/a5xx: Fix VPC protect value in gpu_write()

2020-09-28 Thread kholk11
From: Konrad Dybcio The upstream API for some reason uses logbase2 instead of just passing the argument as-is, whereas downstream CAF kernel does the latter. Hence, a mistake has been made when porting: 4 is the value that's supposed to be passed, but log2(4) = 2. Changing the value to 16 (=

[PATCH v2 6/7] drm/msm/a5xx: Disable flat shading optimization

2020-09-28 Thread kholk11
From: Konrad Dybcio Port over the command from downstream to prevent undefined behaviour. Signed-off-by: Konrad Dybcio Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v2 7/7] drm/msm/a5xx: Disable UCHE global filter

2020-09-28 Thread kholk11
From: Konrad Dybcio Port over the command from downstream to prevent undefined behaviour. Signed-off-by: Konrad Dybcio Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/msm/adreno/a5xx.xml.h | 2 ++ drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 3 +++ 2 files changed, 5 insertions(+)

[PATCH v2 3/7] drm/msm/a5xx: Add support for Adreno 508, 509, 512 GPUs

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno The Adreno 508/509/512 GPUs are stripped versions of the Adreno 5xx found in the mid-end SoCs such as SDM630, SDM636, SDM660 and SDA variants; these SoCs are usually provided with ZAP firmwares, but they have no available GPMU. Signed-off-by: AngeloGioacchino

[PATCH v2 1/7] drm/msm/a5xx: Remove overwriting A5XX_PC_DBG_ECO_CNTL register

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno The PC_DBG_ECO_CNTL register on the Adreno A5xx family gets programmed to some different values on a per-model basis. At least, this is what we intend to do here; Unfortunately, though, this register is being overwritten with a static magic number, right after

Re: [PATCH v2 1/2] Revert "drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh"

2020-09-28 Thread John Stultz
On Tue, Aug 25, 2020 at 4:22 AM Maulik Shah wrote: > > Commit efde2659b0fe ("drivers: qcom: rpmh-rsc: Use rcuidle tracepoints > for rpmh") was written to fix a bug seen in an unmerged series that > implemented a struct generic_pm_domain::power_off() callback calling > rpmh_flush(). See stack

[PATCH v2 0/7] Add support for Adreno 508/509/512

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno In this patch series, we are adding support for lower end Adreno 5 series GPUs, such as A508, A509 and A512 that we have found in the Qualcomm SDM630, SDM636 and SDM660 SoCs. On a note, adding support for these three units, also adds 99% of the required "things"

Re: [PATCH 8/8] selftests/vm: hmm-tests: remove the libhugetlbfs dependency

2020-09-28 Thread John Hubbard
On 9/28/20 1:18 PM, John Hubbard wrote: On 9/28/20 6:02 AM, Jason Gunthorpe wrote: On Sun, Sep 27, 2020 at 11:21:59PM -0700, John Hubbard wrote: ... +gcc -c $tmpfile_c -o $tmpfile_o >/dev/null 2>&1 This gcc has to come from some makefile variable I plan on posting a v2 with this

Re: [PATCH -next for tip:x86/pti] x86/tlb: drop unneeded local vars in enable_l1d_flush_for_task()

2020-09-28 Thread Nathan Chancellor
On Mon, Sep 28, 2020 at 02:44:57PM +0200, Lukas Bulwahn wrote: > Commit b6724f118d44 ("prctl: Hook L1D flushing in via prctl") checks the > validity for enable_l1d_flush_for_task() and introduces some superfluous > local variables for that implementation. > > make clang-analyzer on x86_64

Re: [PATCH v38 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 05:44:35PM +0100, Andrew Cooper wrote: > On 28/09/2020 01:58, Jarkko Sakkinen wrote: > > On Fri, Sep 25, 2020 at 07:23:59PM +0100, Andrew Cooper wrote: > >> On 15/09/2020 12:28, Jarkko Sakkinen wrote: > >>> diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S > >>>

Re: [PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

2020-09-28 Thread Martin Blumenstingl
Hi Artem, On Mon, Sep 28, 2020 at 10:42 AM Art Nikpal wrote: > > OK today i can't reproduce it again on my new equipments ;-) > > may be its some specific problem we can try forget about this uh, this is weird please let me know if you can reproduce it on your new hardware thanks for the update

Re: [PATCH v1 2/5] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-28 Thread Pankaj Gupta
> __putback_isolated_page() already documents that pages will be placed to > the tail of the freelist - this is, however, not the case for > "order >= MAX_ORDER - 2" (see buddy_merge_likely()) - which should be > the case for all existing users. > > This change affects two users: > - free page

Re: kernel BUG at fs/erofs/inode.c:LINE!

2020-09-28 Thread Gao Xiang
Hi, On Mon, Sep 28, 2020 at 12:27:24AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:d1d2220c Add linux-next specific files for 20200924 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=166cb7d990 > kernel

Re: [PATCH] arm64/mm: Validate hotplug range before creating linear mapping

2020-09-28 Thread Will Deacon
On Thu, Sep 17, 2020 at 02:16:42PM +0530, Anshuman Khandual wrote: > During memory hotplug process, the linear mapping should not be created for > a given memory range if that would fall outside the maximum allowed linear > range. Else it might cause memory corruption in the kernel virtual space.

Re: [RFC PATCH v2 03/30] mm: thp: use single linked list for THP page table page deposit.

2020-09-28 Thread Zi Yan
On 28 Sep 2020, at 15:34, Matthew Wilcox wrote: > On Mon, Sep 28, 2020 at 01:54:01PM -0400, Zi Yan wrote: >> struct {/* Page table pages */ >> -unsigned long _pt_pad_1;/* compound_head */ >> -pgtable_t pmd_huge_pte; /* protected

Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters

2020-09-28 Thread Kees Cook
On Sun, Sep 27, 2020 at 07:35:26PM -0400, Joel Fernandes wrote: > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > > This patch series is a result of discussion at the refcount_t BOF > > the Linux Plumbers Conference. In this discussion, we identified > > a need for looking closely

Re: [PATCH v1 4/5] mm/page_alloc: place pages to tail in __free_pages_core()

2020-09-28 Thread Pankaj Gupta
> __free_pages_core() is used when exposing fresh memory to the buddy > during system boot and when onlining memory in generic_online_page(). > > generic_online_page() is used in two cases: > > 1. Direct memory onlining in online_pages(). > 2. Deferred memory onlining in memory-ballooning-like

Re: general protection fault in perf_misc_flags

2020-09-28 Thread Nick Desaulniers
On Sun, Sep 27, 2020 at 10:18 PM 'Dmitry Vyukov' via Clang Built Linux wrote: > > On Sun, Sep 27, 2020 at 4:57 PM Borislav Petkov wrote: > > > > On Sat, Sep 19, 2020 at 01:32:14AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:

[PATCH v4] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-28 Thread Chris Goldsworthy
V1: Introduces a retry loop that attempts a CMA allocation a finite number of times before giving up: https://lkml.org/lkml/2020/8/5/1097 https://lkml.org/lkml/2020/8/11/893 V2: Introduces an indefinite retry for CMA allocations. David Hildenbrand raised a page pinning example which precludes

[PATCH v4] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-28 Thread Chris Goldsworthy
CMA allocations will fail if 'pinned' pages are in a CMA area, since we cannot migrate pinned pages. The _refcount of a struct page being greater than _mapcount for that page can cause pinning for anonymous pages. This is because try_to_unmap(), which (1) is called in the CMA allocation path, and

Re: [PATCH 5/7] drm/msm/a5xx: Fix VPC protect value in gpu_write()

2020-09-28 Thread AngeloGioacchino Del Regno
Il giorno lun 28 set 2020 alle ore 18:16 Jordan Crouse ha scritto: > > On Sat, Sep 26, 2020 at 02:51:44PM +0200, khol...@gmail.com wrote: > > From: Konrad Dybcio > > > > The upstream API for some reason uses logbase2 instead of > > just passing the argument as-is, whereas downstream CAF > >

[PATCH v2 0/3] Extract run_kselftest.sh and generate stand-alone test list

2020-09-28 Thread Kees Cook
v2: - update documentation - include SPDX line in extracted script v1: https://lore.kernel.org/linux-kselftest/20200925234527.1885234-1-keesc...@chromium.org/ Hi! I really like Hangbin Liu's intent[1] but I think we need to be a little more clean about the implementation. This extracts

[PATCH v2 2/3] selftests/run_kselftest.sh: Make each test individually selectable

2020-09-28 Thread Kees Cook
Currently with run_kselftest.sh there is no way to choose which test we could run. All the tests listed in kselftest-list.txt are all run every time. This patch enhanced the run_kselftest.sh to make the test collections (or tests) individually selectable. e.g.: $ ./run_kselftest.sh -c seccomp -t

[PATCH v2 1/3] selftests: Extract run_kselftest.sh and generate stand-alone test list

2020-09-28 Thread Kees Cook
Instead of building a script on the fly (which just repeats the same thing for each test collection), move the script out of the Makefile and into run_kselftest.sh, which reads kselftest-list.txt. Adjust the emit_tests target to report each test on a separate line so that test running tools (e.g.

[PATCH v2 3/3] doc: dev-tools: kselftest.rst: Update examples and paths

2020-09-28 Thread Kees Cook
Update the installation commands and path details, detail the new options available in the run_kselftests.sh script. Signed-off-by: Kees Cook --- Documentation/dev-tools/kselftest.rst | 35 +-- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git

Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-28 Thread Thomas Gleixner
On Mon, Sep 28 2020 at 21:05, Edward Cree wrote: > efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out > whether it is safe to sleep (for MCDI) or not. > The only caller from which it was not is efx_net_stats(), which can be > invoked under dev_base_lock from

Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b

2020-09-28 Thread Martin Blumenstingl
Hi Andrew, On Sat, Sep 26, 2020 at 4:45 PM Andrew Lunn wrote: > > > I checked this again for the vendor u-boot (where Ethernet is NOT > > working) as well as the Android kernel which this board was shipped > > with (where Ethernet is working) > > - in u-boot the MAC side adds a 2ns TX delay and

Re: general protection fault in perf_misc_flags

2020-09-28 Thread Borislav Petkov
On Mon, Sep 28, 2020 at 12:33:57PM +0200, Dmitry Vyukov wrote: > It may be related to VMs, but also may well not be related to VMs. Right, and so I tried to set it up on a test box here, it looks like it worked, see below. I'll let it fuzz in the coming days and see what explodes... 2020/09/28

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 12:45:27PM -0700, Dave Hansen wrote: > On 9/28/20 12:32 PM, Jarkko Sakkinen wrote: > > My problem is that I fully agree what you say in your description but > > disagree on that EMODPE should not be mentioned. > > I'll just be very clear: I'm not willing to ack any patch

Re: [PATCH 8/8] selftests/vm: hmm-tests: remove the libhugetlbfs dependency

2020-09-28 Thread John Hubbard
On 9/28/20 6:02 AM, Jason Gunthorpe wrote: On Sun, Sep 27, 2020 at 11:21:59PM -0700, John Hubbard wrote: ... +gcc -c $tmpfile_c -o $tmpfile_o >/dev/null 2>&1 This gcc has to come from some makefile variable ahem, yes, that really should have just been $(CC), will change to that. This is

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 09:48:10AM -0700, Dave Hansen wrote: > On 9/28/20 9:19 AM, Jarkko Sakkinen wrote: > > On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: > >> EMODPE is virtually irrelevant for this whole thing. The x86 PTE > >> permissions still specify the most restrictive

[PATCH] perf tools: Fix printable strings in python3 scripts

2020-09-28 Thread Jiri Olsa
Hagen reported broken strings in python3 tracepoint scripts: make PYTHON=python3 ./perf record -e sched:sched_switch -a -- sleep 5 ./perf script --gen-script py ./perf script -s ./perf-script.py [..] sched__sched_switch 7 563231.7595257920 swapper \

Re: [PATCH AUTOSEL 4.4 42/64] serial: uartps: Wait for tx_empty in console setup

2020-09-28 Thread Naresh Kamboju
On Fri, 18 Sep 2020 at 07:51, Sasha Levin wrote: > > From: Raviteja Narayanam > > [ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ] > > On some platforms, the log is corrupted while console is being > registered. It is observed that when set_termios is called, there > are still some

Re: [PATCH v1 0/6] seccomp: Implement constant action bitmaps

2020-09-28 Thread YiFei Zhu
On Mon, Sep 28, 2020 at 3:04 PM Kees Cook wrote: > Regardless, let's take things one step at a time. First, let's do > the simplest version of the feature, and then let's look at further > optimizations. > > Can you send a v3 and we can continue from there? ok, will do later tonight / tomorrow.

Re: [PATCH] h8300: Make irq disable and enable a compiler barrier

2020-09-28 Thread Steven Rostedt
Ping! (Warning 1: is this architecture still maintained?) -- Steve On Fri, 18 Sep 2020 15:25:07 -0400 Steven Rostedt wrote: > From: Steven Rostedt (VMware) > > In a conversation on #linux-rt, it was asked if the irq disabling and > enabling functions were a compiler barrier, and reads wont

[PATCH v2] media: uapi: h264: Add documentation to the interface header

2020-09-28 Thread Ezequiel Garcia
In preparation for making the interface public, document all the structures. Special care is taken to annotate those fields that depart from the H264 syntax. This commit only adds documentation and doesn't affect functionality in any way. Signed-off-by: Ezequiel Garcia --- v2: * Address the

Re: [PATCH v2 00/12] Overhaul multi-page lookups for THP

2020-09-28 Thread Matthew Wilcox
ping On Mon, Sep 14, 2020 at 02:00:30PM +0100, Matthew Wilcox (Oracle) wrote: > The critical patch to review here is patch 11, "Handle truncates that > split THPs". This code is shared with shmem, and while xfstests passes > (both with the tmpfs filesystem and with THPs enabled for XFS), it is

Re: [PATCH AUTOSEL 4.9 64/90] serial: uartps: Wait for tx_empty in console setup

2020-09-28 Thread Naresh Kamboju
On Tue, 29 Sep 2020 at 01:41, Naresh Kamboju wrote: > > On Fri, 18 Sep 2020 at 07:55, Sasha Levin wrote: > > > > From: Raviteja Narayanam > > > > [ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ] > > > > On some platforms, the log is corrupted while console is being > > registered.

Re: [PATCH v1 1/5] mm/page_alloc: convert "report" flag of __free_one_page() to a proper flag

2020-09-28 Thread Pankaj Gupta
> Let's prepare for additional flags and avoid long parameter lists of bools. > Follow-up patches will also make use of the flags in __free_pages_ok(), > however, I wasn't able to come up with a better name for the type - should > be good enough for internal purposes. > > Reviewed-by: Alexander

Re: [PATCH v3] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-28 Thread Chris Goldsworthy
On 2020-09-27 12:23, Minchan Kim wrote: On Wed, Sep 23, 2020 at 10:16:25PM -0700, Chris Goldsworthy wrote: CMA allocations will fail if 'pinned' pages are in a CMA area, since we +config CMA_RETRY_SLEEP_DURATION + int "Sleep duration between retries" + depends on CMA +

Re: [PATCH AUTOSEL 4.9 64/90] serial: uartps: Wait for tx_empty in console setup

2020-09-28 Thread Naresh Kamboju
On Fri, 18 Sep 2020 at 07:55, Sasha Levin wrote: > > From: Raviteja Narayanam > > [ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ] > > On some platforms, the log is corrupted while console is being > registered. It is observed that when set_termios is called, there > are still some

[RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-28 Thread Edward Cree
efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out whether it is safe to sleep (for MCDI) or not. The only caller from which it was not is efx_net_stats(), which can be invoked under dev_base_lock from net-sysfs::netstat_show(). So add a new update_stats_atomic() method to

Re: [PATCH 2/8] selftests/vm: use a common gup_test.h

2020-09-28 Thread John Hubbard
On 9/28/20 5:57 AM, Jason Gunthorpe wrote: On Sun, Sep 27, 2020 at 11:21:53PM -0700, John Hubbard wrote: diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index d1ae706d9927..9cc6bc087461 100644 +++ b/tools/testing/selftests/vm/Makefile @@ -130,3 +130,5 @@

Re: [PATCH 2/2] selftests/run_kselftest.sh: Make each test individually selectable

2020-09-28 Thread Kees Cook
On Sun, Sep 27, 2020 at 10:48:40AM +0800, Hangbin Liu wrote: > On Fri, Sep 25, 2020 at 04:45:27PM -0700, Kees Cook wrote: > > Currently with run_kselftest.sh there is no way to choose which test > > we could run. All the tests listed in kselftest-list.txt are all run > > every time. This patch

Re: [PATCHv5 kselftest next] selftests/run_kselftest.sh: make each test individually selectable

2020-09-28 Thread Kees Cook
On Sun, Sep 27, 2020 at 09:53:34AM +0800, Hangbin Liu wrote: > On Fri, Sep 25, 2020 at 02:16:14PM -0700, Kees Cook wrote: > > On Fri, Sep 25, 2020 at 01:51:53PM +0530, Naresh Kamboju wrote: > > > On Mon, 14 Sep 2020 at 07:53, Hangbin Liu wrote: > > > > > > > > Currently, after generating

Re: [PATCH] media: coda: avoid starvation on well-compressed data

2020-09-28 Thread Ezequiel Garcia
Hi Benjamin, On Fri, 18 Sep 2020 at 05:35, Benjamin Bara - SKIDATA wrote: > > Hi all, > > there are still cases where the decoder starves. > Also, the failure log at the bottom contradicts with the 2x256 bytes > assumption. > When I increase the threshold to 512 bytes, the respective video (and

Re: [PATCH v1 0/6] seccomp: Implement constant action bitmaps

2020-09-28 Thread Kees Cook
On Sat, Sep 26, 2020 at 01:11:50PM -0500, YiFei Zhu wrote: > On Fri, Sep 25, 2020 at 2:07 AM YiFei Zhu wrote: > > I'll try to profile the latter later on my qemu-kvm, with a recent > > libsecomp with binary tree and docker's profile, probably both direct > > filter attaches and filter attaches

Re: [PATCH 4.19 38/92] kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler

2020-09-28 Thread Naresh Kamboju
On Thu, 20 Aug 2020 at 15:23, Greg Kroah-Hartman wrote: > > From: Muchun Song > > commit 0cb2f1372baa60af8456388a574af6133edd7d80 upstream. > > We found a case of kernel panic on our server. The stack trace is as > follows(omit some irrelevant information): > > BUG: kernel NULL pointer

[PATCH v1] kunit: tool: handle when .kunit exists but .kunitconfig does not

2020-09-28 Thread Brendan Higgins
Right now .kunitconfig and the build dir are automatically created if the build dir does not exists; however, if the build dir is present and .kunitconfig is not, kunit_tool will crash. Fix this by checking for both the build dir as well as the .kunitconfig. NOTE: This depends on commit

[PATCH v2 2/2] dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno Add the bindings for the Qualcomm SDM660-class NoC, valid for SDM630, SDM636, SDM660 and SDA variants. Signed-off-by: AngeloGioacchino Del Regno --- .../bindings/interconnect/qcom,sdm660.yaml| 147 ++ 1 file changed, 147 insertions(+)

[PATCH v2 0/2] Add SDM630/636/660 interconnect driver

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno This patch series adds the SDM660 interconnect provider driver in order to stop some timeouts and achieve some decent performance by avoiding to be NoC limited. It's also providing some power consumption improvement, but I have only measured that as less heat,

Re: [PATCH 7/8] selftests/vm: run_vmtest.sh: update and clean up gup_test invocation

2020-09-28 Thread John Hubbard
On 9/28/20 12:26 PM, Ira Weiny wrote: On Sun, Sep 27, 2020 at 11:21:58PM -0700, John Hubbard wrote: ... +echo "--" +echo "running gup_test -ct -F 0x1 0 19 0x1000" +echo " Dumps pages 0, 19, and 4096, using pin_user_pages (-F 0x1)"

[PATCH v2 1/2] interconnect: qcom: Add SDM660 interconnect provider driver

2020-09-28 Thread kholk11
From: AngeloGioacchino Del Regno Introduce a driver for the Qualcomm interconnect busses found in the SDM630/SDM636/SDM660 SoCs. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. On a note, these

Re: [PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module

2020-09-28 Thread Michael S. Tsirkin
On Thu, Sep 24, 2020 at 05:32:31PM +0300, Eli Cohen wrote: > Change core vdpa functionality into a loadbale module such that upcoming > block implementation will be able to use it. > > Signed-off-by: Eli Cohen Why don't we merge this patch together with the block module? > --- > V0 --> V1: >

Re: [PATCH] media: uapi: h264: Add documentation to the interface header

2020-09-28 Thread Ezequiel Garcia
On Thu, 2020-09-24 at 10:29 +0200, Hans Verkuil wrote: > Hi Ezequiel, > > On 21/09/2020 21:38, Ezequiel Garcia wrote: > > In preparation for making the interface public, > > document all the structures. Special care is taken to > > annotate those fields that depart from the H264 syntax. > > > >

Re: [PATCH AUTOSEL 4.14 112/127] perf parse-events: Fix incorrect conversion of 'if () free()' to 'zfree()'

2020-09-28 Thread Naresh Kamboju
On Fri, 18 Sep 2020 at 08:00, Sasha Levin wrote: > > From: Arnaldo Carvalho de Melo > > [ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ] > > When applying a patch by Ian I incorrectly converted to zfree() an > expression that involved testing some other struct member, not the one >

Re: [patch 11/35] net: ionic: Replace in_interrupt() usage.

2020-09-28 Thread Shannon Nelson
On 9/28/20 10:24 AM, Shannon Nelson wrote: On 9/27/20 12:48 PM, Thomas Gleixner wrote: From: Sebastian Andrzej Siewior The in_interrupt() usage in this driver tries to figure out which context may sleep and which context may not sleep. in_interrupt() is not really suitable as it misses both

[RFC 2/3] iommu: Account for dma_mask and iommu aperture in IOVA reserved regions

2020-09-28 Thread Eric Auger
VFIO currently exposes the usable IOVA regions through the VFIO_IOMMU_GET_INFO ioctl. However it fails to take into account the dma_mask of the devices within the container. The top limit currently is defined by the iommu aperture. So, for instance, if the IOMMU supports up to 48bits, it may give

[RFC 0/3] iommu: Reserved regions for IOVAs beyond dma_mask and iommu aperture

2020-09-28 Thread Eric Auger
VFIO currently exposes the usable IOVA regions through the VFIO_IOMMU_GET_INFO ioctl / VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE capability. However it fails to take into account the dma_mask of the devices within the container. The top limit currently is defined by the iommu aperture. So, for

[RFC 3/3] vfio/type1: Increase the version of VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE

2020-09-28 Thread Eric Auger
Now the IOVA regions beyond the dma_mask and the vfio aperture are removed from the usable IOVA ranges, the API becomes reliable to compute the max IOVA. Let's advertise this by using a new version for the capability. Signed-off-by: Eric Auger --- drivers/vfio/vfio_iommu_type1.c | 2 +- 1 file

[RFC 1/3] iommu: Fix merging in iommu_insert_resv_region

2020-09-28 Thread Eric Auger
We currently fail to merge a region into another one whose top address is ULLONG_MAX. This situation shouldn't have been encountered yet due to the nature of reserved regions being exposed but this would happen if we were to expose regions beyond the reach of dma_mask or beyond the reach of the

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-28 Thread Linus Torvalds
On Mon, Sep 28, 2020 at 12:36 PM Linus Torvalds wrote: > > So I'll do the pte wrprotect/restore removal. Anybody willing to do > and test the sequence count approach? So the wrprotect removal is trivial, with most of it being about the comments. However, when I look at this, I am - once again -

Re: KASLR support on ARM with Kernel 4.9 and 4.14

2020-09-28 Thread Kees Cook
On Mon, Sep 28, 2020 at 07:41:13PM +0530, Pintu Agarwal wrote: > On Mon, 28 Sep 2020 at 19:15, Pintu Agarwal wrote: > > > > On Sat, 26 Sep 2020 at 22:10, Kees Cook wrote: > > > > > > >> I wonder if this is an Android Common kernel? > > > > It uses the below kernel for 4.14: > > > >

[PATCH] ACPI / NUMA: Add stub function for pxm_to_node

2020-09-28 Thread Nathan Chancellor
After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT"): $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/ drivers/acpi/nfit/core.c: In function

[PATCH v2 RESEND 0/1] PCI: pcie_bus_config can be set at build time

2020-09-28 Thread Jim Quinlan
v2: Add more description text in the new Kconfig settings (Bjorn). v1: Original Jim Quinlan (1): PCI: pcie_bus_config can be set at build time drivers/pci/Kconfig | 56 + drivers/pci/pci.c | 12 ++ 2 files changed, 68 insertions(+) --

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