Re: [PATCH RFC PKS/PMEM 51/58] kernel: Utilize new kmap_thread()

2020-10-09 Thread Eric W. Biederman
ira.we...@intel.com writes: > From: Ira Weiny > > This kmap() call is localized to a single thread. To avoid the over > head of global PKRS updates use the new kmap_thread() call. Acked-by: "Eric W. Biederman" > > Cc: Eric Biederman > Signed-off-by: Ira Weiny > --- > kernel/kexec_core.c |

Re: [PATCH RFC PKS/PMEM 57/58] nvdimm/pmem: Stray access protection for pmem->virt_addr

2020-10-09 Thread John Hubbard
On 10/9/20 12:50 PM, ira.we...@intel.com wrote: From: Ira Weiny The pmem driver uses a cached virtual address to access its memory directly. Because the nvdimm driver is well aware of the special protections it has mapped memory with, we call dev_access_[en|dis]able() around the direct

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread James Bottomley
On Fri, 2020-10-09 at 14:34 -0700, Eric Biggers wrote: > On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The kmap() calls in this FS are localized to a single thread. To > > avoid the over head of global PKRS updates use the new > > kmap_thread()

Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread()

2020-10-09 Thread Coly Li
On 2020/10/10 03:50, ira.we...@intel.com wrote: > From: Ira Weiny > > These kmap() calls are localized to a single thread. To avoid the over > head of global PKRS updates use the new kmap_thread() call. > Hi Ira, There were a number of options considered. 1) Attempt to change all the thread

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread Eric Biggers
On Sat, Oct 10, 2020 at 01:39:54AM +0100, Matthew Wilcox wrote: > On Fri, Oct 09, 2020 at 02:34:34PM -0700, Eric Biggers wrote: > > On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > > > The kmap() calls in this FS are localized to a single thread. To avoid > > > the over head

[staging:staging-testing] BUILD SUCCESS 41f0666f0f60997dea10e716df728f330525052e

2020-10-09 Thread kernel test robot
randconfig-a006-20201009 i386 randconfig-a005-20201009 i386 randconfig-a001-20201009 i386 randconfig-a004-20201009 i386 randconfig-a002-20201009 i386 randconfig-a003-20201009 x86_64 randconfig-a012

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread Matthew Wilcox
On Fri, Oct 09, 2020 at 02:34:34PM -0700, Eric Biggers wrote: > On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > > The kmap() calls in this FS are localized to a single thread. To avoid > > the over head of global PKRS updates use the new kmap_thread() call. > > > > @@

[PATCH] Fixed coding style issues raised by checkpatch.

2020-10-09 Thread Tabot Kevin
This patch fixes the following: - Made sure alignment matched open parenthesis. Signed-off-by: Tabot Kevin --- drivers/staging/greybus/audio_module.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/audio_module.c

Re: [PATCH RFC PKS/PMEM 09/58] drivers/gpu: Utilize new kmap_thread()

2020-10-09 Thread Daniel Vetter
On Fri, Oct 09, 2020 at 12:49:44PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > These kmap() calls in the gpu stack are localized to a single thread. > To avoid the over head of global PKRS updates use the new kmap_thread() > call. > > Cc: David Airlie > Cc: Daniel Vetter > Cc:

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread Eric Biggers
On Fri, Oct 09, 2020 at 12:49:57PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Jaegeuk Kim > Cc: Chao Yu > Signed-off-by: Ira

Gruß,

2020-10-09 Thread Vernitha Maynard
Gruß, Mit warmem Herzen biete ich Ihnen meine Freundschaft und meine Grüße im Namen unseres Herrn an, und ich hoffe, dass dieser Brief Sie rechtzeitig trifft. Ich schlage mit meinem freien Verstand vor und als eine Person der Integrität von Gott weiß ich, dass dies Die Botschaft wird Ihnen als

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Kees Cook
On Fri, Oct 09, 2020 at 09:37:46PM +0200, Peter Zijlstra wrote: > On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: > > Simple atomic counters api provides interfaces for simple atomic counters > > that just count, and don't guard resource lifetimes. The interfaces are > > built on top

[PATCH RFC PKS/PMEM 57/58] nvdimm/pmem: Stray access protection for pmem->virt_addr

2020-10-09 Thread ira . weiny
From: Ira Weiny The pmem driver uses a cached virtual address to access its memory directly. Because the nvdimm driver is well aware of the special protections it has mapped memory with, we call dev_access_[en|dis]able() around the direct pmem->virt_addr (pmem_addr) usage instead of the

[PATCH RFC PKS/PMEM 43/58] drivers/mmc: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Ulf Hansson Cc: Sascha Sommer Signed-off-by: Ira Weiny --- drivers/mmc/host/mmc_spi.c| 4 ++-- drivers/mmc/host/sdricoh_cs.c | 4 ++--

[PATCH RFC PKS/PMEM 42/58] drivers/scsi: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Ira Weiny --- drivers/scsi/ipr.c | 8 drivers/scsi/pmcraid.c |

[PATCH RFC PKS/PMEM 51/58] kernel: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny This kmap() call is localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Eric Biederman Signed-off-by: Ira Weiny --- kernel/kexec_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH RFC PKS/PMEM 50/58] drivers/android: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Greg Kroah-Hartman Signed-off-by: Ira Weiny --- drivers/android/binder_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH RFC PKS/PMEM 37/58] fs/ext2: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS update use the new kmap_thread() call instead. Cc: Jan Kara Signed-off-by: Ira Weiny --- fs/ext2/dir.c | 2 +- fs/ext2/ext2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH RFC PKS/PMEM 47/58] drivers/mtd: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Signed-off-by: Ira Weiny --- drivers/mtd/mtd_blkdevs.c | 12 ++-- 1

[PATCH RFC PKS/PMEM 54/58] powerpc: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Ira Weiny --- arch/powerpc/mm/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH RFC PKS/PMEM 56/58] dax: Stray access protection for dax_direct_access()

2020-10-09 Thread ira . weiny
From: Ira Weiny dax_direct_access() is a special case of accessing pmem via a page offset and without a struct page. Because the dax driver is well aware of the special protections it has mapped memory with, call dev_access_[en|dis]able() directly instead of the unnecessary overhead of trying

[PATCH RFC PKS/PMEM 58/58] [dax|pmem]: Enable stray access protection

2020-10-09 Thread ira . weiny
From: Ira Weiny Protecting against stray writes is particularly important for PMEM because, unlike writes to anonymous memory, writes to PMEM persists across a reboot. Thus data corruption could result in permanent loss of data. While stray writes are more serious than reads, protection is

[PATCH RFC PKS/PMEM 38/58] fs/isofs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- fs/isofs/compress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/isofs/compress.c

[PATCH RFC PKS/PMEM 45/58] drivers/firmware: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Ard Biesheuvel Signed-off-by: Ira Weiny --- drivers/firmware/efi/capsule-loader.c | 6 +++--- drivers/firmware/efi/capsule.c| 4 ++--

[PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Nicolas Pitre Signed-off-by: Ira Weiny --- fs/cramfs/inode.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH RFC PKS/PMEM 31/58] fs/vboxsf: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Hans de Goede Signed-off-by: Ira Weiny --- fs/vboxsf/file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

[PATCH RFC PKS/PMEM 52/58] mm: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- mm/memory.c | 8 mm/swapfile.c| 4 ++-- mm/userfaultfd.c | 4 ++-- 3 files changed, 8

[PATCH RFC PKS/PMEM 55/58] samples: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Kirti Wankhede Signed-off-by: Ira Weiny --- samples/vfio-mdev/mbochs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH RFC PKS/PMEM 34/58] fs/erofs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Gao Xiang Cc: Chao Yu Signed-off-by: Ira Weiny --- fs/erofs/super.c | 4 ++-- fs/erofs/xattr.c | 4 ++-- 2 files changed, 4

[PATCH RFC PKS/PMEM 53/58] lib: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Alexander Viro Cc: "Jérôme Glisse" Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Andrii Nakryiko Cc: John Fastabend Cc: KP

[PATCH RFC PKS/PMEM 27/58] fs/ubifs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Richard Weinberger Signed-off-by: Ira Weiny --- fs/ubifs/file.c | 16 1 file changed, 8 insertions(+), 8

[PATCH RFC PKS/PMEM 46/58] drives/staging: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Greg Kroah-Hartman Signed-off-by: Ira Weiny --- drivers/staging/rts5208/rtsx_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH RFC PKS/PMEM 49/58] drivers/misc: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Greg Kroah-Hartman Signed-off-by: Ira Weiny --- drivers/misc/vmw_vmci/vmci_queue_pair.c | 12 ++-- 1 file changed, 6 insertions(+),

[PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Coly Li (maintainer:BCACHE (BLOCK LAYER CACHE)) Cc: Kent Overstreet (maintainer:BCACHE (BLOCK LAYER CACHE)) Signed-off-by: Ira Weiny ---

[PATCH RFC PKS/PMEM 30/58] fs/romfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- fs/romfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/romfs/super.c

[PATCH RFC PKS/PMEM 44/58] drivers/xen: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Stefano Stabellini Signed-off-by: Ira Weiny --- drivers/xen/gntalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH RFC PKS/PMEM 41/58] drivers/target: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls in this driver are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- drivers/target/target_core_iblock.c| 4 ++-- drivers/target/target_core_rd.c| 4 ++--

[PATCH RFC PKS/PMEM 36/58] fs/ext2: Use ext2_put_page

2020-10-09 Thread ira . weiny
From: Ira Weiny There are 3 places in namei.c where the equivalent of ext2_put_page() is open coded. We want to use k[un]map_thread() instead of k[un]map() in ext2_[get|put]_page(). Move ext2_put_page() to ext2.h and use it in namei.c in prep for converting the k[un]map() code. Cc: Jan Kara

[PATCH RFC PKS/PMEM 29/58] fs/ntfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Anton Altaparmakov Signed-off-by: Ira Weiny --- fs/ntfs/aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH RFC PKS/PMEM 40/58] net: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls in these drivers are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: Trond Myklebust Cc: Anna Schumaker

[PATCH RFC PKS/PMEM 24/58] fs/freevxfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Christoph Hellwig Signed-off-by: Ira Weiny --- fs/freevxfs/vxfs_immed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH RFC PKS/PMEM 39/58] fs/jffs2: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- fs/jffs2/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jffs2/file.c

[PATCH RFC PKS/PMEM 28/58] fs/cachefiles: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: David Howells Signed-off-by: Ira Weiny --- fs/cachefiles/rdwr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH RFC PKS/PMEM 26/58] fs/zonefs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Damien Le Moal Cc: Naohiro Aota Signed-off-by: Ira Weiny --- fs/zonefs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH RFC PKS/PMEM 35/58] fs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Alexander Viro Cc: Jens Axboe Signed-off-by: Ira Weiny --- fs/aio.c | 4 ++-- fs/binfmt_elf.c | 4 ++--

[PATCH RFC PKS/PMEM 32/58] fs/hostfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Signed-off-by: Ira Weiny --- fs/hostfs/hostfs_kern.c | 12 ++-- 1 file

[PATCH RFC PKS/PMEM 18/58] fs/hfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- fs/hfs/bnode.c | 14 +++--- fs/hfs/btree.c | 20 ++-- 2 files changed, 17

[PATCH RFC PKS/PMEM 16/58] fs/gfs2: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Bob Peterson Cc: Andreas Gruenbacher Signed-off-by: Ira Weiny --- fs/gfs2/bmap.c | 4 ++-- fs/gfs2/ops_fstype.c | 4 ++-- 2

[PATCH RFC PKS/PMEM 25/58] fs/reiserfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Jan Kara Cc: "Theodore Ts'o" Cc: Randy Dunlap Cc: Alex Shi Signed-off-by: Ira Weiny --- fs/reiserfs/journal.c | 4 ++-- 1 file

[PATCH RFC PKS/PMEM 03/58] memremap: Add zone device access protection

2020-10-09 Thread ira . weiny
From: Ira Weiny Device managed memory exposes itself to the kernel direct map which allows stray pointers to access these device memories. Stray pointers to normal memory may result in a crash or other undesirable behavior which, while unfortunate, are usually recoverable with a reboot. Stray

[PATCH RFC PKS/PMEM 14/58] fs/cifs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Steve French Signed-off-by: Ira Weiny --- fs/cifs/cifsencrypt.c | 6 +++--- fs/cifs/file.c| 16

[PATCH RFC PKS/PMEM 19/58] fs/hfsplus: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Signed-off-by: Ira Weiny --- fs/hfsplus/bitmap.c | 20 - fs/hfsplus/bnode.c | 102 ++--

[PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Jaegeuk Kim Cc: Chao Yu Signed-off-by: Ira Weiny --- fs/f2fs/f2fs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH RFC PKS/PMEM 15/58] fs/ecryptfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Herbert Xu Cc: Eric Biggers Cc: Aditya Pakki Signed-off-by: Ira Weiny --- fs/ecryptfs/crypto.c | 8

