[PATCH 0/9] drivers: staging: rtl8187se: various code cleanups

2014-03-01 Thread Axel Rasmussen
This set of patches fixes a substantial number of checkpatch.pl errors and warnings, and additionally it refactors some sections of code where lines were far too long due to organizational problems. Axel Rasmussen (9): drivers: staging: rtl8187se: use netdev_* instead of prink drivers

[PATCH 3/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 40 ++ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH 1/9] drivers: staging: rtl8187se: use netdev_* instead of prink

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/Module.symvers | 0 drivers/staging/rtl8187se/r8180_core.c | 8 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/rtl8187se/Module.symvers diff --git a/drivers

[PATCH 7/9] drivers: staging: rtl8187se: fixed checkpatch.pl errors

2014-03-01 Thread Axel Rasmussen
The definition of the driver's ChannelPlan array produced a large number of checkpatch.pl errors. This patch fixes all of them by adding spaces and wrapping the resulting overly-long lines. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 49

[PATCH 8/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 125 ++--- 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH 6/9] drivers: staging: rtl8187se: fixed broken indentation

2014-03-01 Thread Axel Rasmussen
A section of code in the function rtl8180_tx was indented for no reason, causing numerous checkpatch.pl warnings. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 133 + 1 file changed, 70 insertions(+), 63

[PATCH 9/9] drivers: staging: rtl8187se: refactor wmm_param_update

2014-03-01 Thread Axel Rasmussen
needed for the original blocks of code. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 119 ++--- 1 file changed, 49 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers

[PATCH 5/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 65 ++ 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH 4/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 73 -- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH 2/9] drivers: staging: rtl8187se: refactor/clean signal smoothing

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180.h | 2 +- drivers/staging/rtl8187se/r8180_core.c | 29 ++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers

[PATCH v2 9/9] drivers: staging: rtl8187se: refactor wmm_param_update

2014-03-03 Thread Axel Rasmussen
needed for the original blocks of code. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 119 ++--- 1 file changed, 49 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers

[PATCH v2 2/9] drivers: staging: rtl8187se: refactor/clean signal smoothing

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180.h | 2 +- drivers/staging/rtl8187se/r8180_core.c | 29 ++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers

[PATCH v2 5/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 63 +- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH v2 1/9] drivers: staging: rtl8187se: use netdev_* instead of prink

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/Module.symvers | 0 drivers/staging/rtl8187se/r8180_core.c | 8 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/rtl8187se/Module.symvers diff --git a/drivers

[PATCH v2 8/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 125 ++--- 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH v2 7/9] drivers: staging: rtl8187se: fixed checkpatch.pl errors

2014-03-03 Thread Axel Rasmussen
The definition of the driver's ChannelPlan array produced a large number of checkpatch.pl errors. This patch fixes all of them by adding spaces and wrapping the resulting overly-long lines. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 49

[PATCH v2 6/9] drivers: staging: rtl8187se: fixed broken indentation

2014-03-03 Thread Axel Rasmussen
A section of code in the function rtl8180_tx was indented for no reason, causing numerous checkpatch.pl warnings. Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 132 + 1 file changed, 69 insertions(+), 63

[PATCH v2 3/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 40 ++ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH v2 0/9] drivers: staging: rtl8187se: various code cleanups

2014-03-03 Thread Axel Rasmussen
in the original set of patches. Axel Rasmussen (9): drivers: staging: rtl8187se: use netdev_* instead of prink drivers: staging: rtl8187se: refactor/clean signal smoothing drivers: staging: rtl8187se: wrap excessively long lines drivers: staging: rtl8187se: wrap excessively long lines drivers: staging

