Re: [PATCH v2 1/4] remoteproc: Add TEE support

2024-01-30 Thread Arnaud POULIQUEN
On 1/29/24 19:55, Mathieu Poirier wrote: > On Thu, Jan 18, 2024 at 11:04:30AM +0100, Arnaud Pouliquen wrote: >> From: Arnaud Pouliquen >> >> Add a remoteproc TEE (Trusted Execution Environment) device >> that will be probed by the TEE bus. If the associated Trusted >> application is supported

Re: [PATCH 1/3] dt-bindings: remoteproc: qcom,sm8550-pas: document the X1E80100 aDSP & cDSP

2024-01-30 Thread Krzysztof Kozlowski
On 29/01/2024 14:34, Abel Vesa wrote: > Document the aDSP and cDSP Peripheral Authentication Service on the > X1E80100 Platform. > > Signed-off-by: Abel Vesa > --- > Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by:

Re: [PATCH] media: dt-bindings: qcom,sc7280-venus: Allow one IOMMU entry

2024-01-30 Thread Vikash Garodia
Hello, On 1/30/2024 1:17 PM, Luca Weiss wrote: > On Mon Jan 29, 2024 at 6:37 PM CET, Conor Dooley wrote: >> On Mon, Jan 29, 2024 at 08:48:54AM +0100, Luca Weiss wrote: >>> Some SC7280-based boards crash when providing the "secure_non_pixel" >>> context bank, so allow only one iommu in the

Re: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address

2024-01-30 Thread Linus Torvalds
On Mon, 29 Jan 2024 at 19:56, Linus Torvalds wrote: > > But I've been staring at this code for too long, so I'm posting this > just as a "it's broken, but _something_ like this", because I'm taking > a break from looking at this. Bah. I literally woke up and realized what the problem is. We're

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

2024-01-30 Thread Manivannan Sadhasivam
On Fri, Jan 05, 2024 at 05:53:03PM +0530, 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 receive data and control events: > 1. mhi_intvec_mhi_states >

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Luis Chamberlain
Declaring rodata_enabled and mark_rodata_ro() at all time > >>>> helps removing related #ifdefery in C files. > >>>> > >>>> Signed-off-by: Christophe Leroy > >>> Very nice cleanup, thanks!, applied and pushed > >>> > >>>

Re: [RFC PATCH v2 3/8] ext2: Use dax_is_supported()

2024-01-30 Thread Jan Kara
On Tue 30-01-24 11:52:50, Mathieu Desnoyers wrote: > Use dax_is_supported() to validate whether the architecture has > virtually aliased data caches at mount time. Print an error and disable > DAX if dax=always is requested as a mount option on an architecture > which does not support DAX. > >

Re: [PATCH v3] virtio_net: Support RX hash XDP hint