[PATCH RFC PKS/PMEM 06/58] kmap: Introduce k[un]map_thread debugging

2020-10-09 Thread ira . weiny
From: Ira Weiny Most kmap() callers use the map within a single thread and have no need for the protection domain to be enabled globally. To differentiate these kmap users, new k[un]map_thread() calls were introduced which are thread local. To aid in debugging the new use of kmap_thread(), add

[PATCH RFC PKS/PMEM 21/58] fs/nfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Trond Myklebust Cc: Anna Schumaker Signed-off-by: Ira Weiny --- fs/nfs/dir.c | 20 ++-- 1 file changed, 10

[PATCH RFC PKS/PMEM 05/58] kmap: Introduce k[un]map_thread

2020-10-09 Thread ira . weiny
From: Ira Weiny To correctly support the semantics of kmap() with Kernel protection keys (PKS), kmap() may be required to set the protections on multiple processors (globally). Enabling PKS globally can be very expensive depending on the requested operation. Furthermore, enabling a domain

[PATCH RFC PKS/PMEM 13/58] fs/btrfs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Signed-off-by: Ira Weiny --- fs/btrfs/check-integrity.c | 4 ++--

[PATCH RFC PKS/PMEM 12/58] fs/afs: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: David Howells Signed-off-by: Ira Weiny --- fs/afs/dir.c | 16 fs/afs/dir_edit.c | 16

[PATCH RFC PKS/PMEM 08/58] drivers/firmware_loader: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this driver are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Luis Chamberlain Signed-off-by: Ira Weiny --- drivers/base/firmware_loader/fallback.c | 4 ++--

[PATCH RFC PKS/PMEM 09/58] drivers/gpu: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny These kmap() calls in the gpu stack are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: David Airlie Cc: Daniel Vetter Cc: Patrik Jakobsson Signed-off-by: Ira Weiny --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH RFC PKS/PMEM 20/58] fs/jffs2: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: David Woodhouse Cc: Richard Weinberger Signed-off-by: Ira Weiny --- fs/jffs2/file.c | 4 ++-- fs/jffs2/gc.c | 4 ++-- 2 files

[PATCH RFC PKS/PMEM 23/58] fs/fuse: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Miklos Szeredi Signed-off-by: Ira Weiny --- fs/fuse/readdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH RFC PKS/PMEM 11/58] drivers/net: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in these drivers are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Jesse Brandeburg Signed-off-by: Ira Weiny ---

[PATCH RFC PKS/PMEM 17/58] fs/nilfs2: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this FS are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Ryusuke Konishi Signed-off-by: Ira Weiny --- fs/nilfs2/alloc.c | 34 +- fs/nilfs2/cpfile.c | 4

[PATCH RFC PKS/PMEM 02/58] x86/pks/test: Add testing for global option

2020-10-09 Thread ira . weiny
From: Ira Weiny Now that PKS can be enabled globaly (for all threads) add a test which spawns a thread and tests the same PKS functionality. The test enables/disables PKS in 1 thread while attempting to access the page in another thread. We use the same test array as in the 'local' PKS

[PATCH RFC PKS/PMEM 10/58] drivers/rdma: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in these drivers are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Mike Marciniszyn Cc: Dennis Dalessandro Cc: Doug Ledford Cc: Jason Gunthorpe Cc: Faisal Latif Cc: Shiraz Saleem Cc:

[PATCH RFC PKS/PMEM 04/58] kmap: Add stray access protection for device pages

2020-10-09 Thread ira . weiny
From: Ira Weiny Device managed pages may have additional protections. These protections need to be removed prior to valid use by kernel users. Check for special treatment of device managed pages in kmap and take action if needed. We use kmap as an interface for generic kernel code because

[PATCH RFC PKS/PMEM 00/58] PMEM: Introduce stray write protection for PMEM

2020-10-09 Thread ira . weiny
From: Ira Weiny Should a stray write in the kernel occur persistent memory is affected more than regular memory. A write to the wrong area of memory could result in latent data corruption which will will persist after a reboot. PKS provides a nice way to restrict access to persistent memory

[PATCH RFC PKS/PMEM 07/58] drivers/drbd: Utilize new kmap_thread()

