Skip to content

RFC Locking protection for the stats pointer

John Wood kernelnewbies 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2security/brute: Brute LSMsecurity/brute/brute.c+358 -00 replies
2/2security/brute.c: Protect the stats pointersecurity/brute/brute.c+29 -62 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] Locking protection for the stats pointer

Hi,

I'm working in the v3 version of the "fork brute force attack mitigation" feature (KSPP task). I'm a kernel developer newbie and I think that now a locking paranoid :)

My post in this mailing list is to get feedback about my locking system. I'm very afraid about locking. I think that the protection of the stats structure's internal data about concurrency is correct. But the protection of a shared pointer among processes is not clear to me.

I divided this post in two patches. The first shows the "brute" LSM code with the explanation of the main idea behind.

The second patch shows what I think is the correct method to protect the stats pointer shared among processes.

The code in every patch not represent the changes that will be done in the version presented to review. I split this changes in this manner to make easier to comment and clarify my doubts.

Also, this RFC tell about a task_fatal_signal hook that are not shown. I think that narrow the code will be better, so this part is not sent.

All my questions are presented in the second patch. I would like to know your comments and opinions. This way I will be able to choose the correct path about locking avoiding basic errors.

The questions are related to locking not the functionality of the "brute" LSM. But any constructive comments are always welcome.

The previous versions can be found in:

RFC
https://lore.kernel.org/kernel-hardening/[email protected]/

v2
https://lore.kernel.org/kernel-hardening/[email protected]/

Thanks in advance.

John Wood (2):
security/brute: Brute LSM
security/brute.c: Protect the stats pointer

 security/brute/brute.c | 381 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 381 insertions(+)
 create mode 100644 security/brute/brute.c

--
2.25.1

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies