Re: [PATCH 1/1] ACPI: fix acpi table use after free

2021-03-10 Thread Rafael J. Wysocki
On Wed, Mar 10, 2021 at 7:39 PM Rafael J. Wysocki wrote: > > On Fri, Mar 5, 2021 at 2:40 PM David Hildenbrand wrote: > > > > >> The ibft table, for example, is mapped in via acpi_map() and kmap(). The > > >> page for the ibft table is not reserved, so it can end up on the > > >> freelist. > > >

Re: [PATCH] signal: Allow RT tasks to cache one sigqueue struct

2021-03-10 Thread Thomas Gleixner
On Thu, Mar 04 2021 at 21:58, Thomas Gleixner wrote: > On Thu, Mar 04 2021 at 13:04, Eric W. Biederman wrote: >> Thomas Gleixner writes: >>> >>> We could of course do the caching unconditionally for all tasks. >> >> Is there any advantage to only doing this for realtime tasks? > > It was mostly to

Re: [syzbot] BUG: unable to handle kernel access to user memory in sock_ioctl

2021-03-10 Thread Dmitry Vyukov
On Wed, Mar 10, 2021 at 7:28 PM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:0d7588ab riscv: process: Fix no prototype for arch_dup_tas.. > git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git > fixes > console output: https://syzk

[PATCH] mm/hugetlb: Fix build with !ARCH_WANT_HUGE_PMD_SHARE