2020-10-09 Thread ira . weiny
From: Ira Weiny The kmap() calls in this driver are localized to a single thread. To avoid the over head of global PKRS updates use the new kmap_thread() call. Cc: Jens Axboe Signed-off-by: Ira Weiny --- drivers/block/drbd/drbd_main.c | 4 ++-- drivers/block/drbd/drbd_receiver.c | 12

[PATCH RFC PKS/PMEM 01/58] x86/pks: Add a global pkrs option

2020-10-09 Thread ira . weiny
From: Ira Weiny Some users, such as kmap(), sometimes requires PKS to be global. However, updating all CPUs, and worse yet all threads is expensive. Introduce a global PKRS state which is checked at critical times to allow the state to enable access when global PKS is required. To accomplish

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Peter Zijlstra
On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: > This patch series is a result of discussion at the refcount_t BOF > the Linux Plumbers Conference. In this discussion, we identified > a need for looking closely and investigating atomic_t usages in > the kernel when it is used strictly

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Shuah Khan
On 10/9/20 12:03 PM, Kees Cook wrote: On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: Note: Would like to get this into Linux 5.10-rc1 so we can continue updating drivers that can be updated to use this API. If this all looks good, Kees, would you like to take this through your tree

Re: [PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-09 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Smatch complains: > >drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: > potential NULL parameter dereference 'wvif' >drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL > parameter dereference

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-09 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Smatch complains: > >main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference > 'tmp_buf' >227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); >228 ret = wfx_send_pds(wdev, tmp_buf,

Re: [PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Kees Cook
On Fri, Oct 09, 2020 at 09:55:55AM -0600, Shuah Khan wrote: > Note: Would like to get this into Linux 5.10-rc1 so we can continue > updating drivers that can be updated to use this API. If this all looks > good, Kees, would you like to take this through your tree or would you > like to take this

[PATCH 0/8] staging: wfx: fix issues reported by Smatch

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Fix the issues reported by Dan using Smatch[1]. [1] https://lore.kernel.org/lkml/20201008131320.GA1042@kadam/ Jérôme Pouiller (8): staging: wfx: improve error handling of hif_join() staging: wfx: check memory allocation staging: wfx: standardize the error when vif

[PATCH 8/8] staging: wfx: improve robustness of wfx_get_hw_rate()

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: data_tx.c:37 wfx_get_hw_rate() warn: constraint '(struct ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl '0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates' 23 struct

[PATCH 7/8] staging: wfx: drop unicode characters from strings

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xc2' hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xb0' 234 if (!wfx_api_older_than(wdev, 1, 4))

[PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: potential NULL parameter dereference 'wvif' drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL parameter dereference 'wvif' Indeed, if the vif id returned by

[PATCH 5/8] staging: wfx: increase robustness of hif_generic_confirm()

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4 20 static int hif_generic_confirm(struct wfx_dev *wdev, 21 const struct hif_msg *hif, const void *buf) 22

[PATCH 6/8] staging: wfx: gpiod_get_value() can return an error

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative Reported-by: Dan

[PATCH 1/8] staging: wfx: improve error handling of hif_join()

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315) 311 if (!hif) 312 return -ENOMEM; 313 body->infrastructure_bss_mode = !conf->ibss_joined; 314

[PATCH 2/8] staging: wfx: check memory allocation

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf' 227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); 228 ret = wfx_send_pds(wdev, tmp_buf, pds->size);

[PATCH 4/8] staging: wfx: wfx_init_common() returns NULL on error

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer bus->core contains the result of wfx_init_common(). With this patch, wfx_init_common() returns a

Greetings to you,

2020-10-09 Thread Christian Artwell
Attention; I am a CHRISTIAN ARTWELL working with BANQUE POPULAIRE S.A TOGO as their SECRETARIAT GENERAL FOREIGN REMITTANCE DEPT, an account officer to late Engineer George, May I inform you that an amount of $9.6 million also (150 kg of Gold) with our bank will be moved on your name as the

Re: [PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
On 09/10/20 9:46 pm, Anant Thazhemadam wrote: > While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if > wMaxPacketSize = 0 for the endpoints found. > > Some devices have isochronous endpoints that have wMaxPacketSize = 0 > (as required by the USB-2 spec). > However, since this

[PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if wMaxPacketSize = 0 for the endpoints found. Some devices have isochronous endpoints that have wMaxPacketSize = 0 (as required by the USB-2 spec). However, since this doesn't apply here, wMaxPacketSize = 0 can be considered to

[PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if wMaxPacketSize = 0 for the endpoints found. Some devices have isochronous endpoints that have wMaxPacketSize = 0 (as required by the USB-2 spec). However, since this doesn't apply here, wMaxPacketSize = 0 can be considered to

[PATCH v3 00/11] Introduce Simple atomic counters

2020-10-09 Thread Shuah Khan
This patch series is a result of discussion at the refcount_t BOF the Linux Plumbers Conference. In this discussion, we identified a need for looking closely and investigating atomic_t usages in the kernel when it is used strictly as a counter without it controlling object lifetimes and state

[PATCH v3 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-10-09 Thread Shuah Khan
counter_atomic* is introduced to be used when a variable is used as a simple counter and doesn't guard object lifetimes. This clearly differentiates atomic_t usages that guard object lifetimes. counter_atomic* variables wrap around to INT_MIN when it overflows and should not be used to guard

Re: [PATCH] staging: octeon: repair "fixed-link" support

2020-10-09 Thread kernel test robot
Hi Alexander, I love your patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Alexander-A-Sverdlin/staging-octeon-repair-fixed-link-support/20201009-174828 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH] staging: octeon: repair "fixed-link" support

2020-10-09 Thread Greg Kroah-Hartman
On Fri, Oct 09, 2020 at 11:47:39AM +0200, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > The PHYs must be registered once in device probe function, not in device > open callback because it's only possible to register them once. > > Fixes: a25e278020 ("staging: octeon: support

Re: [PATCH v2 07/11] drivers/android/binder: convert stats, transaction_log to counter_atomic32

2020-10-09 Thread Christian Brauner
On Tue, Oct 06, 2020 at 02:44:38PM -0600, Shuah Khan wrote: > counter_atomic* is introduced to be used when a variable is used as > a simple counter and doesn't guard object lifetimes. This clearly > differentiates atomic_t usages that guard object lifetimes. > > counter_atomic* variables will

Re: [PATCH] stating: octeon: Drop on uncorrectable alignment or FCS error

2020-10-09 Thread Dan Carpenter
On Fri, Oct 09, 2020 at 11:46:05AM +0200, Alexander A Sverdlin wrote: > --- a/drivers/staging/octeon/ethernet-rx.c > +++ b/drivers/staging/octeon/ethernet-rx.c > @@ -69,14 +69,16 @@ static inline int cvm_oct_check_rcv_error(struct cvmx_wqe > *work) > else > port =

[PATCH 0/2] Fix new warnings at linux-next

2020-10-09 Thread Mauro Carvalho Chehab
There are some file renames at linux-next that are causing some new documentation warnings. Address them. Mauro Carvalho Chehab (2): MAINTAINERS: fix broken doc refs due to yaml conversion crypto: sun8x-ce*: update entries to its documentation

[PATCH 1/2] MAINTAINERS: fix broken doc refs due to yaml conversion

2020-10-09 Thread Mauro Carvalho Chehab
Several *.txt files got converted to yaml. Update their references at MAINTAINERS file accordingly. Signed-off-by: Mauro Carvalho Chehab --- Documentation/devicetree/bindings/clock/hi6220-clock.txt | 2 +- MAINTAINERS | 9 -

Re: [PATCH] staging: octeon: repair "fixed-link" support

2020-10-09 Thread kernel test robot
Hi Alexander, I love your patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Alexander-A-Sverdlin/staging-octeon-repair-fixed-link-support/20201009-174828 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH] staging: octeon: Drop on uncorrectable alignment or FCS error

2020-10-09 Thread Alexander Sverdlin
Hello Greg, On 10/01/2020 13:48, Greg Kroah-Hartman wrote: > On Wed, Jan 08, 2020 at 05:10:42PM +0100, Alexander X Sverdlin wrote: >> From: Alexander Sverdlin >> >> Currently in case of alignment or FCS error if the packet cannot be >> corrected it's still not dropped. Report the error properly

[PATCH] stating: octeon: Drop on uncorrectable alignment or FCS error

2020-10-09 Thread Alexander A Sverdlin
From: Alexander Sverdlin Currently in case of alignment or FCS error if the packet cannot be corrected it's still not dropped. Report the error properly and drop the packet while making the code around a little bit more readable. Signed-off-by: Alexander Sverdlin Fixes: 80ff0fd3ab ("Staging:

  1   2   >