[RFC PATCH RESEND v2 1/2] mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd

2025-01-02 Thread Isaac J. Manjarres
] https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/drivers/staging/android/ashmem.c [2] https://developer.android.com/reference/android/database/CursorWindow Signed-off-by: Isaac J. Manjarres --- include/uapi/linux/fcntl.h | 1 + mm/memfd.c | 39

[RFC PATCH RESEND v2 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC

2025-01-02 Thread Isaac J. Manjarres
Add tests to ensure that F_SEAL_FUTURE_EXEC behaves as expected. Signed-off-by: Isaac J. Manjarres --- tools/testing/selftests/memfd/memfd_test.c | 79 ++ 1 file changed, 79 insertions(+) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests

[RFC PATCH RESEND v2 0/2] Add file seal to prevent future exec mappings

2025-01-02 Thread Isaac J. Manjarres
inks to previous versions: v1: https://lore.kernel.org/all/20241206010930.3871336-1-isaacmanjar...@google.com/ Isaac J. Manjarres (2): mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC include/uapi/linux/fcntl.h | 1 + mm/memfd.

[RFC PATCH v2 1/2] mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd

2024-12-26 Thread Isaac J. Manjarres
] https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/drivers/staging/android/ashmem.c [2] https://developer.android.com/reference/android/database/CursorWindow Signed-off-by: Isaac J. Manjarres --- include/uapi/linux/fcntl.h | 1 + mm/memfd.c | 39

