Re: [PATCH v3 5/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2020-11-30 Thread Christoph Hellwig
> +#ifndef CONFIG_DMA_NONCOHERENT I think you need to drop this ifdef. This code should work just fine on noncoherent mips and sh platforms. > + uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size, > + _urb->dma, > +

Re: [PATCH v3 5/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2020-11-30 Thread Christoph Hellwig
On Thu, Nov 26, 2020 at 08:44:50PM +0900, Sergey Senozhatsky wrote: > > + uvc_urb->buffer = vmap(uvc_urb->pages, > > + PAGE_ALIGN(stream->urb_size) >> PAGE_SHIFT, > > + VM_DMA_COHERENT, PAGE_KERNEL); > > This is not related to Ricardo's patch,

Re: [PATCH] riscv/mm: Prevent kernel module access user-space memory without uaccess routines

2020-11-30 Thread Christoph Hellwig
> + if (!user_mode(regs) && addr < TASK_SIZE && unlikely(!(regs->status & > SR_SUM))) Please avoid the overly long line.

Re: [PATCH 3/6] dma-iommu: remove __iommu_dma_mmap

2020-11-30 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 04:38:42PM +0100, Ricardo Ribalda wrote: > From: Christoph Hellwig > > The function has a single caller, so open code it there and take > advantage of the precalculated page count variable. > > Signed-off-by: Christoph Hellwig It turns out this isn

Re: [PATCH 2/6] dma-direct: use __GFP_ZERO in dma_direct_alloc_pages

2020-11-30 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 04:38:41PM +0100, Ricardo Ribalda wrote: > From: Christoph Hellwig > > Prepare for supporting the DMA_ATTR_NO_KERNEL_MAPPING flag in > dma_alloc_pages. > > Signed-off-by: Christoph Hellwig FYI, this patch should be dropped as I've implemented

Re: 5.10 regression caused by: "uas: fix sdev->host->dma_dev": many XHCI swiotlb buffer is full / DMAR: Device bounce map failed errors on thunderbolt connected XHCI controller

2020-11-28 Thread Christoph Hellwig
Can you give this one-liner a spin? diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index c6622011d4938c..e889111b55c71d 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4007,6 +4007,7 @@ static const struct dma_map_ops bounce_dma_ops = {

Re: [PATCH 1/6] seq_file: add seq_read_iter

2020-11-27 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 03:29:42AM +, Al Viro wrote: > > Still good. > > > > Tested-by: Nathan Chancellor > > Pushed into #fixes Shouldn't this go to Linus before v5.10 is released?

Re: 5.10 regression caused by: "uas: fix sdev->host->dma_dev": many XHCI swiotlb buffer is full / DMAR: Device bounce map failed errors on thunderbolt connected XHCI controller

2020-11-27 Thread Christoph Hellwig
On Fri, Nov 27, 2020 at 01:32:16PM +0100, Hans de Goede wrote: > I ran some more tests, I can confirm that reverting: > > 5df7ef7d32fe "uas: bump hw_max_sectors to 2048 blocks for SS or faster drives" > 558033c2828f "uas: fix sdev->host->dma_dev" > > Makes the problem go away while running a

Re: linux-next: build failure after merge of the dma-mapping tree

2020-11-27 Thread Christoph Hellwig
I fixed this as shown: diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index c724548ca295c0..111249fd619de8 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -10,6 +10,7 @@ #include #include +#ifdef

Re: linux-next: build failure after merge of the dma-mapping tree

2020-11-27 Thread Christoph Hellwig
On Fri, Nov 27, 2020 at 05:58:01PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the dma-mapping tree, today's linux-next build (powerpc64 > allnoconfig) failed like this: I'm looking into fixing this now, but how do you generate a powerpc64 allnoconfig? My attempts so far either

Re: [PATCH] dma-mapping: Fix sizeof() mismatch on tsk allocation

2020-11-26 Thread Christoph Hellwig
On Wed, Nov 25, 2020 at 06:49:19PM +, Colin Ian King wrote: > On 25/11/2020 18:29, Christoph Hellwig wrote: > > I'll fold this one in as well. > > > OK, so two SoB's disappear? Yes, and are replaced by an annotation about folded fixes, just like for all kinds of other commits.

Re: [PATCH] ima: Don't modify file descriptor mode on the fly

2020-11-26 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-26 Thread Christoph Hellwig
On Thu, Nov 26, 2020 at 05:48:25PM +0800, Yicong Yang wrote: > Sorry for not describing the issues I met correctly in the commit message. > Actually we're using inline function vfs_stat() for getting the > attributes, which calls vfs_fstatat(): Again, there generally isn't much need to look at

Re: kconfig as a git subtree on Linux

2020-11-26 Thread Christoph Hellwig
On Wed, Nov 25, 2020 at 05:25:44PM +, Luis Chamberlain wrote: > I'd like to propose we discuss the possibility of taking kconfig and > making it a git subtree under the Linux kernel. This would allow > other projects outside of the Linux kernel to be able to update their > own copy / fork of

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-26 Thread Christoph Hellwig
On Thu, Nov 26, 2020 at 05:08:26PM +0800, Yicong Yang wrote: > > And why would you want to use them in kernel module? Please explain > > that in the patch that exports them, and please send that patch in the > > same series as the patches adding the users. > > we're using it in the modules for

Re: [PATCH] drm/ttm: don't set page->mapping

2020-11-25 Thread Christoph Hellwig
On Wed, Nov 25, 2020 at 07:57:20PM -0400, Jason Gunthorpe wrote: > annotate is OK, I used that for a long time.. > > My main gripe was it didn't setup the to/cc until after the annotate > editor closes. I put the To/Cc into the cover letter text file.

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-25 Thread Christoph Hellwig
On Thu, Nov 26, 2020 at 03:15:48PM +0800, Yicong Yang wrote: > The public function vfs_stat() and vfs_fstatat() are > unexported after moving out of line in > commit 09f1bde4017e ("fs: move vfs_fstatat out of line"), > which will prevent the using in kernel modules. > So make them exported. And

Re: [PATCH] dma-mapping: Fix sizeof() mismatch on tsk allocation

2020-11-25 Thread Christoph Hellwig
I'll fold this one in as well.

Re: [PATCH] dma-mapping: fix an uninitialized pointer read due to typo in argp assignment

2020-11-25 Thread Christoph Hellwig
Ooops, that was my edit. I'll make sure to fold the fix into the original commit.

Re: [PATCH] drm/ttm: don't set page->mapping

2020-11-25 Thread Christoph Hellwig
On Wed, Nov 25, 2020 at 02:06:06PM -0400, Jason Gunthorpe wrote: > It uses a empty 'cover-letter' commit and automatically transforms it > into exactly the right stuff. Keeps track of everything you send in > git, and there is a little tool to auto-run git range-diff to help > build change logs..

Re: linux-next: manual merge of the rdma tree with the arm-soc tree

2020-11-25 Thread Christoph Hellwig
On Wed, Nov 25, 2020 at 12:33:51PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > include/linux/dma-mapping.h > > between commit: > > 16fee29b0735 ("dma-mapping: remove the dma_direct_set_offset export") > > from the arm-soc

Re: [PATCH] syscalls: Document OCI seccomp filter interactions & workaround

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 03:08:09PM +0100, Florian Weimer wrote: > Do you categorically reject the general advice, or specific instances as > well? All of the above. Really, if people decided to use seccompt to return nonsensical error codes we should not work around that in new kernel ABIs.

Re: [PATCH] syscalls: Document OCI seccomp filter interactions & workaround

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 03:08:05PM +0100, Mark Wielaard wrote: > For valgrind the issue is statx which we try to use before falling back > to stat64, fstatat or stat (depending on architecture, not all define > all of these). The problem with these fallbacks is that under some > containers

Re: [EXT] Re: [PATCH v1 1/2] mmc: Support kmsg dumper based on pstore/blk

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 03:40:21PM +0100, Ulf Hansson wrote: > It looks like Christoph is planning for some rewrite of the pstore > code, so let's see what that means in regards to this. Here is what I posted last month: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/pstore

Re: [PATCH v2 2/2] uuid: Make guid_t completely internal type to the kernel

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 04:07:45PM +0200, Andy Shevchenko wrote: > > > > IMHO we should kill this header entirely and move the definition to > > under a new name so that no one picks up the > > definition by accident. > > I would like to do that in a separate series. Here I don't change the

Re: [PATCH] dma-contiguous: fix a typo error in cma comment.

2020-11-24 Thread Christoph Hellwig
Thanks, applied.

Re: [PATCH v2 2/2] uuid: Make guid_t completely internal type to the kernel

2020-11-24 Thread Christoph Hellwig
On Fri, Oct 30, 2020 at 08:49:50PM +0200, Andy Shevchenko wrote: > diff --git a/include/uapi/linux/uuid.h b/include/uapi/linux/uuid.h > index e5a7eecef7c3..c3e175f686f4 100644 > --- a/include/uapi/linux/uuid.h > +++ b/include/uapi/linux/uuid.h > @@ -1,6 +1,6 @@ > /* SPDX-License-Identifier:

Re: [PATCH] syscalls: Document OCI seccomp filter interactions & workaround

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 01:08:20PM +0100, Florian Weimer wrote: > This documents a way to safely use new security-related system calls > while preserving compatibility with container runtimes that require > insecure emulation (because they filter the system call by default). > Admittedly, it is

Re: [PATCH] WIP! media: uvcvideo: Use dma_alloc_noncontiguos API

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 01:01:33PM +0100, Ricardo Ribalda wrote: > I was hoping that you could answer that question :). > > Do you have other use-cases than linux-media in mind? > > I think Sergey wants to experiment also with vb2, to figure out how > much it affects it. > His change will be

Re: [PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc()

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 06:45:31PM +0800, Zhen Lei wrote: > krealloc() does the free operation when the parameter new_size is 0, with > ZERO_SIZE_PTR returned. Because all other places use NULL to check whether > if_data is available or not, so covert it from ZERO_SIZE_PTR to NULL. This new code

Re: [PATCH 1/2] xfs: check the return value of krealloc()

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 06:45:30PM +0800, Zhen Lei wrote: > krealloc() may fail to expand the memory space. Add sanity checks to it, > and WARN() if that really happened. What part of the __GFP_NOFAIL semantics isn't clear enough?

Re: [PATCH] zlib: define get_unaligned16() only when used

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 12:08:40PM +0100, Jann Horn wrote: > > Since commit acaab7335bd6 ("lib/zlib: remove outdated and incorrect > > pre-increment optimization"), get_unaligned16() is only used when > > !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. > > > > Hence, make CC=clang W=1 warns: > > > >

Re: [PATCH] [PATCH] Adding offset keeping option when mapping data via SWIOTLB.

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 02:18:07PM -0800, Jianxiong Gao wrote: > NVMe driver and other applications may depend on the data offset > to operate correctly. Currently when unaligned data is mapped via > SWIOTLB, the data is mapped as slab aligned with the SWIOTLB. When > booting with --swiotlb=force

Re: [PATCH v2 1/2] mmc: Support kmsg dumper based on pstore/blk

2020-11-24 Thread Christoph Hellwig
Please hold this off for now. I have a major rewrite of the pstore/blk interface pending..

Re: [PATCH] WIP! media: uvcvideo: Use dma_alloc_noncontiguos API

2020-11-24 Thread Christoph Hellwig
On Wed, Nov 18, 2020 at 03:25:46PM +0100, Ricardo Ribalda wrote: > On architectures where the is no coherent caching such as ARM use the > dma_alloc_noncontiguos API and handle manually the cache flushing using > dma_sync_single(). > > With this patch on the affected architectures we can measure

Re: [PATCH 5.11] block: optimise for_each_bvec() advance

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 10:21:23AM +, Pavel Begunkov wrote: > Because of how for_each_bvec() works it never advances across multiple > entries at a time, so bvec_iter_advance() is an overkill. Add > specialised bvec_iter_advance_single() that is faster. It also handles > zero-len bvecs, so can

Re: 5.10 regression, many XHCI swiotlb buffer is full / DMAR: Device bounce map failed errors on thunderbolt connected XHCI controller

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 03:49:09PM +0100, Hans de Goede wrote: > Hi, > > +Cc Christoph Hellwig > > Christoph, this is still an issue, so I've been looking around a bit and > think this > might have something to do with the dma-mapping-5.10 changes. > > Do you ha

Re: [PATCH RFC 01/10] vmalloc: Add basic perm alloc implementation

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 12:01:35AM +, Edgecombe, Rick P wrote: > Another option could be putting the new metadata in vm_struct and just > return that, like get_vm_area(). Then we don't need to invent a new > struct. But then normal vmalloc()'s would have a bit of wasted memory > since they

Re: [PATCH 9/9] blktrace: make relay callbacks const

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:29PM +0200, Jani Nikula wrote: > Now that relay_open() accepts const callbacks, make relay callbacks > const. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 8/9] ath9k: make relay callbacks const

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:28PM +0200, Jani Nikula wrote: > Now that relay_open() accepts const callbacks, make relay callbacks > const. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 7/9] ath11k: make relay callbacks const

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:27PM +0200, Jani Nikula wrote: > Now that relay_open() accepts const callbacks, make relay callbacks > const. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 6/9] ath10k: make relay callbacks const

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:26PM +0200, Jani Nikula wrote: > Now that relay_open() accepts const callbacks, make relay callbacks > const. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 5/9] drm/i915: make relay callbacks const

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:25PM +0200, Jani Nikula wrote: > Now that relay_open() accepts const callbacks, make relay callbacks > const. > > Cc: intel-...@lists.freedesktop.org > Signed-off-by: Jani Nikula Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 4/9] relay: allow the use of const callback structs

2020-11-24 Thread Christoph Hellwig
ev_subbuf, prev_padding); Otherwise this looks good to me: Reviewed-by: Christoph Hellwig

Re: [PATCH 3/9] relay: make create_buf_file and remove_buf_file callbacks mandatory

2020-11-24 Thread Christoph Hellwig
al. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/9] relay: require non-NULL callbacks in relay_open()

2020-11-24 Thread Christoph Hellwig
On Mon, Nov 23, 2020 at 07:59:22PM +0200, Jani Nikula wrote: > There are no clients passing NULL callbacks, which makes sense as it > wouldn't even create a file. Require non-NULL callbacks, and throw away > the handling for NULL callbacks. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 1/3] LICENSES: Add the CC-BY-4.0 license

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 10:31:33AM +0100, Thorsten Leemhuis wrote: > Am 24.11.20 um 10:18 schrieb Christoph Hellwig: >> On Tue, Nov 24, 2020 at 09:00:01AM +0100, Thorsten Leemhuis wrote: >>> For context: Patch 2 of this series adds a text to the Documentation/ >>> d

Re: [PATCH 1/9] relay: remove unused buf_mapped and buf_unmapped callbacks

2020-11-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 1/3] LICENSES: Add the CC-BY-4.0 license

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 09:00:01AM +0100, Thorsten Leemhuis wrote: > For context: Patch 2 of this series adds a text to the Documentation/ > directory > which (for now) uses "GPL-2.0+ OR CC-BY-4.0", as I want to make it easy and > attractive for others to base their work on it. I'm not strongly

Re: linux-next: build failure after merge of the arm-soc tree

2020-11-24 Thread Christoph Hellwig
On Tue, Nov 24, 2020 at 09:31:15AM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the arm-soc tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > drivers/soc/sunxi/sunxi_mbus.c: In function 'sunxi_mbus_notifier': > drivers/soc/sunxi/sunxi_mbus.c:93:8:

Re: simplify pstore-blk

2020-11-23 Thread Christoph Hellwig
On Fri, Oct 16, 2020 at 03:54:25PM -0700, Kees Cook wrote: > On Fri, Oct 16, 2020 at 03:20:38PM +0200, Christoph Hellwig wrote: > > this series cleans up and massively simplifies the pstore-blk code, > > please take a look. > > Cool! Thanks for doing this work. I have a few t

Re: [PATCH 8/9] pstore/blk: use the normal block device I/O path

2020-11-23 Thread Christoph Hellwig
On Sun, Nov 08, 2020 at 10:43:29PM +0800, 廖威雄 wrote: > > + const char devname[] = "/dev/pstore-blk"; > > + dev_t dev = name_to_dev_t(blkdev); > > + > > + if (!dev) > > + return; > > + init_unlink(devname); > > + init_mknod(devname, S_IFBLK | 0600,

Re: [PATCH v5 3/7] iommu: Allow the dma-iommu api to use bounce buffers

2020-11-23 Thread Christoph Hellwig
> + /* > + * If both the physical buffer start address and size are > + * page aligned, we don't need to use a bounce page. > + */ > + if (IS_ENABLED(CONFIG_SWIOTLB) && dev_is_untrusted(dev) && > + iova_offset(iovad, phys | org_size)) { > + aligned_size =

Re: [PATCH v1 0/2] Add support to capture external module's SCM version

2020-11-23 Thread Christoph Hellwig
On Sat, Nov 21, 2020 at 01:16:49AM +, Will McVicker wrote: > These two patches add module support to capture an external module's SCM > version as a MODULE_INFO() attribute. This allows users to identity the SCM > version of a given kernel module by using the modinfo tool or on the device >

Re: [PATCH RFC 01/10] vmalloc: Add basic perm alloc implementation

2020-11-23 Thread Christoph Hellwig
First thanks for doing this, having a vmalloc variant that starts out with proper permissions has been on my todo list for a while. > +#define PERM_R 1 > +#define PERM_W 2 > +#define PERM_X 4 > +#define PERM_RWX (PERM_R | PERM_W | PERM_X) > +#define PERM_RW

Re: [PATCH 01/29] iov_iter: Switch to using a table of operations

2020-11-23 Thread Christoph Hellwig
On Sat, Nov 21, 2020 at 02:13:30PM +, David Howells wrote: > Switch to using a table of operations. In a future patch the individual > methods will be split up by type. For the moment, however, the ops tables > just jump directly to the old functions - which are now static. Inline >

Re: [PATCH v2 1/2] iov_iter: optimise iov_iter_npages for bvec

2020-11-20 Thread Christoph Hellwig
On Fri, Nov 20, 2020 at 02:54:57AM +, Matthew Wilcox wrote: > On Fri, Nov 20, 2020 at 02:25:08AM +, Pavel Begunkov wrote: > > On 20/11/2020 02:22, Ming Lei wrote: > > > iov_iter_npages(bvec) still can be improved a bit by the following way: > > > > Yep, was doing exactly that, +a couple

Re: [PATCH v2] nvme: Cache DMA descriptors to prevent corruption.

2020-11-20 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 05:27:37PM -0800, Tom Roeder wrote: > This patch changes the NVMe PCI implementation to cache host_mem_descs > in non-DMA memory instead of depending on descriptors stored in DMA > memory. This change is needed under the malicious-hypervisor threat > model assumed by the

Re: [PATCH 0/1] x86: restore the write back cache of reserved RAM in iounmap()

2020-11-19 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 12:59:01PM -0500, Andrea Arcangeli wrote: > Hello everyone, > > We identified some PCD set on the direct mapping causing hardly > reproducible performance issues and this patch fixes the ultimate root > cause. > > The caller for now has been tweaked to avoid triggering

Re: [PATCH v2] eventfd: convert to ->write_iter()

2020-11-19 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 07:00:19PM +0100, Michal Kubecek wrote: > While eventfd ->read() callback was replaced by ->read_iter() recently by > commit 12aceb89b0bc ("eventfd: convert to f_op->read_iter()"), ->write() > was not replaced. > > Convert also ->write() to ->write_iter() to make the

Re: [PATCH 2/2] iov_iter: optimise iter type checking

2020-11-19 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 03:29:43PM +, Pavel Begunkov wrote: > The problem here is that iov_iter_is_*() helpers check types for > equality, but all iterate_* helpers do bitwise ands. This confuses > a compiler, so even if some cases were handled separately with > iov_iter_is_*(), it can't

Re: [PATCH 1/6] relay: allow the use of const callback structs

2020-11-19 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 08:11:20AM +, Christoph Hellwig wrote: > Please also add a patch to mark all rchan_callbacks instances const > while you're at it. Oops, I just noticed you actually sent that one.

Re: [PATCH 1/6] relay: allow the use of const callback structs

2020-11-19 Thread Christoph Hellwig
> +/* > + * rchan_callback wrappers. Call the callbacks if available, otherwise fall > back > + * to default behaviour. > + */ This adds an overly long line. That being said this behavior is pretty normal for kernel APIs, so I'm not even sure we need it at all. > + > +/* > + * subbuf_start()

Re: [PATCH 0/7] sunxi: Remove the calls to dma_direct_set_offset

2020-11-19 Thread Christoph Hellwig
On Mon, Nov 09, 2020 at 10:43:03AM +0100, Maxime Ripard wrote: > Hi Christoph, Chen-Yu, Hans, > > On Fri, Nov 06, 2020 at 05:07:37PM +0100, Christoph Hellwig wrote: > > Thanks, > > > > this looks good to me: > > > > Reviewed-by: Christoph Hellwig > &g

Re: [PATCH v5] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-11-18 Thread Christoph Hellwig
On Wed, Nov 18, 2020 at 08:12:43PM +, Ashish Kalra wrote: > From: Ashish Kalra > > For SEV, all DMA to and from guest has to use shared > (un-encrypted) pages. SEV uses SWIOTLB to make this > happen without requiring changes to device drivers. > However, depending on workload being run, the

Re: [PATCH] eventfd: convert to ->write_iter()

2020-11-18 Thread Christoph Hellwig
On Wed, Nov 18, 2020 at 10:19:17AM +0100, Michal Kubecek wrote: > While eventfd ->read() callback was replaced by ->read_iter() recently, > it still provides ->write() for writes. Since commit 4d03e3cc5982 ("fs: > don't allow kernel reads and writes without iter ops"), this prevents >

Re: possible deadlock in brd_probe

2020-11-17 Thread Christoph Hellwig
I think this is a false positive due to the cycling through different bd_mutex instances. I think my next big series aimed at 5.11 will fix this as a side effect, so I plan to ignore this for now, but will test the reproducer with the follow on work applied eventually. On Tue, Nov 17, 2020 at

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-17 Thread Christoph Hellwig
On Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote: > The dma_declare_coherent_memory allows to associate vdev0buffer memory region > to the remoteproc virtio device (vdev parent). This region is used to > allocated > the rpmsg buffers. > The memory for the rpmsg buffer is allocated

Re: [PATCH] Revert "mm/vunmap: add cond_resched() in vunmap_pmd_range"

2020-11-17 Thread Christoph Hellwig
Btw, I remember that the whole vmalloc magic in zsmalloc was only giving a small benefit for a few niche use cases. Given that it generally has very strange interaction with the vmalloc core, including using various APIs not used by any driver I'm going to ask once again why we can't just drop

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

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 09:37:32AM -0800, Linus Torvalds wrote: > > This discussion seems to be going down the path of requiring an IMA > > filesystem hook for reading the file, again. That solution was > > rejected, not by me. What is new this time? > > You can't read a non-read-opened file.

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 03:07:20PM -0500, Jonathan Marek wrote: > qcom's vulkan driver has nonCoherentAtomSize=1, and it looks like > dma_sync_single_for_cpu() does deal in some way with the partial cache line > case, although I'm not sure that means we can have a nonCoherentAtomSize=1. No, it

Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-16 Thread Christoph Hellwig
> +#define FAST_COPY_SAFEGUARD_SIZE (sizeof(long) * 2 - 1) > + > +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > + > +/* > + * The caller must ensure that the output buffer has enough space (len + > FAST_COPY_SAFEGUARD_SIZE), > + * so we can write 2 words per loop without overflowing the output

Re: [RFC PATCH 3/9] cxl/mem: Add a driver for the type-3 mailbox

2020-11-16 Thread Christoph Hellwig
On Wed, Nov 11, 2020 at 09:17:37AM -0800, Dan Williams wrote: > > > +config CXL_MEM > > > +tristate "CXL.mem Device Support" > > > +depends on PCI && CXL_BUS_PROVIDER != n > > > > depend on PCI && CXL_BUS_PROVIDER > > > > > +default m if CXL_BUS_PROVIDER > > > > Please

Re: [PATCH v5 1/9] lib: zstd: Add zstd compatibility wrapper

2020-11-16 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 02:24:35PM -0500, Chris Mason wrote: > I think APIs change based on the needs of the project. We do this all the > time in the kernel, and we don???t think twice about updating users of the > API as needed. We update kernel APIs when: - we need additional functionality

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
Btw, I also still don't understand why remoteproc is using dma_declare_coherent_memory to start with. The virtio code has exactly one call to dma_alloc_coherent vring_alloc_queue, a function that already switches between two different allocators. Why can't we just add a third allocator

Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-16 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 03:16:01AM +0800, zengzhao...@163.com wrote: > From: Zhaoxiu Zeng > > Copying the matched bytes from the back output buffer is the > key code of the LZ decompression algorithm which used by zlib, lzo, etc. > > This patch introduce the optimized copy_from_back function. >

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 01:07:28PM +, Alexander Lobakin wrote: > But lots of subsystems like netdev for example uses dev->parent for > DMA operations. I know that their pointers go directly to the > platform/PCI/etc. device, but still. Oh, every drivers is perfectly fine to use ->parent as it

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 04:51:49AM -0500, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2020 at 09:19:50AM +0000, Christoph Hellwig wrote: > > I just noticed this showing up in Linus' tree and I'm not happy. > > > > This whole model of the DMA subdevices in remoteproc is simpl

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 11:46:59AM +0100, Arnaud POULIQUEN wrote: > Hi all, > > On 11/16/20 10:19 AM, Christoph Hellwig wrote: > > I just noticed this showing up in Linus' tree and I'm not happy. > > > > This whole model of the DMA subdevices in remoteproc is simply

Re: [PATCH] kthread_worker: Add flush delayed work func

2020-11-16 Thread Christoph Hellwig
On Wed, Nov 11, 2020 at 05:13:55PM +0800, qiang.zh...@windriver.com wrote: > From: Zqiang > > Add 'kthread_flush_delayed_work' func, the principle of > this func is wait for a dwork to finish executing the > last queueing. Who is going to use it? And why? Please document this and resend it

Re: [PATCH] syscalls: Fix file comments for syscalls implemented in kernel/sys.c

2020-11-16 Thread Christoph Hellwig
On Thu, Nov 12, 2020 at 04:56:57PM -0500, Tal Zussman wrote: > The relevant syscalls were previously moved from kernel/timer.c to > kernel/sys.c, > but the comments weren't updated to reflect this change. > > Fixing these comments messes up the alphabetical ordering of syscalls by > filename.

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

2020-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2020 at 08:52:19AM +, Roberto Sassu wrote: > FMODE_CAN_READ was not set because f_mode does not have > FMODE_READ. In the patch, I check if the former can be set > similarly to the way it is done in file_table.c and open.c. > > Is there a better way to read a file when the

Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial

2020-11-16 Thread Christoph Hellwig
I just noticed this showing up in Linus' tree and I'm not happy. This whole model of the DMA subdevices in remoteproc is simply broken. We really need to change the virtio code pass an expicit DMA device ( similar to what e.g. the USB and RDMA code does), instead of faking up devices with broken

Re: [PATCH] scsi: sd: remove obsolete variable in sd_remove()

2020-11-16 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-16 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 01:18:37PM -0800, Raj, Ashok wrote: > On Sat, Nov 14, 2020 at 10:34:30AM +0000, Christoph Hellwig wrote: > > On Thu, Nov 12, 2020 at 11:42:46PM +0100, Thomas Gleixner wrote: > > > DMI vendor name is pretty good final check when the bit is 0. The >

Re: [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-14 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek wrote: > +void msm_gem_sync_cache(struct drm_gem_object *obj, uint32_t flags, > + size_t range_start, size_t range_end) > +{ > + struct msm_gem_object *msm_obj = to_msm_bo(obj); > + struct device *dev =

Re: [RESEND PATCH v2 2/5] dma-direct: add dma_direct_bypass() to force direct ops

2020-11-14 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 10:17:10AM -0500, Jonathan Marek wrote: > Add a function to force direct ops and disable swiotlb for a deivce. s/deivce/device/ > +#if IS_ENABLED(CONFIG_DMA_OPS_BYPASS) && > !IS_ENABLED(CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED) overly long line. > +#if

Re: [RESEND PATCH v2 3/5] drm/msm: call dma_direct_bypass()

2020-11-14 Thread Christoph Hellwig
On Sat, Nov 14, 2020 at 10:17:11AM -0500, Jonathan Marek wrote: > Always use direct dma ops and no swiotlb. > > Note: arm-smmu-qcom already avoids creating iommu dma ops, but not > everything uses arm-smmu-qcom and this also sets the dma mask. > > Signed-off-by: Jonathan Marek > --- >

Re: [PATCH] dma-pool: no need to check return value of debugfs_create functions

2020-11-14 Thread Christoph Hellwig
Thanks, applied.

Re: [PATCH kernel v4 2/2] powerpc/dma: Fallback to dma_ops when persistent memory present

2020-11-14 Thread Christoph Hellwig
On Thu, Oct 29, 2020 at 12:52:41PM +1100, Alexey Kardashevskiy wrote: > +EXPORT_SYMBOL_GPL(arch_dma_map_page_direct); I've dropped the unused exports and applied the series to dma-mapping-for-next.

Re: [PATCH 02/10] kernel: entry: Expose helpers to migrate TIF to SYSCALL_WORK flags

2020-11-14 Thread Christoph Hellwig
> +#ifdef CONFIG_GENERIC_ENTRY > +static inline void __set_task_syscall_work(struct thread_info *ti, int flag) > +{ > + set_bit(flag, (unsigned long *)>syscall_work); > +} > +static inline int __test_task_syscall_work(struct thread_info *ti, int flag) > +{ > + return test_bit(flag,

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

2020-11-14 Thread Christoph Hellwig
On Fri, Nov 13, 2020 at 09:01:32AM +0100, Roberto Sassu wrote: > Commit a1f9b1c0439db ("integrity/ima: switch to using __kernel_read") > replaced the __vfs_read() call in integrity_kernel_read() with > __kernel_read(), a new helper introduced by commit 61a707c543e2a ("fs: add > a __kernel_read

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-14 Thread Christoph Hellwig
On Thu, Nov 12, 2020 at 11:42:46PM +0100, Thomas Gleixner wrote: > DMI vendor name is pretty good final check when the bit is 0. The > strings I'm aware of are: > > QEMU, Bochs, KVM, Xen, VMware, VMW, VMware Inc., innotek GmbH, Oracle > Corporation, Parallels, BHYVE, Microsoft Corporation > >

Re: [RFC] depopulate_range_driver_managed() for removing page-table mappings for hot-added memory blocks

2020-11-14 Thread Christoph Hellwig
On Fri, Nov 13, 2020 at 06:41:22PM -0800, Sudarshan Rajagopalan wrote: > > Hello, > > When memory blocks are removed, along with removing the memmap entries, > memory resource and memory block devices, the arch specific > arch_remove_memory() is called which takes care of tearing down the >

Re: [PATCH v4 16/16] mm/filemap: Return only head pages from find_get_entries

2020-11-14 Thread Christoph Hellwig
structure > instead of open-coding how pvecs behave. This has the side-effect of > being able to append to a pagevec with existing contents, although we > don't make use of that functionality anywhere yet. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v4 13/16] mm: Pass pvec directly to find_get_entries

2020-11-14 Thread Christoph Hellwig
On Thu, Nov 12, 2020 at 09:26:38PM +, Matthew Wilcox (Oracle) wrote: > + pvec->nr = ret; > return ret; Do we need to return the number of found entries in addition to storing it in the pagevec?

Re: [PATCH v4 11/16] mm: Add an 'end' parameter to pagevec_lookup_entries

2020-11-14 Thread Christoph Hellwig
on. I'd say the truncate_exceptional_pvec_entries simpliciation is a separate step and should normally be a separate patch. But otherwise this looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v4 14/16] mm: Remove pagevec_lookup_entries

2020-11-14 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v4 12/16] mm: Remove nr_entries parameter from pagevec_lookup_entries

2020-11-14 Thread Christoph Hellwig
On Thu, Nov 12, 2020 at 09:26:37PM +, Matthew Wilcox (Oracle) wrote: > All callers want to fetch the full size of the pvec. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Jan Kara > Reviewed-by: William Kucharski Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v4 10/16] mm: Add an 'end' parameter to find_get_entries

2020-11-14 Thread Christoph Hellwig
viewed-by: William Kucharski Looks good, Reviewed-by: Christoph Hellwig

<    5   6   7   8   9   10   11   12   13   14   >