If a read request is not within the device range return error.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 10 +-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-comp
if enough space is not available to create a block of the specified size error
out.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers
ed-off-by: Shaohua Li <s...@fusionio.com>
Signed-off-by: Ram Pai <ram.n@gmail.com>
---
drivers/md/Kconfig |6 +
drivers/md/Makefile |1 +
drivers/md/dm-inplace-compress.c | 1487 ++
drivers/md/dm-inplace-compress.h |
On an average the compressed size is less than 50% of the original buffer. Use
this knowledge to optimize the amount of space allocated to hold the compressed
buffer. If the allocated size is determined to be insufficient than reallocate
the required size.
Signed-off-by: Ram Pai <li
We store the size of the compressed segment, on the sector boundary. And later
use that location to determine the size of the compressed segment. However if
that location is corrupted for any reason we would'nt know. Hence add a
magicmarker to catch for such corruptions.
Signed-off-by: Ram Pai
-buffer is contigious within the same bio-segment.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 143 ++---
drivers/md/dm-inplace-compress.h |2 +
2 files changed, 102 insertions(+), 43 deletions(-)
diff --git a/drivers
Helper functions to allocate/reallocate and free memory.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 17 +
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-comp
Ability to create a block device with a compression algorithm of the users
choice. Currently lzo and nx842 compressors are supported.
If the compressor algorithm is not specified the default setting in
/sys/modules/dm-inplace-compress/parameters/compress is used.
Signed-off-by: Ram Pai <li
device.
Your comments to improve the code is very much appreciated.
Ram Pai (15):
DM: Ability to choose the compressor.
DM: Error if enough space is not available.
DM: Ensure that the read request is within the device range.
DM: allocation/free helper routines.
DM: separate out compression
Done to conserve as much free space as possible. Waiting to release till the
bio is done will unneccesarily hog up memory.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 14 +++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff
Add parameters to monitor the memory efficiency of the module.
dm_icomp_total_alloc_size: total memory currently in use.
dm_icomp_total_bio_save: total memory allocation saved by the optimizations.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c
.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 76 +-
drivers/md/dm-inplace-compress.h |3 +-
2 files changed, 68 insertions(+), 11 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-i
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
.../device-mapper/dm-inplace-compress.text | 138
1 files changed, 138 insertions(+), 0 deletions(-)
create mode 100644 Documentation/device-mapper/dm-inplace-compress.text
diff --git a/Documentation/device-map
read boundaries. Which
is a huge advantage especially if we are operating under acute memory
starvation; mostly when this block device is used as a swap device.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c | 185 ++---
driv
No point doing it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/md/dm-inplace-compress.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-compress.c
index 55a515b..31b144b 100644
--- a/drivers
.
Your comments to improve the code is very much appreciated.
Ram Pai (1):
From: Shaohua Li <s...@kernel.org>
.../device-mapper/dm-inplace-compress.txt | 155 ++
drivers/md/Kconfig |6 +
drivers/md/Makefile
size issue.
So even if SSD FTL cannot map non-contiguous disk sectors to
contiguous nand, the compression target can still function well.
Signed-off-by: Shaohua Li <s...@fusionio.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
.../device-mapper/dm-inplace-
ong git tree, please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Ram-Pai/DM-inplace-compressed-DM-target/20170214-055727
> base:
> https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> for-next
&
not receive any comments.
Ram Pai (1):
From: Shaohua Li <s...@kernel.org>
.../device-mapper/dm-inplace-compress.txt | 155 ++
drivers/md/Kconfig |6 +
drivers/md/Makefile|2 +
drivers/md/dm-inplace-comp
size issue.
So even if SSD FTL cannot map non-contiguous disk sectors to
contiguous nand, the compression target can still function well.
Signed-off-by: Shaohua Li <s...@fusionio.com>
Signed-off-by: Ram Pai <ram.n@gmail.com>
---
.../device-mapper/dm-inplace-
of
allocating a new one.
Your comments to improve the code is very much appreciated.
Ram Pai (1):
From: Shaohua Li <s...@kernel.org>
.../device-mapper/dm-inplace-compress.txt | 139 ++
drivers/md/Kconfig |6 +
drivers/md/Ma
size issue.
So even if SSD FTL cannot map non-contiguous disk sectors to
contiguous nand, the compression target can still function well.
Signed-off-by: Shaohua Li <s...@fusionio.com>
Signed-off-by: Ram Pai <ram.n@gmail.com>
---
.../device-mapper/dm-inplace-
/archives/dm-devel/2013-December/msg00144.html
Ram Pai (1):
From: Shaohua Li <s...@kernel.org>
Documentation/device-mapper/dm-inplace-compress.txt | 174 +
drivers/md/Kconfig |6
drivers/md/Makefile |2
drivers
size issue.
So even if SSD FTL cannot map non-continuous disk sectors to
continuous nand, the compression target can still function well.
Signed-off-by: Shaohua Li <s...@fusionio.com>
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
.../device-mapper/dm-inplace-
On Thu, Jul 27, 2017 at 02:32:59PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai <linux...@us.ibm.com> writes:
>
> > Store and restore the AMR, IAMR and UMOR register state of the task
> > before scheduling out and after scheduling in, respectively.
> >
ully the comments that I currently have will be helpful anyway.
sure. thanx for taking the time to look through the patches.
>
> Ram Pai <linux...@us.ibm.com> writes:
> > diff --git a/arch/powerpc/include/asm/pkeys.h
> > b/arch/powerpc/include/asm/pkeys.h
> > index 203d
On Fri, Jul 28, 2017 at 06:00:02PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai <linux...@us.ibm.com> writes:
> > --- a/arch/powerpc/mm/pkeys.c
> > +++ b/arch/powerpc/mm/pkeys.c
> > @@ -201,3 +201,36 @@ int __arch_override_mprotect_pkey(struct
>
On Thu, Jul 27, 2017 at 11:15:36AM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai <linux...@us.ibm.com> writes:
> > @@ -113,10 +117,14 @@ static inline int arch_override_mprotect_pkey(struct
> > vm_area_struct *vma,
> > return 0;
> > }
> >
> >
On Fri, Jul 28, 2017 at 07:17:13PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai <linux...@us.ibm.com> writes:
> > --- a/arch/powerpc/mm/pkeys.c
> > +++ b/arch/powerpc/mm/pkeys.c
> > @@ -97,3 +97,60 @@ int __arch_set_user_pkey_access(struct task_struct *tsk,
&
On Thu, Jul 27, 2017 at 05:40:44PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai <linux...@us.ibm.com> writes:
>
> > Introduce helper functions that can initialize the bits in the AMR,
> > IAMR and UMOR register; the bits that correspond to the given pkey.
> >
On Thu, Jul 13, 2017 at 12:45:00AM -0700, Ram Pai wrote:
> On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote:
> > On Wed, 5 Jul 2017 14:21:51 -0700
> > Ram Pai <linux...@us.ibm.com> wrote:
> >
> > > Initial plumbing to manage all the
On Tue, Jul 11, 2017 at 11:23:29AM -0700, Dave Hansen wrote:
> On 07/05/2017 02:22 PM, Ram Pai wrote:
> > Add documentation updates that capture PowerPC specific changes.
> >
> > Signed-off-by: Ram Pai <linux...@us.ibm.com>
> > ---
> > Docu
On Thu, Jul 13, 2017 at 07:49:05PM +1000, Balbir Singh wrote:
> On Thu, Jul 13, 2017 at 5:55 PM, Ram Pai <linux...@us.ibm.com> wrote:
> > On Wed, Jul 12, 2017 at 03:26:01PM +1000, Balbir Singh wrote:
> >> On Wed, 5 Jul 2017 14:21:52 -0700
> >> Ra
On Tue, Jul 11, 2017 at 03:59:59PM +1000, Balbir Singh wrote:
> On Wed, 5 Jul 2017 14:21:39 -0700
> Ram Pai <linux...@us.ibm.com> wrote:
>
> > Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6
> > in the 64K backed HPTE pages. This along with the earlier
> &
On Tue, Jul 11, 2017 at 04:52:46PM +0200, Michal Hocko wrote:
> On Wed 05-07-17 14:21:37, Ram Pai wrote:
> > Memory protection keys enable applications to protect its
> > address space from inadvertent access or corruption from
> > itself.
> >
> > The overall id
On Wed, Jul 12, 2017 at 08:08:56AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2017-07-11 at 14:51 -0700, Ram Pai wrote:
> > On Wed, Jul 12, 2017 at 07:29:37AM +1000, Benjamin Herrenschmidt wrote:
> > > On Tue, 2017-07-11 at 11:11 -0700, Dave Hansen wrote:
> > > &g
On Sun, Jul 09, 2017 at 11:05:44PM -0700, Ram Pai wrote:
> On Mon, Jul 10, 2017 at 11:13:23AM +0530, Anshuman Khandual wrote:
> > On 07/06/2017 02:51 AM, Ram Pai wrote:
.
>
> > do you have data points to show the difference in
> > performance between this version and t
On Mon, Jul 10, 2017 at 08:41:30AM +0530, Anshuman Khandual wrote:
> On 07/06/2017 02:52 AM, Ram Pai wrote:
> > get_pte_pkey() helper returns the pkey associated with
> > a address corresponding to a given mm_struct.
> >
> > Signed-off-by: Ram Pai <linux...@us.ibm.
On Mon, Jul 10, 2017 at 11:13:23AM +0530, Anshuman Khandual wrote:
> On 07/06/2017 02:51 AM, Ram Pai wrote:
> > Memory protection keys enable applications to protect its
> > address space from inadvertent access or corruption from
> > itself.
> >
> > The
On Mon, Jul 10, 2017 at 08:37:04AM +0530, Anshuman Khandual wrote:
> On 07/06/2017 02:52 AM, Ram Pai wrote:
> > Add documentation updates that capture PowerPC specific changes.
> >
> > Signed-off-by: Ram Pai <linux...@us.ibm.com>
> > ---
> > Docu
On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote:
> On Wed, 5 Jul 2017 14:21:51 -0700
> Ram Pai <linux...@us.ibm.com> wrote:
>
> > Initial plumbing to manage all the keys supported by the
> > hardware.
> >
> > Total 32 keys are supported
On Tue, Jul 11, 2017 at 11:13:56AM -0700, Dave Hansen wrote:
> On 07/05/2017 02:22 PM, Ram Pai wrote:
> > +#ifdef CONFIG_PPC64_MEMORY_PROTECTION_KEYS
> > +void arch_show_smap(struct seq_file *m, struct vm_area_struct *vma)
> > +{
> > + seq_printf(m, "Prot
On Wed, Jul 12, 2017 at 01:10:51PM +1000, Balbir Singh wrote:
> On Tue, 11 Jul 2017 08:44:15 -0700
> Ram Pai <linux...@us.ibm.com> wrote:
>
> > On Tue, Jul 11, 2017 at 03:59:59PM +1000, Balbir Singh wrote:
> > > On Wed, 5 Jul 2017 14:21:39 -0700
> > &
On Wed, Jul 12, 2017 at 03:26:01PM +1000, Balbir Singh wrote:
> On Wed, 5 Jul 2017 14:21:52 -0700
> Ram Pai <linux...@us.ibm.com> wrote:
>
> > Implements helper functions to read and write the key related
> > registers; AMR, IAMR, UAMOR.
> >
> > AMR re
On Mon, Jul 10, 2017 at 08:40:19AM +0530, Anshuman Khandual wrote:
> On 07/06/2017 02:52 AM, Ram Pai wrote:
> > Capture the protection key that got violated in paca.
> > This value will be used by used to inform the signal
> > handler.
> >
> > Signed-off
On Mon, Jul 10, 2017 at 08:37:28AM +0530, Anshuman Khandual wrote:
> On 07/06/2017 02:52 AM, Ram Pai wrote:
> > Display the pkey number associated with the vma in smaps of a task.
> > The key will be seen as below:
> >
> > ProtectionKey: 0
> >
> > Sign
On Thu, Jul 20, 2017 at 11:34:10AM +0530, Aneesh Kumar K.V wrote:
> Ram Pai <linux...@us.ibm.com> writes:
>
> > basic setup to initialize the pkey system. Only 64K kernel in HPT
> > mode, enables the pkey system.
> >
> > Signed-off-by: Ram Pai <linux..
On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote:
> Ram Pai <linux...@us.ibm.com> writes:
>
> > helper function that checks if the read/write/execute is allowed
> > on the pte.
> >
> > Signed-off-by: Ram Pai <linux...@us.ibm.com>
>
detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a
detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a
introduce a new allocator that allocates 4k hardware-pages to back
64k linux-page. This allocator is only applicable on powerpc.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 29 ++
1 files changed, 29 insertions
a access-denied key should not trigger any key violation
after the key has been freed.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 25 +
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/tools/t
a write-denied key should not trigger any key violation
after the key has been freed.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/tools/testing/sel
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/Makefile |1 +
tools/testing/selftests/vm/pkey-helpers.h | 219
tools/testing/selftests/vm/protection_keys.c | 1395 +
tools/testing/selftests/x86/Makefile
Moved all the generic definition and helper functions to the
header file
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 62 +++--
tools/testing/selftests/vm/protection_keys.c | 54 --
2 files chang
some pkru references are named to pkey_reg
and some prku references are renamed to pkey
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 85 +-
tools/testing/selftests/vm/protection_keys.c | 227 ++
2 files c
This is in preparation to accomadate a differing size register
across architectures.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27 +-
tools/testing/selftests/vm/protection_keys.c | 75 ++
2 files c
open_hugepage_file() <- opens the huge page file
get_start_key() <-- provides the first non-reserved key.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 11 +++
tools/testing/selftests/vm/protection_keys.c |6 +++---
2 f
helper functions to handler shadow pkey register
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 27
tools/testing/selftests/vm/protection_keys.c | 34 -
2 files changed, 49 insertions(
detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 19 +++
1 files changed, 19 insertions(+), 0 deletions(-)
diff
cleanup the code to satisfy coding styles.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 81 ++
1 files changed, 43 insertions(+), 38 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b
throughout
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/protection_keys.c
b/tools/testing/selftests/vm/protection_keys.c
index 20bab6d..f
instead of clearing the bits, pkey_disable_clear() was setting
the bits. Fixed it.
Also fixed a wrong assertion in that function. When bits are
cleared, the resulting bit value will be less than the original.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selfte
When a key is freed, the key is no more effective.
Clear the bits corresponding to the pkey in the shadow
register. Otherwise it will carry some spurious bits
which can trigger false-positive asserts.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selfte
alloc_random_pkey() was allocating the same pkey every time.
Not all pkeys were geting tested. fixed it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/protection_keys.c | 10 +++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/t
Finally this patch provides the ability for a process to
allocate and free a protection key.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/systbl.h |2 ++
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |2
to be available.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu.h |9 +++
arch/powerpc/include/asm/mmu_context.h |1 +
arch/powerpc/include/asm/pkeys.h | 81 --
arch/powerpc/mm/mmu_context_book3s64.c
This patch provides the implementation of execute-only pkey.
The architecture-independent expects the ability to create
and manage a special key which has execute-only permission.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu.h |1 +
arch/p
powerpc has hardware support to disable execute on a pkey.
This patch enables the ability to create execute-disabled
keys.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/pkeys.h | 12
arch/powerpc/mm/pkeys.c | 10 ++
2 files c
This patch provides the detailed implementation for
a user to allocate a key and enable it in the hardware.
It provides the plumbing, but it cannot be used till
the system call is implemented. The next patch will
do so.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/inclu
cleanup the bits corresponding to a key in the AMR, and IAMR
register, when the key is newly allocated/activated or is freed.
We dont want some residual bits cause the hardware enforce
unintended behavior when the key is activated or freed.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
Store and restore the AMR, IAMR and UMOR register state of the task
before scheduling out and after scheduling in, respectively.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/processor.h |5 +
arch/powerpc/kernel/process.c| 18 +++
-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 20 +++-
arch/powerpc/include/asm/mman.h |8
arch/powerpc/include/asm/pkeys.h | 12
3 files changed, 39 insertions(+), 1 deletions(-)
diff
Introduce helper functions that can initialize the bits in the AMR,
IAMR and UMOR register; the bits that correspond to the given pkey.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/pkeys.h |1 +
arch/powerpc/mm/pkeys.c
The maximum number of keys that can be allocated has to
take into consideration that some keys are reserved by
the architecture of specific purpose and cannot be allocated.
Fix the assertion in test_pkey_alloc_exhaust()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selfte
Since PowerPC and Intel both support memory protection keys, moving
the documenation to arch-neutral directory.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
Documentation/vm/protection-keys.txt | 85 +
Documentation/x86/protection-keys.txt
arch_pkeys_enabled() returns true if the cpu
supports X86_FEATURE_OSPKE.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/x86/include/asm/pkeys.h |1 +
arch/x86/kernel/fpu/xstate.c |5 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/p
Only the architecture knows if it supports protection keys.
Hence introducing arch_pkeys_enabled().
This function is needed by arch neutral code.
One use case is -- to determine if the
protection key needs to be displayed in smaps.
Signed-off-by: Ram Pai <linux...@us.ibm.
Introduce powerpc implementation for the various
abstactions.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
tools/testing/selftests/vm/pkey-helpers.h| 97 +++--
tools/testing/selftests/vm/protection_keys.c | 33 +
2 files changed, 107 insertions(
Add documentation updates that capture PowerPC specific changes.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
Documentation/vm/protection-keys.txt | 90 -
1 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/Documentation/vm/protection-ke
Introduce pte_get_hash_gslot()() which returns the slot number of the
HPTE in the global hash table.
This function will come in handy as we work towards re-arranging the
PTE bits in the later patches.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/
take some additional parameters to keep the prototype consistent.
This function will be handy as we work towards re-arranging the
bits in the later patches.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/hash-4k.h | 15 +++
arch/p
replace redundant code with helper functions
pte_get_hash_gslot() and pte_set_hash_slot()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/hash64_4k.c | 14 ++
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/mm/hash64_4k.c b/arch/p
replace redundant code in flush_hash_page() with helper function
pte_get_hash_gslot().
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/hash_utils_64.c | 13 -
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/mm/hash_utils_64.c
replace redundant code in __hash_page_huge() with helper
functions pte_get_hash_gslot() and pte_set_hash_slot()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/hugetlbpage-hash64.c | 24
1 files changed, 4 insertions(+), 20 deletions(-)
diff
replace redundant code in __hash_page_4K() with helper
functions pte_get_hash_gslot() and pte_set_hash_slot()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/hash64_64k.c | 34 +-
1 files changed, 9 insertions(+), 25 deletions(-)
diff
The H_PAGE_F_SECOND,H_PAGE_F_GIX are not in the 64K main-PTE.
capture these changes in the dump pte report.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/dump_linuxpagetables.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powe
replace redundant code in __hash_page_64K() with helper
functions pte_get_hash_gslot() and pte_set_hash_slot()
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/mm/hash64_64k.c | 24
1 files changed, 4 insertions(+), 20 deletions(-)
diff --git
Currently only 4bits are allocated in the vma flags to hold 16
keys. This is sufficient for x86. PowerPC supports 32 keys,
which needs 5bits. This patch allocates an additional bit.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
fs/proc/task_mmu.c |6 --
include/linux/mm.h
Implements helper functions to read and write the key related
registers; AMR, IAMR, UAMOR.
AMR register tracks the read,write permission of a key
IAMR register tracks the execute permission of a key
UAMOR register enables and disables a key
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
ael Ellermen and myself.
4K PTE format remains unchanged currently.
The patch does the following code changes
a) PTE flags are split between 64k and 4k header files.
b) __hash_page_4K() is reimplemented to reflect the
above logic.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
ar
arch_show_smap() function is not needed anymore.
Delete it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/x86/kernel/setup.c |8
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f818236..5efe4c3
support pkeys.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
fs/proc/task_mmu.c |9 -
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index e5710bc..d2b3e75 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -16,6
The value of the AMR register at the time of exception
is made available in gp_regs[PT_AMR] of the siginfo.
The value of the pkey, whose protection got violated,
is made available in si_pkey field of the siginfo structure.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/i
This patch provides the implementation for
arch_vma_access_permitted(). Returns true if the
requested access is allowed by pkey associated with the
vma.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/mmu_context.h |5 +++-
arch/powerpc/mm/p
arch_pkeys_enabled() returns true if the cpu
supports protection key, and the kernel has it
enabled.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/pkeys.h |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/pke
get_pte_pkey() helper returns the pkey associated with
a address corresponding to a given mm_struct.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 +
arch/powerpc/mm/hash_utils_64.c | 25 ++
Replace the magic number used to check for DSI exception
with a meaningful value.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/reg.h |7 ++-
arch/powerpc/kernel/exceptions-64s.S |2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff
helper function that checks if the read/write/execute is allowed
on the pte.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++
arch/powerpc/include/asm/pkeys.h | 12 +
arch/powerpc/mm/p
Patch provides the ability for a process to
associate a pkey with a address range.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/systbl.h |1 +
arch/powerpc/include/asm/unistd.h |4 +---
arch/powerpc/include/uapi/asm/unistd.h |1 +
3
1 - 100 of 346 matches
Mail list logo