[RFC PATCH v2 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC

2024-12-26 Thread Isaac J. Manjarres
Add tests to ensure that F_SEAL_FUTURE_EXEC behaves as expected. Signed-off-by: Isaac J. Manjarres --- tools/testing/selftests/memfd/memfd_test.c | 79 ++ 1 file changed, 79 insertions(+) diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests

[RFC PATCH v2 0/2] Add file seal to prevent future exec mappings

2024-12-26 Thread Isaac J. Manjarres
fa47dbd8a23@lucifer.local [6] https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/tree/?h=mm-unstable [7] https://lore.kernel.org/all/3a53b154-1e46-45fb-a559-65afa7a8a788@lucifer.local/ Links to previous versions: v1: https://lore.kernel.org/all/20241206010930.3871336-1-isaacma

[RFC PATCH v1 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC

2024-12-05 Thread Isaac J. Manjarres
Add tests to ensure that F_SEAL_FUTURE_EXEC behaves as expected. Cc: Suren Baghdasaryan Cc: Kalesh Singh Cc: John Stultz Signed-off-by: Isaac J. Manjarres --- tools/testing/selftests/memfd/memfd_test.c | 79 ++ 1 file changed, 79 insertions(+) diff --git a/tools/testing

[RFC PATCH v1 1/2] mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd

2024-12-05 Thread Isaac J. Manjarres
/android/kernel/superproject/+/common-android-mainline:common/drivers/staging/android/ashmem.c [2] https://developer.android.com/reference/android/database/CursorWindow Cc: Suren Baghdasaryan Cc: Kalesh Singh Cc: John Stultz Signed-off-by: Isaac J. Manjarres --- include/linux/mm.h | 5

[RFC PATCH v1 0/2] Add file seal to prevent future exec mappings

2024-12-05 Thread Isaac J. Manjarres
rWindow [3] https://lore.kernel.org/all/cover.1732804776.git.lorenzo.stoa...@oracle.com/ Isaac J. Manjarres (2): mm/memfd: Add support for F_SEAL_FUTURE_EXEC to memfd selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC include/linux/mm.h | 5 ++ include/uapi/lin

[PATCH v1] selftests/memfd: Run sysctl tests when PID namespace support is enabled

2024-12-05 Thread Isaac J. Manjarres
informative message to let the user know why the sysctl tests are not being run. Fixes: 11f75a01448f ("selftests/memfd: add tests for MFD_NOEXEC_SEAL MFD_EXEC") Cc: sta...@vger.kernel.org # v6.6+ Cc: Jeff Xu Cc: Suren Baghdasaryan Cc: Kalesh Singh Signed-off-by: Isaac J. Manjarres --- too

[PATCH] iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs

2021-01-25 Thread Isaac J. Manjarres
u-qcom: Read back stream mappings") Signed-off-by: Isaac J. Manjarres Cc: sta...@vger.kernel.org --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index bcda1

[PATCH v2 0/5] Optimize iommu_map_sg() performance

2021-01-11 Thread Isaac J. Manjarres
sical address ranges being mapped are within the appropriate limits. -Added Sai Prakash Ranjan's "Tested-by" tag. Thanks, Isaac Isaac J. Manjarres (5): iommu/io-pgtable: Introduce map_sg() as a page table op iommu/io-pgtable-arm: Hook up map_sg() iommu/io-pgtable-arm-v7s: Hook

[PATCH v2 1/5] iommu/io-pgtable: Introduce map_sg() as a page table op

2021-01-11 Thread Isaac J. Manjarres
calls, and boosting overall iommu_map_sg() performance. Signed-off-by: Isaac J. Manjarres Tested-by: Sai Prakash Ranjan --- include/linux/io-pgtable.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/io-pgtable.h b/include/linux/io-pgtable.h index ea727eb..6d0e731 100644

[PATCH v2 5/5] iommu/arm-smmu: Hook up map_sg()

2021-01-11 Thread Isaac J. Manjarres
Now that everything is in place for iommu_map_sg() to defer mapping a scatter-gather list to the io-pgtable layer, implement the map_sg() callback in the SMMU driver, so that iommu_map_sg() can invoke it with the entire scatter-gather list that will be mapped. Signed-off-by: Isaac J. Manjarres

[PATCH v2 3/5] iommu/io-pgtable-arm-v7s: Hook up map_sg()

2021-01-11 Thread Isaac J. Manjarres
Implement the map_sg io-pgtable op for the ARMv7s io-pgtable code, so that IOMMU drivers can call it when they need to map a scatter-gather list. Signed-off-by: Isaac J. Manjarres Tested-by: Sai Prakash Ranjan --- drivers/iommu/io-pgtable-arm-v7s.c | 90

[PATCH v2 4/5] iommu: Introduce map_sg() as an IOMMU op for IOMMU drivers

2021-01-11 Thread Isaac J. Manjarres
n the io-pgtable layer. For IOMMU drivers that do not provide a callback, the default implementation of iterating through the scatter-gather list, while calling iommu_map() will be used. Signed-off-by: Isaac J. Manjarres Tested-by: Sai Prakash Ranjan --- drivers/iommu/iommu.c

[PATCH v2 2/5] iommu/io-pgtable-arm: Hook up map_sg()

2021-01-11 Thread Isaac J. Manjarres
Implement the map_sg io-pgtable op for the ARM LPAE io-pgtable code, so that IOMMU drivers can call it when they need to map a scatter-gather list. Signed-off-by: Isaac J. Manjarres Tested-by: Sai Prakash Ranjan --- drivers/iommu/io-pgtable-arm.c | 86

[PATCH 0/5] Optimize iommu_map_sg() performance

2021-01-08 Thread Isaac J. Manjarres
ap_sg latencies is the same in both experiments. Clearly, reducing the jumps between the different layers in the IOMMU code offers a signficant performance boost in iommu_map_sg() latency. Thanks, Isaac Isaac J. Manjarres (5): iommu/io-pgtable: Introduce map_sg() as a page table op iommu/io-pg

[PATCH 5/5] iommu/arm-smmu: Hook up map_sg()

2021-01-08 Thread Isaac J. Manjarres
Now that everything is in place for iommu_map_sg() to defer mapping a scatter-gather list to the io-pgtable layer, implement the map_sg() callback in the SMMU driver, so that iommu_map_sg() can invoke it with the entire scatter-gather list that will be mapped. Signed-off-by: Isaac J. Manjarres

[PATCH 3/5] iommu/io-pgtable-arm-v7s: Hook up map_sg()

2021-01-08 Thread Isaac J. Manjarres
Implement the map_sg io-pgtable op for the ARMv7s io-pgtable code, so that IOMMU drivers can call it when they need to map a scatter-gather list. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm-v7s.c | 90 ++ 1 file changed, 90 insertions

[PATCH 4/5] iommu: Introduce map_sg() as an IOMMU op for IOMMU drivers

2021-01-08 Thread Isaac J. Manjarres
n the io-pgtable layer. For IOMMU drivers that do not provide a callback, the default implementation of iterating through the scatter-gather list, while calling iommu_map() will be used. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/iommu.c | 13 + include/linux/iommu.h | 5 +++

[PATCH 2/5] iommu/io-pgtable-arm: Hook up map_sg()

2021-01-08 Thread Isaac J. Manjarres
Implement the map_sg io-pgtable op for the ARM LPAE io-pgtable code, so that IOMMU drivers can call it when they need to map a scatter-gather list. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm.c | 86 ++ drivers/iommu/iommu.c

[PATCH 1/5] iommu/io-pgtable: Introduce map_sg() as a page table op

2021-01-08 Thread Isaac J. Manjarres
calls, and boosting overall iommu_map_sg() performance. Signed-off-by: Isaac J. Manjarres --- include/linux/io-pgtable.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/io-pgtable.h b/include/linux/io-pgtable.h index ea727eb..6d0e731 100644 --- a/include/linux/io-pgtable.h

[PATCH v2 3/7] iommu/arm-smmu: Add dependency on io-pgtable format modules

2020-12-21 Thread Isaac J. Manjarres
ng the ARM SMMU driver module. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index d8c6bfd..a72649f 100644 --- a/drivers/iommu/arm/ar

[PATCH v2 2/7] iommu/io-pgtable: Add refcounting for io-pgtable format modules

2020-12-21 Thread Isaac J. Manjarres
In preparation for modularizing io-pgtable formats, add support for reference counting the io-pgtable format modules to ensure that the modules are not unloaded while they are in use. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm-v7s.c | 1 + drivers/iommu/io-pgtable-arm.c

[PATCH v2 6/7] drm/panfrost: Add dependency on io-pgtable-arm format module

2020-12-21 Thread Isaac J. Manjarres
oading the Panfrost DRM driver module. Signed-off-by: Isaac J. Manjarres --- drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 83a461b..7294622 100644 --- a/drivers/gpu/dr

[PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

2020-12-21 Thread Isaac J. Manjarres
-pgtable formats, switch to a dynamic registration scheme, where each io-pgtable format can register their init functions with the io-pgtable code at boot or module insertion time. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm-v7s.c | 34 +- drivers/iommu/io-pgtable

[PATCH v2 4/7] iommu/arm-smmu-v3: Add dependency on io-pgtable-arm format module

2020-12-21 Thread Isaac J. Manjarres
ARM SMMUv3 driver module. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 8ca7415..c498ac8 100644 --- a/drivers/iom

[PATCH v2 7/7] iommu/io-pgtable-arm: Allow building modular io-pgtable fmts

2020-12-21 Thread Isaac J. Manjarres
Now that everything is in place for modular io-pgtable formats, allow the ARM LPAE and ARMV7S io-pgtable formats to be built as modules. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/Kconfig | 4 ++-- drivers/iommu/io-pgtable-arm-v7s.c | 2 ++ drivers/iommu/io-pgtable-arm.c

[RFC PATCH v2 0/7] iommu: Permit modular builds of io-pgtable drivers

2020-12-21 Thread Isaac J. Manjarres
Kconfig options for the ARM LPAE nad ARM V7S to tristate. Thanks in advance for the feedback, Isaac J. Manjarres Isaac J. Manjarres (7): iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration iommu/io-pgtable: Add refcounting for io-pgtable format modules iommu/arm-smmu: Add dependency

[PATCH v2 5/7] drm/msm: Add dependency on io-pgtable-arm format module

2020-12-21 Thread Isaac J. Manjarres
he MSM DRM driver module. Signed-off-by: Isaac J. Manjarres --- drivers/gpu/drm/msm/msm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 535a026..8be3506 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm

[PATCH 3/3] iommu/io-pgtable: Allow building as a module

2020-12-18 Thread Isaac J. Manjarres
descriptor format (either or both ARM LPAE and ARMV7S) can be built as modules. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 192ef8f..d7de6db 100644 --- a

[PATCH 2/3] iommu/io-pgtable: Prepare for modularization

2020-12-18 Thread Isaac J. Manjarres
() instead. Also, add the GPL v2 module license to the io-pgtable source file. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/io-pgtable.c b/drivers/iommu/io-pgtable.c index 94394c8..867ecb4

[RFC PATCH 0/3] iommu: Permit modular builds of io-pgtable drivers

2020-12-18 Thread Isaac J. Manjarres
river module. Thanks in advance for the feedback, Isaac J. Manjarres Isaac J. Manjarres (3): iommu/io-pgtable-arm: Prepare for modularization iommu/io-pgtable: Prepare for modularization iommu/io-pgtable: Allow building as a module drivers/iommu/Kconfig | 6 +++--- drivers/iom

[PATCH 1/3] iommu/io-pgtable-arm: Prepare for modularization

2020-12-18 Thread Isaac J. Manjarres
The io-pgtable-arm and io-pgtable-arm-v7s source files will be compiled as separate modules, along with the io-pgtable source. Export the symbols for the io-pgtable init function structures for the io-pgtable module to use. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm

[RFC PATCH] fork: Free per-cpu cached vmalloc'ed thread stacks with

2020-09-04 Thread Isaac J. Manjarres
y to help move along the CPU hotplug teardown state machine quickly. Signed-off-by: Isaac J. Manjarres --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/fork.c b/kernel/fork.c index 4d32190..68346a0 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -202,7

[PATCH] mm/usercopy: Use memory range to be accessed for wraparound check

2019-07-30 Thread Isaac J. Manjarres
ctually be accessed when considering if accessing a certain amount of bytes will cause the memory address to wrap around. Fixes: f5509cc18daa ("mm: Hardened usercopy") Co-developed-by: Prasad Sodagudi Signed-off-by: Prasad Sodagudi Signed-off-by: Isaac J. Manjarres Cc: sta...@vger.kernel.org

[PATCH] mm/usercopy: Use memory range to be accessed for wraparound check

2018-11-13 Thread Isaac J. Manjarres
ctually be accessed when considering if accessing a certain amount of bytes will cause the memory address to wrap around. Change-Id: I2563a5988e41122727ede17180f365e999b953e6 Fixes: f5509cc18daa ("mm: Hardened usercopy") Co-Developed-by: Prasad Sodagudi Signed-off-by: Prasad Sodagudi Si

[PATCH] stop_machine: Atomically queue and wake stopper threads

2018-08-03 Thread Isaac J. Manjarres
works and waking the stopper threads is atomic. Fixes: 0b26351b910f ("stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock") Co-Developed-by: Isaac J. Manjarres Signed-off-by: Prasad Sodagudi Signed-off-by: Isaac J. Manjarres Cc: sta...@vger.kernel.org --- kernel/stop_ma

[tip:sched/core] stop_machine: Disable preemption after queueing stopper threads

2018-07-25 Thread tip-bot for Isaac J. Manjarres
Commit-ID: 2610e88946632afb78aa58e61f11368ac4c0af7b Gitweb: https://git.kernel.org/tip/2610e88946632afb78aa58e61f11368ac4c0af7b Author: Isaac J. Manjarres AuthorDate: Tue, 17 Jul 2018 12:35:29 -0700 Committer: Ingo Molnar CommitDate: Wed, 25 Jul 2018 11:25:08 +0200 stop_machine

[PATCH] stop_machine: Disable preemption after queueing stopper threads

2018-07-17 Thread Isaac J. Manjarres
eueing the works and waking the stopper threads is atomic. Fixes: 9fb8d5dc4b64 ("stop_machine, Disable preemption when waking two stopper threads") Co-Developed-by: Prasad Sodagudi Co-Developed-by: Pavankumar Kondeti Signed-off-by: Isaac J. Manjarres Signed-off-by: Prasad Sodagudi Signe

[PATCH v4] stop_machine: Disable preemption after queueing stopper threads

2018-07-17 Thread Isaac J. Manjarres
ensure that the operation of queueing the works and waking the stopper threads is atomic. Fixes: 0b26351b910f ("stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock") Co-Developed-by: Prasad Sodagudi Co-Developed-by: Pavankumar Kondeti Signed-off-by: Isaac J. Manjarres

[tip:sched/urgent] stop_machine: Disable preemption when waking two stopper threads

2018-07-15 Thread tip-bot for Isaac J. Manjarres
Commit-ID: 9fb8d5dc4b649dd190e1af4ead670753e71bf907 Gitweb: https://git.kernel.org/tip/9fb8d5dc4b649dd190e1af4ead670753e71bf907 Author: Isaac J. Manjarres AuthorDate: Tue, 3 Jul 2018 15:02:14 -0700 Committer: Thomas Gleixner CommitDate: Sun, 15 Jul 2018 12:12:45 +0200 stop_machine

[PATCH v3] stop_machine: Disable preemption when waking two stopper threads

2018-07-03 Thread Isaac J. Manjarres
dagudi Co-Developed-by: Pavankumar Kondeti Signed-off-by: Isaac J. Manjarres Signed-off-by: Prasad Sodagudi Signed-off-by: Pavankumar Kondeti Cc: sta...@vger.kernel.org --- kernel/stop_machine.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/stop_machine.c b/

[PATCH v2] stop_machine: Disable preemption when waking two stopper threads

2018-06-29 Thread Isaac J. Manjarres
permanently scheduled out, leaving the remaining stopper thread asleep in the wake queue. Co-developed-by: Pavankumar Kondeti Signed-off-by: Prasad Sodagudi Signed-off-by: Pavankumar Kondeti Signed-off-by: Isaac J. Manjarres --- kernel/stop_machine.c | 6 +- 1 file changed, 5 insertions(+),

[PATCH] stop_machine: Remove cpu swap from stop_two_cpus

2018-06-26 Thread Isaac J. Manjarres
so that the source CPU's stopper thread is added to the wake queue last, so that the source CPU's stopper thread is woken up last, ensuring that all other threads that it depends on are woken up before it runs. Co-developed-by: Prasad Sodagudi Signed-off-by: Prasad Sodagudi Signed-off-