Re: UBSAN: shift-out-of-bounds in validate_sb_layout

2024-05-20 Thread Kent Overstreet
On Mon, May 20, 2024 at 10:31:53AM -0400, Steven Rostedt wrote: > On Mon, 20 May 2024 15:02:26 +0800 > "Ubisectech Sirius" wrote: > > > Hello. > > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > > Recently, our team has discovered a issue in Linux kernel 6.7.

Re: kernel BUG in ptr_stale

2024-05-09 Thread Kent Overstreet
On Thu, May 09, 2024 at 02:26:24PM +0800, Ubisectech Sirius wrote: > Hello. > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > Recently, our team has discovered a issue in Linux kernel 6.7. Attached to > the email were a PoC file of the issue. This (and several of

Re: [PATCH v4 00/15] mm: jit/text allocator

2024-04-11 Thread Kent Overstreet
On Thu, Apr 11, 2024 at 07:00:36PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > Since v3 I looked into making execmem more of an utility toolbox, as we > discussed at LPC with Mark Rutland, but it was getting more hairier than > having a struct describing architecture

Re: [FYI][PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-02-23 Thread Kent Overstreet
On Fri, Feb 23, 2024 at 01:46:53PM -0500, Steven Rostedt wrote: > On Fri, 23 Feb 2024 10:30:45 -0800 > Jeff Johnson wrote: > > > On 2/23/2024 9:56 AM, Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > > > [ > > >This is a treewide change. I will likely re-create this

Re: linux-next: Tree for Sep 12 (bcachefs)

2023-09-14 Thread Kent Overstreet
On Wed, Sep 13, 2023 at 06:17:00PM -0700, Kees Cook wrote: > On Tue, Sep 12, 2023 at 03:26:45PM +1000, Stephen Rothwell wrote: > > New tree: bcachefs > > Thanks for going through and fixing all the fake flexible array members. > It looks much nicer. :) > > I have some questions about the

Re: [GIT PULL] bcachefs

2023-09-09 Thread Kent Overstreet
On Wed, Sep 06, 2023 at 01:20:59PM -0700, Linus Torvalds wrote: > On Wed, 6 Sept 2023 at 13:02, Linus Torvalds > wrote: > > > > And guess what happens when you have (unsigned char)-1? It does *not* > > cast back to -1. > > Side note: again, this may be one of those "it works in practice", >

[PATCH 03/11] tools/testing/nvdimm: Convert to printbuf

2022-08-15 Thread Kent Overstreet
From: Kent Overstreet This converts from seq_buf to printbuf. Here we're using printbuf with an external buffer, meaning it's a direct conversion. Signed-off-by: Kent Overstreet Cc: Dan Williams Cc: Dave Hansen Cc: nvd...@lists.linux.dev Acked-by: Dan Williams Tested-By: Shivaprasad G Bhat

Re: [PATCH v5 24/32] tools/testing/nvdimm: Convert to printbuf

2022-08-08 Thread Kent Overstreet
On 8/8/22 14:30, Dan Williams wrote: Matthew Wilcox (Oracle) wrote: From: Kent Overstreet This converts from seq_buf to printbuf. Here we're using printbuf with an external buffer, meaning it's a direct conversion. Signed-off-by: Kent Overstreet Cc: Dan Williams Cc: Dave Hansen Cc: nvd

[PATCH v4 26/34] tools/testing/nvdimm: Convert to printbuf

2022-06-19 Thread Kent Overstreet
This converts from seq_buf to printbuf. Here we're using printbuf with an external buffer, meaning it's a direct conversion. Signed-off-by: Kent Overstreet Cc: Dan Williams Cc: Dave Hansen Cc: nvd...@lists.linux.dev --- tools/testing/nvdimm/test/ndtest.c | 22 ++ 1 file

[PATCH v3 26/33] tools/testing/nvdimm: Convert to printbuf

2022-06-04 Thread Kent Overstreet
This converts from seq_buf to printbuf. Here we're using printbuf with an external buffer, meaning it's a direct conversion. Signed-off-by: Kent Overstreet Cc: Dan Williams Cc: Dave Hansen Cc: nvd...@lists.linux.dev --- tools/testing/nvdimm/test/ndtest.c | 22 ++ 1 file

[PATCH v2 25/28] tools/testing/nvdimm: Convert to printbuf

2022-05-19 Thread Kent Overstreet
This converts from seq_buf to printbuf. Here we're using printbuf with an external buffer, meaning it's a direct conversion. Signed-off-by: Kent Overstreet Cc: Dan Williams Cc: Dave Hansen Cc: nvd...@lists.linux.dev --- tools/testing/nvdimm/test/ndtest.c | 22 ++ 1 file

Re: [RFC PATCH] percpu_ref: Make percpu_ref_tryget*() ACQUIRE operations

2021-04-15 Thread Kent Overstreet
On Thu, Apr 15, 2021 at 09:42:56PM -0700, Paul E. McKenney wrote: > On Tue, Apr 13, 2021 at 10:47:03AM +0800, Huang Ying wrote: > > One typical use case of percpu_ref_tryget() family functions is as > > follows, > > > > if (percpu_ref_tryget(>ref)) { > > /* Operate on the other fields of

Re: [PATCH 3/3] vfs: inode cache conversion to hash-bl

2021-04-06 Thread Kent Overstreet
3.36% insert_inode_locked > >- 78.43% do_filp_open > - 78.36% path_openat > - 53.95% bch2_create > - 47.99% __bch2_create > > - 7.57% inode_insert5 > 6.94% find_inode &

Re: [PATCH 2/3] hlist-bl: add hlist_bl_fake()

2021-04-06 Thread Kent Overstreet
't directly use > the VFS indoe cache. > > Signed-off-by: Dave Chinner Reviewed-by: Kent Overstreet > --- > include/linux/list_bl.h | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h &g

Re: [PATCH 1/3] vfs: factor out inode hash head calculation

2021-04-06 Thread Kent Overstreet
On Tue, Apr 06, 2021 at 10:33:41PM +1000, Dave Chinner wrote: > From: Dave Chinner > > In preparation for changing the inode hash table implementation. > > Signed-off-by: Dave Chinner Reviewed-by: Kent Overstreet > --- > fs/inode.c | 44 +---

Re: [RFC PATCH 0/3] vfs: convert inode cache to hlist-bl

2021-04-06 Thread Kent Overstreet
On Tue, Apr 06, 2021 at 10:33:40PM +1000, Dave Chinner wrote: > Hi folks, > > Recently I've been doing some scalability characterisation of > various filesystems, and one of the limiting factors that has > prevented me from exploring filesystem characteristics is the > inode hash table. namely,

Re: [PATCH v6 00/27] Memory Folios

2021-04-02 Thread Kent Overstreet
On Wed, Mar 31, 2021 at 07:47:01PM +0100, Matthew Wilcox (Oracle) wrote: > The medium-term goal is to convert all filesystems and some device > drivers to work in terms of folios. This series contains a lot of > explicit conversions, but it's important to realise it's removing a lot > of implicit

bcachefs snapshots design doc - RFC

2021-03-17 Thread Kent Overstreet
Snapshots for bcaches are well under way, and I've written a design doc for them. I'd love to get feedback on anything I might have missed, especially from the btrfs people. The current version of this document lives at https://bcachefs.org/Snapshots/ and the in-progress code lives at

bcachefs-for-review

2020-12-13 Thread Kent Overstreet
to b7ddbb0e20d2add011d8f5a035b04ca3ac8b34fa: bcachefs: Add some cond_rescheds() in shutdown path (2020-12-13 16:14:10 -0500) Justin Husted (2): bcachefs: Set lost+found mode to 0700 bcachefs: Update directory timestamps during link Kent Overstreet (408

bcachefs-for-review

2020-10-27 Thread Kent Overstreet
Here's where bcachefs is at and what I'd like to get merged: https://evilpiepirate.org/git/bcachefs.git/log/?h=bcachefs-for-review Non bcachefs prep patches: Compiler Attributes: add __flatten locking: SIX locks (shared/intent/exclusive) mm: export find_get_pages_range()

[PATCH v2 1/2] fs: Break generic_file_buffered_read up into multiple functions

2020-10-25 Thread Kent Overstreet
is intended to be relatively minimal. Signed-off-by: Kent Overstreet Cc: Matthew Wilcox (Oracle) Cc: Jens Axboe --- mm/filemap.c | 473 --- 1 file changed, 261 insertions(+), 212 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index

[PATCH v2 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-10-25 Thread Kent Overstreet
on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). Signed-off-by: Kent

[PATCH v2 0/2] generic_file_buffered_read() improvements

2020-10-25 Thread Kent Overstreet
Rebased onto current mainline - this series already included Jens' patch for IOCB_WAITQ behaviour so nothing changed, but Jens might want to glance at it. Kent Overstreet (2): fs: Break generic_file_buffered_read up into multiple functions fs: generic_file_buffered_read() now uses

[PATCH v2 2/2] fs: kill add_to_page_cache_locked()

2020-10-21 Thread Kent Overstreet
No longer has any users, so remove it. Signed-off-by: Kent Overstreet --- include/linux/pagemap.h | 20 ++--- mm/filemap.c| 64 - 2 files changed, 33 insertions(+), 51 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux

[PATCH v2 1/2] cifs: convert to add_to_page_cache()

2020-10-21 Thread Kent Overstreet
This is just open coding add_to_page_cache(), and the next patch will delete add_to_page_cache_locked(). Signed-off-by: Kent Overstreet --- fs/cifs/file.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index be46fab4c9

[PATCH v2 0/2] kill add_to_page_cache_locked()

2020-10-21 Thread Kent Overstreet
since v1 - kill a faulty assertion found by kernel test robot - drop an unneeded line break Andrew, can this go through your tree? Kent Overstreet (2): cifs: convert to add_to_page_cache() fs: kill add_to_page_cache_locked() fs/cifs/file.c | 20 +++-- include/linux

[PATCH 2/2] block: Add blk_status_to_str()

2020-10-19 Thread Kent Overstreet
If we're going to the trouble of having these nice error strings, let's make them available. Signed-off-by: Kent Overstreet --- block/blk-core.c | 13 + include/linux/blkdev.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk

[PATCH 1/2] block: Add some exports for bcachefs

2020-10-19 Thread Kent Overstreet
bcachefs has its own direct IO code. Signed-off-by: Kent Overstreet --- block/bio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/bio.c b/block/bio.c index e865ea55b9..72a65c4113 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1320,6 +1320,7 @@ void bio_set_pages_dirty(struct bio

[PATCH 1/2] cifs: convert to add_to_page_cache()

2020-10-19 Thread Kent Overstreet
This is just open coding add_to_page_cache(), and the next patch will delete add_to_page_cache_locked(). Signed-off-by: Kent Overstreet --- fs/cifs/file.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index be46fab4c9

[PATCH 2/2] fs: kill add_to_page_cache_locked()

2020-10-19 Thread Kent Overstreet
No longer has any users, so remove it. Signed-off-by: Kent Overstreet --- include/linux/pagemap.h | 20 ++--- mm/filemap.c| 62 - 2 files changed, 32 insertions(+), 50 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux

[PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-10-17 Thread Kent Overstreet
on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). Signed-off-by: Kent

[PATCH 0/2] generic_file_buffered_read() refactoring, perf improvements

2020-10-17 Thread Kent Overstreet
to ~250k iops, and the improvements to big sequential reads are even bigger. This incorporates the fix for IOCB_WAITQ handling that Jens just posted as well, also factors out lock_page_for_iocb() to improve handling of the various iocb flags. Kent Overstreet (2): fs: Break generic_file_buffered_read

[PATCH 1/2] fs: Break generic_file_buffered_read up into multiple functions

2020-10-17 Thread Kent Overstreet
is intended to be relatively minimal. Signed-off-by: Kent Overstreet Cc: Matthew Wilcox (Oracle) Cc: Jens Axboe --- mm/filemap.c | 473 --- 1 file changed, 261 insertions(+), 212 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index

Re: [PATCH 00/13] lib/generic-radix-tree: genradix bug fix and optimisations.

2020-08-25 Thread Kent Overstreet
On Tue, Aug 25, 2020 at 04:00:35PM +, David Laight wrote: > From: 'Marcelo Ricardo Leitner' > > Sent: 25 August 2020 16:41 > > > > On Tue, Aug 25, 2020 at 02:52:34PM +, David Laight wrote: > > > The genradix code is used by SCTP for accessing per-stream data. > > > This means there are

Fixup patch for [PATCH 0/2] generic_file_buffered_read() refactoring & optimization

2020-06-29 Thread Kent Overstreet
ned-off-by: Kent Overstreet --- mm/filemap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index d8bd5e9647..b3a2aad1b7 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2220,8 +2220,9 @@ static ssize_t generic_file_buffered_read(struct kiocb *i

Re: [PATCH v3 0/2] generic_file_buffered_read() refactoring & optimization

2020-06-19 Thread Kent Overstreet
On Fri, Jun 19, 2020 at 05:59:20AM -0700, Christoph Hellwig wrote: > After looking at v2 yesterday I noticed I few things in the structure > that I really didn't like: > > - using a struct page * return value just to communicate status codes > - the extremely long function names > - a

[PATCH v3 1/2] fs: Break generic_file_buffered_read up into multiple functions

2020-06-18 Thread Kent Overstreet
is intended to be relatively minimal. Signed-off-by: Kent Overstreet --- mm/filemap.c | 418 --- 1 file changed, 228 insertions(+), 190 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 23a051a7ef..dc4a72042e 100644 --- a/mm/filemap.c

[PATCH v3 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-06-18 Thread Kent Overstreet
on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). Signed-off-by: Kent

[PATCH v3 0/2] generic_file_buffered_read() refactoring & optimization

2020-06-18 Thread Kent Overstreet
Ok - here's a new version, I fixed the checkpatch stuff and the thing with ret should be more readable now: Kent Overstreet (2): fs: Break generic_file_buffered_read up into multiple functions fs: generic_file_buffered_read() now uses find_get_pages_contig mm/filemap.c | 497

Re: [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-06-09 Thread Kent Overstreet
On Tue, Jun 09, 2020 at 06:38:08PM -0700, Matthew Wilcox wrote: > On Tue, Jun 09, 2020 at 08:10:36PM -0400, Kent Overstreet wrote: > > Convert generic_file_buffered_read() to get pages to read from in > > batches, and then copy data to userspace from many pages at once - in > &g

[PATCH v2 1/2] fs: Break generic_file_buffered_read up into multiple functions

2020-06-09 Thread Kent Overstreet
is intended to be relatively minimal. Signed-off-by: Kent Overstreet --- mm/filemap.c | 418 --- 1 file changed, 228 insertions(+), 190 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index e67fa8ab48..206d51a1c9 100644 --- a/mm/filemap.c

[PATCH v2 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-06-09 Thread Kent Overstreet
on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). Signed-off-by: Kent

Re: [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-06-09 Thread Kent Overstreet
On Tue, Jun 09, 2020 at 05:47:53PM -0700, Matthew Wilcox wrote: > On Tue, Jun 09, 2020 at 08:10:36PM -0400, Kent Overstreet wrote: > > @@ -2275,83 +2287,93 @@ static ssize_t generic_file_buffered_read(struct > > kiocb *iocb, > > struct iov_iter *

[PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig

2020-06-09 Thread Kent Overstreet
on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). Signed-off-by: Kent

[PATCH 0/2] generic_file_buffered_read() refactoring & optimization

2020-06-09 Thread Kent Overstreet
, generic_file_buffered_read() gets broken up into multiple functions that are _somewhat_ easier to follow. Kent Overstreet (2): fs: Break generic_file_buffered_read up into multiple functions fs: generic_file_buffered_read() now uses find_get_pages_contig mm/filemap.c | 486

[PATCH 1/2] fs: Break generic_file_buffered_read up into multiple functions

2020-06-09 Thread Kent Overstreet
is intended to be relatively minimal. Signed-off-by: Kent Overstreet --- mm/filemap.c | 418 --- 1 file changed, 228 insertions(+), 190 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index e67fa8ab48..206d51a1c9 100644 --- a/mm/filemap.c

Re: [PATCH 12/12] closures: fix a race on wakeup from closure_sync

2019-07-22 Thread Kent Overstreet
On Thu, Jul 18, 2019 at 03:46:46PM +0800, Coly Li wrote: > On 2019/7/16 6:47 下午, Coly Li wrote: > > Hi Kent, > > > > On 2019/6/11 3:14 上午, Kent Overstreet wrote: > >> Signed-off-by: Kent Overstreet > > Acked-by: Coly Li > > > > And also I rece

Re: pagecache locking (was: bcachefs status update) merged)

2019-06-14 Thread Kent Overstreet
On Fri, Jun 14, 2019 at 09:55:24AM +1000, Dave Chinner wrote: > On Thu, Jun 13, 2019 at 02:36:25PM -0400, Kent Overstreet wrote: > > On Thu, Jun 13, 2019 at 09:02:24AM +1000, Dave Chinner wrote: > > > On Wed, Jun 12, 2019 at 12:21:44PM -0400, Kent Overstreet wrote: > > >

Re: pagecache locking (was: bcachefs status update) merged)

2019-06-13 Thread Kent Overstreet
On Thu, Jun 13, 2019 at 03:13:40PM -0600, Andreas Dilger wrote: > There are definitely workloads that require multiple threads doing > non-overlapping > writes to a single file in HPC. This is becoming an increasingly common > problem > as the number of cores on a single client increase, since

pagecache locking (was: bcachefs status update) merged)

2019-06-13 Thread Kent Overstreet
On Thu, Jun 13, 2019 at 09:02:24AM +1000, Dave Chinner wrote: > On Wed, Jun 12, 2019 at 12:21:44PM -0400, Kent Overstreet wrote: > > Ok, I'm totally on board with returning EDEADLOCK. > > > > Question: Would we be ok with returning EDEADLOCK for any IO where the > >

Re: [PATCH 10/12] bcache: move closures to lib/

2019-06-13 Thread Kent Overstreet
On Thu, Jun 13, 2019 at 12:28:41AM -0700, Christoph Hellwig wrote: > On Mon, Jun 10, 2019 at 03:14:18PM -0400, Kent Overstreet wrote: > > Prep work for bcachefs - being a fork of bcache it also uses closures > > NAK. This obsfucation needs to go away from bcache and not actua

Re: bcachefs status update (it's done cooking; let's get this sucker merged)

2019-06-12 Thread Kent Overstreet
On Tue, Jun 11, 2019 at 02:33:36PM +1000, Dave Chinner wrote: > I just recently said this with reference to the range lock stuff I'm > working on in the background: > > FWIW, it's to avoid problems with stupid userspace stuff > that nobody really should be doing that I want range

Re: bcachefs status update (it's done cooking; let's get this sucker merged)

2019-06-10 Thread Kent Overstreet
On Mon, Jun 10, 2019 at 10:46:35AM -1000, Linus Torvalds wrote: > On Mon, Jun 10, 2019 at 9:14 AM Kent Overstreet > wrote: > > > > So. Here's my bcachefs-for-review branch - this has the minimal set of > > patches > > outside of fs/bcachefs/. My mast

bcachefs status update (it's done cooking; let's get this sucker merged)

2019-06-10 Thread Kent Overstreet
Last status update: https://lkml.org/lkml/2018/12/2/46 Current status - I'm pretty much running out of things to polish and excuses to keep tinkering. The core featureset is _done_ and the list of known outstanding bugs is getting to be short and unexciting. The next big things on my todo list

[PATCH 01/12] Compiler Attributes: add __flatten

2019-06-10 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- include/linux/compiler_attributes.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index 6b318efd8a..48b2c6ae6f 100644 --- a/include/linux/compiler_attributes.h +++ b/include

[PATCH 05/12] fs: insert_inode_locked2()

2019-06-10 Thread Kent Overstreet
New helper for bcachefs, so that when we race inserting an inode we can atomically grab a ref to the inode already in the inode cache. Signed-off-by: Kent Overstreet --- fs/inode.c | 40 include/linux/fs.h | 1 + 2 files changed, 41 insertions

[PATCH 02/12] locking: SIX locks (shared/intent/exclusive)

2019-06-10 Thread Kent Overstreet
New lock for bcachefs, like read/write locks but with a third state, intent. Intent locks conflict with each other, but not with read locks; taking a write lock requires first holding an intent lock. Signed-off-by: Kent Overstreet --- include/linux/six.h | 192 +++ kernel

[PATCH 11/12] closures: closure_wait_event()

2019-06-10 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- include/linux/closure.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/linux/closure.h b/include/linux/closure.h index 308e38028c..abacb91c35 100644 --- a/include/linux/closure.h +++ b/include/linux/closure.h @@ -379,4

[PATCH 12/12] closures: fix a race on wakeup from closure_sync

2019-06-10 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- lib/closure.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/closure.c b/lib/closure.c index 46cfe4c382..3e6366c262 100644 --- a/lib/closure.c +++ b/lib/closure.c @@ -104,8 +104,14 @@ struct closure_syncer { static void

[PATCH 07/12] Propagate gfp_t when allocating pte entries from __vmalloc

2019-06-10 Thread Kent Overstreet
This fixes a lockdep recursion when using __vmalloc from places that aren't GFP_KERNEL safe. Signed-off-by: Kent Overstreet --- arch/alpha/include/asm/pgalloc.h | 11 ++--- arch/arc/include/asm/pgalloc.h | 9 +--- arch/arm/include/asm/pgalloc.h | 11

[PATCH 09/12] bcache: optimize continue_at_nobarrier()

2019-06-10 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- drivers/md/bcache/closure.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h index c88cdc4ae4..376c5e659c 100644 --- a/drivers/md/bcache/closure.h +++ b/drivers/md/bcache

[PATCH 06/12] fs: factor out d_mark_tmpfile()

2019-06-10 Thread Kent Overstreet
New helper for bcachefs - bcachefs doesn't want the inode_dec_link_count() call that d_tmpfile does, it handles i_nlink on its own atomically with other btree updates Signed-off-by: Kent Overstreet --- fs/dcache.c| 10 -- include/linux/dcache.h | 1 + 2 files changed, 9

[PATCH 03/12] mm: pagecache add lock

2019-06-10 Thread Kent Overstreet
Add a per address space lock around adding pages to the pagecache - making it possible for fallocate INSERT_RANGE/COLLAPSE_RANGE to work correctly, and also hopefully making truncate and dio a bit saner. Signed-off-by: Kent Overstreet --- fs/inode.c| 1 + include/linux/fs.h| 24

[PATCH 10/12] bcache: move closures to lib/

2019-06-10 Thread Kent Overstreet
Prep work for bcachefs - being a fork of bcache it also uses closures Signed-off-by: Kent Overstreet --- drivers/md/bcache/Kconfig | 10 +-- drivers/md/bcache/Makefile| 6 ++-- drivers/md/bcache/bcache.h| 2 +- drivers/md/bcache

[PATCH 04/12] mm: export find_get_pages()

2019-06-10 Thread Kent Overstreet
Needed for bcachefs Signed-off-by: Kent Overstreet --- mm/filemap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/filemap.c b/mm/filemap.c index 93d7e0e686..617168474e 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1899,6 +1899,7 @@ unsigned find_get_pages_range(struct address_space

[PATCH 08/12] block: Add some exports for bcachefs

2019-06-10 Thread Kent Overstreet
Signed-off-by: Kent Overstreet --- block/bio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/bio.c b/block/bio.c index 716510ecd7..a67aa6e0de 100644 --- a/block/bio.c +++ b/block/bio.c @@ -958,6 +958,7 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter

Re: general protection fault in ebitmap_destroy (2)

2019-03-21 Thread Kent Overstreet
#syz test: http://evilpiepirate.org/git/bcachefs.git syzbot-fix

Re: [PATCH -next] bcache: Fix potential NULL pointer dereference

2019-01-30 Thread Kent Overstreet
On Wed, Jan 30, 2019 at 06:21:12PM +0800, YueHaibing wrote: > There is a potential NULL pointer dereference in case > kzalloc() fails and returns NULL. > > Fixes: bc082a55d25c ("bcache: fix inaccurate io state for detached bcache > devices") > Signed-off-by: YueHaibing > --- >

Re: [PATCH 6/7] sctp: Convert to genradix

2018-12-17 Thread Kent Overstreet
On Mon, Dec 17, 2018 at 12:50:01PM -0800, Andrew Morton wrote: > On Mon, 17 Dec 2018 08:19:28 -0500 Kent Overstreet > wrote: > > > @@ -535,9 +470,6 @@ int sctp_send_add_streams(struct sctp_association *asoc, > > goto out; > > } > > > > -

[PATCH 1/7] openvswitch: convert to kvmalloc

2018-12-17 Thread Kent Overstreet
There was no real need for this code to be using flexarrays, it's just implementing a hash table - ideally it would be using rhashtables, but that conversion would be significantly more complicated. Signed-off-by: Kent Overstreet Cc: Pravin B Shelar Cc: d...@openvswitch.org Reviewed-by: Matthew

[PATCH 2/7] md: convert to kvmalloc

2018-12-17 Thread Kent Overstreet
The code really just wants a big flat buffer, so just do that. Signed-off-by: Kent Overstreet Cc: Shaohua Li Cc: linux-r...@vger.kernel.org Reviewed-by: Matthew Wilcox --- drivers/md/raid5-ppl.c | 6 +-- drivers/md/raid5.c | 87 +++--- drivers/md/raid5

[PATCH 7/7] Drop flex_arrays

2018-12-17 Thread Kent Overstreet
All existing users have been converted to generic radix trees Signed-off-by: Kent Overstreet Acked-by: Dave Hansen --- Documentation/core-api/flexible-arrays.rst | 130 --- Documentation/flexible-arrays.txt | 123 --- include/linux/flex_array.h | 149

[PATCH 5/7] proc: commit to genradix

2018-12-17 Thread Kent Overstreet
the new generic radix trees have a simpler API and implementation, and no limitations on number of elements, so all flex_array users are being converted Signed-off-by: Kent Overstreet Cc: Al Viro --- fs/proc/base.c | 43 +++ 1 file changed, 15 insertions

[PATCH 6/7] sctp: Convert to genradix

2018-12-17 Thread Kent Overstreet
This also makes sctp_stream_alloc_(out|in) saner, in that they no longer allocate new flex_arrays/genradixes, they just preallocate more elements. This code does however have a suspicious lack of locking. Signed-off-by: Kent Overstreet Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo

[PATCH 0/7] generic radix trees; drop flex arrays

2018-12-17 Thread Kent Overstreet
to use it for it's quite useful. Andrew, would you mind picking up this series, or would someone else be more suitable? The patch series has been sent out a few times and seen a fair amoun of review. Kent Overstreet (7): openvswitch: convert to kvmalloc md: convert to kvmalloc selinux: convert

[PATCH 4/7] Generic radix trees

2018-12-17 Thread Kent Overstreet
flex_array does. Signed-off-by: Kent Overstreet --- Documentation/core-api/generic-radix-tree.rst | 12 + Documentation/core-api/index.rst | 1 + include/linux/generic-radix-tree.h| 231 ++ lib/Makefile | 3 +- lib

[PATCH 3/7] selinux: convert to kvmalloc

2018-12-17 Thread Kent Overstreet
The flex arrays were being used for constant sized arrays, so there's no benefit to using flex_arrays over something simpler. Signed-off-by: Kent Overstreet Cc: linux-security-mod...@vger.kernel.org --- security/selinux/ss/avtab.c | 40 +- security/selinux/ss/avtab.h | 4

Re: [PATCH 6/6] Drop flex_arrays

2018-12-17 Thread Kent Overstreet
gt; On Thu, Dec 13, 2018 at 09:30:47PM +0900, Xin Long wrote: > > > > > On Sat, Sep 8, 2018 at 1:57 AM Kent Overstreet > > > > > wrote: > > > > > > > > > > > > All existing users have been converted to generic

Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel

2018-12-07 Thread Kent Overstreet
On Thu, Dec 06, 2018 at 12:32:47PM +, Kieran Bingham wrote: > Oh - although, yes - there are some good concepts there - but I'm a bit > weary of how easy it would be to 'run' the said test against multiple > kernel version libraries... there would be a lot of possible ABI > conflicts perhaps.

Bcachefs status update, current work

2018-12-01 Thread Kent Overstreet
So, since I've been pretty quiet since LSF I thought I ought to give an update on where bcachefs is at - and in particular talk about what sorts of problems and improvements are currently being worked on. As of last LSF, there was still a lot of work to be done before we had fast mount times that

Bcachefs status update, current work

2018-12-01 Thread Kent Overstreet
So, since I've been pretty quiet since LSF I thought I ought to give an update on where bcachefs is at - and in particular talk about what sorts of problems and improvements are currently being worked on. As of last LSF, there was still a lot of work to be done before we had fast mount times that

Re: [PATCH] bug fix in function check_should_bypass

2018-09-27 Thread Kent Overstreet
On Thu, Sep 27, 2018 at 04:27:49PM +0800, Dongbo Cao wrote: > bio->bi_iter.bi_sector is the sector index of current request, no need to be > aligned. > instead, bio->bi_iter.bi_size should be aligned to block_bytes-1, not > block_size-1. > and bio_sectors is the number of sectors of current

Re: [PATCH] bug fix in function check_should_bypass

2018-09-27 Thread Kent Overstreet
On Thu, Sep 27, 2018 at 04:27:49PM +0800, Dongbo Cao wrote: > bio->bi_iter.bi_sector is the sector index of current request, no need to be > aligned. > instead, bio->bi_iter.bi_size should be aligned to block_bytes-1, not > block_size-1. > and bio_sectors is the number of sectors of current

Re: [PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Fri, Sep 07, 2018 at 10:49:42AM -0700, Matthew Wilcox wrote: > On Fri, Sep 07, 2018 at 12:56:31PM -0400, Kent Overstreet wrote: > > @@ -165,7 +164,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct > > raid5_percpu *percpu, > >struct dma_as

Re: [PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Fri, Sep 07, 2018 at 10:49:42AM -0700, Matthew Wilcox wrote: > On Fri, Sep 07, 2018 at 12:56:31PM -0400, Kent Overstreet wrote: > > @@ -165,7 +164,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct > > raid5_percpu *percpu, > >struct dma_as

Re: [PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Sat, Sep 08, 2018 at 02:08:03AM +0900, Tetsuo Handa wrote: > On 2018/09/08 1:56, Kent Overstreet wrote: > > @@ -329,8 +328,7 @@ int avtab_alloc(struct avtab *h, u32 nrules) > > nslot = MAX_AVTAB_HASH_BUCKETS; > > mask = nslot - 1; > > > >

Re: [PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
On Sat, Sep 08, 2018 at 02:08:03AM +0900, Tetsuo Handa wrote: > On 2018/09/08 1:56, Kent Overstreet wrote: > > @@ -329,8 +328,7 @@ int avtab_alloc(struct avtab *h, u32 nrules) > > nslot = MAX_AVTAB_HASH_BUCKETS; > > mask = nslot - 1; > > > >

[PATCH 5/6] proc: commit to genradix

2018-09-07 Thread Kent Overstreet
the new generic radix trees have a simpler API and implementation, and no limitations on number of elements, so all flex_array users are being converted Signed-off-by: Kent Overstreet Cc: Al Viro --- fs/proc/base.c | 43 +++ 1 file changed, 15 insertions

[PATCH 5/6] proc: commit to genradix

2018-09-07 Thread Kent Overstreet
the new generic radix trees have a simpler API and implementation, and no limitations on number of elements, so all flex_array users are being converted Signed-off-by: Kent Overstreet Cc: Al Viro --- fs/proc/base.c | 43 +++ 1 file changed, 15 insertions

[PATCH 4/6] Generic radix trees

2018-09-07 Thread Kent Overstreet
flex_array does. Signed-off-by: Kent Overstreet --- include/linux/generic-radix-tree.h | 222 + lib/Makefile | 3 +- lib/generic-radix-tree.c | 180 +++ 3 files changed, 404 insertions(+), 1 deletion(-) create

[PATCH 6/6] Drop flex_arrays

2018-09-07 Thread Kent Overstreet
All existing users have been converted to generic radix trees Signed-off-by: Kent Overstreet Acked-by: Dave Hansen --- Documentation/core-api/flexible-arrays.rst | 130 --- Documentation/flexible-arrays.txt | 123 --- include/linux/flex_array.h | 149

[PATCH 4/6] Generic radix trees

2018-09-07 Thread Kent Overstreet
flex_array does. Signed-off-by: Kent Overstreet --- include/linux/generic-radix-tree.h | 222 + lib/Makefile | 3 +- lib/generic-radix-tree.c | 180 +++ 3 files changed, 404 insertions(+), 1 deletion(-) create

[PATCH 6/6] Drop flex_arrays

2018-09-07 Thread Kent Overstreet
All existing users have been converted to generic radix trees Signed-off-by: Kent Overstreet Acked-by: Dave Hansen --- Documentation/core-api/flexible-arrays.rst | 130 --- Documentation/flexible-arrays.txt | 123 --- include/linux/flex_array.h | 149

[PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The code really just wants a big flat buffer, so just do that. Signed-off-by: Kent Overstreet Cc: Shaohua Li Cc: linux-r...@vger.kernel.org --- drivers/md/raid5-ppl.c | 7 ++-- drivers/md/raid5.c | 82 +++--- drivers/md/raid5.h | 9 ++--- 3 files

[PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The flex arrays were being used for constant sized arrays, so there's no benefit to using flex_arrays over something simpler. Signed-off-by: Kent Overstreet Cc: linux-security-mod...@vger.kernel.org --- security/selinux/ss/avtab.c | 40 +- security/selinux/ss/avtab.h | 4

[PATCH 2/6] md: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The code really just wants a big flat buffer, so just do that. Signed-off-by: Kent Overstreet Cc: Shaohua Li Cc: linux-r...@vger.kernel.org --- drivers/md/raid5-ppl.c | 7 ++-- drivers/md/raid5.c | 82 +++--- drivers/md/raid5.h | 9 ++--- 3 files

[PATCH 3/6] selinux: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
The flex arrays were being used for constant sized arrays, so there's no benefit to using flex_arrays over something simpler. Signed-off-by: Kent Overstreet Cc: linux-security-mod...@vger.kernel.org --- security/selinux/ss/avtab.c | 40 +- security/selinux/ss/avtab.h | 4

[PATCH 1/6] openvswitch: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
There was no real need for this code to be using flexarrays, it's just implementing a hash table - ideally it would be using rhashtables, but that conversion would be significantly more complicated. Signed-off-by: Kent Overstreet Cc: Pravin B Shelar Cc: d...@openvswitch.org --- net/openvswitch

[PATCH 0/6] flex_arrays -> genradix; prep work for bcachefs

2018-09-07 Thread Kent Overstreet
Generic radix trees are a dead simple radix tree implementation that can store types of different sizes, needed for bcachefs. The patch series was sent out previously and was pretty uncontroversial - this is a respin that converts most users to just use kvmalloc. Kent Overstreet (6

[PATCH 1/6] openvswitch: convert to kvmalloc

2018-09-07 Thread Kent Overstreet
There was no real need for this code to be using flexarrays, it's just implementing a hash table - ideally it would be using rhashtables, but that conversion would be significantly more complicated. Signed-off-by: Kent Overstreet Cc: Pravin B Shelar Cc: d...@openvswitch.org --- net/openvswitch

  1   2   3   4   5   6   7   8   9   10   >