Re: [PATCH v2] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot system

2020-11-17 Thread Lu Baolu
+Will Please consider this patch for v5.10. Best regards, baolu On 2020/11/10 15:19, Zhenzhong Duan wrote: "intel_iommu=off" command line is used to disable iommu but iommu is force enabled in a tboot system for security reason. However for better performance on high speed network device, a

Re: [PATCH v7 1/8] block: ensure bios are not split in middle of crypto data unit

2020-11-17 Thread Eric Biggers
On Tue, Nov 17, 2020 at 02:07:01PM +, Satya Tangirala wrote: > Introduce blk_crypto_bio_sectors_alignment() that returns the required > alignment for the number of sectors in a bio. Any bio split must ensure > that the number of sectors in the resulting bios is aligned to that > returned

Re: [RESEND][PATCH] ima: Set and clear FMODE_CAN_READ in ima_calc_file_hash()

2020-11-17 Thread Linus Torvalds
On Tue, Nov 17, 2020 at 3:24 PM Mimi Zohar wrote: > > I really wish it wasn't needed. Seriously, I get the feeling that IMA is completely mis-designed, and is doing actively bad things. Who uses this "feature", and who cares? Because I would suggest you just change the policy and be done with

[PATCH bpf-next v4 2/2] bpf: Add tests for bpf_bprm_opts_set helper

2020-11-17 Thread KP Singh
From: KP Singh The test forks a child process, updates the local storage to set/unset the securexec bit. The BPF program in the test attaches to bprm_creds_for_exec which checks the local storage of the current task to set the secureexec bit on the binary parameters (bprm). The child then

Re: [PATCH 11/24] x86/resctrl: Group staged configuration into a separate struct

2020-11-17 Thread Reinette Chatre
Hi James, On 10/30/2020 9:11 AM, James Morse wrote: Arm's MPAM may have surprisingly large bitmaps for its cache portions as the architecture allows up to 4K portions. The size exposed via resctrl may not be the same, some scaling may occur. The values written to hardware may be unlike the

[PATCH bpf-next v4 1/2] bpf: Add bpf_bprm_opts_set helper

2020-11-17 Thread KP Singh
From: KP Singh The helper allows modification of certain bits on the linux_binprm struct starting with the secureexec bit which can be updated using the BPF_F_BPRM_SECUREEXEC flag. secureexec can be set by the LSM for privilege gaining executions to set the AT_SECURE auxv for glibc. When set,

RE: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message

2020-11-17 Thread Patel, Utkarsh H
Hi Heikki, > -Original Message- > From: Heikki Krogerus > Sent: Tuesday, November 17, 2020 4:10 AM > To: Patel, Utkarsh H > Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; > pmal...@chromium.org; enric.balle...@collabora.com; Mani, Rajmohan > ; Shaikh, Azhar > Subject: Re:

[PATCH v7 13/13] misc: bcm-vk: add ttyVK support

2020-11-17 Thread Scott Branden
Add ttyVK support to driver to allow console access to VK card from host. Device node will be in the follow form /dev/bcm-vk.x_ttyVKy where: x is the instance of the VK card y is the tty device number on the VK card Signed-off-by: Scott Branden --- drivers/misc/bcm-vk/Makefile | 3 +-

[PATCH v7 12/13] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-11-17 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e451dcce054f..f574946f2f56 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3716,6 +3716,13 @@ L:

[PATCH v7 10/13] misc: bcm-vk: reset_pid support

2020-11-17 Thread Scott Branden
Add reset support via ioctl. Kill user processes that are open when VK card is reset. If a particular PID has issued the reset request do not kill that process as it issued the ioctl. Co-developed-by: Desmond Yan Signed-off-by: Desmond Yan Signed-off-by: Scott Branden ---

[PATCH v7 11/13] misc: bcm-vk: add mmap function for exposing BAR2

2020-11-17 Thread Scott Branden
Add mmap function that allows host application to open up BAR2 memory for remote spooling out messages from the VK logger. Co-developed-by: Desmond Yan Signed-off-by: Desmond Yan Signed-off-by: Scott Branden --- drivers/misc/bcm-vk/bcm_vk_dev.c | 24 1 file changed,

Re: [arm] BUG: KASAN: slab-out-of-bounds in memcmp+0x30/0x5c

2020-11-17 Thread Nishanth Menon
On 16:25-20201117, Arnd Bergmann wrote: > On Tue, Nov 17, 2020 at 3:44 PM Naresh Kamboju > wrote: > > > > While booting arm KASAN config enabled kernel on TI x15 device > > Linux version 5.10.0-rc3-next-20201116. > > > > The reported issue is not a regre

[PATCH v7 09/13] misc: bcm-vk: add VK messaging support

2020-11-17 Thread Scott Branden
Add message support in order to be able to communicate to VK card via message queues. This info is used for debug purposes via collection of logs via direct read of BAR space and by sysfs access (in a follow on commit). Co-developed-by: Desmond Yan Signed-off-by: Desmond Yan Signed-off-by:

Re: [PATCH net-next 4/4] ptp: ptp_ines: use enum ptp_msg_type

2020-11-17 Thread Vladimir Oltean
On Wed, Nov 18, 2020 at 07:17:41AM +0800, kernel test robot wrote: > >> drivers/ptp/ptp_ines.c:690:26: error: conflicting types for > >> 'tag_to_msgtype' > 690 | static enum ptp_msg_type tag_to_msgtype(u8 tag) > | ^~ >

Re: [PATCH v5 1/2] iommu/iova: Retry from last rb tree node if iova search fails

2020-11-17 Thread Will Deacon
On Wed, 30 Sep 2020 13:14:23 +0530, vji...@codeaurora.org wrote: > When ever a new iova alloc request comes iova is always searched > from the cached node and the nodes which are previous to cached > node. So, even if there is free iova space available in the nodes > which are next to the cached

[PATCH v7 08/13] misc: bcm-vk: add get_card_info, peerlog_info, and proc_mon_info

2020-11-17 Thread Scott Branden
Add support to get card_info (details about card), peerlog_info (to get details of peerlog on card), and proc_mon_info (process monitoring on card). This info is used for collection of logs via direct read of BAR space and by sysfs access (in a follow on commit). Co-developed-by: Desmond Yan

[PATCH v7 07/13] misc: bcm-vk: add ioctl load_image

2020-11-17 Thread Scott Branden
Add ioctl support to issue load_image operation to VK card. Co-developed-by: Desmond Yan Signed-off-by: Desmond Yan Co-developed-by: James Hu Signed-off-by: James Hu Signed-off-by: Scott Branden --- drivers/misc/bcm-vk/bcm_vk.h | 3 + drivers/misc/bcm-vk/bcm_vk_dev.c | 95

Re: [PATCH] iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM

2020-11-17 Thread Will Deacon
On Sun, 15 Nov 2020 21:59:51 +0100, Lukas Bulwahn wrote: > Commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") > introduced intel_iommu_sva_invalidate() when CONFIG_INTEL_IOMMU_SVM. > This function uses the dedicated static variable inv_type_granu_table > and functions

[PATCH v7 06/13] misc: bcm-vk: add open/release

2020-11-17 Thread Scott Branden
Add open/release to replace private data with context for other methods to use. Reason for the context is because it is allowed for multiple sessions to open sysfs. For each file open, when upper layer queries the response, only those that are tied to a specified open should be returned.

Re: [PATCH] iommu: Modify the description of iommu_sva_unbind_device

2020-11-17 Thread Will Deacon
On Fri, 23 Oct 2020 06:48:27 +, Chen Jun wrote: > iommu_sva_unbind_device has no return value. > > Remove the description of the return value of the function. Applied to arm64 (for-next/iommu/misc), thanks! [1/1] iommu: Modify the description of iommu_sva_unbind_device

[PATCH v7 05/13] misc: bcm-vk: add triggers when host panic or reboots to notify card

2020-11-17 Thread Scott Branden
Pass down an interrupt to card in case of panic or reboot so that card can take appropriate action to perform a clean reset. Uses kernel notifier block either directly (register on panic list), or implicitly (add shutdown method for PCI device). Co-developed-by: Desmond Yan Signed-off-by:

[PATCH v7 04/13] misc: bcm-vk: add misc device to Broadcom VK driver

2020-11-17 Thread Scott Branden
Add misc device base support to create and remove devnode. Additional misc functions for open/read/write/release/ioctl/sysfs, etc will be added in follow on commits to allow for individual review. Co-developed-by: Desmond Yan Signed-off-by: Desmond Yan Signed-off-by: Scott Branden ---

[PATCH -tip 09/32] sched/fair: Snapshot the min_vruntime of CPUs on force idle

2020-11-17 Thread Joel Fernandes (Google)
During force-idle, we end up doing cross-cpu comparison of vruntimes during pick_next_task. If we simply compare (vruntime-min_vruntime) across CPUs, and if the CPUs only have 1 task each, we will always end up comparing 0 with 0 and pick just one of the tasks all the time. This starves the task

[PATCH v7 03/13] misc: bcm-vk: add autoload support

2020-11-17 Thread Scott Branden
Add support to load and boot images on card automatically. The kernel module parameter auto_load can be passed in as false to disable such support on probe. As well, nr_scratch_pages can be specified to allocate more or less scratch memory on init as needed for desired card operation.

[PATCH v7 02/13] misc: bcm-vk: add Broadcom VK driver

2020-11-17 Thread Scott Branden
Add initial version of Broadcom VK driver to enumerate PCI device IDs of Valkyrie and Viper device IDs. VK based cards provide real-time high performance, high throughput, low latency offload compute engine operations. They are used for multiple parallel offload tasks as: audio, video and image

[PATCH v7 01/13] bcm-vk: add bcm_vk UAPI

2020-11-17 Thread Scott Branden
Add user space api for bcm-vk driver. Provide ioctl api to load images and issue reset command to card. FW status registers in PCI BAR space also defined as part of API so that user space is able to interpret these memory locations as needed via direct PCIe access. Signed-off-by: Scott Branden

[PATCH v7 00/13] Add Broadcom VK driver

2020-11-17 Thread Scott Branden
This patch series drops previous patches in [1] that were incorporated by Kees Cook into patch series "Introduce partial kernel_read_file() support" [2]. Remaining patches are contained in this series to add Broadcom VK driver. (which depends on request_firmware_into_buf API addition which has

[PATCH -tip 08/32] sched/fair: Fix forced idle sibling starvation corner case

2020-11-17 Thread Joel Fernandes (Google)
From: Vineeth Pillai If there is only one long running local task and the sibling is forced idle, it might not get a chance to run until a schedule event happens on any cpu in the core. So we check for this condition during a tick to see if a sibling is starved and then give it a chance to

Re: [RESEND][PATCH] ima: Set and clear FMODE_CAN_READ in ima_calc_file_hash()

2020-11-17 Thread Mimi Zohar
On Tue, 2020-11-17 at 10:23 -0800, Linus Torvalds wrote: > On Mon, Nov 16, 2020 at 10:35 AM Mimi Zohar wrote: > > > > We need to differentiate between signed files, which by definition are > > immutable, and those that are mutable. Appending to a mutable file, > > for example, would result in

[PATCH -tip 21/32] sched: CGroup tagging interface for core scheduling

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Marks all tasks in a cgroup as matching for core-scheduling. A task will need to be moved into the core scheduler queue when the cgroup it belongs to is tagged to run with core scheduling. Similarly the task will need to be moved out of the core scheduler queue when the

[PATCH -tip 15/32] sched: Improve snapshotting of min_vruntime for CGroups

2020-11-17 Thread Joel Fernandes (Google)
A previous patch improved cross-cpu vruntime comparison opertations in pick_next_task(). Improve it further for tasks in CGroups. In particular, for cross-CPU comparisons, we were previously going to the root-level se(s) for both the task being compared. That was strange. This patch instead finds

[PATCH -tip 19/32] entry/idle: Enter and exit kernel protection during idle entry and exit

2020-11-17 Thread Joel Fernandes (Google)
Add a generic_idle_{enter,exit} helper function to enter and exit kernel protection when entering and exiting idle, respectively. While at it, remove a stale RCU comment. Reviewed-by: Alexandre Chartre Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) ---

[PATCH -tip 32/32] sched: Debug bits...

2020-11-17 Thread Joel Fernandes (Google)
Tested-by: Julien Desfossez Not-Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 35 ++- kernel/sched/fair.c | 9 + 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH -tip 31/32] sched: Add a coresched command line option

2020-11-17 Thread Joel Fernandes (Google)
Some hardware such as certain AMD variants don't have cross-HT MDS/L1TF issues. Detect this and don't enable core scheduling as it can needlessly slow those device down. However, some users may want core scheduling even if the hardware is secure. To support them, add a coresched= option which

[PATCH v12 0/5] Add NUMA-awareness to qspinlock

2020-11-17 Thread Alex Kogan
Minor change from v11: Fix documentation issue, as requested by Randy Dunlap and Longman. The rest of the series is unchanged. Summary --- Lock throughput can be increased by handing a lock to a waiter on the same NUMA node as the lock holder, provided care is taken to

[PATCH -tip 30/32] Documentation: Add core scheduling documentation

2020-11-17 Thread Joel Fernandes (Google)
Document the usecases, design and interfaces for core scheduling. Co-developed-by: Vineeth Pillai Signed-off-by: Vineeth Pillai Tested-by: Julien Desfossez Reviewed-by: Randy Dunlap Signed-off-by: Joel Fernandes (Google) --- .../admin-guide/hw-vuln/core-scheduling.rst | 330

[PATCH -tip 13/32] sched: Trivial forced-newidle balancer

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra When a sibling is forced-idle to match the core-cookie; search for matching tasks to fill the core. rcu_read_unlock() can incur an infrequent deadlock in sched_core_balance(). Fix this by using the RCU-sched flavor instead. Acked-by: Paul E. McKenney Tested-by: Julien

[PATCH -tip 29/32] sched: Move core-scheduler interfacing code to a new file

2020-11-17 Thread Joel Fernandes (Google)
core.c is already huge. The core-tagging interface code is largely independent of it. Move it to its own file to make both files easier to maintain. Also make the following changes: - Fix SWA bugs found by Chris Hyser. - Fix refcount underrun caused by not zero'ing new task's cookie. Tested-by:

[PATCH -tip 03/32] sched/fair: Fix pick_task_fair crashes due to empty rbtree

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra pick_next_entity() is passed curr == NULL during core-scheduling. Due to this, if the rbtree is empty, the 'left' variable is set to NULL within the function. This can cause crashes within the function. This is not an issue if put_prev_task() is invoked on the currently

[PATCH v12 2/5] locking/qspinlock: Refactor the qspinlock slow path

2020-11-17 Thread Alex Kogan
Move some of the code manipulating the spin lock into separate functions. This would allow easier integration of alternative ways to manipulate that lock. Signed-off-by: Alex Kogan Reviewed-by: Steve Sistare Reviewed-by: Waiman Long --- kernel/locking/qspinlock.c | 38

[PATCH -tip 26/32] sched: Add a second-level tag for nested CGroup usecase

2020-11-17 Thread Joel Fernandes (Google)
From: Josh Don Google has a usecase where the first level tag to tag a CGroup is not sufficient. So, a patch is carried for years where a second tag is added which is writeable by unprivileged users. Google uses DAC controls to make the 'tag' possible to set only by root while the second-level

[PATCH -tip 28/32] kselftest: Add tests for core-sched interface

2020-11-17 Thread Joel Fernandes (Google)
Add a kselftest test to ensure that the core-sched interface is working correctly. Tested-by: Julien Desfossez Reviewed-by: Josh Don Signed-off-by: Joel Fernandes (Google) --- tools/testing/selftests/sched/.gitignore | 1 + tools/testing/selftests/sched/Makefile| 14 +

[PATCH v12 5/5] locking/qspinlock: Avoid moving certain threads between waiting queues in CNA

2020-11-17 Thread Alex Kogan
Prohibit moving certain threads (e.g., in irq and nmi contexts) to the secondary queue. Those prioritized threads will always stay in the primary queue, and so will have a shorter wait time for the lock. Signed-off-by: Alex Kogan Reviewed-by: Steve Sistare Reviewed-by: Waiman Long ---

[PATCH -tip 27/32] sched/debug: Add CGroup node for printing group cookie if SCHED_DEBUG

2020-11-17 Thread Joel Fernandes (Google)
This will be used by kselftest to verify the CGroup cookie value that is set by the CGroup interface. Reviewed-by: Josh Don Tested-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 31 +++ 1 file changed, 31 insertions(+) diff

[PATCH -tip 25/32] sched: Refactor core cookie into struct

2020-11-17 Thread Joel Fernandes (Google)
From: Josh Don The overall core cookie is currently a single unsigned long value. This poses issues as we seek to add additional sub-fields to the cookie. This patch refactors the core_cookie to be a pointer to a struct containing an arbitrary set of cookie fields. We maintain a sorted RB tree

[PATCH -tip 23/32] sched: Add a per-thread core scheduling interface

2020-11-17 Thread Joel Fernandes (Google)
Add a per-thread core scheduling interface which allows a thread to share a core with another thread, or have a core exclusively for itself. ChromeOS uses core-scheduling to securely enable hyperthreading. This cuts down the keypress latency in Google docs from 150ms to 50ms while improving the

[PATCH -tip 24/32] sched: Release references to the per-task cookie on exit

2020-11-17 Thread Joel Fernandes (Google)
During exit, we have to free the references to a cookie that might be shared by many tasks. This commit therefore ensures when the task_struct is released, any references to cookies that it holds are also released. Reviewed-by: Chris Hyser Tested-by: Julien Desfossez Signed-off-by: Joel

[PATCH -tip 22/32] sched: Split the cookie and setup per-task cookie on fork

2020-11-17 Thread Joel Fernandes (Google)
In order to prevent interference and clearly support both per-task and CGroup APIs, split the cookie into 2 and allow it to be set from either per-task, or CGroup API. The final cookie is the combined value of both and is computed when the stop-machine executes during a change of cookie. Also,

[PATCH -tip 20/32] entry/kvm: Protect the kernel when entering from guest

2020-11-17 Thread Joel Fernandes (Google)
From: Vineeth Pillai Similar to how user to kernel mode transitions are protected in earlier patches, protect the entry into kernel from guest mode as well. Tested-by: Julien Desfossez Reviewed-by: Joel Fernandes (Google) Reviewed-by: Alexandre Chartre Signed-off-by: Vineeth Pillai

[PATCH -tip 18/32] kernel/entry: Add support for core-wide protection of kernel-mode

2020-11-17 Thread Joel Fernandes (Google)
Core-scheduling prevents hyperthreads in usermode from attacking each other, but it does not do anything about one of the hyperthreads entering the kernel for any reason. This leaves the door open for MDS and L1TF attacks with concurrent execution sequences between hyperthreads. This patch

[PATCH -tip 17/32] arch/x86: Add a new TIF flag for untrusted tasks

2020-11-17 Thread Joel Fernandes (Google)
Add a new TIF flag to indicate whether the kernel needs to be careful and take additional steps to mitigate micro-architectural issues during entry into user or guest mode. This new flag will be used by the series to determine if waiting is needed or not, during exit to user or guest mode.

[PATCH -tip 16/32] irq_work: Cleanup

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Get rid of the __call_single_node union and clean up the API a little to avoid external code relying on the structure layout as much. (Needed for irq_work_is_busy() API in core-scheduling series). Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel)

[PATCH -tip 14/32] sched: migration changes for core scheduling

2020-11-17 Thread Joel Fernandes (Google)
From: Aubrey Li - Don't migrate if there is a cookie mismatch Load balance tries to move task from busiest CPU to the destination CPU. When core scheduling is enabled, if the task's cookie does not match with the destination CPU's core cookie, this task will be skipped by

[PATCH -tip 12/32] sched: Simplify the core pick loop for optimized case

2020-11-17 Thread Joel Fernandes (Google)
The core pick loop grew a lot of warts over time to support optimizations. Turns out that that directly doing a class pick before entering the core-wide pick is better for readability. Make the changes. Since this is a relatively new patch, make it a separate patch so that it is easier to revert

Re: [PATCH] interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes

2020-11-17 Thread Mike Tipton
On 11/12/2020 2:51 AM, Georgi Djakov wrote: Some nodes are incorrectly marked as RPM-controlled (they have RPM master and slave ids assigned), but are actually controlled by the application CPU instead. The RPM complains when we send requests for resources that it can't control. Let's fix this

[PATCH -tip 10/32] sched: Fix priority inversion of cookied task with sibling

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra The rationale is as follows. In the core-wide pick logic, even if need_sync == false, we need to go look at other CPUs (non-local CPUs) to see if they could be running RT. Say the RQs in a particular core look like this: Let CFS1 and CFS2 be 2 tagged CFS tags. Let RT1 be an

[PATCH -tip 11/32] sched: Enqueue task into core queue only after vruntime is updated

2020-11-17 Thread Joel Fernandes (Google)
A waking task may have its vruntime adjusted. However, the code right now puts it into the core queue without the adjustment. This means the core queue may have a task with incorrect vruntime, potentially a very long one. This may cause a task to get artificially boosted during picking. Fix it by

[PATCH -tip 07/32] sched: Add core wide task selection and scheduling.

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Instead of only selecting a local task, select a task for all SMT siblings for every reschedule on the core (irrespective which logical CPU does the reschedule). Tested-by: Julien Desfossez Reviewed-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel)

[PATCH -tip 02/32] sched: Introduce sched_class::pick_task()

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Because sched_class::pick_next_task() also implies sched_class::set_next_task() (and possibly put_prev_task() and newidle_balance) it is not state invariant. This makes it unsuitable for remote task selection. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra

[PATCH -tip 06/32] sched: Basic tracking of matching tasks

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Introduce task_struct::core_cookie as an opaque identifier for core scheduling. When enabled; core scheduling will only allow matching task to be on the core; where idle matches everything. When task_struct::core_cookie is set (and core scheduling is enabled) these tasks

[PATCH -tip 04/32] sched: Core-wide rq->lock

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Introduce the basic infrastructure to have a core wide rq->lock. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Julien Desfossez Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Joel Fernandes (Google) --- kernel/Kconfig.preempt |

[PATCH -tip 05/32] sched/fair: Add a few assertions

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) --- kernel/sched/fair.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

[PATCH -tip 01/32] sched: Wrap rq::lock access

2020-11-17 Thread Joel Fernandes (Google)
From: Peter Zijlstra In preparation of playing games with rq->lock, abstract the thing using an accessor. Tested-by: Julien Desfossez Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Julien Desfossez Signed-off-by: Joel Fernandes (Google) ---

[PATCH -tip 00/32] Core scheduling (v9)

2020-11-17 Thread Joel Fernandes (Google)
Core-Scheduling === Enclosed is series v9 of core scheduling. v9 is rebased on tip/master (fe4adf6f92c4 ("Merge branch 'irq/core'")).. I hope that this version is acceptable to be merged (pending any new review comments that arise) as the main issues in the past are all resolved: 1.

Re: possible deadlock in kill_fasync

2020-11-17 Thread syzbot
: 7c8ca812 Add linux-next specific files for 20201117 git tree: linux-next final oops: https://syzkaller.appspot.com/x/report.txt?x=12b4642950 console output: https://syzkaller.appspot.com/x/log.txt?x=14b4642950 kernel config: https://syzkaller.appspot.com/x/.config?x=ff4bc71371dc5b13

