Re: [PATCH V12 08/14] riscv: qspinlock: Force virt_spin_lock for KVM guests

2024-01-03 Thread Leonardo Bras
On Mon, Dec 25, 2023 at 07:58:41AM -0500, guo...@kernel.org wrote: > From: Guo Ren > > Force to enable virt_spin_lock when KVM guest, because fair locks > have horrible lock 'holder' preemption issues. > > Suggested-by: Leonardo Bras > Link:

Re: [PATCH V12 07/14] riscv: qspinlock: Add virt_spin_lock() support for VM guest

2024-01-03 Thread Leonardo Bras
On Mon, Dec 25, 2023 at 07:58:40AM -0500, guo...@kernel.org wrote: > From: Guo Ren > > Add a static key controlling whether virt_spin_lock() should be > called or not. When running on bare metal set the new key to > false. > > The VM guests should fall back to a Test-and-Set spinlock, > because

Re: [PATCH V12 06/14] riscv: qspinlock: Introduce combo spinlock

2024-01-03 Thread Leonardo Bras
On Mon, Dec 25, 2023 at 07:58:39AM -0500, guo...@kernel.org wrote: > From: Guo Ren > > Combo spinlock could support queued and ticket in one Linux Image and > select them during boot time via command line. Here is the func > size (Bytes) comparison table below: > > TYPE : COMBO

Re: [PATCH v8] bus: mhi: host: Add tracing support

2024-01-03 Thread Krishna Chaitanya Chundru
Hi Steven, Can you please review this. Thanks & Regards, Krishna Chaitanya. On 12/7/2023 10:00 AM, Krishna chaitanya chundru wrote: This change adds ftrace support for following functions which helps in debugging the issues when there is Channel state & MHI state change and also when we

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Al Viro
On Wed, Jan 03, 2024 at 09:25:06PM -0500, Steven Rostedt wrote: > On Thu, 4 Jan 2024 01:48:37 + > Al Viro wrote: > > > On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > > > > > + /* Get the tracefs root from the parent */ > > > + inode = d_inode(dentry->d_parent); > > > +

Re: [PATCH] x86/kprobes: fix incorrect return address calculation in kprobe_emulate_call_indirect

2024-01-03 Thread Google
On Tue, 2 Jan 2024 17:33:45 -0600 Jinghao Jia wrote: > kprobe_emulate_call_indirect currently uses int3_emulate_call to emulate > indirect calls. However, int3_emulate_call always assumes the size of > the call to be 5 bytes when calculating the return address. This is > incorrect for

Re: [PATCH V12 03/14] riscv: errata: Move errata vendor func-id into vendorid_list.h

2024-01-03 Thread Leonardo Bras
On Mon, Dec 25, 2023 at 07:58:36AM -0500, guo...@kernel.org wrote: > From: Guo Ren > > Move errata vendor func-id definitions from errata_list into > vendorid_list.h. Unifying these definitions is also for following > rwonce errata implementation. > > Suggested-by: Leonardo Bras > Link:

Re: [PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers

2024-01-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Tue, 2 Jan 2024 12:59:04 -0800 you wrote: > Minor fix for virtio: code wanting to access the fields inside an skb > frag should use the skb_frag_*() helpers, instead of accessing the > fields directly. This

Re: [PATCH] virtiofs: use GFP_NOFS when enqueuing request through kworker

2024-01-03 Thread Matthew Wilcox
On Thu, Jan 04, 2024 at 09:58:05AM +0800, Hou Tao wrote: > static int virtio_fs_enqueue_req(struct virtio_fs_vq *fsvq, > - struct fuse_req *req, bool in_flight); > + struct fuse_req *req, bool in_flight, > +

[PATCH v2] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Instead of walking the dentries on mount/remount to update the gid values of all the dentries if a gid option is specified on mount, just update the root inode. Add .getattr, .setattr, and .permissions on the tracefs inode operations to update the permissions of

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Steven Rostedt
On Thu, 4 Jan 2024 01:48:37 + Al Viro wrote: > On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > > > + /* Get the tracefs root from the parent */ > > + inode = d_inode(dentry->d_parent); > > + inode = d_inode(inode->i_sb->s_root); > > That makes no sense. First of

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Steven Rostedt
On Thu, 4 Jan 2024 01:59:10 + Al Viro wrote: > On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > > > +static struct inode *instance_inode(struct dentry *parent, struct inode > > *inode) > > +{ > > + struct tracefs_inode *ti; > > + struct inode *root_inode; > > + > > +

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Al Viro
On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > +static struct inode *instance_inode(struct dentry *parent, struct inode > *inode) > +{ > + struct tracefs_inode *ti; > + struct inode *root_inode; > + > + root_inode = d_inode(inode->i_sb->s_root); > + > + /* If

[PATCH] virtiofs: use GFP_NOFS when enqueuing request through kworker

2024-01-03 Thread Hou Tao
From: Hou Tao When invoking virtio_fs_enqueue_req() through kworker, both the allocation of the sg array and the bounce buffer still use GFP_ATOMIC. Considering the size of both the sg array and the bounce buffer may be greater than PAGE_SIZE, use GFP_NOFS instead of GFP_ATOMIC to lower the

[PATCH v2 2/2] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The eventfs creates dynamically allocated dentries and inodes. Using the dcache_readdir() logic for its own directory lookups requires hiding the cursor of the dcache logic and playing games to allow the dcache_readdir() to still have access to the cursor while

[PATCH v2 1/2] eventfs: Remove "lookup" parameter from create_dir/file_dentry()

2024-01-03 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The "lookup" parameter is a way to differentiate the call to create_file/dir_dentry() from when it's just a lookup (no need to up the dentry refcount) and accessed via a readdir (need to up the refcount). But reality, it just makes the code more complex. Just up

[PATCH v2 0/2] eventfs: Don't use dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
After having a "pleasant" conversation with Linus over on the security mailing list, we came to the conclusion that eventfs should not be using the dcache_readdir() routine for iterating the entries of a directory (getdents()). Instead, the .open and .release callbacks of the directory file

Re: [PATCH 3/5] LoongArch/smp: Refine ipi ops on LoongArch platform

2024-01-03 Thread kernel test robot
Hi Bibo, kernel test robot noticed the following build warnings: [auto build test WARNING on 610a9b8f49fbcf1100716370d3b5f6f884a2835a] url: https://github.com/intel-lab-lkp/linux/commits/Bibo-Mao/LoongArch-KVM-Add-hypercall-instruction-emulation-support/20240103-151946 base

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Al Viro
On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > + /* Get the tracefs root from the parent */ > + inode = d_inode(dentry->d_parent); > + inode = d_inode(inode->i_sb->s_root); That makes no sense. First of all, for any positive dentry we have dentry->d_sb ==

[PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-03 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Instead of walking the dentries on mount/remount to update the gid values of all the dentries if a gid option is specified on mount, just update the root inode. Add .getattr, .setattr, and .permissions on the tracefs inode operations to update the permissions of

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 14:14, Al Viro wrote: > > On Wed, Jan 03, 2024 at 01:54:36PM -0800, Linus Torvalds wrote: > > > Again: UNTESTED, and meant as a "this is another way to avoid messing > > with the dentry tree manually, and just using the VFS interfaces we > > already have" > > That would

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Al Viro
On Wed, Jan 03, 2024 at 01:54:36PM -0800, Linus Torvalds wrote: > Again: UNTESTED, and meant as a "this is another way to avoid messing > with the dentry tree manually, and just using the VFS interfaces we > already have" That would break chown(), though. From conversation back in November:

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 14:04, Steven Rostedt wrote: > > I actually have something almost working too. Here's the WIP. It only works > for tracefs, and now eventfs needs to be updated as the "events" directory > no longer has the right ownership. So I need a way to link the eventfs > entries to use

[PATCH v4 2/2] remoteproc: enhance rproc_put() for clusters

2024-01-03 Thread Tanmay Shah
This patch enhances rproc_put() to support remoteproc clusters with multiple child nodes as in rproc_get_by_phandle(). Signed-off-by: Tarak Reddy Signed-off-by: Tanmay Shah --- drivers/remoteproc/remoteproc_core.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH v4 1/2] remoteproc: Make rproc_get_by_phandle() work for clusters

2024-01-03 Thread Tanmay Shah
From: Mathieu Poirier Multi-cluster remoteproc designs typically have the following DT declaration: remoteproc_cluster { compatible = "soc,remoteproc-cluster"; core0: core0 { compatible = "soc,remoteproc-core"

[PATCH v4 0/2] remoteproc: get rproc devices for clusters

2024-01-03 Thread Tanmay Shah
This series extends original patch and makes rproc_put() work for clusters along with rprog_get_by_phandle(). Changes in v4: - Retrieve cluster device using rproc->dev.parent->parent relation Changes in v3: - remove module_put call that was introduced in the patch by mistake - remove

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 13:54, Linus Torvalds wrote: > > Here's an updated patch that builds, and is PURELY AN EXAMPLE. Oh, and while doing this patch, I found another bug in tracefs, although it happily is one that doesn't have any way to trigger. Tracefs has code like this: if

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
On Wed, 3 Jan 2024 13:54:36 -0800 Linus Torvalds wrote: > On Wed, 3 Jan 2024 at 11:57, Linus Torvalds > wrote: > > > > Or, you know, you could do what I've told you to do at least TEN TIMES > > already, which is to not mess with any of this, and just implement the > > '->permission()' callback

Re: [PATCH 1/1] fs/proc: remove redudant comments from /proc/bootconfig

2024-01-03 Thread Paul E. McKenney
On Tue, Jan 02, 2024 at 06:19:37PM +0800, Zhenhua Huang wrote: > commit 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to > /proc/bootconfig") adds bootloader argument comments into /proc/bootconfig. > > /proc/bootconfig shows boot_command_line[] multiple times following > every xbc

Re: [syzbot] [fs?] [trace?] BUG: unable to handle kernel paging request in tracefs_apply_options

2024-01-03 Thread Steven Rostedt
On Wed, 03 Jan 2024 13:41:31 -0800 syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:453f5db0619e Merge tag 'trace-v6.7-rc7' of git://git.kerne.. > git tree: upstream > console+strace: https://syzkaller.appspot.com/x/log.txt?x=10ec3829e8 > kernel

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 11:57, Linus Torvalds wrote: > > Or, you know, you could do what I've told you to do at least TEN TIMES > already, which is to not mess with any of this, and just implement the > '->permission()' callback (and getattr() to just make 'ls' look sane > too, rather than silently

[syzbot] [fs?] [trace?] BUG: unable to handle kernel paging request in tracefs_apply_options

2024-01-03 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:453f5db0619e Merge tag 'trace-v6.7-rc7' of git://git.kerne.. git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=10ec3829e8 kernel config: https://syzkaller.appspot.com/x/.config?x=f8e72bae38c079e4

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 11:52, Steven Rostedt wrote: > > This doesn't work because for tracefs (not eventfs) the dentries are > created at boot up and before the file system is mounted. This means you > can't even set a gid in /etc/fstab. This will cause a regression. Which is why I suggested

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
On Wed, 3 Jan 2024 10:38:09 -0800 Linus Torvalds wrote: > @@ -332,10 +255,8 @@ static int tracefs_apply_options(struct super_block *sb, > bool remount) > if (!remount || opts->opts & BIT(Opt_uid)) > inode->i_uid = opts->uid; > > - if (!remount || opts->opts &

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 10:50, Steven Rostedt wrote: > I think these changes are a bit much for -rc8, don't you? Oh, absolutely. None of this is rc8 material apart from the oops fix in your pull request (which my patch that then removes the whole function did *not* have - so that patch won't

Re: [PATCH v8 3/3] remoteproc: zynqmp: parse TCM from device tree

2024-01-03 Thread Tanmay Shah
On 1/3/24 12:17 PM, Mathieu Poirier wrote: > On Fri, Dec 15, 2023 at 03:57:25PM -0800, Tanmay Shah wrote: > > ZynqMP TCM information is fixed in driver. Now ZynqMP TCM information > > s/"is fixed in driver"/"was fixed in driver" > > > is available in device-tree. Parse TCM information in driver

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
On Wed, 3 Jan 2024 10:38:09 -0800 Linus Torvalds wrote: > On Wed, 3 Jan 2024 at 10:12, Linus Torvalds > wrote: > > > > Much better. Now eventfs looks more like a real filesystem, and less > > like an eldritch horror monster that is parts of dcache tackled onto a > > pseudo-filesystem. > >

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 10:12, Linus Torvalds wrote: > > Much better. Now eventfs looks more like a real filesystem, and less > like an eldritch horror monster that is parts of dcache tackled onto a > pseudo-filesystem. Oh, except I think you still need to just remove the 'set_gid()' mess. It's

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
On Wed, 3 Jan 2024 10:12:08 -0800 Linus Torvalds wrote: > On Wed, 3 Jan 2024 at 07:24, Steven Rostedt wrote: > > > > Instead, just have eventfs have its own iterate_shared callback function > > that will fill in the dent entries. This simplifies the code quite a bit. > > Much better. Now

Re: [PATCH v8 2/3] dts: zynqmp: add properties for TCM in remoteproc

2024-01-03 Thread Tanmay Shah
On 1/3/24 11:54 AM, Mathieu Poirier wrote: > Hi Tanmay, > > On Fri, Dec 15, 2023 at 03:57:24PM -0800, Tanmay Shah wrote: > > Add properties as per new bindings in zynqmp remoteproc node > > to represent TCM address and size. > > > > This patch also adds alternative remoteproc node to represent

Re: [PATCH v8 3/3] remoteproc: zynqmp: parse TCM from device tree

2024-01-03 Thread Mathieu Poirier
On Fri, Dec 15, 2023 at 03:57:25PM -0800, Tanmay Shah wrote: > ZynqMP TCM information is fixed in driver. Now ZynqMP TCM information s/"is fixed in driver"/"was fixed in driver" > is available in device-tree. Parse TCM information in driver > as per new bindings. > > Signed-off-by: Tanmay Shah

Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Linus Torvalds
On Wed, 3 Jan 2024 at 07:24, Steven Rostedt wrote: > > Instead, just have eventfs have its own iterate_shared callback function > that will fill in the dent entries. This simplifies the code quite a bit. Much better. Now eventfs looks more like a real filesystem, and less like an eldritch horror

Re: [PATCH v8 2/3] dts: zynqmp: add properties for TCM in remoteproc

2024-01-03 Thread Mathieu Poirier
Hi Tanmay, On Fri, Dec 15, 2023 at 03:57:24PM -0800, Tanmay Shah wrote: > Add properties as per new bindings in zynqmp remoteproc node > to represent TCM address and size. > > This patch also adds alternative remoteproc node to represent > remoteproc cluster in split mode. By default lockstep

Re: [PATCH v6 09/12] x86/sgx: Restructure top-level EPC reclaim function

2024-01-03 Thread Dave Hansen
On 12/18/23 13:24, Haitao Huang wrote:> @Dave and @Michal, Your thoughts? Or could you confirm we should not > do reclaim per cgroup at all? What's the benefit of doing reclaim per cgroup? Is that worth the extra complexity? The key question here is whether we want the SGX VM to be complex and

Re: [PATCH 3/5] remoteproc: imx_rproc: Convert to dev_pm_domain_attach|detach_list()

2024-01-03 Thread Mathieu Poirier
On Wed, 3 Jan 2024 at 03:11, Ulf Hansson wrote: > > On Tue, 2 Jan 2024 at 19:41, Mathieu Poirier > wrote: > > > > Hi Ulf, > > > > I'm in agreement with the modifications done to imx_rproc.c and > > imx_dsp_rproc.c. > > There is one thing I am ambivalent on, please see below. > > > > On Thu,

[PATCH] eventfs: Stop using dcache_readdir() for getdents()

2024-01-03 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The eventfs creates dynamically allocated dentries and inodes. Using the dcache_readdir() logic for its own directory lookups requires hiding the cursor of the dcache logic and playing games to allow the dcache_readdir() to still have access to the cursor while

Re: [PATCH 1/5] PM: domains: Add helper functions to attach/detach multiple PM domains

2024-01-03 Thread Ulf Hansson
On Fri, 29 Dec 2023 at 21:21, Nikunj Kela wrote: > > > On 12/28/2023 3:41 AM, Ulf Hansson wrote: > > Attaching/detaching of a device to multiple PM domains has started to > > become a common operation for many drivers, typically during ->probe() and > > ->remove(). In most cases, this has lead to

[PATCH] virtiofs: limit the length of ITER_KVEC dio by max_nopage_rw

2024-01-03 Thread Hou Tao
From: Hou Tao When trying to insert a 10MB kernel module kept in a virtiofs with cache disabled, the following warning was reported: [ cut here ] WARNING: CPU: 2 PID: 439 at mm/page_alloc.c:4544 .. Modules linked in: CPU: 2 PID: 439 Comm: insmod Not tainted

Re: [PATCH 3/5] remoteproc: imx_rproc: Convert to dev_pm_domain_attach|detach_list()

2024-01-03 Thread Ulf Hansson
On Tue, 2 Jan 2024 at 19:41, Mathieu Poirier wrote: > > Hi Ulf, > > I'm in agreement with the modifications done to imx_rproc.c and > imx_dsp_rproc.c. > There is one thing I am ambivalent on, please see below. > > On Thu, Dec 28, 2023 at 12:41:55PM +0100, Ulf Hansson wrote: > > Let's avoid the

[PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2024-01-03 Thread Yunsheng Lin
introduce vhost_net_test basing on virtio_test to test vhost_net changing in the kernel. Signed-off-by: Yunsheng Lin --- tools/virtio/Makefile | 8 +- tools/virtio/vhost_net_test.c | 574 ++ 2 files changed, 579 insertions(+), 3 deletions(-) create

[PATCH net-next 5/6] net: introduce page_frag_cache_drain()

2024-01-03 Thread Yunsheng Lin
When draining a page_frag_cache, most user are doing the similar steps, so introduce an API to avoid code duplication. Signed-off-by: Yunsheng Lin Acked-by: Jason Wang --- drivers/net/ethernet/google/gve/gve_main.c | 11 ++- drivers/net/ethernet/mediatek/mtk_wed_wo.c | 17

[PATCH net-next 4/6] vhost/net: remove vhost_net_page_frag_refill()

2024-01-03 Thread Yunsheng Lin
The page frag in vhost_net_page_frag_refill() uses the 'struct page_frag' from skb_page_frag_refill(), but it's implementation is similar to page_frag_alloc_align() now. This patch removes vhost_net_page_frag_refill() by using 'struct page_frag_cache' instead of 'struct page_frag', and allocating

[PATCH net-next 2/6] page_frag: unify gfp bits for order 3 page allocation

2024-01-03 Thread Yunsheng Lin
Currently there seems to be three page frag implementions which all try to allocate order 3 page, if that fails, it then fail back to allocate order 0 page, and each of them all allow order 3 page allocation to fail under certain condition by using specific gfp bits. The gfp bits for order 3 page

Re: [PATCH 4/5] LoongArch: Add paravirt interface for guest kernel

2024-01-03 Thread maobibo
On 2024/1/3 下午4:14, Juergen Gross wrote: On 03.01.24 09:00, maobibo wrote: On 2024/1/3 下午3:40, Jürgen Groß wrote: On 03.01.24 08:16, Bibo Mao wrote: The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And

Re: [PATCH 4/5] LoongArch: Add paravirt interface for guest kernel

2024-01-03 Thread Juergen Gross
On 03.01.24 09:00, maobibo wrote: On 2024/1/3 下午3:40, Jürgen Groß wrote: On 03.01.24 08:16, Bibo Mao wrote: The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And returns true it is KVM hypervisor, else

Re: [PATCH 4/5] LoongArch: Add paravirt interface for guest kernel

2024-01-03 Thread maobibo
On 2024/1/3 下午3:40, Jürgen Groß wrote: On 03.01.24 08:16, Bibo Mao wrote: The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And returns true it is KVM hypervisor, else return false. Currently only KVM