On 4/19/21 10:01 AM, Maciej W. Rozycki wrote:
> On Mon, 19 Apr 2021, Khalid Aziz wrote:
>
>> On 4/18/21 2:21 PM, Ondrej Zary wrote:
>>>
>>> Found the 3000763 document here:
>>> https://doc.lagout.org/science/0_Computer Science/0_Comp
On 4/18/21 2:21 PM, Ondrej Zary wrote:
> On Friday 16 April 2021 23:25:18 Maciej W. Rozycki wrote:
>> On Fri, 16 Apr 2021, Khalid Aziz wrote:
>>
>>>> Sadly I didn't get to these resources while they were still there, and
>>>> neither did archive
On 4/15/21 8:08 PM, Joe Perches wrote:
> And while it's a lot more code, I'd prefer a solution that looks more
> like the other commonly used kernel logging extension mechanisms
> where adapter is placed before the format, ... in the argument list.
Hi Joe,
I don't mind making these changes. It is
As Maciej explained in other email that snprintf() does null-terminate
the string, I think this change is fine.
Acked-by: Khalid Aziz
On 4/14/21 4:38 PM, Maciej W. Rozycki wrote:
> Hi,
>
> First of all, does anyone have a copy of: "MultiMaster UltraSCSI Host
> Adapters for PCI Systems: Technical Reference Manual" (pub. 3002493-E)?
> It used to live in the "Mylex Manuals and Documentation Archives" section
> of the Mylex web
st_no, buf);
> } else
> - printk("%s", buf);
> + pr_cont("%s", buf);
> } else {
> if (begin) {
> if (adapter != NULL && adapter->adapter_initd)
> @@ -3611,7 +3611,7 @@ static void blogic_msg(enum blogic_msgle
> else
> printk("%s%s", blogic_msglevelmap[msglevel],
> buf);
> } else
> - printk("%s", buf);
> + pr_cont("%s", buf);
> }
> begin = (buf[len - 1] == '\n');
> }
>
Looks good.
Acked-by: Khalid Aziz
On 3/17/21 3:11 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/scsi/FlashPoint.c: In function ‘FlashPoint_AbortCCB’:
> drivers/scsi/FlashPoint.c:1618:16: warning: variable ‘TID’ set but not used
> [-Wunused-but-set-variable]
>
>
> candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>
> Cc: Khalid Aziz
> Cc: "James E.J. Bottomley"
> Cc: "Martin K. Petersen"
> Cc: "Leonard N. Zubkoff"
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Lee Jones
> --
p
> *
> - * Description: Load the Automation RAM with the defualt map values.
> + * Description: Load the Automation RAM with the default map values.
> *
> *-----*/
> static void FPT_autoLoadDefaultMap(u32 p_port
score_zone_weighted(zone);
}
return score;
Looks good.
Reviewed-by: Khalid Aziz
On 11/20/20 11:01 AM, Catalin Marinas wrote:
Hi Khalid,
On Fri, Oct 23, 2020 at 11:56:11AM -0600, Khalid Aziz wrote:
diff --git a/arch/sparc/include/asm/mman.h b/arch/sparc/include/asm/mman.h
index f94532f25db1..274217e7ed70 100644
--- a/arch/sparc/include/asm/mman.h
+++ b/arch/sparc/include
Christoph Hellwig
Suggested-by: Catalin Marinas
Signed-off-by: Khalid Aziz
---
arch/sparc/include/asm/mman.h | 54 +++
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/arch/sparc/include/asm/mman.h b/arch/sparc/include/asm/mman.h
index f9
On 10/15/20 3:05 AM, Catalin Marinas wrote:
> On Wed, Oct 14, 2020 at 03:21:16PM -0600, Khalid Aziz wrote:
>> What FreeBSD does seems like a reasonable thing to do. Any way first
>> thing to do is to update sparc to use arch_validate_flags() and update
>> sparc_validate_prot()
On 10/13/20 3:16 AM, Catalin Marinas wrote:
> On Mon, Oct 12, 2020 at 01:14:50PM -0600, Khalid Aziz wrote:
>> On 10/12/20 11:22 AM, Catalin Marinas wrote:
>>> On Mon, Oct 12, 2020 at 11:03:33AM -0600, Khalid Aziz wrote:
>>>> On 10/10/20 5:09 AM, Catalin Marinas wrote:
On 10/12/20 11:22 AM, Catalin Marinas wrote:
> On Mon, Oct 12, 2020 at 11:03:33AM -0600, Khalid Aziz wrote:
>> On 10/10/20 5:09 AM, Catalin Marinas wrote:
>>> On Wed, Oct 07, 2020 at 02:14:09PM -0600, Khalid Aziz wrote:
>>>> On 10/7/20 1:39 AM, Jann Horn wrote:
>&g
On 10/10/20 5:09 AM, Catalin Marinas wrote:
> Hi Khalid,
>
> On Wed, Oct 07, 2020 at 02:14:09PM -0600, Khalid Aziz wrote:
>> On 10/7/20 1:39 AM, Jann Horn wrote:
>>> arch_validate_prot() is a hook that can validate whether a given set of
>>> protection flags is
(Application Data
> Integrity)")
> Signed-off-by: Jann Horn
> ---
> compile-tested only, I don't have a Sparc ADI setup - might be nice if some
> Sparc person could test this?
>
> arch/sparc/include/asm/mman.h | 50 +------
> 1 file changed, 30 ins
> arch_validate_prot() call in mm/mprotect.c down into the locked region.
>
> Cc: sta...@vger.kernel.org
> Fixes: 9035cf9a97e4 ("mm: Add address parameter to arch_validate_prot()")
> Suggested-by: Khalid Aziz
> Suggested-by: Christoph Hellwig
> Signed-off-by: Jann Horn
On 9/28/20 6:14 AM, Jann Horn wrote:
> From what I can tell from looking at the code:
>
> SPARC's arch_validate_prot() looks up the VMA and peeks at it; that's
> not permitted though. do_mprotect_pkey() calls arch_validate_prot()
> before taking the mmap lock, so we can hit use-after-free reads if
On 9/4/20 9:19 AM, Greg KH wrote:
> On Mon, Aug 31, 2020 at 10:08:43AM -0600, Khalid Aziz wrote:
>> With the USB 3.0/3.1 controller on MSI B450-A Pro Max motherboard,
>> full speed and low speed devices see constant resets making
>> keyboards and mouse unreliable and unusa
On 9/1/20 1:51 PM, Alan Stern wrote:
> On Tue, Sep 01, 2020 at 11:00:16AM -0600, Khalid Aziz wrote:
>> On 9/1/20 10:36 AM, Alan Stern wrote:
>>> On Tue, Sep 01, 2020 at 09:15:46AM -0700, Khalid Aziz wrote:
>>>> On 8/31/20 8:31 PM, Alan Stern wrote:
>>>>&
On 9/1/20 10:36 AM, Alan Stern wrote:
> On Tue, Sep 01, 2020 at 09:15:46AM -0700, Khalid Aziz wrote:
>> On 8/31/20 8:31 PM, Alan Stern wrote:
>>> Can you collect a usbmon trace showing an example of this problem?
>>>
>>
>> I have attached usbmon traces fo
On 8/31/20 8:31 PM, Alan Stern wrote:
> On Mon, Aug 31, 2020 at 10:23:30AM -0600, Khalid Aziz wrote:
>> [Resending since I screwed up linux-usb mailing list address in
>> cut-n-paste in original email]
>>
>>
>> I recently replaced the motherboard on my desk
hub being cleared. Hubs do
not seem to repsond well to this and seem to hang which causes
further USB transactions to time out. A reset finally clears the
issue until we repeat the cycle all over again.
Signed-off-by: Khalid Aziz
Cc: Khalid Aziz
---
drivers/usb/host/ehci-q.c | 4
1 file
p sending isochronous packets)". That may be what is happening.
Removing the code that returns EPROTO for such case solves the
problem on my machine (as in the RFC patch) but that probably is not
the right solution. I do not understand USB protocol well enough to
propose a better solution. Do
hugepage allocations.
>
> Changelog v2 vs v1:
> - Introduce per-node and per-zone "proactive compaction score". This
> score is compared against watermarks which are set according to
>user provided proactiveness value.
> - Separate code-paths for proactive compa
This looks good to me. I like the idea overall of controlling
aggressiveness of compaction with a single tunable for the whole
system. I wonder how an end user could arrive at what a reasonable
value would be for this based upon their workload. More comments below.
On Mon, 2020-05-18 at 11:14 -070
creator_id[4];
> u32 creator_rev;
> u32 num_uarts;
> - struct pcdp_uartuart[0];/* actual size is num_uarts */
> + struct pcdp_uartuart[]; /* actual size is num_uarts */
> /* remainder of table is pcdp_device structures */
> } __attribute__((packed));
>
Loks good to me.
Acked-by: Khalid Aziz
On 9/24/19 7:39 AM, Vlastimil Babka wrote:
> On 9/20/19 1:37 AM, Nitin Gupta wrote:
>> On Tue, 2019-08-20 at 10:46 +0200, Vlastimil Babka wrote:
>>>
>>> That's a lot of control knobs - how is an admin supposed to tune them to
>>> their
>>> needs?
>>
>>
>> Yes, it's difficult for an admin to get so
On 9/2/19 2:02 AM, Michal Hocko wrote:
> On Fri 30-08-19 15:35:06, Khalid Aziz wrote:
> [...]
>> - Kernel is not self-tuning and is dependent upon a userspace tool to
>> perform well in a fundamental area of memory management.
>
> You keep bringing this up without an ac
On 8/27/19 12:16 AM, Michal Hocko wrote:
> On Tue 27-08-19 02:14:20, Bharath Vedartham wrote:
>> Hi Michal,
>>
>> Here are some of my thoughts,
>> On Wed, Aug 21, 2019 at 04:06:32PM +0200, Michal Hocko wrote:
>>> On Thu 15-08-19 14:51:04, Khalid Aziz wrote:
>
On 8/20/19 2:46 AM, Vlastimil Babka wrote:
> +CC Khalid Aziz who proposed a different approach:
> https://lore.kernel.org/linux-mm/20190813014012.30232-1-khalid.a...@oracle.com/T/#u
>
> On 8/16/19 11:43 PM, Nitin Gupta wrote:
>> The patch has plenty of rough edges but posting
On 8/15/19 11:02 AM, Michal Hocko wrote:
> On Thu 15-08-19 10:27:26, Khalid Aziz wrote:
>> On 8/14/19 2:58 AM, Michal Hocko wrote:
>>> On Tue 13-08-19 09:20:51, Khalid Aziz wrote:
>>>> On 8/13/19 8:05 AM, Michal Hocko wrote:
>>>>>
On 8/14/19 2:58 AM, Michal Hocko wrote:
> On Tue 13-08-19 09:20:51, Khalid Aziz wrote:
>> On 8/13/19 8:05 AM, Michal Hocko wrote:
>>> On Mon 12-08-19 19:40:10, Khalid Aziz wrote:
>>> [...]
>>>> Patch 1 adds code to maintain a sliding lookback window of (
On 8/13/19 8:05 AM, Michal Hocko wrote:
> On Mon 12-08-19 19:40:10, Khalid Aziz wrote:
> [...]
>> Patch 1 adds code to maintain a sliding lookback window of (time, number
>> of free pages) points which can be updated continuously and adds code to
>> compute best fit line
-by: Khalid Aziz
Signed-off-by: Bharath Vedartham
Tested-by: Vandana BN
---
include/linux/mmzone.h | 38 ++
mm/page_alloc.c| 27 --
mm/vmscan.c| 116 ++---
3 files changed, 148 insertions(+), 33 deletions(-)
diff --git
improvements. It attempts to address potential stalls proactively before
they happen and will make use of any improvements made to the
reclamation/compaction code.
Any feedback on this proposal and associated implementation will be
greatly appreciated. This is work in progress.
Khalid Aziz (2):
mm: Add
least squares. it can then compute if
system will run out of memory if the current trend continues.
Historical data is held in a new data structure lsq_struct for each
zone and each order within the zone. Size of the window for historical
data is given by LSQ_LOOKBACK.
Signed-off-by: Khalid Aziz
>> Signed-off-by: Christoph Hellwig
>> Reviewed-by: Khalid Aziz
>> ---
>> arch/sparc/Kconfig | 1 +
>> arch/sparc/include/asm/pgtable_64.h | 18 ++
>> arch/sparc/mm/Makefile | 2 +-
>> arch/sparc/mm/gup.c
On 6/21/19 7:39 AM, Jason Gunthorpe wrote:
> On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote:
>> This will allow sparc64 to override its ADI tags for
>> get_user_pages and get_user_pages_fast.
>>
>> Signed-off-by: Christoph Hellwig
>> mm/gup.c | 4 ++--
>> 1 file changed, 2 inse
On 6/19/19 9:55 AM, Khalid Aziz wrote:
> On 6/12/19 5:43 AM, Andrey Konovalov wrote:
>> This patch is a part of a series that extends arm64 kernel ABI to allow to
>> pass tagged user pointers (with the top byte set to something else other
>> than 0x00) as syscall arguments.
&g
1 +
> arch/sparc/include/asm/pgtable_64.h | 18 ++
> arch/sparc/mm/Makefile | 2 +-
> arch/sparc/mm/gup.c | 340
> 4 files changed, 20 insertions(+), 341 deletions(-)
> delete mode 100644 arch/sparc/mm/gup.c
>
Reviewed-by: Khalid Aziz
| 2 +-
> mm/gup.c | 4 ++--
> 10 files changed, 11 insertions(+), 18 deletions(-)
>
Looks good.
Reviewed-by: Khalid Aziz
insertions(+)
Looks good to me.
Reviewed-by: Khalid Aziz
>
> diff --git a/arch/sparc/include/asm/pgtable_64.h
> b/arch/sparc/include/asm/pgtable_64.h
> index f0dcf991d27f..1904782dcd39 100644
> --- a/arch/sparc/include/asm/pgtable_64.h
> +++ b/arch/sparc/include/asm/pgtab
tagging to use this. So I would suggest
rewording the commit log. Other than that:
Reviewed-by: Khalid Aziz
> mm/gup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index ddde097cf9e4..6bb521db67ec 100644
> --- a/mm/gu
On 6/1/19 1:49 AM, Christoph Hellwig wrote:
> From: Andrey Konovalov
>
> To allow arm64 syscalls to accept tagged pointers from userspace, we must
> untag them when they are passed to the kernel. Since untagging is done in
> generic parts of the kernel, the untagged_addr macro needs to be defined
ris started, there is a generic need
to untag addresses in kernel and this patch gets us ready for that.
Reviewed-by: Khalid Aziz
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 6b10c21630f5..44041df804a6 100644
> --- a/include/linux/mm.h
> +++ b/include/lin
On 5/25/19 11:05 AM, Linus Torvalds wrote:
> [ Adding Khalid, who added the sparc64 code ]
>
> On Sat, May 25, 2019 at 6:32 AM Christoph Hellwig wrote:
>>
>> This will allow sparc64 to override its ADI tags for
>> get_user_pages and get_user_pages_fast. I have no idea why this
>> is not required
On 3/12/19 7:28 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski
>
> The mm variable is set but unused. Remove it.
It is used. Look further down for calls to set_pte_at().
--
Khalid
>
> Signed-off-by: Bartosz Golaszewski
> ---
> mm/mprotect.c | 1 -
> 1 file changed, 1 deletion(-)
On 2/15/19 6:09 AM, Mark Rutland wrote:
> Hi,
>
> On Wed, Feb 13, 2019 at 05:01:31PM -0700, Khalid Aziz wrote:
>> From: Tycho Andersen
>>
>> XPFO doesn't support section/contiguous mappings yet, so let's disable it
>> if XPFO is turned on.
>>
>
On 2/14/19 12:08 PM, Peter Zijlstra wrote:
> On Thu, Feb 14, 2019 at 10:13:54AM -0700, Khalid Aziz wrote:
>
>> Patch 11 ("xpfo, mm: remove dependency on CONFIG_PAGE_EXTENSION") cleans
>> all this up. If the original authors of these two patches, Juerg
>> Haef
On 2/14/19 10:42 AM, Dave Hansen wrote:
>> #endif
>> +
>> +/* If there is a pending TLB flush for this CPU due to XPFO
>> + * flush, do it now.
>> + */
>
> Don't forget CodingStyle in all this, please.
Of course. I will fix that.
>
>> +if (cpumask_test_and_clear_cpu(cpu, &pendi
On 2/14/19 10:44 AM, Christoph Hellwig wrote:
> On Thu, Feb 14, 2019 at 09:56:24AM -0700, Khalid Aziz wrote:
>> On 2/14/19 12:47 AM, Christoph Hellwig wrote:
>>> On Wed, Feb 13, 2019 at 05:01:27PM -0700, Khalid Aziz wrote:
>>>> +++ b/kernel/dma/swiotlb.c
>&g
On 2/14/19 8:54 AM, Tycho Andersen wrote:
> Hi,
>
> On Wed, Feb 13, 2019 at 05:01:30PM -0700, Khalid Aziz wrote:
>> From: Juerg Haefliger
>>
>> If the page is unmapped by XPFO, a data cache flush results in a fatal
>> page fault, so let's temporarily map
On 2/14/19 9:15 AM, Borislav Petkov wrote:
> On Thu, Feb 14, 2019 at 11:56:31AM +0100, Peter Zijlstra wrote:
>>> +EXPORT_SYMBOL(xpfo_kunmap);
>>
>> And these here things are most definitely not IRQ-safe.
>
> Should also be EXPORT_SYMBOL_GPL.
>
Agreed. On the other hand, is there even a need to e
On 2/14/19 3:56 AM, Peter Zijlstra wrote:
> On Wed, Feb 13, 2019 at 05:01:26PM -0700, Khalid Aziz wrote:
>> static inline void *kmap_atomic(struct page *page)
>> {
>> +void *kaddr;
>> +
>> preempt_disable();
>> pagefault_disab
On 2/14/19 12:47 AM, Christoph Hellwig wrote:
> On Wed, Feb 13, 2019 at 05:01:27PM -0700, Khalid Aziz wrote:
>> +++ b/kernel/dma/swiotlb.c
>> @@ -396,8 +396,9 @@ static void swiotlb_bounce(phys_addr_t orig_addr,
>> phys_addr_t tlb_addr,
>> {
>> unsig
From: Tycho Andersen
vm_mmap is exported, which means kernel modules can use it. In particular,
for testing XPFO support, we want to use it with the MAP_HUGETLB flag, so
let's support it via vm_mmap.
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
Tested-by: Khalid Aziz
---
in
by: Julian Stecklina
Reviewed-by: Khalid Aziz
---
.../admin-guide/kernel-parameters.txt | 2 +
arch/x86/Kconfig | 1 +
arch/x86/include/asm/pgtable.h| 26 ++
arch/x86/mm/Makefile | 2 +
ar
configurable for maximum performance.
Signed-off-by: Julian Stecklina
Cc: x...@kernel.org
Cc: kernel-harden...@lists.openwall.com
Cc: Vasileios P. Kemerlis
Cc: Juerg Haefliger
Cc: Tycho Andersen
Cc: Marco Benatto
Cc: David Woodhouse
Reviewed-by: Khalid Aziz
---
include/linux/mm_types.h
803.989s1.32x
4.20+XPFO+Deferred flush+Batch update 795.728s1.31x
Signed-off-by: Khalid Aziz
Signed-off-by: Tycho Andersen
---
arch/x86/mm/xpfo.c | 5 +
include/linux/page-flags.h | 5 -
include/linux/xpfo.h | 8
mm/page_alloc.c| 4
table.
Model-checked with up to 4 concurrent callers with Spin.
Signed-off-by: Julian Stecklina
Signed-off-by: Khalid Aziz
Cc: x...@kernel.org
Cc: kernel-harden...@lists.openwall.com
Cc: Vasileios P. Kemerlis
Cc: Juerg Haefliger
Cc: Tycho Andersen
Cc: Marco Benatto
Cc: David Woodhouse
en a fault is in kernel space which has been triggered by XPFO.
Signed-off-by: Tycho Andersen
CC: x...@kernel.org
Tested-by: Khalid Aziz
---
arch/x86/mm/fault.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 71d4b9d4d43f..ba51652fbd33 10
From: Juerg Haefliger
v6: * guard against lookup_xpfo() returning NULL
CC: Konrad Rzeszutek Wilk
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Reviewed-by: Khalid Aziz
Reviewed-by: Konrad Rzeszutek Wilk
---
include/linux/xpfo.h | 4
kernel/dma/swiotlb.c | 3 ++-
mm
ned-off-by: Tycho Andersen
Reviewed-by: Khalid Aziz
---
arch/arm64/mm/mmu.c | 2 +-
include/linux/xpfo.h | 4
mm/xpfo.c| 6 ++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index d1d6601b385d..f4dd27073006 100644
--- a/
: Khalid Aziz
---
include/linux/xpfo.h | 22 ++
mm/xpfo.c| 30 ++
2 files changed, 52 insertions(+)
diff --git a/include/linux/xpfo.h b/include/linux/xpfo.h
index cba37ffb09b1..1ae05756344d 100644
--- a/include/linux/xpfo.h
+++ b/include
;t be used accidentally by other
CPUs.
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
[jstec...@amazon.de: rebased from v4.13 to v4.19]
Signed-off-by: Julian Stecklina
Tested-by: Khalid Aziz
---
drivers/misc/lkdtm/Makefile | 1 +
drivers/misc/lk
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
Signed-off-by: Khalid Aziz
---
v6: * add a definition of user_virt_to_phys in the !CONFIG_XPFO case
v7: * make user_virt_to_phys a GPL symbol
arch/x86/mm/xpfo.c | 57
include/linux/xpfo.h | 8
Andersen
Signed-off-by: Khalid Aziz
---
v6:
- use flush_tlb_kernel_range() instead of __flush_tlb_one()
v8:
- Add check for NULL pte in set_kpte()
arch/arm64/Kconfig | 1 +
arch/arm64/mm/Makefile | 2 ++
arch/arm64/mm/xpfo.c | 64
Signed-off-by: Khalid Aziz
---
arch/x86/include/asm/tlbflush.h | 1 +
arch/x86/mm/tlb.c | 38 +
arch/x86/mm/xpfo.c | 2 +-
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/i
Add test for XPFO
Julian Stecklina (2):
xpfo, mm: remove dependency on CONFIG_PAGE_EXTENSION
xpfo, mm: optimize spinlock usage in xpfo_kunmap
Khalid Aziz (2):
xpfo, mm: Defer TLB flushes for non-current CPUs (x86 only)
xpfo, mm: Optimize XPFO TLB flushes by batching them together
Tycho
From: Juerg Haefliger
If the page is unmapped by XPFO, a data cache flush results in a fatal
page fault, so let's temporarily map the region, flush the cache, and then
unmap it.
v6: actually flush in the face of xpfo, and temporarily map the underlying
memory so it can be flushed correctly
On 2/12/19 1:01 PM, Laura Abbott wrote:
> On 2/12/19 7:52 AM, Khalid Aziz wrote:
>> On 1/23/19 7:24 AM, Konrad Rzeszutek Wilk wrote:
>>> On Thu, Jan 10, 2019 at 02:09:37PM -0700, Khalid Aziz wrote:
>>>> From: Juerg Haefliger
>>>>
>>>> Enable
On 1/23/19 7:24 AM, Konrad Rzeszutek Wilk wrote:
> On Thu, Jan 10, 2019 at 02:09:37PM -0700, Khalid Aziz wrote:
>> From: Juerg Haefliger
>>
>> Enable support for eXclusive Page Frame Ownership (XPFO) for arm64 and
>> provide a hook for updating a single kernel
On 1/23/19 7:20 AM, Konrad Rzeszutek Wilk wrote:
> On Thu, Jan 10, 2019 at 02:09:37PM -0700, Khalid Aziz wrote:
>> From: Juerg Haefliger
>>
>> Enable support for eXclusive Page Frame Ownership (XPFO) for arm64 and
>> provide a hook for updating a single kernel
On 1/16/19 5:18 PM, Laura Abbott wrote:
> On 1/10/19 1:09 PM, Khalid Aziz wrote:
>> From: Julian Stecklina
>>
>> We can reduce spin lock usage in xpfo_kmap to the 0->1 transition of
>> the mapcount. This means that xpfo_kmap() can now race and that we
>> get
On 1/16/19 7:56 AM, Julian Stecklina wrote:
> Khalid Aziz writes:
>
>> I am continuing to build on the work Juerg, Tycho and Julian have done
>> on XPFO.
>
> Awesome!
>
>> A rogue process can launch a ret2dir attack only from a CPU that has
>> dual mapp
On 1/11/19 2:06 PM, Andy Lutomirski wrote:
> On Fri, Jan 11, 2019 at 12:42 PM Dave Hansen wrote:
>>
The second process could easily have the page's old TLB entry. It could
abuse that entry as long as that CPU doesn't context switch
(switch_mm_irqs_off()) or otherwise flush the TLB
On 1/11/19 1:42 PM, Dave Hansen wrote:
>>> The second process could easily have the page's old TLB entry. It could
>>> abuse that entry as long as that CPU doesn't context switch
>>> (switch_mm_irqs_off()) or otherwise flush the TLB entry.
>>
>> That is an interesting scenario. Working through thi
On 1/10/19 5:44 PM, Andy Lutomirski wrote:
> On Thu, Jan 10, 2019 at 3:07 PM Kees Cook wrote:
>>
>> On Thu, Jan 10, 2019 at 1:10 PM Khalid Aziz wrote:
>>> I implemented a solution to reduce performance penalty and
>>> that has had large impact. When XPFO code
On 1/11/19 7:54 AM, Tycho Andersen wrote:
> On Thu, Jan 10, 2019 at 02:09:39PM -0700, Khalid Aziz wrote:
>> From: Juerg Haefliger
>>
>> If the page is unmapped by XPFO, a data cache flush results in a fatal
>> page fault, so let's temporarily map the region, flush
Hi Dave,
Thanks for looking at this and providing feedback.
On 1/10/19 4:40 PM, Dave Hansen wrote:
> First of all, thanks for picking this back up. It looks to be going in
> a very positive direction!
>
> On 1/10/19 1:09 PM, Khalid Aziz wrote:
>> I implemented a solution to
Thanks for looking this over.
On 1/10/19 4:07 PM, Kees Cook wrote:
> On Thu, Jan 10, 2019 at 1:10 PM Khalid Aziz wrote:
>> I implemented a solution to reduce performance penalty and
>> that has had large impact. When XPFO code flushes stale TLB entries,
>> it does so for a
;t be used accidentally by other
CPUs.
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
[jstec...@amazon.de: rebased from v4.13 to v4.19]
Signed-off-by: Julian Stecklina
Signed-off-by: Khalid Aziz
---
drivers/misc/lkdtm/Makefile | 1 +
drivers/misc/lk
table.
Model-checked with up to 4 concurrent callers with Spin.
Signed-off-by: Julian Stecklina
Cc: x...@kernel.org
Cc: kernel-harden...@lists.openwall.com
Cc: Vasileios P. Kemerlis
Cc: Juerg Haefliger
Cc: Tycho Andersen
Cc: Marco Benatto
Cc: David Woodhouse
Signed-off-by: Khalid Aziz
ectly
CC: linux-arm-ker...@lists.infradead.org
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Signed-off-by: Khalid Aziz
---
arch/arm64/mm/flush.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index 30695a868107..f12f26b
c: Juerg Haefliger
Cc: Tycho Andersen
Cc: Marco Benatto
Cc: David Woodhouse
Signed-off-by: Khalid Aziz
---
mm/xpfo.c | 37 +
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/mm/xpfo.c b/mm/xpfo.c
index 25fba05d01bd..e80374b0c78e 100644
--- a/mm/xpfo
configurable for maximum performance.
Signed-off-by: Julian Stecklina
Cc: x...@kernel.org
Cc: kernel-harden...@lists.openwall.com
Cc: Vasileios P. Kemerlis
Cc: Juerg Haefliger
Cc: Tycho Andersen
Cc: Marco Benatto
Cc: David Woodhouse
Signed-off-by: Khalid Aziz
---
include/linux/mm_types.h
Kernel hangs when booted up with "xpfotlbflush" option. This is caused
by xpfo_kunmap() fliushing TLB while holding xpfo lock starving other
tasks waiting for the lock. This patch moves tlb flush outside of the
code holding xpfo lock.
Signed-off-by: Khalid Aziz
---
mm/xpfo.c | 7 +
ned-off-by: Tycho Andersen
Signed-off-by: Khalid Aziz
---
arch/arm64/mm/mmu.c | 2 +-
include/linux/xpfo.h | 4
mm/xpfo.c| 6 ++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index d1d6601b385d..f4dd27073006 100644
--- a/
...@lists.infradead.org
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Signed-off-by: Khalid Aziz
---
arch/arm64/Kconfig | 1 +
arch/arm64/mm/Makefile | 2 ++
arch/arm64/mm/xpfo.c | 58 ++
3 files changed, 61 insertions(+)
create mode 100644 arch
elp reduce these cases. This same
code should be implemented for other architectures as well once
finalized.
Signed-off-by: Khalid Aziz
---
arch/x86/include/asm/tlbflush.h | 1 +
arch/x86/mm/tlb.c | 27 +++
arch/x86/mm/xpfo.c | 2 +-
include/lin
From: Tycho Andersen
vm_mmap is exported, which means kernel modules can use it. In particular,
for testing XPFO support, we want to use it with the MAP_HUGETLB flag, so
let's support it via vm_mmap.
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
Signed-off-by: Khalid
Cc: David Woodhouse
Signed-off-by: Khalid Aziz
---
arch/x86/mm/fault.c | 4
include/linux/xpfo.h | 4
mm/xpfo.c| 50 +---
3 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
in
From: Juerg Haefliger
v6: * guard against lookup_xpfo() returning NULL
CC: Konrad Rzeszutek Wilk
Signed-off-by: Juerg Haefliger
Signed-off-by: Tycho Andersen
Signed-off-by: Khalid Aziz
---
include/linux/xpfo.h | 4
kernel/dma/swiotlb.c | 3 ++-
mm/xpfo.c| 15
-by: Khalid Aziz
---
include/linux/xpfo.h | 22 ++
mm/xpfo.c| 30 ++
2 files changed, 52 insertions(+)
diff --git a/include/linux/xpfo.h b/include/linux/xpfo.h
index e38b823f44e3..2682a00ebbcb 100644
--- a/include/linux/xpfo.h
+++ b
t for XPFO
Julian Stecklina (4):
mm, x86: omit TLB flushing by default for XPFO page table
modifications
xpfo, mm: remove dependency on CONFIG_PAGE_EXTENSION
xpfo, mm: optimize spinlock usage in xpfo_kunmap
EXPERIMENTAL: xpfo, mm: optimize spin lock usage in xpfo_kmap
Khalid Aziz (2):
by: Julian Stecklina
Signed-off-by: Khalid Aziz
---
.../admin-guide/kernel-parameters.txt | 2 +
arch/x86/Kconfig | 1 +
arch/x86/include/asm/pgtable.h| 26 ++
arch/x86/mm/Makefile | 2 +
ar
O case
CC: linux-arm-ker...@lists.infradead.org
CC: x...@kernel.org
Signed-off-by: Tycho Andersen
Tested-by: Marco Benatto
Signed-off-by: Khalid Aziz
---
arch/x86/mm/xpfo.c | 57
include/linux/xpfo.h | 8 +++
2 files changed, 65 insertions(+)
en a fault is in kernel space which has been triggered by XPFO.
Signed-off-by: Tycho Andersen
CC: x...@kernel.org
Signed-off-by: Khalid Aziz
---
arch/x86/mm/fault.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 71d4b9d4d43f..ba51652fb
1 - 100 of 474 matches
Mail list logo