Re: [PATCH net-next 4/4] ptp: ptp_ines: use enum ptp_msg_type

2020-11-17 Thread kernel test robot
Hi Christian, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Christian-Eggers/net-ptp-introduce-enum-ptp_msg_type/20201118-033828 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

Re: Ping(3): [PATCH v4] : Add nitems()

2020-11-17 Thread Joseph Myers
On Tue, 17 Nov 2020, Alejandro Colomar via Libc-alpha wrote: > Nice! > Please update me on any feedback you receive. Apparently the author is planning new versions of those papers so WG14 discussion is waiting for those. > So glibc will basically hold this patch > at least until the WG answers

Re: [PATCH] interconnect: qcom: qcs404: Remove gpu and display nodes

2020-11-17 Thread Mike Tipton
On 11/11/2020 2:07 AM, Georgi Djakov wrote: The following errors are noticed during boot on a QCS404 board: [2.926647] qcom_icc_rpm_smd_send mas 6 error -6 [2.934573] qcom_icc_rpm_smd_send mas 8 error -6 These errors show when we try to configure the GPU and display nodes, which are

[PATCH v12 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock

2020-11-17 Thread Alex Kogan
In CNA, spinning threads are organized in two queues, a primary queue for threads running on the same node as the current lock holder, and a secondary queue for threads running on other nodes. After acquiring the MCS lock and before acquiring the spinlock, the MCS lock holder checks whether the

Re: [PATCH] powerpc: Drop -me200 addition to build flags

2020-11-17 Thread Michael Ellerman
On Mon, 16 Nov 2020 23:09:13 +1100, Michael Ellerman wrote: > Currently a build with CONFIG_E200=y will fail with: > > Error: invalid switch -me200 > Error: unrecognized option -me200 > > Upstream binutils has never supported an -me200 option. Presumably it > was supported at some point by

[PATCH v12 4/5] locking/qspinlock: Introduce starvation avoidance into CNA

2020-11-17 Thread Alex Kogan
Keep track of the time the thread at the head of the secondary queue has been waiting, and force inter-node handoff once this time passes a preset threshold. The default value for the threshold (10ms) can be overridden with the new kernel boot command-line option "numa_spinlock_threshold". The ms

[PATCH v12 1/5] locking/qspinlock: Rename mcs lock/unlock macros and make them more generic

2020-11-17 Thread Alex Kogan
The mcs unlock macro (arch_mcs_lock_handoff) should accept the value to be stored into the lock argument as another argument. This allows using the same macro in cases where the value to be stored when passing the lock is different from 1. Signed-off-by: Alex Kogan Reviewed-by: Steve Sistare

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Mathieu Desnoyers
- On Nov 17, 2020, at 5:19 PM, rostedt rost...@goodmis.org wrote: > On Tue, 17 Nov 2020 13:33:42 -0800 > Kees Cook wrote: > >> As I think got discussed in the thread, what you had here wouldn't work >> in a CFI build if the function prototype of the call site and the >> function don't

Re: [PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema

2020-11-17 Thread Reinette Chatre
Hi James, On 10/30/2020 9:11 AM, James Morse wrote: Move the names used for the schemata file out of the resource and into struct resctrl_schema. This allows one resource to have two different names, based on the other schema properties. This patch copies the names, eventually resctrl will

Re: [PATCH 2/2] fpga: dfl: look for vendor specific capability

2020-11-17 Thread matthew . gerlach
On Tue, 17 Nov 2020, Tom Rix wrote: On 11/16/20 5:25 PM, matthew.gerl...@linux.intel.com wrote: From: Matthew Gerlach A DFL may not begin at offset 0 of BAR 0. A PCIe vendor specific capability can be used to specify the start of a number of DFLs. Signed-off-by: Matthew Gerlach ---

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Mathieu Desnoyers
- On Nov 16, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > On Mon, 16 Nov 2020 16:34:41 -0500 (EST) > Mathieu Desnoyers wrote: [...] >> I think you'll want a WRITE_ONCE(old[i].func, tp_stub_func) here, matched >> with a READ_ONCE() in __DO_TRACE. This introduces a new situation

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Mathieu Desnoyers
- On Nov 17, 2020, at 5:16 PM, rostedt rost...@goodmis.org wrote: > On Tue, 17 Nov 2020 16:22:23 -0500 (EST) > Mathieu Desnoyers wrote: > >> If we don't call the stub, then there is no point in having the stub at >> all, and we should just compare to a constant value, e.g. 0x1UL. As far >>

Re: [PATCH] rtc: destroy mutex when releasing the device

2020-11-17 Thread Alexandre Belloni
On Tue, 10 Nov 2020 10:42:05 +0100, Bartosz Golaszewski wrote: > Not destroying mutexes doesn't lead to resource leak but it's the correct > thing to do for mutex debugging accounting. Applied, thanks! [1/1] rtc: destroy mutex when releasing the device commit:

Re: [RFC PATCH v3 9/9] ipu3-cio2: Add functionality allowing software_node connections to sensors on platforms designed for Windows

2020-11-17 Thread Dan Scally
On 17/11/2020 16:42, Andy Shevchenko wrote: > On Tue, Nov 17, 2020 at 2:02 PM Dan Scally wrote: >> On 16/11/2020 16:16, Andy Shevchenko wrote: >>> On Mon, Nov 16, 2020 at 02:15:01PM +, Dan Scally wrote: On 16/11/2020 14:10, Laurent Pinchart wrote: > I thought we were looking for ACPI

Re: Ping(3): [PATCH v4] : Add nitems()

2020-11-17 Thread Alejandro Colomar
Hi Joseph, On 11/17/20 11:44 PM, Joseph Myers wrote: > I've asked the WG14 reflector why N2529 (and N2530, though that one's not > relevant to this feature) doesn't seem to have made it onto a meeting > agenda yet, when there have been two WG14 meetings since that proposal was > made and a third

[GIT PULL] Kunit fixes update for Linux 5.10-rc5

2020-11-17 Thread Shuah Khan
Hi Linus, Please pull the following Kunit fixes update for Linux 5.10-rc5. This Kunit update for Linux 5.10-rc5 consists of several fixes Kunit documentation, tool, compile time fixes not pollute source directory, and fix to remove tools/testing/kunit/.gitattributes file. diff is attached.

Re: [PATCH] selftests/seccomp: sh: Fix register names

2020-11-17 Thread John Paul Adrian Glaubitz
On 11/17/20 9:56 PM, Kees Cook wrote: > It looks like the seccomp selftests were never actually built for sh. > This fixes it, though I don't have an environment to do a runtime test > of it yet. > > Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER") > Signed-off-by: Kees Cook > --- >

Re: [PATCH 0/8] rtc: rework resource management

2020-11-17 Thread Alexandre Belloni
On Mon, 9 Nov 2020 17:34:01 +0100, Bartosz Golaszewski wrote: > As discussed: this is my take on RTC devres. The series does a couple things: > it adds missing documentation of managed RTC functions, adds the 'devm_' > prefix > to managed APIs, makes the rtc_device struct unaware of being managed

Re: [PATCH] iommu/amd: Enforce 4k mapping for certain IOMMU data structures

2020-11-17 Thread Will Deacon
On Wed, Oct 28, 2020 at 11:18:24PM +, Suravee Suthikulpanit wrote: > AMD IOMMU requires 4k-aligned pages for the event log, the PPR log, > and the completion wait write-back regions. However, when allocating > the pages, they could be part of large mapping (e.g. 2M) page. > This causes #PF due

Re: [PATCH RFC v2 0/5] dwmac-meson8b: picosecond precision RX delay support

2020-11-17 Thread Martin Blumenstingl
Hi Kevin, On Sun, Nov 15, 2020 at 7:52 PM Martin Blumenstingl wrote: [...] > I have tested this on an X96 Air 4GB board (not upstream yet). [...] > Also I have tested this on a X96 Max board without any .dts changes can you please add this series to your testing branch? I am interested in

Re: [PATCH 08/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2020-11-17 Thread Reinette Chatre
Hi James, On 10/30/2020 9:11 AM, James Morse wrote: Now that resctrl has its own list of resources it is using, walk that list instead of the architectures list. This means resctrl has somewhere to keep schema properties with the resource that is using them. Most users of

Re: [Freedreno] [PATCH] drm/msm/dpu: Remove chatty vbif debug print

2020-11-17 Thread Stephen Boyd
Quoting abhin...@codeaurora.org (2020-11-17 12:34:56) > On 2020-11-17 09:26, Stephen Boyd wrote: > > I don't know what this debug print is for but it is super chatty, > > throwing 8 lines of debug prints in the logs every time we update a > > plane. It looks like it has no value. Let's nuke it so

Re: [PATCH] phy: amlogic: Replace devm_reset_control_array_get()

2020-11-17 Thread Martin Blumenstingl
Hi Yejune, On Tue, Nov 17, 2020 at 6:58 AM Yejune Deng wrote: > > devm_reset_control_array_get_exclusive() looks more readable > > Signed-off-by: Yejune Deng > --- > drivers/phy/amlogic/phy-meson-axg-pcie.c | 2 +- > drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +- >

Re: Ping(3): [PATCH v4] : Add nitems()

2020-11-17 Thread Joseph Myers
I've asked the WG14 reflector why N2529 (and N2530, though that one's not relevant to this feature) doesn't seem to have made it onto a meeting agenda yet, when there have been two WG14 meetings since that proposal was made and a third one coming up. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH RFC v2 3/5] net: stmmac: dwmac-meson8b: use picoseconds for the RGMII RX delay

2020-11-17 Thread Martin Blumenstingl
Hi Florian, On Tue, Nov 17, 2020 at 7:36 PM Florian Fainelli wrote: > > On 11/15/20 10:52 AM, Martin Blumenstingl wrote: > > Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX > > delay register which allows picoseconds precision. Parse the new > > "amlogic,rgmii-rx-delay-ps"

Re: [PATCH bpf-next v3 2/2] bpf: Add tests for bpf_lsm_set_bprm_opts

2020-11-17 Thread Daniel Borkmann
On 11/17/20 3:13 AM, KP Singh wrote: [...] + +static int run_set_secureexec(int map_fd, int secureexec) +{ + ^ same here + int child_pid, child_status, ret, null_fd; + + child_pid = fork(); + if (child_pid == 0) { + null_fd = open("/dev/null", O_WRONLY); +

Re: [PATCH v11 07/16] PCI/ERR: Simplify by computing pci_pcie_type() once

2020-11-17 Thread Kelley, Sean V
Hi Sathya, > On Nov 17, 2020, at 1:58 PM, Kuppuswamy, Sathyanarayanan > wrote: > > Hi, > > On 11/17/20 11:19 AM, Sean V Kelley wrote: >> Instead of calling pci_pcie_type(dev) twice, call it once and save the >> result. No functional change intended. > > Same optimization can be applied to

Re: [PATCH v3 00/14] iommu/amd: Add Generic IO Page Table Framework Support

2020-11-17 Thread Will Deacon
Hey Suravee (it's been a while!), On Fri, Nov 13, 2020 at 12:57:18PM +0700, Suravee Suthikulpanit wrote: > Please ignore to include the V3. I am working on V4 to resubmit. Please can you put me on CC for that? Thanks, Will

Re: [PATCH] iommu: fix return error code in iommu_probe_device()

2020-11-17 Thread Will Deacon
On Tue, Nov 17, 2020 at 07:11:28PM +0800, Yang Yingliang wrote: > On 2020/11/17 17:40, Lu Baolu wrote: > > On 2020/11/17 10:52, Yang Yingliang wrote: > > > If iommu_group_get() failed, it need return error code > > > in iommu_probe_device(). > > > > > > Fixes: cf193888bfbd ("iommu: Move new

Re: [PATCH bpf-next v3 1/2] bpf: Add bpf_lsm_set_bprm_opts helper

2020-11-17 Thread Daniel Borkmann
On 11/17/20 3:13 AM, KP Singh wrote: From: KP Singh The helper allows modification of certain bits on the linux_binprm struct starting with the secureexec bit which can be updated using the BPF_LSM_F_BPRM_SECUREEXEC flag. secureexec can be set by the LSM for privilege gaining executions to

Re: [PATCH v11 02/16] PCI/RCEC: Add RCEC class code and extended capability

2020-11-17 Thread Kelley, Sean V
Hi Sathya, Thanks for reviewing > On Nov 17, 2020, at 12:07 PM, Kuppuswamy, Sathyanarayanan > wrote: > > Hi, > > On 11/17/20 11:19 AM, Sean V Kelley wrote: >> From: Qiuxu Zhuo >> A PCIe Root Complex Event Collector (RCEC) has base class 0x08, sub-class >> 0x07, and programming interface

Re: [PATCH] spi: dw: Set transfer handler before unmasking the IRQs

2020-11-17 Thread Mark Brown
On Tue, 17 Nov 2020 12:40:54 +0300, Serge Semin wrote: > It turns out the IRQs most like can be unmasked before the controller is > enabled with no problematic consequences. The manual doesn't explicitly > state that, but the examples perform the controller initialization > procedure in that

Re: [PATCH] ASoC: intel: SND_SOC_INTEL_KEEMBAY should depend on ARCH_KEEMBAY

2020-11-17 Thread Mark Brown
On Tue, 10 Nov 2020 15:50:01 +0100, Geert Uytterhoeven wrote: > The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs. > Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about > this driver when configuring a kernel without Intel Keem Bay platform > support.

Re: [PATCH] ASoc: adi: Kconfig: Remove depends on for ADI reference designs

2020-11-17 Thread Mark Brown
On Tue, 10 Nov 2020 17:22:13 +0200, Alexandru Ardelean wrote: > Audio ADI reference designs are also used on some ZynqMP boards, and can > also be used on Intel FPGA boards and also on some more complex FPGA > combinations (FPGA cards connected through PCIe). > > This change removes the

Re: [PATCH] ASoC: Fix 7/8 spaces indentation in Kconfig

2020-11-17 Thread Mark Brown
On Tue, 10 Nov 2020 18:49:04 +0100, Geert Uytterhoeven wrote: > Some entries used 7 or 8 spaces instead if a single TAB. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: Fix 7/8 spaces indentation in Kconfig commit:

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