On Thu, Jun 22, 2017 at 02:37:27PM +0530, Anshuman Khandual wrote:
> On 06/17/2017 09:22 AM, Ram Pai wrote:
> > Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6
> > in the 4K backed hpte pages. These bits continue to be used
> > for 64K backed hpte pages in this pat
On Thu, Jun 22, 2017 at 07:21:03PM +1000, Balbir Singh wrote:
> On Wed, 2017-06-21 at 18:39 -0700, Ram Pai wrote:
> > Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6,
> > in the 4K backed HPTE pages. These bits continue to be used
> > for 64K backed HPTE pages in thi
On Sat, Jun 17, 2017 at 08:54:44AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2017-06-16 at 12:15 -0700, Ram Pai wrote:
> > gp_regs size is not changed, nor is the layout. A unused field in
> > the gp_regs is used to fill in the AMR contents. Old binaries will not
> >
significantly and has the
added advantage of releasing four valuable PTE bits for other
purpose.
This idea was jointly developed by Paul Mackerras, Aneesh, Michael
Ellermen and myself.
4K PTE format remain unchanged currently.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64
the patch
separately, along with documentation updates.
Thanks-to: Dave Hansen, Aneesh, Paul Mackerras,
Michael Ellermen :)
Ram Pai (7):
Free up four PTE bits to accommadate memory keys
Implement sys_pkey_alloc and sys_pkey_free system call.
store and restore the key state
Handle Data and Instruction exceptions caused by memory
protection-key.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/mmu_context.h | 12 +
arch/powerpc/include/asm/pkeys.h | 9
arch/powerpc/include/asm/reg.h | 10 +++-
arch/powerpc/kernel/exceptions-64s.S | 2
This system call, associates the pkey with the pte of all
pages corresponding to the given address range.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 22 ++-
arch/powerpc/include/asm/mman.h | 29 +
arch/powerpc/include/asm/pkeys.h
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/processor.h | 5 +
arch/powerpc/kernel/process.c| 18 ++
2 files changed, 23 insertions(+)
diff --git a/arch/powerpc/include/asm/processor.h
b/arch/powerpc/include/asm/processor.h
index a2123f2..1f714df 100644
of the siginfo structure.
Signed-off-by: Ram Pai
---
arch/powerpc/include/uapi/asm/ptrace.h | 5 +++-
arch/powerpc/kernel/asm-offsets.c | 1 +
arch/powerpc/kernel/exceptions-64s.S | 8 ++
arch/powerpc/kernel/signal_32.c| 18 ++---
arch/powerpc/kernel/signal_64.c
Map the PTE protection key bits to the HPTE key protection bits,
while creatiing HPTE entries.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 5 +
arch/powerpc/include/asm/pkeys.h | 7 +++
arch/powerpc/mm/hash_utils_64.c | 5
Sys_pkey_alloc() allocates and returns available pkey
Sys_pkey_free() frees up the key.
Total 32 keys are supported on powerpc. However key 0,1 and 31
are reserved. So effectively we have 29 keys.
Signed-off-by: Ram Pai
---
arch/powerpc/Kconfig | 15
arch/powerpc
On Mon, Jun 12, 2017 at 12:27:44PM +0530, Aneesh Kumar K.V wrote:
> Ram Pai writes:
>
> > Rearrange PTE bits to free up bits 3, 4, 5 and 6 for
> > memory keys. Bit 3, 4, 5, 6 and 57 shall be used for memory
> > keys.
> >
> > The patch does the fo
On Tue, Jun 13, 2017 at 07:32:24AM +0530, Aneesh Kumar K.V wrote:
> Ram Pai writes:
>
> > On Mon, Jun 12, 2017 at 12:27:44PM +0530, Aneesh Kumar K.V wrote:
> >> Ram Pai writes:
> >>
> >> > Rearrange PTE bits to free up bits 3, 4, 5 and 6 for
On Tue, Jun 13, 2017 at 10:22:43AM +0530, Aneesh Kumar K.V wrote:
> Ram Pai writes:
>
> > Rearrange PTE bits to free up bits 3, 4, 5 and 6 for
> > memory keys. Bit 3, 4, 5, 6 and 57 shall be used for memory
> > keys.
> >
> > The patch does the fo
On Tue, Sep 19, 2017 at 04:18:02PM -0700, Dawid Ciezarkiewicz wrote:
> On Mon, Sep 18, 2017 at 1:47 PM, Ram Pai wrote:
> > It is possible to make a slave mount readonly, by remounting it with
> > 'ro' flags.
> >
> > something like
> >
> > mount
sorry forgot to copy Eric.
On Wed, Sep 20, 2017 at 12:39:54PM -0700, Ram Pai wrote:
> On Tue, Sep 19, 2017 at 04:18:02PM -0700, Dawid Ciezarkiewicz wrote:
> > On Mon, Sep 18, 2017 at 1:47 PM, Ram Pai wrote:
> > > It is possible to make a slave mount readonly, by remounting
On Wed, Sep 20, 2017 at 06:06:55PM -0500, Eric W. Biederman wrote:
> ebied...@xmission.com (Eric W. Biederman) writes:
>
> > Ram Pai writes:
> >
> >> sorry forgot to copy Eric.
> >
> > Adding fs-devel as well.
> >
> >> On Wed, Sep 20, 2017 at
On Wed, Sep 20, 2017 at 08:00:57PM -0700, Dawid Ciezarkiewicz wrote:
> On Wed, Sep 20, 2017 at 5:39 PM, Ram Pai wrote:
> > Anyway; so something like this should be possible without breaking
> > existing semantics.
> >
> > mount -o bind,remount,ro /mnt
> >
On Fri, Sep 22, 2017 at 04:00:19PM +1000, Balbir Singh wrote:
> On Fri, 15 Sep 2017 18:21:08 -0700
> Ram Pai wrote:
>
> > From: Thiago Jung Bauermann
> >
> > Expose useful information for programs using memory protection keys.
> > Provide implementation f
On Fri, Sep 29, 2017 at 04:02:42PM -0700, Dawid Ciezarkiewicz wrote:
> On Fri, Sep 22, 2017 at 11:43 AM, Dawid Ciezarkiewicz
> wrote:
> > On Thu, Sep 21, 2017 at 12:14 PM, Ram Pai wrote:
> >> Here is a patch that accomplishes the job. tested to work with
> >> so
> But hopefully the comments that I currently have will be helpful anyway.
sure. thanx for taking the time to look through the patches.
>
> Ram Pai writes:
> > diff --git a/arch/powerpc/include/asm/pkeys.h
> > b/arch/powerpc/include/asm/pkeys.h
> > index 203d7de..09b268e 1
On Thu, Jul 27, 2017 at 11:15:36AM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai writes:
> > @@ -113,10 +117,14 @@ static inline int arch_override_mprotect_pkey(struct
> > vm_area_struct *vma,
> > return 0;
> > }
> >
> > +extern int __arch_se
On Thu, Jul 27, 2017 at 11:54:31AM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai writes:
>
> > --- a/arch/powerpc/include/asm/pkeys.h
> > +++ b/arch/powerpc/include/asm/pkeys.h
> > @@ -2,6 +2,18 @@
> > #define _ASM_PPC64_PKEYS_H
> >
> > extern b
On Thu, Jul 27, 2017 at 02:32:59PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai writes:
>
> > 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 Pa
On Thu, Jul 27, 2017 at 05:40:44PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai writes:
>
> > 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:
On Fri, Jul 28, 2017 at 06:00:02PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai writes:
> > --- a/arch/powerpc/mm/pkeys.c
> > +++ b/arch/powerpc/mm/pkeys.c
> > @@ -201,3 +201,36 @@ int __arch_override_mprotect_pkey(struct
> > vm_area_struct *vma, int prot,
>
On Fri, Jul 28, 2017 at 07:17:13PM -0300, Thiago Jung Bauermann wrote:
>
> Ram Pai 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,
> > int pkey,
> &g
On Fri, Jun 16, 2017 at 02:50:13PM +0530, Anshuman Khandual wrote:
> On 06/06/2017 06:35 AM, Ram Pai wrote:
> > The value of the AMR register at the time of the exception
> > is made available in gp_regs[PT_AMR] of the siginfo.
>
> But its already available there in uctxt-&
On Fri, Jun 16, 2017 at 08:33:01PM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2017-06-16 at 14:50 +0530, Anshuman Khandual wrote:
> > On 06/06/2017 06:35 AM, Ram Pai wrote:
> > > The value of the AMR register at the time of the exception
> > > is made availabl
On Fri, Jun 16, 2017 at 09:18:29PM +1000, Michael Ellerman wrote:
> Ram Pai writes:
> > diff --git a/arch/powerpc/include/uapi/asm/ptrace.h
> > b/arch/powerpc/include/uapi/asm/ptrace.h
> > index 8036b38..109d0c2 100644
> > --- a/arch/powerpc/include/uapi/asm/ptra
ed by Ben.
version v1: Initial version
Thanks-to: Dave Hansen, Aneesh, Paul Mackerras,
Michael Ellermen
Ram Pai (12):
Free up four 64K PTE bits in 4K backed hpte pages.
Free up four 64K PTE bits in 64K backed hpte pages.
Implement sys_pkey_alloc and sys_pkey_free system call.
This system call, associates the pkey with PTE of all
pages corresponding to the given address range.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 22 ++-
arch/powerpc/include/asm/mman.h | 29 +
arch/powerpc/include/asm/pkeys.h
Signed-off-by: Ram Pai
---
arch/powerpc/kernel/exceptions-64s.S | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index 8db9ef8..a4de1b4 100644
--- a/arch/powerpc/kernel/exceptions
advantage of releasing four valuable PTE bits for other
purpose.
This idea was jointly developed by Paul Mackerras, Aneesh, Michael
Ellermen and myself.
4K PTE format remain unchanged currently.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/hash-4k.h | 20 +++
arch/powerpc
The Documentaton file is moved from x86 into the generic area,
since this feature is now supported by more than one archs.
Signed-off-by: Ram Pai
---
Documentation/vm/protection-keys.txt | 110 ++
Documentation/x86/protection-keys.txt | 85
Handle Data and Instruction exceptions caused by memory
protection-key.
Signed-off-by: Ram Pai
(cherry picked from commit a5e5217619a0c475fe0cacc3b0cf1d3d33c79a09)
Conflicts:
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/exceptions-64s.S
---
arch/powerpc/include/asm
Added test support for PowerPC implementation off protection keys.
Signed-off-by: Ram Pai
---
tools/testing/selftests/vm/Makefile |1 +
tools/testing/selftests/vm/pkey-helpers.h | 365 +++
tools/testing/selftests/vm/protection_keys.c | 1451
Replace the magic number used to check for DSI exception
with a meaningful value.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/reg.h | 9 -
arch/powerpc/kernel/exceptions-64s.S | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm
structure.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/paca.h| 1 +
arch/powerpc/include/uapi/asm/ptrace.h | 3 ++-
arch/powerpc/kernel/asm-offsets.c | 5
arch/powerpc/kernel/exceptions-64s.S | 8 ++
arch/powerpc/kernel/signal_32.c| 14 ++
arch
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/processor.h | 5 +
arch/powerpc/kernel/process.c| 18 ++
2 files changed, 23 insertions(+)
diff --git a/arch/powerpc/include/asm/processor.h
b/arch/powerpc/include/asm/processor.h
index a2123f2..1f714df 100644
Map the PTE protection key bits to the HPTE key protection bits,
while creatiing HPTE entries.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 5 +
arch/powerpc/include/asm/pkeys.h | 7 +++
arch/powerpc/mm/hash_utils_64.c | 5
part of the PTE will hold
(H_PAGE_F_SECOND|H_PAGE_F_GIX) at bit 60,61,62,63.
Signed-off-by: Ram Pai
---
arch/powerpc/include/asm/book3s/64/hash-64k.h | 26 --
arch/powerpc/mm/hash64_64k.c | 16 +++-
arch/powerpc/mm/hugetlbpage-hash64.c
Sys_pkey_alloc() allocates and returns available pkey
Sys_pkey_free() frees up the pkey.
Total 32 keys are supported on powerpc. However pkey 0,1 and 31
are reserved. So effectively we have 29 pkeys.
Signed-off-by: Ram Pai
---
arch/powerpc/Kconfig | 15
arch
On Mon, Jun 19, 2017 at 09:06:13PM +1000, Michael Ellerman wrote:
> Ram Pai writes:
>
> > Signed-off-by: Ram Pai
> > ---
> > arch/powerpc/kernel/exceptions-64s.S | 16 ++--
> > 1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > d
On Mon, Nov 06, 2017 at 05:22:18PM -0800, Ram Pai wrote:
> On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote:
> > * Ram Pai:
> >
> > > Testing:
> > > ---
> > > This patch series has passed all the protection key
> > > tests avai
On Thu, Nov 09, 2017 at 04:47:15PM -0200, Breno Leitao wrote:
> Hi Ram,
>
> On Mon, Nov 06, 2017 at 12:57:36AM -0800, Ram Pai wrote:
> > @@ -206,12 +209,14 @@ void signal_handler(int signum, siginfo_t *si, void
> > *vucontext)
> >
> > trapno = uc
> Hi Miklos, Ram
> >>
> >> Thanks for your comments. A question below.
> >>
> >> On 13 November 2017 at 09:11, Miklos Szeredi wrote:
> >>> On Mon, Nov 13, 2017 at 8:55 AM, Ram Pai wrote:
> >>>> On Mon, Nov 13, 2017 at 07:02:21AM +0
On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote:
> * Ram Pai:
>
> > Testing:
> > ---
> > This patch series has passed all the protection key
> > tests available in the selftest directory.The
> > tests are updated to work on both x86 and power
On Tue, Nov 07, 2017 at 08:32:16AM +0100, Florian Weimer wrote:
> * Ram Pai:
>
> > On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote:
> >> * Ram Pai:
> >>
> >> > Testing:
> >> > ---
> >> > This patch series has pa
On Tue, Nov 07, 2017 at 02:47:10PM -0800, Dave Hansen wrote:
> On 11/07/2017 02:39 PM, Ram Pai wrote:
> >
> > As per the current semantics of sys_pkey_free(); the way I understand it,
> > the calling thread is saying disassociate me from this key.
>
> No. It is saying
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
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
Simplify the code by separating out the compression and decompression routines.
Signed-off-by: Ram Pai
---
drivers/md/dm-inplace-compress.c | 127 +-
1 files changed, 71 insertions(+), 56 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers
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
---
drivers/md/dm-inplace-compress.c | 14 +++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-inplace
Signed-off-by: Ram Pai
---
.../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-mapper/dm-inplace
y buffer across 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
---
drivers/md/dm-inplace-compress.c | 185 ++---
drivers/md/dm-inp
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
---
drivers/md/dm-inplace-compress.c | 36
Consolidate code to set and get the state of a request.
Signed-off-by: Ram Pai
---
drivers/md/dm-inplace-compress.c | 31 +--
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-compress.c
index
.
Signed-off-by: Ram Pai
---
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-inplace-compress.c
index 04decdd
No point doing it.
Signed-off-by: Ram Pai
---
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/md/dm-inplace-compress.c
+++ b
Helper functions to allocate/reallocate and free memory.
Signed-off-by: Ram Pai
---
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-compress.c
index bf18028
still function well.
Signed-off-by: Shaohua Li
Signed-off-by: Ram Pai
---
drivers/md/Kconfig |6 +
drivers/md/Makefile |1 +
drivers/md/dm-inplace-compress.c | 1487 ++
drivers/md/dm-inplace-compress.h | 140
4 files c
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
---
drivers/md
in the bio-buffer is contigious within the same bio-segment.
Signed-off-by: Ram Pai
---
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/md/dm-inplace-co
if enough space is not available to create a block of the specified size error
out.
Signed-off-by: Ram Pai
---
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/md/dm-inplace-compress.c
index
If a read request is not within the device range return error.
Signed-off-by: Ram Pai
---
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-compress.c
index 17221a1..bf18028
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: Ra
501 - 567 of 567 matches
Mail list logo