2021-03-10 Thread Peter Xu
want_pmd_share() is undefined with !ARCH_WANT_HUGE_PMD_SHARE since it's put by accident into a "#ifdef ARCH_WANT_HUGE_PMD_SHARE" block. Moving it out won't work either since vma_shareable() is only defined within the block. Define it for !ARCH_WANT_HUGE_PMD_SHARE instead. Fixes: 5b109cc1cdcc ("hu

[PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable()

2021-03-10 Thread Florian Fainelli
Having dynamic debug prints in b53_vlan_enable() has been helpful to uncover a recent but update the function to indicate the port being configured (or -1 for initial setup) and include the global VLAN enabled and VLAN filtering enable status. Signed-off-by: Florian Fainelli --- drivers/net/dsa/

Re: [PATCH 4.14 27/50] mm, slub: consider rest of partial list if acquire_slab() fails

2021-03-10 Thread Greg Kroah-Hartman
On Wed, Mar 10, 2021 at 10:43:33AM -0800, Linus Torvalds wrote: > Just a note to the stable tree: this commit has been reverted > upstream, because it causes a huge performance drop (admittedly on a > load and setup that may not be all that relevant to most people). > > It was applied to 4.4, 4.9

Re: [PATCH v2] ptrace: add PTRACE_GET_RSEQ_CONFIGURATION request

2021-03-10 Thread Oleg Nesterov
I don't think I can review this patch, I don't understand the problem space well enough. But just in case, I see nothing wrong in this simple patch. Feel free to add Acked-by: Oleg Nesterov On 02/26, Piotr Figiel wrote: > > For userspace checkpoint and restore (C/R) a way of getting process s

Re: [PATCH] fb_defio: Remove custom address_space_operations

2021-03-10 Thread Matthew Wilcox
On Wed, Mar 10, 2021 at 06:38:07PM +, William Kucharski wrote: > Looks good, just one super minor nit inline. > > @@ -228,13 +202,6 @@ void fb_deferred_io_cleanup(struct fb_info *info) > > > > BUG_ON(!fbdefio); > > cancel_delayed_work_sync(&info->deferred_work); > > - > > - /* clear

[PATCH 1/1] asm-generic/hyperv: Add missing function prototypes per -W1 warnings

2021-03-10 Thread Michael Kelley
Add two function prototypes for -W1 warnings generated by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Michael Kelley --- include/asm-generic/mshyperv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h

[PATCH net] net: dsa: b53: VLAN filtering is global to all users

2021-03-10 Thread Florian Fainelli
The bcm_sf2 driver uses the b53 driver as a library but does not make usre of the b53_setup() function, this made it fail to inherit the vlan_filtering_is_global attribute. Fix this by moving the assignment to b53_switch_alloc() which is used by bcm_sf2. Fixes: 7228b23e68f7 ("net: dsa: b53: Let DS

Re: [PATCH v6 04/15] dt-bindings: add BCM6328 pincontroller binding documentation

2021-03-10 Thread Rob Herring
On Wed, Mar 10, 2021 at 11:03 AM Álvaro Fernández Rojas wrote: > > Hi Rob, > > > El 10 mar 2021, a las 18:45, Rob Herring escribió: > > > > On Wed, Mar 10, 2021 at 5:55 AM Álvaro Fernández Rojas > > wrote: > >> > >> Add binding documentation for the pincontrol core found in BCM6328 SoCs. > >> >

[PATCH v3 2/2] arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz

2021-03-10 Thread Srinivasa Rao Mandadapu
This is a trgodor variant, required to have sound node variable for coachz specific platform. Signed-off-by: Srinivasa Rao Mandadapu --- .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-

[PATCH v1] clk: qcom: clk-rcg2: Add support for duty-cycle for RCG

2021-03-10 Thread Taniya Das
The root clock generators with MND divider has the capability to support change in duty-cycle by updating the 'D'. Add the clock ops which would check all the boundary conditions and enable setting the desired duty-cycle as per the consumer. Signed-off-by: Taniya Das --- drivers/clk/qcom/clk-rcg

[PATCH v3 0/2] Qualcomm's lpass device tree changes for I2s dai

2021-03-10 Thread Srinivasa Rao Mandadapu
These patches are device tree changes to support audio over I2S. Changes Since v1: -- Ajith's Certification is added. -- Alias name added for sound dai link node Changes Since v2: -- sound node variable is added in sc7180-trogdor-coachz.dtsi. -- Audio-jack property is removed, as it may cr

[PATCH v3 1/2] arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver

2021-03-10 Thread Srinivasa Rao Mandadapu
From: Ajit Pandey Add dai link for supporting lpass I2S driver, which is used for audio capture and playback. Add lpass-cpu node with pin controls and i2s primary and secondary dai-links Signed-off-by: Ajit Pandey Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu ---

Re: [PATCH 4.14 27/50] mm, slub: consider rest of partial list if acquire_slab() fails

2021-03-10 Thread Linus Torvalds
Just a note to the stable tree: this commit has been reverted upstream, because it causes a huge performance drop (admittedly on a load and setup that may not be all that relevant to most people). It was applied to 4.4, 4.9 and 4.12, because the commit it was marked as "fixing" is from 2012, but i

Re: [PATCH] vfio/pci: Handle concurrent vma faults

2021-03-10 Thread Jason Gunthorpe
On Wed, Mar 10, 2021 at 11:34:06AM -0700, Alex Williamson wrote: > > I think after the address_space changes this should try to stick with > > a normal io_rmap_pfn_range() done outside the fault handler. > > I assume you're suggesting calling io_remap_pfn_range() when device > memory is enabled,

Re: [PATCH 1/1] ACPI: fix acpi table use after free

2021-03-10 Thread Rafael J. Wysocki
On Fri, Mar 5, 2021 at 2:40 PM David Hildenbrand wrote: > > >> The ibft table, for example, is mapped in via acpi_map() and kmap(). The > >> page for the ibft table is not reserved, so it can end up on the freelist. > > > > You appear to be saying that it is not sufficient to kmap() a page in > >

Re: [PATCH] fb_defio: Remove custom address_space_operations

2021-03-10 Thread William Kucharski
Looks good, just one super minor nit inline. Reviewed-by: William Kucharski > On Mar 10, 2021, at 6:51 AM, Matthew Wilcox (Oracle) > wrote: > > There's no need to give the page an address_space. Leaving the > page->mapping as NULL will cause the VM to handle set_page_dirty() > the same way t

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Pierre-Louis Bossart
Build time dependencies aren't going to help anything, arm64 (and to my understanding some future x86 systems, LynxPoint IIRC) supports both DT and ACPI and so you have kernels built with support for both. well, that's what I suggested initially: if (is_of_node(card->dev->fwnode))

Re: [PATCH] vfio/pci: Handle concurrent vma faults

2021-03-10 Thread Alex Williamson
On Wed, 10 Mar 2021 14:14:46 -0400 Jason Gunthorpe wrote: > On Wed, Mar 10, 2021 at 10:53:29AM -0700, Alex Williamson wrote: > > > diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c > > index 65e7e6b44578..ae723808e08b 100644 > > +++ b/drivers/vfio/pci/vfio_pci.c > > @@ -1573

Re: [PATCH] docs: don't include Documentation/Kconfig twice

2021-03-10 Thread Randy Dunlap
On 3/7/21 6:00 AM, Sergei Trofimovich wrote: > Before the change there were two inclusions of Documentation/Kconfig: > lib/Kconfig.debug:source "Documentation/Kconfig" > Kconfig: source "Documentation/Kconfig" > > Kconfig also included 'source "lib/Kconfig.debug"'. > > Noticed as two 'mak

Re: [PATCH 0/6] usbip fixes to crashes found by syzbot

2021-03-10 Thread Greg KH
On Sun, Mar 07, 2021 at 08:53:25PM -0700, Shuah Khan wrote: > This patch series fixes the following problems founds in syzbot > fuzzing. Thanks for these, all now queued up. greg k-h

Re: [PATCH -tip 0/5] kprobes: Fix stacktrace in kretprobes

2021-03-10 Thread Josh Poimboeuf
On Thu, Mar 11, 2021 at 12:55:09AM +0900, Masami Hiramatsu wrote: > +#ifdef CONFIG_KRETPROBES > +static unsigned long orc_kretprobe_correct_ip(struct unwind_state *state) > +{ > + return kretprobe_find_ret_addr( > + (unsigned long)kretprobe_trampoline_addr(), > +

[PATCH 5.10 00/47] 5.10.23-rc2 review

2021-03-10 Thread gregkh
From: Greg Kroah-Hartman This is the start of the stable review cycle for the 5.10.23 release. There are 47 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Fri, 12 Mar 2021 1

Re: [PATCH v2] include: Remove pagemap.h from blkdev.h

2021-03-10 Thread William Kucharski
Nice cleanup, IMHO. Reviewed-by: William Kucharski > On Mar 9, 2021, at 12:57 PM, Matthew Wilcox (Oracle) > wrote: > > My UEK-derived config has 1030 files depending on pagemap.h before > this change. Afterwards, just 326 files need to be rebuilt when I > touch pagemap.h. I think blkdev.h i

[syzbot] BUG: unable to handle kernel access to user memory in sock_ioctl

2021-03-10 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:0d7588ab riscv: process: Fix no prototype for arch_dup_tas.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes console output: https://syzkaller.appspot.com/x/log.txt?x=122c343ad0 kernel config: ht

Re: [PATCH v6 02/15] gpio: regmap: set gpio_chip of_node

2021-03-10 Thread Michael Walle
Am 2021-03-10 13:54, schrieb Álvaro Fernández Rojas: This is needed for properly registering GPIO regmap as a child of a regmap pin controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Michael Walle --- v6: add comment and simplify of_node assignment Ah, I see you add the comment

Re: [PATCH 5.10 14/49] net: ipa: ignore CHANNEL_NOT_RUNNING errors

2021-03-10 Thread Greg Kroah-Hartman
On Wed, Mar 10, 2021 at 11:06:09PM +0530, Naresh Kamboju wrote: > On Wed, 10 Mar 2021 at 18:56, wrote: > > > > From: Greg Kroah-Hartman > > > > From: Alex Elder > > > > [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ] > > > > IPA v4.2 has a hardware quirk that requires the AP to allo

Re: [PATCH 5.10 00/49] 5.10.23-rc1 review

2021-03-10 Thread Greg Kroah-Hartman
On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote: > On Wed, 10 Mar 2021 at 18:54, wrote: > > > > From: Greg Kroah-Hartman > > > > This is the start of the stable review cycle for the 5.10.23 release. > > There are 49 patches in this series, all will be posted as a response > > to th

Re: [PATCH 5.10 00/49] 5.10.23-rc1 review

2021-03-10 Thread Greg Kroah-Hartman
On Wed, Mar 10, 2021 at 09:58:34AM -0800, Guenter Roeck wrote: > On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote: > > On Wed, 10 Mar 2021 at 18:54, wrote: > > > > > > From: Greg Kroah-Hartman > > > > > > This is the start of the stable review cycle for the 5.10.23 release. > > > Th

Re: [v9 PATCH 13/13] mm: vmscan: shrink deferred objects proportional to priority

2021-03-10 Thread Shakeel Butt
On Wed, Mar 10, 2021 at 9:46 AM Yang Shi wrote: > > The number of deferred objects might get windup to an absurd number, and it > results in clamp of slab objects. It is undesirable for sustaining > workingset. > > So shrink deferred objects proportional to priority and cap nr_deferred to > twi

-Walign-mismatch in block/blk-mq.c

2021-03-10 Thread Nathan Chancellor
Hi Jens, There is a new clang warning added in the development branch, -Walign-mismatch, which shows an instance in block/blk-mq.c: block/blk-mq.c:630:39: warning: passing 8-byte aligned argument to 32-byte aligned parameter 2 of 'smp_call_function_single_async' may result in an unaligned pointer

Re: [RESEND PATCH v4 0/3] proc: Relax check of mount visibility

2021-03-10 Thread Alexey Gladkov
On Mon, Feb 22, 2021 at 09:44:40AM -0600, Eric W. Biederman wrote: > Alexey Gladkov writes: > > > If only the dynamic part of procfs is mounted (subset=pid), then there is no > > need to check if procfs is fully visible to the user in the new user > > namespace. > > > A couple of things. > > 1

[PATCH v5 5/5] docs: proc: add documentation about relaxing visibility restrictions

2021-03-10 Thread Alexey Gladkov
Signed-off-by: Alexey Gladkov --- Documentation/filesystems/proc.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 3daf0e7d1071..9d2985a7aad6 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/

[PATCH v5 4/5] proc: Relax check of mount visibility

2021-03-10 Thread Alexey Gladkov
Allow to mount of procfs with subset=pid option even if the entire procfs is not fully accessible to the user. Signed-off-by: Alexey Gladkov --- fs/namespace.c | 27 --- fs/proc/root.c | 17 ++--- include/linux/fs.h | 1 + 3 files changed, 27 insertio

[PATCH v5 3/5] proc: Disable cancellation of subset=pid option

2021-03-10 Thread Alexey Gladkov
There is no way to remount procfs mountpoint with subset=pid option without it. This is done in order not to make visible what was hidden since some checks occur during mount. This patch makes this limitation explicit and demonstrates the error. Signed-off-by: Alexey Gladkov --- fs/proc/root.c

[PATCH v5 1/5] docs: proc: add documentation about mount restrictions

2021-03-10 Thread Alexey Gladkov
Signed-off-by: Alexey Gladkov --- Documentation/filesystems/proc.rst | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 2fa69f710e2a..3daf0e7d1071 100644 --- a/Documentation/filesystems/proc.rst +++

[PATCH v5 2/5] proc: Show /proc/self/net only for CAP_NET_ADMIN

2021-03-10 Thread Alexey Gladkov
Cache the mounters credentials and make access to the net directories contingent of the permissions of the mounter of proc. Show /proc/self/net only if mounter has CAP_NET_ADMIN and if proc is mounted with subset=pid option. Signed-off-by: Alexey Gladkov --- fs/proc/proc_net.c | 8

[PATCH v5 0/5] proc: Relax check of mount visibility

2021-03-10 Thread Alexey Gladkov
If only the dynamic part of procfs is mounted (subset=pid), then there is no need to check if procfs is fully visible to the user in the new user namespace. Changelog - v4: * Set SB_I_DYNAMIC only if pidonly is set. * Add an error message if subset=pid is canceled during remount. v3: * Ad

[PATCH v2 1/1] fs: Allow no_new_privs tasks to call chroot(2)

2021-03-10 Thread Mickaël Salaün
From: Mickaël Salaün Being able to easily change root directories enable to ease some development workflow and can be used as a tool to strengthen unprivileged security sandboxes. chroot(2) is not an access-control mechanism per se, but it can be used to limit the absolute view of the filesystem

[PATCH v2 0/1] Unprivileged chroot

2021-03-10 Thread Mickaël Salaün
Hi, This second patch replaces the custom is_path_beneath() with the existing path_is_under(). The chroot system call is currently limited to be used by processes with the CAP_SYS_CHROOT capability. This protects against malicious procesess willing to trick SUID-like binaries. The following pat

[PATCH v1] clk: qcom: rpmh: Update the XO clock source for SC7280

2021-03-10 Thread Taniya Das
The bi_tcxo clock source for SC7280 requires a div 4 to derive 19.2MHz from the xo_board. Thus update the same. Fixes: fff2b9a65162 ("clk: qcom: rpmh: Add support for RPMH clocks on SC7280") Signed-off-by: Taniya Das --- drivers/clk/qcom/clk-rpmh.c | 7 +-- 1 file changed, 5 insertions(+), 2

Re: [EXT] Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread Andrew Lunn
> Make it patch series? I can split it to 2/3 patches. I don't think that will be needed. The helpers should be pretty obvious. Andrew

Re: [PATCH v1 0/1] Unprivileged chroot

2021-03-10 Thread Mickaël Salaün
On 10/03/2021 18:22, Casey Schaufler wrote: > On 3/10/2021 8:09 AM, Mickaël Salaün wrote: >> Hi, >> >> The chroot system call is currently limited to be used by processes with >> the CAP_SYS_CHROOT capability. This protects against malicious >> procesess willing to trick SUID-like binaries. The

Re: [mm, slub] 8ff60eb052: stress-ng.rawpkt.ops_per_sec -47.9% regression

2021-03-10 Thread Linus Torvalds
On Tue, Mar 9, 2021 at 10:59 PM Christoph Lameter wrote: > > > > > it really looks like this might well have been very intentional > > indeed. Or at least very beneficial for _some_ loads. > > Yes the thought was that adding an additional page when contention is > there on the page objects will in

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Mark Brown
On Wed, Mar 10, 2021 at 11:50:13AM -0600, Pierre-Louis Bossart wrote: > On 3/10/21 10:52 AM, Mark Brown wrote: > > Build time dependencies aren't going to help anything, arm64 (and to my > > understanding some future x86 systems, LynxPoint IIRC) supports both DT > > and ACPI and so you have kernel

Re: [PATCH v2] x86/perf: Use RET0 as default for guest_get_msrs to handle "no PMU" case

2021-03-10 Thread Sean Christopherson
On Wed, Mar 10, 2021, Peter Zijlstra wrote: > On Tue, Mar 09, 2021 at 09:10:19AM -0800, Sean Christopherson wrote: > > > @@ -2024,9 +2021,6 @@ static int __init init_hw_perf_events(void) > > if (!x86_pmu.read) > > x86_pmu.read = _x86_pmu_read; > > > > - if (!x86_pmu.guest_get_m

Re: [PATCH] vfio/pci: Handle concurrent vma faults

2021-03-10 Thread Jason Gunthorpe
On Wed, Mar 10, 2021 at 10:53:29AM -0700, Alex Williamson wrote: > diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c > index 65e7e6b44578..ae723808e08b 100644 > +++ b/drivers/vfio/pci/vfio_pci.c > @@ -1573,6 +1573,11 @@ static int __vfio_pci_add_vma(struct vfio_pci_device > *

Re: [PATCH 1/3] ASoC: simple-card-utils: Fix device module clock

2021-03-10 Thread Michael Walle
Hi Sameer, Hi Mark, Am 2021-03-10 15:50, schrieb Sameer Pujar: On 3/10/2021 4:00 AM, Michael Walle wrote: Am 2021-03-09 17:27, schrieb Sameer Pujar: On 3/9/2021 8:11 PM, Michael Walle wrote: If "clocks = <&xxx>" is specified from the CPU or Codec component device node, the clock is not gettin

Re: [PATCH v1 1/1] fs: Allow no_new_privs tasks to call chroot(2)

2021-03-10 Thread Mickaël Salaün
On 10/03/2021 17:56, Eric W. Biederman wrote: > Mickaël Salaün writes: > >> From: Mickaël Salaün >> >> Being able to easily change root directories enable to ease some >> development workflow and can be used as a tool to strengthen >> unprivileged security sandboxes. chroot(2) is not an acces

Re: [GIT PULL] detached mounts fix

2021-03-10 Thread pr-tracker-bot
The pull request you sent on Wed, 10 Mar 2021 13:45:22 +0100: > g...@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux > tags/for-linus-2021-03-10 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d3110f256d126b44d34c1f662310cd295877c447 Thank you! -- Deet-do

Re: [GIT PULL] cifs fixes

2021-03-10 Thread pr-tracker-bot
The pull request you sent on Tue, 9 Mar 2021 20:49:00 -0600: > git://git.samba.org/sfrench/cifs-2.6.git tags/5.12-rc2-smb3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d0df9aabefda4d0a64730087f939f53f91e29ee6 Thank you! -- Deet-doot-dot, I am a bot. https://korg.d

Re: [PATCH v2 5/7] x86/boot/compressed/64: Add CPUID sanity check to 32-bit boot-path

2021-03-10 Thread Martin Radev
On Wed, Mar 10, 2021 at 09:51:48AM -0800, Sean Christopherson wrote: > On Wed, Mar 10, 2021, Martin Radev wrote: > > On Wed, Mar 10, 2021 at 08:08:37AM -0800, Sean Christopherson wrote: > > > On Wed, Mar 10, 2021, Joerg Roedel wrote: > > > > + /* > > > > +* Sanity check CPUID results

Re: [PATCH v4 2/4] hugetlb/userfaultfd: Forbid huge pmd sharing when uffd enabled

2021-03-10 Thread Naresh Kamboju
m/hugetlbpage.c > > > index 6e3bcffe2837..58987a98e179 100644 > > > --- a/arch/arm64/mm/hugetlbpage.c > > > +++ b/arch/arm64/mm/hugetlbpage.c > > > @@ -284,8 +284,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct > > > vm_area_struct *vma, > > >

Re: [PATCH] usb: dwc3: gadget: Prevent EP queuing while stopping transfers

2021-03-10 Thread Jack Pham
Hi Wesley, On Wed, Mar 10, 2021 at 03:02:10AM -0800, Wesley Cheng wrote: > In the situations where the DWC3 gadget stops active transfers, once > calling the dwc3_gadget_giveback(), there is a chance where a function > driver can queue a new USB request in between the time where the dwc3 > lock ha

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 09:06:48AM -0800, Minchan Kim wrote: > On Wed, Mar 10, 2021 at 05:46:56PM +0100, Michal Hocko wrote: > > On Wed 10-03-21 08:05:36, Minchan Kim wrote: > > > On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote: > > [...] > > > > The is a lot of churn indeed. Have you

Re: [PATCH v3] auxdisplay: Remove in_interrupt() usage.

2021-03-10 Thread Miguel Ojeda
On Wed, Mar 10, 2021 at 6:51 PM Sebastian Andrzej Siewior wrote: > > I assumed you are going to apply it but I don't see it in -next as of > today. Is there anything I need to do? Ah, since you said you were posting a patch, I kept this in the waiting list. I will apply the latest one then. Chee

Re: [PATCH v6 04/15] dt-bindings: add BCM6328 pincontroller binding documentation

2021-03-10 Thread Álvaro Fernández Rojas
Hi Rob, > El 10 mar 2021, a las 18:45, Rob Herring escribió: > > On Wed, Mar 10, 2021 at 5:55 AM Álvaro Fernández Rojas > wrote: >> >> Add binding documentation for the pincontrol core found in BCM6328 SoCs. >> >> Signed-off-by: Jonas Gorski >> Co-developed-by: Jonas Gorski >> Signed-off-by

Re: [PATCH v6 3/6] x86/elf: Support a new ELF aux vector AT_MINSIGSTKSZ

2021-03-10 Thread Bae, Chang Seok
On Mar 10, 2021, at 09:43, Borislav Petkov wrote: > > No, build the docs by doing > > make htmldocs > > and look at the result. > > Btw, you should always look at the result before sending it out. Ah, now I get that. Sorry for my ignorance. I will fix and make sure not missing this check. Th

Re: [PATCH v2 00/25] KVM SGX virtualization support

2021-03-10 Thread Jarkko Sakkinen
On Tue, Mar 09, 2021 at 10:30:37AM +0100, Borislav Petkov wrote: > On Tue, Mar 09, 2021 at 02:38:49PM +1300, Kai Huang wrote: > > This series adds KVM SGX virtualization support. The first 14 patches > > starting > > with x86/sgx or x86/cpu.. are necessary changes to x86 and SGX core/driver > > t

[PATCH v3] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
Currently, debugging CMA allocation failures is quite limited. The most commong source of these failures seems to be page migration which doesn't provide any useful information on the reason of the failure by itself. alloc_contig_range can report those failures as it holds a list of migrate-failed

Re: [PATCH 5.10 14/49] net: ipa: ignore CHANNEL_NOT_RUNNING errors

2021-03-10 Thread Greg Kroah-Hartman
On Wed, Mar 10, 2021 at 11:48:03AM -0600, Alex Elder wrote: > On 3/10/21 11:36 AM, Naresh Kamboju wrote: > > On Wed, 10 Mar 2021 at 18:56, wrote: > > > > > > From: Greg Kroah-Hartman > > > > > > From: Alex Elder > > > > > > [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ] > > Ups

Re: [PATCH v3 0/2] x86/setup: consolidate early memory reservations

2021-03-10 Thread David Hildenbrand
On 10.03.21 18:52, Mike Rapoport wrote: Any comments on these? Take my Acked-by: David Hildenbrand it looks sane to me ... but not sure what it's worth in that x86-64 code :) -- Thanks, David / dhildenb

[PATCH v4 34/34] KVM: arm64: Protect the .hyp sections from the host

2021-03-10 Thread Quentin Perret
When KVM runs in nVHE protected mode, use the host stage 2 to unmap the hypervisor sections by marking them as owned by the hypervisor itself. The long-term goal is to ensure the EL2 code can remain robust regardless of the host's state, so this starts by making sure the host cannot e.g. write to t

[PATCH v4 32/34] KVM: arm64: Page-align the .hyp sections

2021-03-10 Thread Quentin Perret
We will soon unmap the .hyp sections from the host stage 2 in Protected nVHE mode, which obviously works with at least page granularity, so make sure to align them correctly. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/kernel/vmlinux.lds.S | 22 +- 1 f

[PATCH v4 30/34] KVM: arm64: Add kvm_pgtable_stage2_find_range()

2021-03-10 Thread Quentin Perret
Since the host stage 2 will be identity mapped, and since it will own most of memory, it would preferable for performance to try and use large block mappings whenever that is possible. To ease this, introduce a new helper in the KVM page-table code which allows to search for large ranges of availab

[PATCH v4 31/34] KVM: arm64: Wrap the host with a stage 2

2021-03-10 Thread Quentin Perret
When KVM runs in protected nVHE mode, make use of a stage 2 page-table to give the hypervisor some control over the host memory accesses. The host stage 2 is created lazily using large block mappings if possible, and will default to page mappings in absence of a better solution. >From this point o

[PATCH v4 33/34] KVM: arm64: Disable PMU support in protected mode

2021-03-10 Thread Quentin Perret
The host currently writes directly in EL2 per-CPU data sections from the PMU code when running in nVHE. In preparation for unmapping the EL2 sections from the host stage 2, disable PMU support in protected mode as we currently do not have a use-case for it. Acked-by: Will Deacon Signed-off-by: Qu

[PATCH v4 26/34] KVM: arm64: Sort the hypervisor memblocks

2021-03-10 Thread Quentin Perret
We will soon need to check if a Physical Address belongs to a memblock at EL2, so make sure to sort them so this can be done efficiently. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/reserved_mem.c | 19 +++ 1 file changed, 19 insertions(+) diff --

[PATCH v4 29/34] KVM: arm64: Refactor stage2_map_set_prot_attr()

2021-03-10 Thread Quentin Perret
In order to ease its re-use in other code paths, refactor stage2_map_set_prot_attr() to not depend on a stage2_map_data struct. No functional change intended. Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/pgtable.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 25/34] KVM: arm64: Reserve memory for host stage 2

2021-03-10 Thread Quentin Perret
Extend the memory pool allocated for the hypervisor to include enough pages to map all of memory at page granularity for the host stage 2. While at it, also reserve some memory for device mappings. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/include/nvhe/mm.h | 27

[PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-10 Thread Quentin Perret
As the host stage 2 will be identity mapped, all the .hyp memory regions and/or memory pages donated to protected guestis will have to marked invalid in the host stage 2 page-table. At the same time, the hypervisor will need a way to track the ownership of each physical page to ensure memory sharin

[PATCH v4 24/34] KVM: arm64: Make memcache anonymous in pgtable allocator

2021-03-10 Thread Quentin Perret
The current stage2 page-table allocator uses a memcache to get pre-allocated pages when it needs any. To allow re-using this code at EL2 which uses a concept of memory pools, make the memcache argument of kvm_pgtable_stage2_map() anonymous, and let the mm_ops zalloc_page() callbacks use it the way

[PATCH v4 27/34] KVM: arm64: Always zero invalid PTEs

2021-03-10 Thread Quentin Perret
kvm_set_invalid_pte() currently only clears bit 0 from a PTE because stage2_map_walk_table_post() needs to be able to follow the anchor. In preparation for re-using bits 63-02 from invalid PTEs, make sure to zero it entirely by ensuring to cache the anchor's child upfront. Suggested-by: Will Deaco

[PATCH v4 22/34] KVM: arm64: Refactor __load_guest_stage2()

2021-03-10 Thread Quentin Perret
Refactor __load_guest_stage2() to introduce __load_stage2() which will be re-used when loading the host stage 2. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_mmu.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/inclu

[PATCH v4 23/34] KVM: arm64: Refactor __populate_fault_info()

2021-03-10 Thread Quentin Perret
Refactor __populate_fault_info() to introduce __get_fault_info() which will be used once the host is wrapped in a stage 2. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/include/hyp/switch.h | 34 + 1 file changed, 18 insertions(+), 16 deletio

[PATCH v4 20/34] KVM: arm64: Set host stage 2 using kvm_nvhe_init_params

2021-03-10 Thread Quentin Perret
Move the registers relevant to host stage 2 enablement to kvm_nvhe_init_params to prepare the ground for enabling it in later patches. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_asm.h | 3 +++ arch/arm64/kernel/asm-offsets.c| 3 +++ arch/arm64/kvm

[PATCH v4 21/34] KVM: arm64: Refactor kvm_arm_setup_stage2()

2021-03-10 Thread Quentin Perret
In order to re-use some of the stage 2 setup code at EL2, factor parts of kvm_arm_setup_stage2() out into separate functions. No functional change intended. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_pgtable.h | 26 + arch/arm64/kvm/hyp/p

Re: [PATCH 5.10 00/49] 5.10.23-rc1 review

2021-03-10 Thread Guenter Roeck
On Wed, Mar 10, 2021 at 11:08:10PM +0530, Naresh Kamboju wrote: > On Wed, 10 Mar 2021 at 18:54, wrote: > > > > From: Greg Kroah-Hartman > > > > This is the start of the stable review cycle for the 5.10.23 release. > > There are 49 patches in this series, all will be posted as a response > > to th

[PATCH v4 19/34] KVM: arm64: Use kvm_arch in kvm_s2_mmu

2021-03-10 Thread Quentin Perret
In order to make use of the stage 2 pgtable code for the host stage 2, change kvm_s2_mmu to use a kvm_arch pointer in lieu of the kvm pointer, as the host will have the former but not the latter. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_host.h | 2 +- a

[PATCH v4 18/34] KVM: arm64: Use kvm_arch for stage 2 pgtable

2021-03-10 Thread Quentin Perret
In order to make use of the stage 2 pgtable code for the host stage 2, use struct kvm_arch in lieu of struct kvm as the host will have the former but not the latter. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_pgtable.h | 5 +++-- arch/arm64/kvm/hyp/pgtabl

Re: [PATCH v5 3/4] x86/vmemmap: Handle unpopulated sub-pmd ranges

2021-03-10 Thread David Hildenbrand
On 10.03.21 18:49, Oscar Salvador wrote: On Tue, Mar 09, 2021 at 06:52:38PM +0100, David Hildenbrand wrote: -#define PAGE_INUSE 0xFD +#ifdef CONFIG_SPARSEMEM_VMEMMAP +#define PAGE_UNUSED 0xFD + +/* Returns true if the PMD is completely unused and thus it can be freed */ +static bool __meminit vm

[PATCH v4 17/34] KVM: arm64: Elevate hypervisor mappings creation at EL2

2021-03-10 Thread Quentin Perret
Previous commits have introduced infrastructure to enable the EL2 code to manage its own stage 1 mappings. However, this was preliminary work, and none of it is currently in use. Put all of this together by elevating the mapping creation at EL2 when memory protection is enabled. In this case, the

[PATCH v4 15/34] arm64: asm: Provide set_sctlr_el2 macro

2021-03-10 Thread Quentin Perret
We will soon need to turn the EL2 stage 1 MMU on and off in nVHE protected mode, so refactor the set_sctlr_el1 macro to make it usable for that purpose. Signed-off-by: Quentin Perret --- arch/arm64/include/asm/assembler.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) dif

[PATCH v4 12/34] KVM: arm64: Introduce a Hyp buddy page allocator

2021-03-10 Thread Quentin Perret
When memory protection is enabled, the hyp code will require a basic form of memory management in order to allocate and free memory pages at EL2. This is needed for various use-cases, including the creation of hyp mappings or the allocation of stage 2 page tables. To address these use-case, introd

[PATCH v4 16/34] KVM: arm64: Prepare the creation of s1 mappings at EL2

2021-03-10 Thread Quentin Perret
When memory protection is enabled, the EL2 code needs the ability to create and manage its own page-table. To do so, introduce a new set of hypercalls to bootstrap a memory management system at EL2. This leads to the following boot flow in nVHE Protected mode: 1. the host allocates memory for th

[PATCH v4 14/34] KVM: arm64: Factor out vector address calculation

2021-03-10 Thread Quentin Perret
In order to re-map the guest vectors at EL2 when pKVM is enabled, refactor __kvm_vector_slot2idx() and kvm_init_vector_slot() to move all the address calculation logic in a static inline function. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_mmu.h | 8 +

[PATCH v4 11/34] KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp

2021-03-10 Thread Quentin Perret
In order to use the kernel list library at EL2, introduce stubs for the CONFIG_DEBUG_LIST out-of-lines calls. Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- arch/arm64/kvm/hyp/nvhe/stub.c | 22 ++ 2 files changed, 23 insertions(+), 1 deletion(-)

[PATCH v4 13/34] KVM: arm64: Enable access to sanitized CPU features at EL2

2021-03-10 Thread Quentin Perret
Introduce the infrastructure in KVM enabling to copy CPU feature registers into EL2-owned data-structures, to allow reading sanitised values directly at EL2 in nVHE. Given that only a subset of these features are being read by the hypervisor, the ones that need to be copied are to be listed under

[PATCH v4 10/34] KVM: arm64: Introduce an early Hyp page allocator

2021-03-10 Thread Quentin Perret
With nVHE, the host currently creates all stage 1 hypervisor mappings at EL1 during boot, installs them at EL2, and extends them as required (e.g. when creating a new VM). But in a world where the host is no longer trusted, it cannot have full control over the code mapped in the hypervisor. In pre

[PATCH v4 08/34] KVM: arm64: Make kvm_call_hyp() a function call at Hyp

2021-03-10 Thread Quentin Perret
kvm_call_hyp() has some logic to issue a function call or a hypercall depending on the EL at which the kernel is running. However, all the code compiled under __KVM_NVHE_HYPERVISOR__ is guaranteed to only run at EL2 which allows us to simplify. Add ifdefery to kvm_host.h to simplify kvm_call_hyp()

[PATCH v4 09/34] KVM: arm64: Allow using kvm_nvhe_sym() in hyp code

2021-03-10 Thread Quentin Perret
In order to allow the usage of code shared by the host and the hyp in static inline library functions, allow the usage of kvm_nvhe_sym() at EL2 by defaulting to the raw symbol name. Acked-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/include/asm/hyp_image.h | 4 1 file chang

[PATCH v4 07/34] KVM: arm64: Introduce a BSS section for use at Hyp

2021-03-10 Thread Quentin Perret
Currently, the hyp code cannot make full use of a bss, as the kernel section is mapped read-only. While this mapping could simply be changed to read-write, it would intermingle even more the hyp and kernel state than they currently are. Instead, introduce a __hyp_bss section, that uses reserved pa

[PATCH v4 06/34] KVM: arm64: Factor memory allocation out of pgtable.c

2021-03-10 Thread Quentin Perret
In preparation for enabling the creation of page-tables at EL2, factor all memory allocation out of the page-table code, hence making it re-usable with any compatible memory allocator. No functional changes intended. Signed-off-by: Quentin Perret --- arch/arm64/include/asm/kvm_pgtable.h | 41 ++

[PATCH v4 02/34] KVM: arm64: Link position-independent string routines into .hyp.text

2021-03-10 Thread Quentin Perret
From: Will Deacon Pull clear_page(), copy_page(), memcpy() and memset() into the nVHE hyp code and ensure that we always execute the '__pi_' entry point on the offchance that it changes in future. [ qperret: Commit title nits and added linker script alias ] Signed-off-by: Will Deacon Signed-of

[PATCH v4 05/34] KVM: arm64: Avoid free_page() in page-table allocator

2021-03-10 Thread Quentin Perret
Currently, the KVM page-table allocator uses a mix of put_page() and free_page() calls depending on the context even though page-allocation is always achieved using variants of __get_free_page(). Make the code consistent by using put_page() throughout, and reduce the memory management API surface

[PATCH v4 04/34] KVM: arm64: Initialize kvm_nvhe_init_params early

2021-03-10 Thread Quentin Perret
Move the initialization of kvm_nvhe_init_params in a dedicated function that is run early, and only once during KVM init, rather than every time the KVM vectors are set and reset. This also opens the opportunity for the hypervisor to change the init structs during boot, hence simplifying the repla

[PATCH v4 03/34] arm64: kvm: Add standalone ticket spinlock implementation for use at hyp

2021-03-10 Thread Quentin Perret
From: Will Deacon We will soon need to synchronise multiple CPUs in the hyp text at EL2. The qspinlock-based locking used by the host is overkill for this purpose and relies on the kernel's "percpu" implementation for the MCS nodes. Implement a simple ticket locking scheme based heavily on the c

[PATCH v4 01/34] arm64: lib: Annotate {clear,copy}_page() as position-independent

2021-03-10 Thread Quentin Perret
From: Will Deacon clear_page() and copy_page() are suitable for use outside of the kernel address space, so annotate them as position-independent code. Signed-off-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/lib/clear_page.S | 4 ++-- arch/arm64/lib/copy_page.S | 4 ++-- 2 fi

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