2024-01-30 Thread Liang Chen
On Tue, Jan 30, 2024 at 7:53 PM Xuan Zhuo wrote: > > On Thu, 25 Jan 2024 18:19:12 +0800, Liang Chen > wrote: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost > > (still a work in progress

Re: [RFC PATCH v2 8/8] dax: Fix incorrect list of dcache aliasing architectures

2024-01-30 Thread Dave Chinner
On Tue, Jan 30, 2024 at 11:52:55AM -0500, Mathieu Desnoyers wrote: > commit d92576f1167c ("dax: does not work correctly with virtual aliasing > caches") > prevents DAX from building on architectures with virtually aliased > dcache with: > > depends on !(ARM || MIPS || SPARC) > > This check is

Re: [RFC PATCH v2 8/8] dax: Fix incorrect list of dcache aliasing architectures

2024-01-30 Thread Dan Williams
Dave Chinner wrote: > On Tue, Jan 30, 2024 at 11:52:55AM -0500, Mathieu Desnoyers wrote: > > commit d92576f1167c ("dax: does not work correctly with virtual aliasing > > caches") > > prevents DAX from building on architectures with virtually aliased > > dcache with: > > > > depends on !(ARM ||

[PATCH v2] tracefs: Zero out the tracefs_inode when allocating it

2024-01-30 Thread Steven Rostedt
From: "Steven Rostedt (Google)" eventfs uses the tracefs_inode and assumes that it's already initialized to zero. That is, it doesn't set fields to zero (like ti->private) after getting its tracefs_inode. This causes bugs due to stale values. Just initialize the entire structure to zero on

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 11:03:54 -0800 Linus Torvalds wrote: > -static void free_ei(struct eventfs_inode *ei) > +static inline struct eventfs_inode *alloc_ei(const char *name) > { > - kfree_const(ei->name); > - kfree(ei->d_children); > - kfree(ei->entry_attrs); > - kfree(ei); > +

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 12:55, Steven Rostedt wrote: > > I'm going to be putting back the ei->name pointer as the above actually > adds more memory usage. I did it mainly because I hate having multiple different allocation sites that then have to do that kref_init() etc individually, and once

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 14:56, Linus Torvalds wrote: > > With that, the base size of 'struct eventfs_inode' actually becomes 96 > bytes for me. It can be shrunk some more. The field ordering is suboptimal. Pointers are 8 bytes and 8-byte aligned, but 'struct kref' is just 4 bytes, and 'struct

Re: [PATCH 3/6] tracefs: dentry lookup crapectomy

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 06:55:36PM -0500, Steven Rostedt wrote: > Actually it's the tracefs_start_creating() locks the inode, the > eventfs_start_creating() doesn't. Right. > > > > > if (unlikely(!inode)) > > > return eventfs_failed_creating(dentry); > > > > ... and that still

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 11:03:54AM -0800, Linus Torvalds wrote: > inode = tracefs_get_inode(dentry->d_sb); > if (unlikely(!inode)) > - return eventfs_failed_creating(dentry); > + return ERR_PTR(-ENOMEM); That belongs in the lookup crapectomy patch - bisect

Re: [PATCH v8 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-01-30 Thread Haitao Huang
On Tue, 30 Jan 2024 09:22:14 -0600, Huang, Kai wrote: struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim) { + struct sgx_epc_cgroup *epc_cg; struct sgx_epc_page *page; + int ret; + + epc_cg = sgx_get_current_epc_cg(); + ret =

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 06:37:49PM -0800, Linus Torvalds wrote: > On Tue, 30 Jan 2024 at 17:12, Al Viro wrote: > > > > > + * > > > + * Note that d_revalidate is called potentially under RCU, > > > + * so it can't take the eventfs mutex etc. It's fine - if > > > + * we open a file just as it's

[PATCH v10] bus: mhi: host: Add tracing support

2024-01-30 Thread Krishna chaitanya chundru
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 receive data and control events: 1. mhi_intvec_mhi_states 2. mhi_process_data_event_ring 3. mhi_process_ctrl_ev_ring 4. mhi_gen_tre 5.

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

2024-01-30 Thread Tanmay Shah
On 1/17/24 12:58 PM, Mathieu Poirier wrote: > Alright, I spent several hours looking at this patchset and the driver as a > whole. I certainly salute your efforts to heed my advice and make the code > less > brittle but I'm afraid we are not there. Hi Mathieu, I am back from vacation.

Re: [RFC PATCH] kernel/module: add a safer implementation of try_module_get()

2024-01-30 Thread Luis Chamberlain
On Tue, Jan 30, 2024 at 08:36:14PM +0100, Marco Pagani wrote: > The current implementation of try_module_get() requires the module to > exist and be live as a precondition. While this may seem intuitive at > first glance, enforcing the precondition can be tricky, considering that > modules can be

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 13:52:05 -0800 Linus Torvalds wrote: > On Tue, 30 Jan 2024 at 12:55, Steven Rostedt wrote: > > > > I'm going to be putting back the ei->name pointer as the above actually > > adds more memory usage. > > I did it mainly because I hate having multiple different allocation >

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 13:52, Linus Torvalds wrote: > > Btw, you can look at name lengths in tracefs with something stupid like this: > > find . | sed 's:^.*/::' | tr -c '\n' . | sort | uniq -c Actually, since only directories have these 'ei' fields, that find should have "-type d", and then

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 14:58:26 -0800 Linus Torvalds wrote: > On Tue, 30 Jan 2024 at 14:55, Steven Rostedt wrote: > > > > Remember, the files don't have an ei allocated. Only directories. > > Crossed emails. > > > I then counted the length of the string - 7 bytes (which is the same as the > >

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

2024-01-30 Thread Krishna Chaitanya Chundru
On 1/30/2024 11:56 PM, Manivannan Sadhasivam wrote: On Tue, Jan 30, 2024 at 09:22:52AM -0500, Steven Rostedt wrote: On Tue, 30 Jan 2024 13:41:52 +0530 Manivannan Sadhasivam wrote: So same trace will get printed for both mhi_channel_command_start() and mhi_channel_command_end()? The

[PATCH v4] virtio_net: Support RX hash XDP hint

2024-01-30 Thread Liang Chen
The RSS hash report is a feature that's part of the virtio specification. Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost (still a work in progress as per [1]) support this feature. While the capability to obtain the RSS hash has been enabled in the normal path, it's

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 07:39:55PM -0800, Linus Torvalds wrote: > Why don't we, btw? It would be so much better if we did the > d_release() from __d_free(). We have all that smarts in fs/dcache.c to > decide if we need to RCU-delay it or not, and then we don't let > filesystems use it. Because

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 14:55, Steven Rostedt wrote: > > Remember, the files don't have an ei allocated. Only directories. Crossed emails. > I then counted the length of the string - 7 bytes (which is the same as the > length of the string plus the '\0' character - 8 bytes) to accommodate the >

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 15:06:13 -0800 Linus Torvalds wrote: > On Tue, 30 Jan 2024 at 14:56, Linus Torvalds > wrote: > > > > With that, the base size of 'struct eventfs_inode' actually becomes 96 > > bytes for me. > > It can be shrunk some more. > > The field ordering is suboptimal. Pointers

Re: [PATCH 3/6] tracefs: dentry lookup crapectomy

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 11:03:52AM -0800, Linus Torvalds wrote: > { > struct eventfs_inode *ei; > > - mutex_lock(_mutex); > do { > // The parent is stable because we do not do renames > dentry = dentry->d_parent; > @@ -247,7 +246,6 @@ static struct

Re: [kees:devel/overflow/sanitizers] [overflow] 660787b56e: UBSAN:signed-integer-overflow_in_lib/test_memcat_p.c

2024-01-30 Thread Kees Cook
On Tue, Jan 30, 2024 at 10:52:56PM +0800, kernel test robot wrote: > > > Hello, > > kernel test robot noticed > "UBSAN:signed-integer-overflow_in_lib/test_memcat_p.c" on: > > commit: 660787b56e6e97ddc34c7882cbe1228f4040ef74 ("overflow: Reintroduce > signed and unsigned overflow sanitizers")

Re: [PATCH RFC v3 04/35] mm: page_alloc: Partially revert "mm: page_alloc: remove stale CMA guard code"

2024-01-30 Thread Anshuman Khandual
On 1/30/24 17:27, Alexandru Elisei wrote: > Hi, > > On Tue, Jan 30, 2024 at 10:04:02AM +0530, Anshuman Khandual wrote: >> >> >> On 1/29/24 17:16, Alexandru Elisei wrote: >>> Hi, >>> >>> On Mon, Jan 29, 2024 at 02:31:23PM +0530, Anshuman Khandual wrote: On 1/25/24 22:12,

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 11:03:55 -0800 Linus Torvalds wrote: > Another thing that might be worth doing is to make all eventfs lookups > mark their dentries as not worth caching. We could do that with > d_delete(), but the DCACHE_DONTCACHE flag would likely be even better. > > As it is, the

Re: [PATCH 3/6] tracefs: dentry lookup crapectomy

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 11:03:52AM -0800, Linus Torvalds wrote: > The dentry lookup for eventfs files was very broken, and had lots of > signs of the old situation where the filesystem names were all created > statically in the dentry tree, rather than being looked up dynamically > based on the

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 15:10, Steven Rostedt wrote: > > > > At which point a name pointer would *just* fit in 96 bytes. > > Does that mean I should keep the kstrdup_const()? You should check that my math matches reality and relevant configurations, but yes, at 96 bytes that should fit exactly in

[PATCH v2 (3/6)] tracefs: dentry lookup crapectomy

2024-01-30 Thread Steven Rostedt
From: Linus Torvalds The dentry lookup for eventfs files was very broken, and had lots of signs of the old situation where the filesystem names were all created statically in the dentry tree, rather than being looked up dynamically based on the eventfs data structures. You could see it in the

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

2024-01-30 Thread Krishna Chaitanya Chundru
On 1/30/2024 1:41 PM, Manivannan Sadhasivam wrote: On Fri, Jan 05, 2024 at 05:53:03PM +0530, 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 receive

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 17:12, Al Viro wrote: > > > + * > > + * Note that d_revalidate is called potentially under RCU, > > + * so it can't take the eventfs mutex etc. It's fine - if > > + * we open a file just as it's marked dead, things will > > + * still work just fine, and just see the old

Re: [RFC PATCH v2 1/8] dax: Introduce dax_is_supported()

2024-01-30 Thread Dave Chinner
On Tue, Jan 30, 2024 at 11:52:48AM -0500, Mathieu Desnoyers wrote: > Introduce a new dax_is_supported() static inline to check whether the > architecture supports DAX. > > This replaces the following fs/Kconfig:FS_DAX dependency: > > depends on !(ARM || MIPS || SPARC) > > This is done in

Re: [RFC PATCH v2 7/8] Introduce dcache_is_aliasing() across all architectures

2024-01-30 Thread Dave Chinner
On Tue, Jan 30, 2024 at 11:52:54AM -0500, Mathieu Desnoyers wrote: > Introduce a generic way to query whether the dcache is virtually aliased > on all architectures. Its purpose is to ensure that subsystems which > are incompatible with virtually aliased data caches (e.g. FS_DAX) can > reliably

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 13:25, Steven Rostedt wrote: > > I actually find the dentry's sticking around when their ref counts go to > zero a feature. Tracing applications will open and close the eventfs files > many times. If the dentry were to be deleted on every close, it would need > to be create

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Beau Belgrave
On Tue, Jan 30, 2024 at 01:52:30PM -0500, Steven Rostedt wrote: > On Tue, 30 Jan 2024 10:05:15 -0800 > Beau Belgrave wrote: > > > On Mon, Jan 29, 2024 at 09:24:07PM -0500, Steven Rostedt wrote: > > > On Mon, 29 Jan 2024 09:29:07 -0800 > > > Beau Belgrave wrote: > > > > > > > Thanks, yeah

Re: [PATCH 3/6] tracefs: dentry lookup crapectomy

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 23:26:21 + Al Viro wrote: > On Tue, Jan 30, 2024 at 11:03:52AM -0800, Linus Torvalds wrote: > > The dentry lookup for eventfs files was very broken, and had lots of > > signs of the old situation where the filesystem names were all created > > statically in the dentry

Re: [PATCH 3/6] tracefs: dentry lookup crapectomy

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 16:23, Al Viro wrote: > > On Tue, Jan 30, 2024 at 11:03:52AM -0800, Linus Torvalds wrote: > > { > > struct eventfs_inode *ei; > > > > - mutex_lock(_mutex); > > do { > > // The parent is stable because we do not do renames > >

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Al Viro
On Tue, Jan 30, 2024 at 11:03:55AM -0800, Linus Torvalds wrote: > +void eventfs_d_release(struct dentry *dentry) > { > - struct eventfs_inode *ei; > - > - mutex_lock(_mutex); > - ei = dentry->d_fsdata; > - if (ei) { > - dentry->d_fsdata = NULL; > -

Re: [kees:devel/overflow/sanitizers] [overflow] 660787b56e: UBSAN:signed-integer-overflow_in_lib/test_memcat_p.c

2024-01-30 Thread Oliver Sang
hi, Kees, On Tue, Jan 30, 2024 at 04:23:06PM -0800, Kees Cook wrote: > On Tue, Jan 30, 2024 at 10:52:56PM +0800, kernel test robot wrote: > > ... > > while testing, we observed below different (and same part) between parent > > and > > this commit: > > > > ea804316c9db5148

Re: [PATCH v8 07/15] x86/sgx: Expose sgx_reclaim_pages() for cgroup

2024-01-30 Thread Haitao Huang
On Tue, 30 Jan 2024 09:39:44 -0600, Huang, Kai wrote: + * @lru: The LRU from which pages are reclaimed. + * @nr_to_scan: Pointer to the target number of pages to scan, must be less than + * SGX_NR_TO_SCAN. + * Return: Number of pages reclaimed. */ -static void

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 18:46, Al Viro wrote: > > What's to stop ->d_revalidate() from being called in parallel with > __dentry_kill()? Oh, you're right. For some reason I thought we did the d_release() _after_ the RCU grace period, but we don't. Why don't we, btw? It would be so much better if

Re: [PATCH RFC v3 06/35] mm: cma: Make CMA_ALLOC_SUCCESS/FAIL count the number of pages

2024-01-30 Thread Anshuman Khandual
On 1/30/24 17:28, Alexandru Elisei wrote: > Hi, > > On Tue, Jan 30, 2024 at 10:22:11AM +0530, Anshuman Khandual wrote: >> >> On 1/29/24 17:21, Alexandru Elisei wrote: >>> Hi, >>> >>> On Mon, Jan 29, 2024 at 02:54:20PM +0530, Anshuman Khandual wrote: On 1/25/24 22:12, Alexandru Elisei

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 21:09, Steven Rostedt wrote: > > I would think that the last "put" would always have the "is_freed" set. The > WARN_ON is to catch things doing too many put_ei(). Yes, that looks sane to me. > > + simple_recursive_removal(dentry, NULL); > > Actually, this doesn't

[PATCH 2/4] csky: apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
Apply the page shift to PFN to get physical address for final VA. The macro __va should take physical address instead of PFN as input. Fixes: c1884e1e1164 ("csky: Make pfn accessors static inlines") Signed-off-by: Yan Zhao --- arch/csky/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+),

[PATCH 1/4] asm-generic/page.h: apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
Apply the page shift to PFN to get physical address for final VA. The macro __va should take physical address instead of PFN as input. Fixes: 2d78057f0dd4 ("asm-generic/page.h: Make pfn accessors static inlines") Signed-off-by: Yan Zhao --- include/asm-generic/page.h | 2 +- 1 file changed, 1

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Christophe Leroy
gt;> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: >>>>>> Declaring rodata_enabled and mark_rodata_ro() at all time >>>>>> helps removing related #ifdefery in C files. >>>>>> >>>>>> Signed-off-by: Christophe Leroy >

Re: [PATCH RFC v3 11/35] mm: Allow an arch to hook into folio allocation when VMA is known

2024-01-30 Thread Anshuman Khandual
On 1/30/24 17:04, Alexandru Elisei wrote: > Hi, > > On Tue, Jan 30, 2024 at 03:25:20PM +0530, Anshuman Khandual wrote: >> >> On 1/25/24 22:12, Alexandru Elisei wrote: >>> arm64 uses VM_HIGH_ARCH_0 and VM_HIGH_ARCH_1 for enabling MTE for a VMA. >>> When VM_HIGH_ARCH_0, which arm64 renames to

Re: [PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Linus Walleij
On Wed, Jan 31, 2024 at 7:25 AM Yan Zhao wrote: > This is a tiny fix to pfn_to_virt() for some platforms. > > The original implementaion of pfn_to_virt() takes PFN instead of PA as the > input to macro __va, with PAGE_SHIFT applying to the converted VA, which > is not right under most

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 21:57, Linus Torvalds wrote: > > Ugh. Oh, and double-ugh on that tracefs_syscall_mkdir/rmdir(). I hate how it does that "unlock and re-lock inode" thing. It's a disease, and no, it's not an acceptable response to "lockdep shows there's a locking problem". The comment

[PATCH 4/4] openrisc: apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
Apply the page shift to PFN to get physical address for final VA. The macro __va should take physical address instead of PFN as input. Fixes: 232ba1630c66 ("openrisc: Make pfn accessors statics inlines") Signed-off-by: Yan Zhao --- arch/openrisc/include/asm/page.h | 2 +- 1 file changed, 1

[PATCH 3/4] Hexagon: apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
Apply the page shift to PFN to get physical address for final VA. The macro __va should take physical address instead of PFN as input. Fixes: d6e81532b10d ("Hexagon: Make pfn accessors statics inlines") Signed-off-by: Yan Zhao --- arch/hexagon/include/asm/page.h | 2 +- 1 file changed, 1

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 11:03:54 -0800 Linus Torvalds wrote: > +/* > + * eventfs_inode reference count management. > + * > + * NOTE! We count only references from dentries, in the > + * form 'dentry->d_fsdata'. There are also references from > + * directory inodes ('ti->private'), but the dentry

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 21:25:30 -0800 Linus Torvalds wrote: > > Does this work: > > > > d_invalidate(dentry); > > It does, but it's basically irrelevant with the d_revalidate approach. > > Basically, once you have d_revalidate(), the unhashing happens there, > and it's just extra work

Re: [PATCH 5/6] eventfs: get rid of dentry pointers without refcounts

2024-01-30 Thread Linus Torvalds
On Tue, 30 Jan 2024 at 21:33, Steven Rostedt wrote: > > With even the last patch included, without the d_invalidate() I get errors > with simply doing: > > # cd /sys/kernel/tracing > # mkdir instances/foo > # ls instances/foo/events > # rmdir instances/foo > > As the rmdir calls

Re: [PATCH RFC v3 07/35] mm: cma: Add CMA_RELEASE_{SUCCESS,FAIL} events

2024-01-30 Thread Anshuman Khandual
On 1/29/24 17:23, Alexandru Elisei wrote: > Hi, > > On Mon, Jan 29, 2024 at 03:01:24PM +0530, Anshuman Khandual wrote: >> >> On 1/25/24 22:12, Alexandru Elisei wrote: >>> Similar to the two events that relate to CMA allocations, add the >>> CMA_RELEASE_SUCCESS and CMA_RELEASE_FAIL events that

Re: [PATCH RFC v3 08/35] mm: cma: Introduce cma_alloc_range()

2024-01-30 Thread Anshuman Khandual
On 1/30/24 17:05, Alexandru Elisei wrote: > Hi, > > On Tue, Jan 30, 2024 at 10:50:00AM +0530, Anshuman Khandual wrote: >> >> On 1/25/24 22:12, Alexandru Elisei wrote: >>> Today, cma_alloc() is used to allocate a contiguous memory region. The >>> function allows the caller to specify the number

[PATCH 0/4] apply page shift to PFN instead of VA in pfn_to_virt

2024-01-30 Thread Yan Zhao
This is a tiny fix to pfn_to_virt() for some platforms. The original implementaion of pfn_to_virt() takes PFN instead of PA as the input to macro __va, with PAGE_SHIFT applying to the converted VA, which is not right under most conditions, especially when there's an offset in __va. Yan Zhao

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Christophe Leroy
n wrote: >> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: >>> Declaring rodata_enabled and mark_rodata_ro() at all time >>> helps removing related #ifdefery in C files. >>> >>> Signed-off-by: Christophe Leroy >> >> Very nice

Re: [PATCH RFC v3 09/35] mm: cma: Introduce cma_remove_mem()

2024-01-30 Thread Alexandru Elisei
Hi, I really appreciate the feedback you have given me so far. I believe the commit message isn't clear enough and there has been a confusion. A CMA user adds a CMA area to the cma_areas array with cma_declare_contiguous_nid() or cma_init_reserved_mem(). init_cma_reserved_pageblock() then

Re: [RFC PATCH 4/7] ext2: Use dax_is_supported()

2024-01-30 Thread Jan Kara
On Mon 29-01-24 16:06:28, Mathieu Desnoyers wrote: > Use dax_is_supported() to validate whether the architecture has > virtually aliased caches at mount time. > > This is relevant for architectures which require a dynamic check > to validate whether they have virtually aliased data caches >

[PATCH v3 0/5] PM: domains: Add helpers for multi PM domains to avoid open-coding

2024-01-30 Thread Ulf Hansson
Rafael, my plan is queue up this series via my pmdomain tree. Please let me know if you see any issues with that, especially around patch1. Updates in v3: - Added tested-by, reviewed-by and suggested-by tags. No other changes have been made. Updates in v2: - Ccing Daniel

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

2024-01-30 Thread Ulf Hansson
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 lots of boilerplate code in the drivers. To fixup up the situation, let's introduce a pair of helper

[PATCH v3 2/5] remoteproc: imx_dsp_rproc: Convert to dev_pm_domain_attach|detach_list()

2024-01-30 Thread Ulf Hansson
Let's avoid the boilerplate code to manage the multiple PM domain case, by converting into using dev_pm_domain_attach|detach_list(). Cc: Bjorn Andersson Cc: Shawn Guo Cc: Sascha Hauer Cc: Daniel Baluta Cc: Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Reviewed-by: Mathieu Poirier

[PATCH v3 4/5] remoteproc: qcom_q6v5_adsp: Convert to dev_pm_domain_attach|detach_list()

2024-01-30 Thread Ulf Hansson
Let's avoid some of the boilerplate code to manage the various PM domain cases, by converting into using dev_pm_domain_attach|detach_list(). As a part of the conversion, we are moving over to use device_links, which simplifies the runtime PM support too. Moreover, while attaching let's trust that

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

2024-01-30 Thread Ulf Hansson
Let's avoid the boilerplate code to manage the multiple PM domain case, by converting into using dev_pm_domain_attach|detach_list(). Cc: Bjorn Andersson Cc: Shawn Guo Cc: Sascha Hauer Cc: Daniel Baluta Cc: Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Reviewed-by: Mathieu Poirier

[PATCH v3 5/5] media: venus: Convert to dev_pm_domain_attach|detach_list() for vcodec

2024-01-30 Thread Ulf Hansson
Let's avoid some of the boilerplate code to manage the vcodec PM domains, by converting into using dev_pm_domain_attach|detach_list(). Cc: Mauro Carvalho Chehab Cc: Stanimir Varbanov Cc: Vikash Garodia Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Tested-by: Bryan O'Donoghue Reviewed-by: Bryan

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Chen-Yu Tsai
ed-off-by: Christophe Leroy > > Very nice cleanup, thanks!, applied and pushed > > Luis On next-20240130, which has your modules-next branch, and thus this series and the other "module: Use set_memory_rox()" series applied, my kernel crashes in some very weird way. Reverting yo

Re: [PATCH v13 3/6] tracing: Add snapshot refcount

2024-01-30 Thread Vincent Donnefort
s/Vincent-Donnefort/ring-buffer-Zero-ring-buffer-sub-buffers/20240129-223025 > base: 29142dc92c37d3259a33aef15b03e6ee25b0d188 > patch link: > https://lore.kernel.org/r/20240129142802.2145305-4-vdonnefort%40google.com > patch subject: [PATCH v13 3/6] tracing: Add snapshot refcount &

Re: [PATCH] media: dt-bindings: qcom,sc7280-venus: Allow one IOMMU entry

2024-01-30 Thread Krzysztof Kozlowski
On 29/01/2024 08:48, Luca Weiss wrote: > Some SC7280-based boards crash when providing the "secure_non_pixel" > context bank, so allow only one iommu in the bindings also. > > Signed-off-by: Luca Weiss > --- Acked-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [RFC PATCH 1/2] x86/kprobes: Prohibit kprobing on INT and UD

2024-01-30 Thread Google
On Mon, 29 Jan 2024 20:50:39 -0600 Jinghao Jia wrote: > On 1/29/24 19:44, Masami Hiramatsu (Google) wrote: > > On Sun, 28 Jan 2024 15:25:59 -0600 > > Jinghao Jia wrote: > > > /* Check if paddr is at an instruction boundary */ > static int can_probe(unsigned long paddr) > { >

Re: [PATCH RFC v3 10/35] mm: cma: Fast track allocating memory when the pages are free

2024-01-30 Thread Alexandru Elisei
Hi, On Tue, Jan 30, 2024 at 02:48:53PM +0530, Anshuman Khandual wrote: > > > On 1/25/24 22:12, Alexandru Elisei wrote: > > If the pages to be allocated are free, take them directly off the buddy > > allocator, instead of going through alloc_contig_range() and avoiding > > costly calls to

Re: [PATCH RFC v3 11/35] mm: Allow an arch to hook into folio allocation when VMA is known

2024-01-30 Thread Alexandru Elisei
Hi, On Tue, Jan 30, 2024 at 03:25:20PM +0530, Anshuman Khandual wrote: > > > On 1/25/24 22:12, Alexandru Elisei wrote: > > arm64 uses VM_HIGH_ARCH_0 and VM_HIGH_ARCH_1 for enabling MTE for a VMA. > > When VM_HIGH_ARCH_0, which arm64 renames to VM_MTE, is set for a VMA, and > > the gfp flag

Re: [PATCH RFC v3 06/35] mm: cma: Make CMA_ALLOC_SUCCESS/FAIL count the number of pages

2024-01-30 Thread Alexandru Elisei
Hi, On Tue, Jan 30, 2024 at 10:22:11AM +0530, Anshuman Khandual wrote: > > > On 1/29/24 17:21, Alexandru Elisei wrote: > > Hi, > > > > On Mon, Jan 29, 2024 at 02:54:20PM +0530, Anshuman Khandual wrote: > >> > >> > >> On 1/25/24 22:12, Alexandru Elisei wrote: > >>> The CMA_ALLOC_SUCCESS,

Re: [RFC PATCH 4/7] ext2: Use dax_is_supported()

2024-01-30 Thread Mathieu Desnoyers
On 2024-01-30 06:33, Jan Kara wrote: On Mon 29-01-24 16:06:28, Mathieu Desnoyers wrote: Use dax_is_supported() to validate whether the architecture has virtually aliased caches at mount time. This is relevant for architectures which require a dynamic check to validate whether they have

RE: [PATCH v8 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-01-30 Thread Huang, Kai
> struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim) { > + struct sgx_epc_cgroup *epc_cg; > struct sgx_epc_page *page; > + int ret; > + > + epc_cg = sgx_get_current_epc_cg(); > + ret = sgx_epc_cgroup_try_charge(epc_cg); > + if (ret) { > +

RE: [PATCH v8 07/15] x86/sgx: Expose sgx_reclaim_pages() for cgroup

2024-01-30 Thread Huang, Kai
> + * @lru: The LRU from which pages are reclaimed. > + * @nr_to_scan: Pointer to the target number of pages to scan, must be less > than > + * SGX_NR_TO_SCAN. > + * Return: Number of pages reclaimed. > */ > -static void sgx_reclaim_pages(void) > +unsigned int

Re: [RFC PATCH 7/7] xfs: Use dax_is_supported()

2024-01-30 Thread Mathieu Desnoyers
On 2024-01-29 21:38, Dave Chinner wrote: On Mon, Jan 29, 2024 at 04:06:31PM -0500, Mathieu Desnoyers wrote: Use dax_is_supported() to validate whether the architecture has virtually aliased caches at mount time. This is relevant for architectures which require a dynamic check to validate

[PATCH v5] remoteproc: Make rproc_get_by_phandle() work for clusters

2024-01-30 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"

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-01-30 Thread Vincent Donnefort
On Tue, Jan 30, 2024 at 11:55:10PM +0900, Masami Hiramatsu wrote: > Hi Vincent, > > Thanks for update the code. > > On Mon, 29 Jan 2024 14:27:58 + > Vincent Donnefort wrote: > > > In preparation for allowing the user-space to map a ring-buffer, add > > a set of mapping functions: > > > >

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-30 Thread Luis Chamberlain
On Tue, Jan 30, 2024 at 09:40:38AM +0800, Changbin Du wrote: > On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > > On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > > > do_free_init() into a

[kees:devel/overflow/sanitizers] [overflow] 660787b56e: UBSAN:signed-integer-overflow_in_lib/test_memcat_p.c

2024-01-30 Thread kernel test robot
42.924183][T1] ---[ end trace ]--- [ 42.925743][T1] test_memcat_p: test passed The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20240130/202401302219.db90a6d5-oliver.s...@intel.com -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Google
On Mon, 29 Jan 2024 09:29:07 -0800 Beau Belgrave wrote: > On Fri, Jan 26, 2024 at 03:04:45PM -0500, Steven Rostedt wrote: > > On Fri, 26 Jan 2024 11:10:07 -0800 > > Beau Belgrave wrote: > > > > > > OK, so the each different event has suffixed name. But this will > > > > introduce non

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-01-30 Thread Google
Hi Vincent, Thanks for update the code. On Mon, 29 Jan 2024 14:27:58 + Vincent Donnefort wrote: > In preparation for allowing the user-space to map a ring-buffer, add > a set of mapping functions: > > ring_buffer_{map,unmap}() > ring_buffer_map_fault() > > And controls on the

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

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 13:41:52 +0530 Manivannan Sadhasivam wrote: > So same trace will get printed for both mhi_channel_command_start() and > mhi_channel_command_end()? The trace output will also include the tracepoint name. That is, it will have the same content but will be preceded with:

Re: [linus:master] [eventfs] 852e46e239: BUG:unable_to_handle_page_fault_for_address

2024-01-30 Thread Steven Rostedt
On Tue, 30 Jan 2024 01:12:05 -0800 Linus Torvalds wrote: > On Tue, 30 Jan 2024 at 00:43, Linus Torvalds > wrote: > > > > I'll go back to bed, but I think the fix is something trivial like this: > > Almost. > > > + result = ERR_PTR(ENOENT); > > That needs a '-' in front of the

Re: [RFC PATCH 0/7] Introduce cache_is_aliasing() to fix DAX regression

2024-01-30 Thread Mathieu Desnoyers
On 2024-01-29 16:22, Dan Williams wrote: Mathieu Desnoyers wrote: This commit introduced in v5.13 prevents building FS_DAX on 32-bit ARM, even on ARMv7 which does not have virtually aliased dcaches: commit d92576f1167c ("dax: does not work correctly with virtual aliasing caches") It used to

Re: [PATCH RFC v3 04/35] mm: page_alloc: Partially revert "mm: page_alloc: remove stale CMA guard code"

2024-01-30 Thread Alexandru Elisei
Hi, On Tue, Jan 30, 2024 at 10:04:02AM +0530, Anshuman Khandual wrote: > > > On 1/29/24 17:16, Alexandru Elisei wrote: > > Hi, > > > > On Mon, Jan 29, 2024 at 02:31:23PM +0530, Anshuman Khandual wrote: > >> > >> > >> On 1/25/24 22:12, Alexandru Elisei wrote: > >>> The patch f945116e4e19 ("mm:

Re: [PATCH v2 4/4] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-01-30 Thread Arnaud POULIQUEN
On 1/26/24 18:11, Mathieu Poirier wrote: > On Thu, Jan 18, 2024 at 11:04:33AM +0100, Arnaud Pouliquen wrote: >> The new TEE remoteproc device is used to manage remote firmware in a >> secure, trusted context. The 'st,stm32mp1-m4-tee' compatibility is >> introduced to delegate the loading of the

Re: [PATCH v13 3/6] tracing: Add snapshot refcount

2024-01-30 Thread kernel test robot
: 29142dc92c37d3259a33aef15b03e6ee25b0d188 patch link: https://lore.kernel.org/r/20240129142802.2145305-4-vdonnefort%40google.com patch subject: [PATCH v13 3/6] tracing: Add snapshot refcount config: arc-randconfig-002-20240130 (https://download.01.org/0day-ci/archive/20240130/202401301740.qzzlpcyv-...@intel.com

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

2024-01-30 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

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

2024-01-30 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 v4 5/5] tools: virtio: introduce vhost_net_test

2024-01-30 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/.gitignore | 1 + tools/virtio/Makefile | 8 +- tools/virtio/vhost_net_test.c | 576 ++ 3 files changed, 582

Re: [PATCH RFC v3 23/35] arm64: mte: Try to reserve tag storage in arch_alloc_page()

2024-01-30 Thread Alexandru Elisei
Hi Peter, On Mon, Jan 29, 2024 at 04:04:18PM -0800, Peter Collingbourne wrote: > On Thu, Jan 25, 2024 at 8:45 AM Alexandru Elisei > wrote: > > > > Reserve tag storage for a page that is being allocated as tagged. This > > is a best effort approach, and failing to reserve tag storage is > >

  1   2   >