[PATCH v2 4/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen axel.rasmuss...@gmail.com --- drivers/staging/rtl8187se/r8180_core.c | 73 -- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index

[PATCH 0/9] drivers: staging: rtl8187se: various code cleanups

2014-03-01 Thread Axel Rasmussen
This set of patches fixes a substantial number of checkpatch.pl errors and warnings, and additionally it refactors some sections of code where lines were far too long due to organizational problems. Axel Rasmussen (9): drivers: staging: rtl8187se: use netdev_* instead of prink drivers

[PATCH 3/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 40 ++ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 67c2583..b6c8c00 100644

[PATCH 1/9] drivers: staging: rtl8187se: use netdev_* instead of prink

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/Module.symvers | 0 drivers/staging/rtl8187se/r8180_core.c | 8 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/rtl8187se/Module.symvers diff --git a/drivers/staging/rtl8187se

[PATCH 7/9] drivers: staging: rtl8187se: fixed checkpatch.pl errors

2014-03-01 Thread Axel Rasmussen
The definition of the driver's ChannelPlan array produced a large number of checkpatch.pl errors. This patch fixes all of them by adding spaces and wrapping the resulting overly-long lines. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 49

[PATCH 8/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 125 ++--- 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 9e1642f..b6fdb6f 100644

[PATCH 6/9] drivers: staging: rtl8187se: fixed broken indentation

2014-03-01 Thread Axel Rasmussen
A section of code in the function rtl8180_tx was indented for no reason, causing numerous checkpatch.pl warnings. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 133 + 1 file changed, 70 insertions(+), 63 deletions(-) diff --git

[PATCH 9/9] drivers: staging: rtl8187se: refactor wmm_param_update

2014-03-01 Thread Axel Rasmussen
needed for the original blocks of code. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 119 ++--- 1 file changed, 49 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se

[PATCH 5/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 65 ++ 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index cd22ba3..a0ca4f2 100644

[PATCH 4/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 73 -- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index b6c8c00..cd22ba3 100644

[PATCH 2/9] drivers: staging: rtl8187se: refactor/clean signal smoothing

2014-03-01 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180.h | 2 +- drivers/staging/rtl8187se/r8180_core.c | 29 ++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h

[PATCH v2 9/9] drivers: staging: rtl8187se: refactor wmm_param_update

2014-03-03 Thread Axel Rasmussen
needed for the original blocks of code. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 119 ++--- 1 file changed, 49 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se

[PATCH v2 2/9] drivers: staging: rtl8187se: refactor/clean signal smoothing

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180.h | 2 +- drivers/staging/rtl8187se/r8180_core.c | 29 ++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h

[PATCH v2 5/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 63 +- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 8681099..fc0b6d3 100644

[PATCH v2 1/9] drivers: staging: rtl8187se: use netdev_* instead of prink

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/Module.symvers | 0 drivers/staging/rtl8187se/r8180_core.c | 8 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/rtl8187se/Module.symvers diff --git a/drivers/staging/rtl8187se

[PATCH v2 8/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 125 ++--- 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index efe1c6e..e89907c 100644

[PATCH v2 7/9] drivers: staging: rtl8187se: fixed checkpatch.pl errors

2014-03-03 Thread Axel Rasmussen
The definition of the driver's ChannelPlan array produced a large number of checkpatch.pl errors. This patch fixes all of them by adding spaces and wrapping the resulting overly-long lines. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 49

[PATCH v2 6/9] drivers: staging: rtl8187se: fixed broken indentation

2014-03-03 Thread Axel Rasmussen
A section of code in the function rtl8180_tx was indented for no reason, causing numerous checkpatch.pl warnings. Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 132 + 1 file changed, 69 insertions(+), 63 deletions(-) diff --git

[PATCH v2 3/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 40 ++ 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 67c2583..344ef74 100644

[PATCH v2 0/9] drivers: staging: rtl8187se: various code cleanups

2014-03-03 Thread Axel Rasmussen
in the original set of patches. Axel Rasmussen (9): drivers: staging: rtl8187se: use netdev_* instead of prink drivers: staging: rtl8187se: refactor/clean signal smoothing drivers: staging: rtl8187se: wrap excessively long lines drivers: staging: rtl8187se: wrap excessively long lines drivers: staging

[PATCH v2 4/9] drivers: staging: rtl8187se: wrap excessively long lines

2014-03-03 Thread Axel Rasmussen
Signed-off-by: Axel Rasmussen --- drivers/staging/rtl8187se/r8180_core.c | 73 -- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 344ef74..8681099 100644

Re: [PATCH 7/9] userfaultfd: add UFFDIO_CONTINUE ioctl

2021-01-21 Thread Axel Rasmussen
On Thu, Jan 21, 2021 at 2:47 PM Peter Xu wrote: > > On Fri, Jan 15, 2021 at 11:04:49AM -0800, Axel Rasmussen wrote: > > This ioctl is how userspace ought to resolve "minor" userfaults. The > > idea is, userspace is notified that a minor fault has occurred. It m

Re: [PATCH 0/9] userfaultfd: add minor fault handling

2021-01-21 Thread Axel Rasmussen
On Thu, Jan 21, 2021 at 11:12 AM Peter Xu wrote: > > On Fri, Jan 15, 2021 at 11:04:42AM -0800, Axel Rasmussen wrote: > > UFFDIO_COPY and UFFDIO_ZEROPAGE cannot be used to resolve minor faults. > > Without > > modifications, the existing codepath assumes a new page ne

[RFC PATCH 0/2] userfaultfd: handle minor faults, add UFFDIO_CONTINUE

2021-01-07 Thread Axel Rasmussen
re commonly used since we're talking about backing guest memory for VMs. I plan to implement shmem support in a follow-up patch series. Axel Rasmussen (2): userfaultfd: add minor fault registration mode userfaultfd: add UFFDIO_CONTINUE ioctl fs/proc/task_mmu.c | 1 + fs/us

[RFC PATCH 2/2] userfaultfd: add UFFDIO_CONTINUE ioctl

2021-01-07 Thread Axel Rasmussen
e, and it also avoid set_page_huge_active() (as this would have been done when the page was allocated). Signed-off-by: Axel Rasmussen --- fs/userfaultfd.c | 63 +++ include/linux/userfaultfd_k.h| 2 + include/uapi/linux/userfaultfd.h | 21 ++

[RFC PATCH 1/2] userfaultfd: add minor fault registration mode

2021-01-07 Thread Axel Rasmussen
n future commits]). - Doing so would make handle_userfault()'s "reason" argument confusing. We'd pass in "MISSING" even if the pages weren't really missing. Signed-off-by: Axel Rasmussen --- fs/proc/task_mmu.c | 1 + fs/userfaultfd.c | 80 +++

[PATCH 0/9] userfaultfd: add minor fault handling

2021-01-15 Thread Axel Rasmussen
ect hugetlbfs to be much more commonly used since we're talking about backing guest memory for VMs. I plan to implement shmem support in a follow-up patch series. Axel Rasmussen (5): userfaultfd: add minor fault registration mode userfaultfd: disable huge PMD sharing for MINOR registered VMAs

[PATCH 1/9] hugetlb: Pass vma into huge_pte_alloc()

2021-01-15 Thread Axel Rasmussen
From: Peter Xu It is a preparation work to be able to behave differently in the per architecture huge_pte_alloc() according to different VMA attributes. Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen --- arch/arm64/mm/hugetlbpage.c | 2 +- arch/ia64/mm/hugetlbpage.c| 3 ++- arch

[PATCH 4/9] hugetlb/userfaultfd: Unshare all pmds for hugetlbfs when register wp

2021-01-15 Thread Axel Rasmussen
. This will pair with want_pmd_share() in hugetlb code so that huge pmd sharing is completely disabled for userfaultfd-wp registered range. Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen --- fs/userfaultfd.c | 43 include/linux/mmu_notifier.h

[PATCH 3/9] mm/hugetlb: Move flush_hugetlb_tlb_range() into hugetlb.h

2021-01-15 Thread Axel Rasmussen
From: Peter Xu Prepare for it to be called outside of mm/hugetlb.c. Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen --- include/linux/hugetlb.h | 8 mm/hugetlb.c| 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/hugetlb.h b

[PATCH 2/9] hugetlb/userfaultfd: Forbid huge pmd sharing when uffd enabled

2021-01-15 Thread Axel Rasmussen
something that arch code would like to use too - ARM64 currently directly check against CONFIG_ARCH_WANT_HUGE_PMD_SHARE when trying to share huge pmd. Switch to the want_pmd_share() helper. Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen --- arch/arm64/mm/hugetlbpage.c | 3 +-- include

[PATCH 6/9] userfaultfd: disable huge PMD sharing for MINOR registered VMAs

2021-01-15 Thread Axel Rasmussen
. Huge PMD sharing would prevent these faults from occurring for suitably aligned areas, so disable it upon UFFD registration. Signed-off-by: Axel Rasmussen --- include/linux/userfaultfd_k.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux

[PATCH 7/9] userfaultfd: add UFFDIO_CONTINUE ioctl

2021-01-15 Thread Axel Rasmussen
IO_ZEROPAGE case, so just extend that design: add an enum for the three modes of operation, and make the small adjustments needed for the MCOPY_ATOMIC_CONTINUE case. (Basically, look up the existing page, and avoid adding the existing page to the page cache or calling set_page_huge_active() on it.)

[PATCH 8/9] userfaultfd: update documentation to describe minor fault handling

2021-01-15 Thread Axel Rasmussen
ING faults, whereas CONTINUE is used for MINOR faults. Signed-off-by: Axel Rasmussen --- Documentation/admin-guide/mm/userfaultfd.rst | 105 +++ 1 file changed, 64 insertions(+), 41 deletions(-) diff --git a/Documentation/admin-guide/mm/userfaultfd.rst b/Documentation/admi

[PATCH 9/9] userfaultfd/selftests: add test exercising minor fault handling

2021-01-15 Thread Axel Rasmussen
INUE ioctl, to setup the mapping and resolve the fault. The reading thread should wake up and see this modification. Currently the minor fault test is only enabled in hugetlb_shared mode, as this is the only configuration the kernel feature supports. Signed-off-by: Axel Rasmussen --- tools/testing/selfte

[PATCH 5/9] userfaultfd: add minor fault registration mode

2021-01-15 Thread Axel Rasmussen
n future commits]). - Doing so would make handle_userfault()'s "reason" argument confusing. We'd pass in "MISSING" even if the pages weren't really missing. Signed-off-by: Axel Rasmussen --- fs/proc/task_mmu.c | 1 + fs/userfaultfd.c | 80 +++

Re: [PATCH 2/3] tracing: Fix parse_synth_field() error handling

2020-09-29 Thread Axel Rasmussen
On Tue, Sep 29, 2020 at 1:33 PM Tom Zanussi wrote: > > synth_field_size() returns either the size or an error. However, the > code assigns the return val to ssize_t which is unsigned, and then > tests whether it's less than 0, which it isn't so discards the error. I think the patch is correct,

Re: [PATCH 3/3] tracing: Add support for dynamic strings to synthetic events

2020-09-29 Thread Axel Rasmussen
On Tue, Sep 29, 2020 at 1:33 PM Tom Zanussi wrote: > > Currently, sythetic events only support static string fields such as: > > # echo 'test_latency u64 lat; char somename[32]' > > /sys/kernel/debug/tracing/synthetic_events > > Which is fine, but wastes a lot of space in the event. > > It

Re: [PATCH 0/3] tracing: Add dynamic strings for synthetic events

2020-09-29 Thread Axel Rasmussen
On Tue, Sep 29, 2020 at 1:33 PM Tom Zanussi wrote: > > Hi, > > This patchset adds support for dynamic strings for synthetic events, > as requested by Axel Rasmussen. > > Actually, the first two patches should be applied in any case - the > first just changes the c

Re: [PATCH v2 1/3] tracing: Change STR_VAR_MAX_LEN

2020-09-30 Thread Axel Rasmussen
, not just this one patch): Tested-by: Axel Rasmussen On Wed, Sep 30, 2020 at 11:41 AM Tom Zanussi wrote: > > 32 is too small for this value, and anyway it makes more sense to use > MAX_FILTER_STR_VAL, as this is also the value used for variable-length > __strings. > > Signed-o

[PATCH v2 2/2] mmap_lock: add tracepoints around lock acquisition

2020-10-07 Thread Axel Rasmussen
s on exactly what e.g. the BPF program does. Signed-off-by: Axel Rasmussen --- include/linux/mmap_lock.h| 112 --- include/trace/events/mmap_lock.h | 70 +++ mm/Makefile | 2 +- mm/mmap_lock.c | 87 +++

[PATCH v2 1/2] tracing: support "bool" type in synthetic trace events

2020-10-07 Thread Axel Rasmussen
of these properties don't match, you get EINVAL [2]). Supporting "bool" explicitly makes hooking this up easier and more portable for userspace. [1]: grep -r "bool" include/trace/events/ [2]: check_synth_field() in kernel/trace/trace_events_hist.c Signed-o

[PATCH v2 0/2] Add tracepoints around mmap_lock acquisition

2020-10-07 Thread Axel Rasmussen
rg/patchwork/patch/1316922/ [2] https://lore.kernel.org/patchwork/patch/1311996/ Axel Rasmussen (2): tracing: support "bool" type in synthetic trace events mmap_lock: add tracepoints around lock acquisition include/linux/mmap_lock.h | 112 +++---

Re: [PATCH v2 2/2] mmap_lock: add tracepoints around lock acquisition

2020-10-08 Thread Axel Rasmussen
On Thu, Oct 8, 2020 at 12:40 AM Michel Lespinasse wrote: > > On Wed, Oct 7, 2020 at 11:44 AM Axel Rasmussen > wrote: > > The goal of these tracepoints is to be able to debug lock contention > > issues. This lock is acquired on most (all?) mmap / munmap / page fault >

Re: [PATCH 0/5] tracing: Synthetic event dynamic string fixes

2020-10-09 Thread Axel Rasmussen
I also tried constructing a synthetic event as we discussed on the thread about my series. As far as I can see, this addresses the edge cases Masami pointed out, and it all seems to work as intended. It works fine with the kind of synthetic event I'm hoping to define for my particular use case.

[PATCH v3 2/2] mmap_lock: add tracepoints around lock acquisition

2020-10-09 Thread Axel Rasmussen
s on exactly what e.g. the BPF program does. Signed-off-by: Axel Rasmussen --- include/linux/mmap_lock.h| 93 ++-- include/trace/events/mmap_lock.h | 70 mm/Makefile | 2 +- mm/mmap_lock.c | 87 +++

[PATCH v3 1/2] tracing: support "bool" type in synthetic trace events

2020-10-09 Thread Axel Rasmussen
of these properties don't match, you get EINVAL [2]). Supporting "bool" explicitly makes hooking this up easier and more portable for userspace. [1]: grep -r "bool" include/trace/events/ [2]: check_synth_field() in kernel/trace/trace_events_hist.c Acked-by: Michel L

[PATCH v3 0/2] Add tracepoints around mmap_lock acquisition

2020-10-09 Thread Axel Rasmussen
ining any of the lock wrappers. This yields ~zero overhead if the tracepoints aren't enabled, and therefore obviates the need for a Kconfig for this change. [1] https://lore.kernel.org/patchwork/patch/1316922/ [2] https://lore.kernel.org/patchwork/patch/1311996/ Axel Rasmussen (2):

Re: [PATCH v3 1/2] tracing: support "bool" type in synthetic trace events

2020-10-12 Thread Axel Rasmussen
On Mon, Oct 12, 2020 at 7:46 AM Steven Rostedt wrote: > > On Mon, 12 Oct 2020 09:26:13 -0500 > Tom Zanussi wrote: > > > Hi Steve, > > > > Looks ok to me. > > > > Acked-by: Tom Zanussi > > Great! > > I'll pull this patch into my tree. It doesn't look like patch 2/2 is > dependent on this and

[PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-17 Thread Axel Rasmussen
The goal of these tracepoints is to be able to debug lock contention issues. This lock is acquired on most (all?) mmap / munmap / page fault operations, so a multi-threaded process which does a lot of these can experience significant contention. We trace just before we start acquisition, when the

Re: [RFC PATCH v3 1/1] mmap_lock: add tracepoints around mmap_lock acquisition

2020-09-09 Thread Axel Rasmussen
Yafang Shao wrote: > > On Fri, Jun 19, 2020 at 6:43 AM Axel Rasmussen > wrote: > > > > The goal is to be able to collect a latency histogram for contended > > mmap_lock acquisitions. This will be used to diagnose slowness observed > > in production workloads,

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-21 Thread Axel Rasmussen
On Sun, Sep 20, 2020 at 9:58 PM Yafang Shao wrote: > > On Fri, Sep 18, 2020 at 2:13 AM Axel Rasmussen > wrote: > > > > The goal of these tracepoints is to be able to debug lock contention > > issues. This lock is acquired on most (all?) mmap / munmap / page fault

[PATCH v5 0/1] mmap_lock: add tracepoints around lock acquisition

2020-10-27 Thread Axel Rasmussen
cepoints are enabled in a header is used to avoid un-inlining any of the lock wrappers. This yields ~zero overhead if the tracepoints aren't enabled, and therefore obviates the need for a Kconfig for this change. [1] https://lore.kernel.org/patchwork/patch/1316922/ [2] https://lore.kernel.org/pat

[PATCH v5 1/1] mmap_lock: add tracepoints around lock acquisition

2020-10-27 Thread Axel Rasmussen
s on exactly what e.g. the BPF program does. [ rost...@goodmis.org: in-depth examples of tracepoint_enabled() usage, and per-cpu-per-context buffer design ] Signed-off-by: Axel Rasmussen --- include/linux/mmap_lock.h| 95 +++- include/trace/events/mmap_lock.h | 107 +

Re: [PATCH v4 1/1] mmap_lock: add tracepoints around lock acquisition

2020-10-23 Thread Axel Rasmussen
On Fri, Oct 23, 2020 at 7:00 AM Vlastimil Babka wrote: > > On 10/20/20 8:47 PM, Axel Rasmussen wrote: > > The goal of these tracepoints is to be able to debug lock contention > > issues. This lock is acquired on most (all?) mmap / munmap / page fault > > operations, so

Re: [mm/page_alloc] 7fef431be9: vm-scalability.throughput 87.8% improvement

2020-10-23 Thread Axel Rasmussen
> test-description: The motivation behind this suite is to exercise functions > > and regions of the mm/ of the Linux kernel which are of interest to us. > > test-url: > > https://git.kernel.org/cgit/linux/kernel/git/wfg/vm-scalability.git/ > > > > I'm curious why

Re: [PATCH v3 2/2] mmap_lock: add tracepoints around lock acquisition

2020-10-20 Thread Axel Rasmussen
On Tue, Oct 20, 2020 at 7:50 AM Vlastimil Babka wrote: > > On 10/10/20 12:05 AM, Axel Rasmussen wrote: > > The goal of these tracepoints is to be able to debug lock contention > > issues. This lock is acquired on most (all?) mmap / munmap / page fault > > operations, so

[PATCH v4 1/1] mmap_lock: add tracepoints around lock acquisition

2020-10-20 Thread Axel Rasmussen
s on exactly what e.g. the BPF program does. Reviewed-by: Michel Lespinasse Acked-by: Yafang Shao Acked-by: David Rientjes Signed-off-by: Axel Rasmussen --- include/linux/mmap_lock.h| 93 -- include/trace/events/mmap_lock.h | 98 +++

[PATCH v4 0/1] Add tracepoints around mmap_lock acquisition

2020-10-20 Thread Axel Rasmussen
tch/1316922/ [2] https://lore.kernel.org/patchwork/patch/1311996/ Axel Rasmussen (1): mmap_lock: add tracepoints around lock acquisition include/linux/mmap_lock.h| 93 -- include/trace/events/mmap_lock.h | 98 mm/Makefile

Re: [mm/page_alloc] 7fef431be9: vm-scalability.throughput 87.8% improvement

2020-10-26 Thread Axel Rasmussen
On Mon, Oct 26, 2020 at 1:31 AM David Hildenbrand wrote: > > On 23.10.20 21:44, Axel Rasmussen wrote: > > On Fri, Oct 23, 2020 at 12:29 PM David Rientjes wrote: > >> > >> On Wed, 21 Oct 2020, kernel test robot wrote: > >> > >>> Greeting, &g

Re: KASAN: use-after-free Write in kernfs_path_from_node_locked

2020-11-30 Thread Axel Rasmussen
Nov 30, 2020 at 5:08 AM syzbot wrote: > > syzbot has bisected this issue to: > > commit 0f818c4bc1f3dc0d6d0ea916e0ab30cf5e75f4c0 > Author: Axel Rasmussen > Date: Tue Nov 24 05:37:42 2020 + > > mm: mmap_lock: add tracepoints around lock acquisitio

[PATCH] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-11-30 Thread Axel Rasmussen
uot;) Signed-off-by: Axel Rasmussen --- mm/mmap_lock.c | 100 + 1 file changed, 85 insertions(+), 15 deletions(-) diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c index 12af8f1b8a14..be38dc58278b 100644 --- a/mm/mmap_lock.c +++ b/mm/mmap_lock.c @@ -3,6 +

Re: [PATCH] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-12-04 Thread Axel Rasmussen
On Fri, Dec 4, 2020 at 8:36 AM Vlastimil Babka wrote: > > On 12/2/20 2:11 AM, Shakeel Butt wrote: > > On Tue, Dec 1, 2020 at 5:07 PM Steven Rostedt wrote: > >> > >> On Tue, 1 Dec 2020 16:36:32 -0800 > >> Shakeel Butt wrote: > >> > >> > SGTM but note that usually Andrew squash all the patches

[PATCH] userfaultfd: selftests: fix SIGSEGV if huge mmap fails

2020-12-04 Thread Axel Rasmussen
r_hugepages (leaving it at 0), and then trying to run the hugetlb_shared test. Another small improvement is, when the original mmap fails, don't just print "it failed": perror(), so we can see *why*. :) Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 25 ++

Re: [PATCH] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-12-01 Thread Axel Rasmussen
On Mon, Nov 30, 2020 at 5:34 PM Shakeel Butt wrote: > > On Mon, Nov 30, 2020 at 3:43 PM Axel Rasmussen > wrote: > > > > syzbot reported[1] a use-after-free introduced in 0f818c4bc1f3. The bug > > is that an ongoing trace event might race with the tracepoint being

Re: [PATCH] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-12-01 Thread Axel Rasmussen
On Tue, Dec 1, 2020 at 10:42 AM Shakeel Butt wrote: > > On Tue, Dec 1, 2020 at 9:56 AM Greg Thelen wrote: > > > > Axel Rasmussen wrote: > > > > > On Mon, Nov 30, 2020 at 5:34 PM Shakeel Butt wrote: > > >> > > >> On M

[PATCH v2] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-12-01 Thread Axel Rasmussen
called get_mem_cgroup_from_mm(), but we never called css_put() to release that reference. get_mm_memcg_path() now does this properly. [1]: https://syzkaller.appspot.com/bug?extid=19e6dd9943972fa1c58a Signed-off-by: Axel Rasmussen --- mm/mmap_lock.c | 104 +++-- 1 file c

Re: [PATCH] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints

2020-12-01 Thread Axel Rasmussen
On Tue, Dec 1, 2020 at 12:53 PM Shakeel Butt wrote: > > +Tejun Heo > > On Tue, Dec 1, 2020 at 11:14 AM Axel Rasmussen > wrote: > > > > On Tue, Dec 1, 2020 at 10:42 AM Shakeel Butt wrote: > > > > > > On Tue, Dec 1, 2020 at 9:56 AM Greg Thelen

[PATCH] userfaultfd: selftests: make __{s,u}64 format specifiers portable

2020-12-02 Thread Axel Rasmussen
tializer" warning when we initialize prms in wp_range(). Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 77 +++- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/us

Re: [PATCH] userfaultfd: selftests: make __{s,u}64 format specifiers portable

2020-12-02 Thread Axel Rasmussen
On Wed, Dec 2, 2020 at 3:10 PM Peter Xu wrote: > > Hi, Axel, > > Looks mostly good to me, but a few nitpickings below. > > On Wed, Dec 02, 2020 at 01:15:42PM -0800, Axel Rasmussen wrote: > > [...] > > > +static void uffd_error(const char *message, __s64 code) >

[PATCH v2] userfaultfd: selftests: make __{s,u}64 format specifiers portable

2020-12-03 Thread Axel Rasmussen
ot; warning when we initialize prms in wp_range(). Acked-by: Peter Xu Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 81 ++-- 1 file changed, 35 insertions(+), 46 deletions(-) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/test

[PATCH v6 0/1] mmap_lock: add tracepoints around lock acquisition

2020-11-05 Thread Axel Rasmussen
cepoints are enabled in a header is used to avoid un-inlining any of the lock wrappers. This yields ~zero overhead if the tracepoints aren't enabled, and therefore obviates the need for a Kconfig for this change. [1] https://lore.kernel.org/patchwork/patch/1316922/ [2] https://lore.kernel.org/pat

[PATCH v6 1/1] mmap_lock: add tracepoints around lock acquisition

2020-11-05 Thread Axel Rasmussen
s on exactly what e.g. the BPF program does. [ rost...@goodmis.org: in-depth examples of tracepoint_enabled() usage, and per-cpu-per-context buffer design ] Acked-by: Vlastimil Babka Signed-off-by: Axel Rasmussen --- include/linux/mmap_lock.h| 94 +++- include/

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-18 Thread Axel Rasmussen
On Thu, Sep 17, 2020 at 12:43 PM Steven Rostedt wrote: > > On Thu, 17 Sep 2020 11:13:47 -0700 > Axel Rasmussen wrote: > > > +/* > > + * Trace calls must be in a separate file, as otherwise there's a circuclar > > + * dependency between linux/mmap_lock.

Re: [PATCH 1/2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-24 Thread Axel Rasmussen
On Thu, Sep 24, 2020 at 10:42 AM Mathieu Desnoyers wrote: > > - On Sep 24, 2020, at 1:09 PM, rostedt rost...@goodmis.org wrote: > > > From: "Steven Rostedt (VMware)" > > > > As tracepoints are discouraged from being added in a header because it can > > cause side effects if other tracepoints

Re: [PATCH 1/2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-24 Thread Axel Rasmussen
On Thu, Sep 24, 2020 at 12:08 PM Mathieu Desnoyers wrote: > > > > - On Sep 24, 2020, at 2:30 PM, rostedt rost...@goodmis.org wrote: > > > On Thu, 24 Sep 2020 13:42:25 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> > Signed-off-by: Steven Rostedt (VMware) > >> > --- > >> >

[RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events

2020-09-25 Thread Axel Rasmussen
know what you think. Happy to drop this and wait for Tom's suggested approach instead. Axel Rasmussen (1): tracing: support dynamic string field types for synthetic events kernel/trace/trace_events_hist.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) -- 2.28.0.681.g6f77f65b4e-goog

[RFC PATCH 1/1] tracing: support dynamic string field types for synthetic events

2020-09-25 Thread Axel Rasmussen
ical tracepoints. It turns out this is already handled correctly, as long as the check during definition parsing doesn't prevent it. [1] grep -r "__string" include/trace/events/ [2] See synth_field_is_string in kernel/trace/trace_events_synth.c [3] See check_synth_field in kernel/trace/

Re: [RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events

2020-09-25 Thread Axel Rasmussen
On Fri, Sep 25, 2020 at 12:48 PM Tom Zanussi wrote: > > Hi Axel, > > On Fri, 2020-09-25 at 12:08 -0700, Axel Rasmussen wrote: > > Hi Steven and Tom, > > > > In this thread: https://lkml.org/lkml/2020/9/17/1015 we discussed how > > to plumb > > dynam

Re: [PATCH 1/3 v2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-25 Thread Axel Rasmussen
On Fri, Sep 25, 2020 at 2:18 PM Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > As tracepoints are discouraged from being added in a header because it can > cause side effects if other tracepoints are in headers, as well as bloat the > kernel as the trace_() function is not a small

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-22 Thread Axel Rasmussen
On Mon, Sep 21, 2020 at 9:09 PM Yafang Shao wrote: > > On Tue, Sep 22, 2020 at 12:53 AM Axel Rasmussen > wrote: > > > > On Sun, Sep 20, 2020 at 9:58 PM Yafang Shao wrote: > > > > > > On Fri, Sep 18, 2020 at 2:13 AM Axel Rasmussen > > > wrot

  1   2   3   >