* [LTP] [PATCH v1 0/2] security/dirtyc0w_shmem: Two fixes
@ 2022-11-25 12:31 David Hildenbrand
2022-11-25 12:31 ` [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM David Hildenbrand
2022-11-25 12:31 ` [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag David Hildenbrand
0 siblings, 2 replies; 7+ messages in thread
From: David Hildenbrand @ 2022-11-25 12:31 UTC (permalink / raw)
To: ltp; +Cc: David Hildenbrand
Reworking compile-time absence of UFFD_FEATURE_MINOR_SHMEM and
looking into using fuzzy sync library takes more time. So two patches
separately upfront.
Cc: Martin Doucha <mdoucha@suse.cz>
Cc: Cyril Hrubis <chrubis@suse.cz>
Cc: Petr Vorel <pvorel@suse.cz>
David Hildenbrand (2):
security/dirtyc0w_shmem: Fix runtime absence of
UFFD_FEATURE_MINOR_SHMEM
security/dirtyc0w_shmem: Drop useless needs_tmpdir tag
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 -
.../kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.38.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM
2022-11-25 12:31 [LTP] [PATCH v1 0/2] security/dirtyc0w_shmem: Two fixes David Hildenbrand
@ 2022-11-25 12:31 ` David Hildenbrand
2022-11-25 12:37 ` Petr Vorel
2022-11-25 12:31 ` [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag David Hildenbrand
1 sibling, 1 reply; 7+ messages in thread
From: David Hildenbrand @ 2022-11-25 12:31 UTC (permalink / raw)
To: ltp; +Cc: David Hildenbrand
We have to test if UFFD_FEATURE_MINOR_SHMEM is really returned by the
UFFD_API ioctl: if the kernel knows about the feature but doesn't support
it, it will be masked off.
Reported-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
.../kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c
index cb2e9df0c..45cc0ee76 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem_child.c
@@ -162,6 +162,10 @@ retry:
"Could not create userfault file descriptor");
}
+ if (!(uffdio_api.features & UFFD_FEATURE_MINOR_SHMEM))
+ tst_brk(TCONF,
+ "System does not have userfaultfd minor fault support for shmem");
+
uffdio_register.range.start = (unsigned long) map;
uffdio_register.range.len = page_size;
uffdio_register.mode = UFFDIO_REGISTER_MODE_MINOR;
--
2.38.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag
2022-11-25 12:31 [LTP] [PATCH v1 0/2] security/dirtyc0w_shmem: Two fixes David Hildenbrand
2022-11-25 12:31 ` [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM David Hildenbrand
@ 2022-11-25 12:31 ` David Hildenbrand
2022-11-25 12:36 ` Petr Vorel
2022-11-25 13:32 ` Martin Doucha
1 sibling, 2 replies; 7+ messages in thread
From: David Hildenbrand @ 2022-11-25 12:31 UTC (permalink / raw)
To: ltp; +Cc: David Hildenbrand
Compilation points out that:
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c: useless tag:
needs_tmpdir
needs_tmpdir is implied by needs_checkpoints, so we can drop it.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
index 1e3b194e7..14b8f8317 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
@@ -109,7 +109,6 @@ static struct tst_test test = {
.needs_checkpoints = 1,
.forks_child = 1,
.needs_root = 1,
- .needs_tmpdir = 1,
.max_runtime = 120,
.setup = setup,
.cleanup = cleanup,
--
2.38.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag
2022-11-25 12:31 ` [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag David Hildenbrand
@ 2022-11-25 12:36 ` Petr Vorel
2022-11-25 13:32 ` Martin Doucha
1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2022-11-25 12:36 UTC (permalink / raw)
To: David Hildenbrand; +Cc: ltp
Hi all,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Fixes: a46f8956f ("security/dirtyc0w_shmem: Add new test for CVE-2022-2590")
Waiting little bit for Martin's input (not required) before merging.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM
2022-11-25 12:31 ` [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM David Hildenbrand
@ 2022-11-25 12:37 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2022-11-25 12:37 UTC (permalink / raw)
To: David Hildenbrand; +Cc: ltp
Hi all,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Fixes: a46f8956f ("security/dirtyc0w_shmem: Add new test for CVE-2022-2590")
Waiting little bit for Martin's input (not required) before merging.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag
2022-11-25 12:31 ` [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag David Hildenbrand
2022-11-25 12:36 ` Petr Vorel
@ 2022-11-25 13:32 ` Martin Doucha
2022-11-25 14:02 ` Petr Vorel
1 sibling, 1 reply; 7+ messages in thread
From: Martin Doucha @ 2022-11-25 13:32 UTC (permalink / raw)
To: David Hildenbrand, ltp
Hi,
both patches look good.
Reviewed-by: Martin Doucha <mdoucha@suse.cz>
On 25. 11. 22 13:31, David Hildenbrand wrote:
> Compilation points out that:
> testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c: useless tag:
> needs_tmpdir
>
> needs_tmpdir is implied by needs_checkpoints, so we can drop it.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
> index 1e3b194e7..14b8f8317 100644
> --- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
> +++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
> @@ -109,7 +109,6 @@ static struct tst_test test = {
> .needs_checkpoints = 1,
> .forks_child = 1,
> .needs_root = 1,
> - .needs_tmpdir = 1,
> .max_runtime = 120,
> .setup = setup,
> .cleanup = cleanup,
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag
2022-11-25 13:32 ` Martin Doucha
@ 2022-11-25 14:02 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2022-11-25 14:02 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp, David Hildenbrand
Hi Martin, David,
> Hi,
> both patches look good.
Thanks, merged!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-25 14:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-25 12:31 [LTP] [PATCH v1 0/2] security/dirtyc0w_shmem: Two fixes David Hildenbrand
2022-11-25 12:31 ` [LTP] [PATCH v1 1/2] security/dirtyc0w_shmem: Fix runtime absence of UFFD_FEATURE_MINOR_SHMEM David Hildenbrand
2022-11-25 12:37 ` Petr Vorel
2022-11-25 12:31 ` [LTP] [PATCH v1 2/2] security/dirtyc0w_shmem: Drop useless needs_tmpdir tag David Hildenbrand
2022-11-25 12:36 ` Petr Vorel
2022-11-25 13:32 ` Martin Doucha
2022-11-25 14:02 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox