Re: [PATCH v2 05/10] sysfs: treewide: constify attribute callback of bin_is_visible()

2024-11-04 Thread Ira Weiny
attr_is_visible(struct kobject *kobj, > - struct bin_attribute *attr, int i) > + const struct bin_attribute *attr, > int i) > { > struct device *dev = kobj_to_dev(kobj); > struct cxl_port *port = to_cxl_port(dev); For CXL Acked-by: Ira Weiny

Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling

2023-04-13 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 12 Apr 2023 16:29:01 -0500 > Bjorn Helgaas wrote: > > > On Tue, Apr 11, 2023 at 01:03:02PM -0500, Terry Bowman wrote: > > > From: Robert Richter > > > > > > RCEC AER corrected and uncorrectable internal errors (CIE/UIE) are > > > disabled by default. > > > >

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Ira Weiny
+ Konstantin Michael Ellerman wrote: > Ira Weiny writes: > > Dave Hansen wrote: > >> On 3/15/23 16:20, Ira Weiny wrote: > >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray > >> > callbacks") removed the calls to memcp

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
Dave Hansen wrote: > On 3/15/23 16:20, Ira Weiny wrote: > > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray > > callbacks") removed the calls to memcpy_page_flushcache(). > > > > kmap_atomic() is deprecated and used in the x86

[PATCH 3/3] arm: uaccess: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
@lists.infradead.org Signed-off-by: Ira Weiny --- arch/arm64/include/asm/uaccess.h| 2 -- arch/arm64/lib/uaccess_flushcache.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 5c7b2f9d5913..4bf2c0975a82 100644 ---

[PATCH 2/3] powerpc: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
t; Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Ira Weiny --- arch/powerpc/include/asm/uaccess.h | 2 -- arch/powerpc/lib/pmem.c| 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h index 3ddc65c63a49.

[PATCH 1/3] x86, uaccess: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
ms" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Ira Weiny --- arch/x86/include/asm/uaccess_64.h | 2 -- arch/x86/lib/usercopy_64.c| 9 - 2 files changed, 11 deletions(-) diff --git a/arch/x86/includ

[PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
;s. Signed-off-by: Ira Weiny --- Ira Weiny (3): x86, uaccess: Remove memcpy_page_flushcache() powerpc: Remove memcpy_page_flushcache() arm: uaccess: Remove memcpy_page_flushcache() arch/arm64/include/asm/uaccess.h| 2 -- arch/arm64/lib/uaccess_flushcache.c | 6 -- arch/

Re: [PATCH RFC] PCI/AER: Enable internal AER errors by default

2023-02-14 Thread Ira Weiny
Bjorn Helgaas wrote: > On Fri, Feb 10, 2023 at 02:33:23PM -0800, Ira Weiny wrote: > > The CXL driver expects internal error reporting to be enabled via > > pci_enable_pcie_error_reporting(). It is likely other drivers expect the > > same. > > Dave submitted a patch to

[PATCH RFC] PCI/AER: Enable internal AER errors by default

2023-02-10 Thread Ira Weiny
aonkar Cc: Oliver O'Halloran Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Ira Weiny --- This is RFC to see if it is acceptable to be part of the standard pci_enable_pcie_error_reporting() call or per

[PATCH] checkpatch: Add kmap and kmap_atomic to the deprecated list

2022-08-13 Thread ira . weiny
From: Ira Weiny kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation

Re: [RFC PATCH 2/6] testing/pkeys: Don't use uninitialized variable

2022-06-13 Thread Ira Weiny
On Mon, Jun 13, 2022 at 03:48:56PM -0700, Mehta, Sohil wrote: > On 6/10/2022 4:35 PM, ira.we...@intel.com wrote: > > diff --git a/tools/testing/selftests/vm/protection_keys.c > > b/tools/testing/selftests/vm/protection_keys.c > > index d0183c381859..43e47de19c0d 100644 > > --- a/tools/testing/self

Re: [RFC PATCH 1/6] testing/pkeys: Add command line options

2022-06-13 Thread Ira Weiny
On Mon, Jun 13, 2022 at 03:31:02PM -0700, Mehta, Sohil wrote: > On 6/10/2022 4:35 PM, ira.we...@intel.com wrote: > > > Add command line options for debug level and number of iterations. > > > > $ ./protection_keys_64 -h > > Usage: ./protection_keys_64 [-h,-d,-i ] > > --help,-h This hel

Re: [RFC PATCH 6/6] pkeys: Change mm_pkey_free() to void

2022-06-13 Thread Ira Weiny
On Mon, Jun 13, 2022 at 09:17:06AM +, Christophe Leroy wrote: > > > Le 11/06/2022 à 01:35, ira.we...@intel.com a écrit : > > From: Ira Weiny > > > > Now that the pkey arch support is no longer checked in mm_pkey_free() > > there is no reason to have it retu

[RFC PATCH 6/6] pkeys: Change mm_pkey_free() to void

2022-06-10 Thread ira . weiny
From: Ira Weiny Now that the pkey arch support is no longer checked in mm_pkey_free() there is no reason to have it return int. Change the return value to void. Cc: Dave Hansen Cc: Aneesh Kumar K.V Suggested-by: Sohil Mehta Signed-off-by: Ira Weiny --- arch/powerpc/include/asm/pkeys.h | 4

[RFC PATCH 4/6] pkeys: Lift pkey hardware check for pkey_alloc()

2022-06-10 Thread ira . weiny
From: Ira Weiny pkey_alloc() is documented to return ENOSPC when the hardware does not support pkeys. On x86, pkey_alloc() incorrectly returns EINVAL. This is because mm_pkey_alloc() does not check for pkey support before returning a key. Therefore, if the keys are not exhausted pkey_alloc

[RFC PATCH 3/6] testing/pkeys: Add additional test for pkey_alloc()

2022-06-10 Thread ira . weiny
From: Ira Weiny When pkeys are not available on the hardware pkey_alloc() has specific behavior which was previously untested. Add test for this. Cc: Dave Hansen Cc: Aneesh Kumar K.V Signed-off-by: Ira Weiny --- tools/testing/selftests/vm/protection_keys.c | 12 1 file changed

[RFC PATCH 0/6] User pkey minor bug fixes

2022-06-10 Thread ira . weiny
From: Ira Weiny While evaluating the possibility of defining a new type for pkeys within the kernel I found a couple of minor bugs. Because these patches clean up the return codes from system calls I'm sending this out RFC hoping that users will speak up if anything breaks. I'

[RFC PATCH 1/6] testing/pkeys: Add command line options

2022-06-10 Thread ira . weiny
From: Ira Weiny It is more convenient to use command line options for debug and iterations vs changing the code and recompiling. Add command line options for debug level and number of iterations. $ ./protection_keys_64 -h Usage: ./protection_keys_64 [-h,-d,-i ] --help,-h This help

[RFC PATCH 5/6] pkeys: Up level pkey_free() checks

2022-06-10 Thread ira . weiny
From: Ira Weiny x86 is missing a hardware check for pkey support in pkey_free(). While the net result is the same (-EINVAL returned), pkey_free() has well defined behavior which will be easier to maintain in one place. For powerpc the return code is -1 rather than -EINVAL. This changes that

[RFC PATCH 2/6] testing/pkeys: Don't use uninitialized variable

2022-06-10 Thread ira . weiny
From: Ira Weiny err was being used in test_pkey_alloc_exhaust() prior to being assigned. errno is useful to know after a failed alloc_pkey() call. Change err to errno in the debug print. Cc: Dave Hansen Cc: Aneesh Kumar K.V Signed-off-by: Ira Weiny --- tools/testing/selftests/vm

Re: [PATCH 5/5] x86/pkeys: Standardize on u8 for pkey type

2022-03-15 Thread Ira Weiny
On Tue, Mar 15, 2022 at 09:03:26AM -0700, Dave Hansen wrote: > On 3/15/22 08:53, Ira Weiny wrote: > > On Mon, Mar 14, 2022 at 04:49:12PM -0700, Dave Hansen wrote: > >> On 3/10/22 16:57, ira.we...@intel.com wrote: > >>> From: Ira Weiny > >>> > >>

Re: [PATCH 5/5] x86/pkeys: Standardize on u8 for pkey type

2022-03-15 Thread Ira Weiny
On Mon, Mar 14, 2022 at 04:49:12PM -0700, Dave Hansen wrote: > On 3/10/22 16:57, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > The number of pkeys supported on x86 and powerpc are much smaller than a > > u16 value can hold. It is desirable to standardiz

[PATCH 4/5] mm/pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-10 Thread ira . weiny
From: Ira Weiny The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture fails to check for an invalid negative value. A simple check for less than 0 would fix this issue however, in the call stack below arch_set_user_pkey_access() the pkey should never be negative on any

[PATCH 5/5] x86/pkeys: Standardize on u8 for pkey type

2022-03-10 Thread ira . weiny
From: Ira Weiny The number of pkeys supported on x86 and powerpc are much smaller than a u16 value can hold. It is desirable to standardize on the type for pkeys. powerpc currently supports the most pkeys at 32. u8 is plenty large for that. Standardize on the pkey types by changing u16 to u8

[PATCH 3/5] powerpc/pkeys: Properly type pkey in init_{i}amr()

2022-03-10 Thread ira . weiny
From: Ira Weiny Negative values passed to pkeyshift() will cause an overflow of the amr and imar values. Pkey should not be negative in this call path and u8 is large enough for the 32 pkeys available on powerpc. Change pkey to u8 in init_amr() and init_iamr(). To: Michael Ellerman Cc

[PATCH 2/5] x86/pkeys: Remove __arch_set_user_pkey_access() declaration

2022-03-10 Thread ira . weiny
From: Ira Weiny In the x86 code __arch_set_user_pkey_access() is not used and is not defined. Remove the dead declaration. To: Dave Hansen Signed-off-by: Ira Weiny --- Changes from V1: Make this part of a series of pkey clean ups --- arch/x86/include/asm/pkeys.h | 6 -- 1 file

[PATCH 0/5] Pkey User clean up patches

2022-03-10 Thread ira . weiny
From: Ira Weiny I'm looking for acks that this is acceptable for official submission to the maintainers. I believe the code to be better than RFC quality but I realize that the type changes may be more churn than is desired. The following patches contain pkey cleanups and an attem

[PATCH 1/5] x86/pkeys: Clean up arch_set_user_pkey_access() declaration

2022-03-10 Thread ira . weiny
From: Ira Weiny arch_set_user_pkey_access() was declared two times in the header. Remove the 2nd declaration. Suggested-by: "Edgecombe, Rick P" Signed-off-by: Ira Weiny --- arch/x86/include/asm/pkeys.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/pkey

Re: [PATCH] pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-07 Thread Ira Weiny
On Mon, Mar 07, 2022 at 12:30:03PM +0530, Aneesh Kumar K.V wrote: > ira.we...@intel.com writes: > > > From: Ira Weiny > > > > The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture > > fails to check for an invalid negative value. > > >

[PATCH] pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-04 Thread ira . weiny
From: Ira Weiny The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture fails to check for an invalid negative value. A simple check for less than 0 would fix this issue however, in the call stack below arch_set_user_pkey_access() the pkey should never be negative on any

Re: [PATCH v3] powerpc/papr_scm: Implement initial support for injecting smart errors

2022-01-18 Thread Ira Weiny
On Thu, Jan 13, 2022 at 05:32:52PM +0530, Vaibhav Jain wrote: [snip] > > +/* Inject a smart error Add the dirty-shutdown-counter value to the pdsm */ > +static int papr_pdsm_smart_inject(struct papr_scm_priv *p, > + union nd_pdsm_payload *payload) > +{ > + int r

Re: [PATCH 01/18] mm: add a kunmap_local_dirty helper

2021-06-18 Thread Ira Weiny
On Fri, Jun 18, 2021 at 11:37:28AM +0800, Herbert Xu wrote: > On Thu, Jun 17, 2021 at 08:01:57PM -0700, Ira Weiny wrote: > > > > > + flush_kernel_dcache_page(__page); \ > > > > Is this required on 32bit systems? Why is kunmap_flush_on_unmap

Re: [PATCH 01/18] mm: add a kunmap_local_dirty helper

2021-06-17 Thread Ira Weiny
On Tue, Jun 15, 2021 at 03:24:39PM +0200, Christoph Hellwig wrote: > Add a helper that calls flush_kernel_dcache_page before unmapping the > local mapping. flush_kernel_dcache_page is required for all pages > potentially mapped into userspace that were written to using kmap*, > so having a helper

Re: [PATCH 09/16] ps3disk: use memcpy_{from,to}_bvec

2021-06-11 Thread Ira Weiny
On Fri, Jun 11, 2021 at 08:53:38AM +0200, Christoph Hellwig wrote: > On Tue, Jun 08, 2021 at 06:48:22PM -0700, Ira Weiny wrote: > > I'm still not 100% sure that these flushes are needed but the are not > > no-ops on > > every arch. Would it be best to preserve the

Re: switch the block layer to use kmap_local_page

2021-06-08 Thread Ira Weiny
n a follow > on series. Other than the missing flush_dcache's. For the series. Reviewed-by: Ira Weiny > > Diffstat: > arch/mips/include/asm/mach-rc32434/rb.h |2 - > block/bio-integrity.c | 14 -- > block/bi

Re: [PATCH 14/16] block: use memcpy_from_bvec in __blk_queue_bounce

2021-06-08 Thread Ira Weiny
On Tue, Jun 08, 2021 at 06:06:01PM +0200, Christoph Hellwig wrote: > Rewrite the actual bounce buffering loop in __blk_queue_bounce to that > the memcpy_to_bvec helper can be used to perform the data copies. > > Signed-off-by: Christoph Hellwig > --- > block/bounce.c | 21 +++-- >

Re: [PATCH 09/16] ps3disk: use memcpy_{from,to}_bvec

2021-06-08 Thread Ira Weiny
On Tue, Jun 08, 2021 at 06:05:56PM +0200, Christoph Hellwig wrote: > > rq_for_each_segment(bvec, req, iter) { > - unsigned long flags; > - dev_dbg(&dev->sbd.core, "%s:%u: bio %u: %u sectors from %llu\n", > - __func__, __LINE__, i, bio_sectors(iter

Re: [PATCH v3] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-05-08 Thread Ira Weiny
rror is returned back. > > In case of H_UNSUPPORTED error we return a EOPNOTSUPP error back from > drc_pmem_query_stats() indicating that performance stats-query > operation is not supported on this nvdimm. > > Fixes: 2d02bf835e57('powerpc/papr_scm: Fetch nvd

Re: [PATCH v2] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-05-05 Thread Ira Weiny
On Thu, May 06, 2021 at 12:46:06AM +0530, Vaibhav Jain wrote: > Currently drc_pmem_qeury_stats() generates a dev_err in case > "Enable Performance Information Collection" feature is disabled from > HMC or performance stats are not available for an nvdimm. The error is > of the form below: > > papr

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-14 Thread Ira Weiny
On Wed, Apr 14, 2021 at 09:51:40PM +0530, Vaibhav Jain wrote: > Thanks for looking into this patch Ira, > > Ira Weiny writes: > > > On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote: > >> Currently drc_pmem_qeury_stats() generates a dev_err in ca

Re: [PATCH] powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible

2021-04-14 Thread Ira Weiny
On Wed, Apr 14, 2021 at 06:10:26PM +0530, Vaibhav Jain wrote: > Currently drc_pmem_qeury_stats() generates a dev_err in case > "Enable Performance Information Collection" feature is disabled from > HMC. The error is of the form below: > > papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Failed

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

2020-11-09 Thread Ira Weiny
On Tue, Nov 10, 2020 at 02:13:56AM +0100, Thomas Gleixner wrote: > Ira, > > On Fri, Oct 09 2020 at 12:49, ira weiny wrote: > > From: Ira Weiny > > > > To correctly support the semantics of kmap() with Kernel protection keys > > (PKS), kmap() may be required t

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

2020-10-13 Thread Ira Weiny
On Tue, Oct 13, 2020 at 12:25:44PM +0100, Christoph Hellwig wrote: > > - kaddr = kmap(pp); > > + kaddr = kmap_thread(pp); > > memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE); > > - kunmap(pp); > > + kunmap_thread(pp); > > You only Cced me on this particular patch, which mean

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

2020-10-13 Thread Ira Weiny
On Tue, Oct 13, 2020 at 09:01:49PM +0100, Al Viro wrote: > On Tue, Oct 13, 2020 at 08:36:43PM +0100, Matthew Wilcox wrote: > > > static inline void copy_to_highpage(struct page *to, void *vfrom, unsigned > > int size) > > { > > char *vto = kmap_atomic(to); > > > > memcpy(vto, vfrom, size

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

2020-10-12 Thread Ira Weiny
On Mon, Oct 12, 2020 at 09:02:54PM +0100, Matthew Wilcox wrote: > On Mon, Oct 12, 2020 at 12:53:54PM -0700, Ira Weiny wrote: > > On Mon, Oct 12, 2020 at 05:44:38PM +0100, Matthew Wilcox wrote: > > > On Mon, Oct 12, 2020 at 09:28:29AM -0700, Dave Hansen wrote: > > >

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

2020-10-12 Thread Ira Weiny
On Mon, Oct 12, 2020 at 05:44:38PM +0100, Matthew Wilcox wrote: > On Mon, Oct 12, 2020 at 09:28:29AM -0700, Dave Hansen wrote: > > kmap_atomic() is always preferred over kmap()/kmap_thread(). > > kmap_atomic() is _much_ more lightweight since its TLB invalidation is > > always CPU-local and never b

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

2020-10-11 Thread Ira Weiny
On Fri, Oct 09, 2020 at 06:30:36PM -0700, Eric Biggers wrote: > 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 th

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

2020-10-11 Thread Ira Weiny
On Fri, Oct 09, 2020 at 07:53:07PM -0700, John Hubbard wrote: > 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

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

2020-10-11 Thread Ira Weiny
On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > 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_thre

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

2020-10-11 Thread Ira Weiny
On Sat, Oct 10, 2020 at 11:36:49AM +, Bernard Metzler wrote: > -ira.we...@intel.com wrote: - > [snip] > >@@ -505,7 +505,7 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, > >struct socket *s) > > page_array[seg] = p; > > > >

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

2020-10-10 Thread Ira Weiny
On Sat, Oct 10, 2020 at 12:03:49AM +0200, Daniel Vetter wrote: > 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 glob

[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 Fastabe

[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 Sch

[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 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 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 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 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

[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 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 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 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 insertions

[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 a

[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 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 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 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 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 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 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 dr

[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 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 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 b/fs/jffs2

[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 b/fs

[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 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 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 ++-- fs

[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 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 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 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 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 b

[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 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 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 deletions

[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 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 |

[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 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 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 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 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 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 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 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 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 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 fs/ecryptfs

[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 fs/cifs

  1   2   3   >