preempt-rt: add bfp configs by default
PATCH 1/1 preempt-rt: add bfp configs by default
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
[1] https://lore.kernel.org/all/[email protected]/
--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)
ktypes/preempt-rt/preempt-rt.scc +1 -0
@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.scc kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc
Signature · 1 line
2.25.1
In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
Bruce
Quoted 31 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +1
-0@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.scc kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.sccSignature · 11 lines
2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#89): https://lists.yoctoproject.org/g/yocto-patches/message/89 Mute This Topic: https://lists.yoctoproject.org/mt/105976633/1050810 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13171493/1050810/607820704/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Quoted 11 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When CONFIG_BPF_SYSCALL is't enabled, there comes below failure with rt kernel.
# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceled
And the above issue is resolved once CONFIG_BPF_SYSCALL enabled.
Thanks,
Quoted 39 lines
Bruce
Quoted 18 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +1
-1@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.scc kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc --Quoted 7 lines
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#104): https://lists.yoctoproject.org/g/yocto-patches/message/104
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13176015/3618448/1484545583/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 38 lines · Mingli via lists.yoctoproject.org
Quoted 11 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When
CONFIG_BPF_SYSCALLis't enabled, there comes below failure with rt kernel.# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceled
Quoted 1 line
And the above issue is resolved once
CONFIG_BPF_SYSCALLenabled.
Being able to run docker on preempt-rt isn't a use case that I consider high priority. Not that it is a bad use case it is that if we want -rt to have any value, we actually need to show that realtime behaviour is preserved as we enable more options and run different workloads.
Getting docker to pull an image doesn't prove/show that -rt and BPF aren't going to spike latencies, or cause other issues.
BPF used to cause locking issues and other latency issues.
There are BPF self tests, showing that they run and pass is a good first step.
Then also running the latency measurements while running both BPF tests and pulling, deleting, pulling, running, etc, containers is the second thing we need to show. If there aren't any latency spikes or locking traces we can consider it "safe enough" to enable for -rt.
Bruce
Quoted 47 lines
Thanks,
Quoted 18 lines
Bruce
Quoted 15 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +0
-0@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.sccQuoted 15 lines
Quoted 10 lines
ktypes/preempt-rt/preempt-rt.scc +1
-1kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc --2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#106): https://lists.yoctoproject.org/g/yocto-patches/message/106
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13171493/1050810/607820704/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 55 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 38 lines · Mingli via lists.yoctoproject.org
Quoted 11 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When
CONFIG_BPF_SYSCALLis't enabled, there comes below failure with rt kernel.# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceledQuoted 1 line
And the above issue is resolved once
CONFIG_BPF_SYSCALLenabled.Being able to run docker on preempt-rt isn't a use case that I consider high priority. Not that it is a bad use case it is that if we want -rt to have any value, we actually need to show that realtime behaviour is preserved as we enable more options and run different workloads.
Getting docker to pull an image doesn't prove/show that -rt and BPF aren't going to spike latencies, or cause other issues.
BPF used to cause locking issues and other latency issues.
Quoted 8 lines
There are BPF self tests, showing that they run and pass is a good first step.
Then also running the latency measurements while running both BPF tests and pulling, deleting, pulling, running, etc, containers is the second thing we need to show. If there aren't any latency spikes or locking traces we can consider it "safe enough" to enable for -rt.
Thanks Bruce for your clarification!
I'm not familiar with BPF tests, so can't provide the test results right now. I'm okay with your concerns.
Thanks,
Quoted 61 lines
Bruce
Quoted 41 lines
Thanks,
Quoted 33 lines
Bruce
Quoted 25 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +1
-1@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.scc kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc --2.25.1
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108): https://lists.yoctoproject.org/g/yocto-patches/message/108
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13176015/3618448/1484545583/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 68 lines · Mingli
Quoted 55 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 38 lines · Mingli via lists.yoctoproject.org
Quoted 11 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When
CONFIG_BPF_SYSCALLis't enabled, there comes below failure with rt kernel.# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceledQuoted 1 line
And the above issue is resolved once
CONFIG_BPF_SYSCALLenabled.Being able to run docker on preempt-rt isn't a use case that I consider high priority. Not that it is a bad use case it is that if we want -rt to have any value, we actually need to show that realtime behaviour is preserved as we enable more options and run different workloads.
Getting docker to pull an image doesn't prove/show that -rt and BPF aren't going to spike latencies, or cause other issues.
BPF used to cause locking issues and other latency issues.
Quoted 8 lines
There are BPF self tests, showing that they run and pass is a good first step.
Then also running the latency measurements while running both BPF tests and pulling, deleting, pulling, running, etc, containers is the second thing we need to show. If there aren't any latency spikes or locking traces we can consider it "safe enough" to enable for -rt.
Quoted 4 lines
Thanks Bruce for your clarification!
I'm not familiar with BPF tests, so can't provide the test results right now. I'm okay with your concerns.
If you have any issues, let me know. I'm trying to create an automated latency test image for -rt in the next few months, and running tests like these while measuring latency is a good starting point (which means I can spend some time on it as well).
Bruce
Quoted 64 lines
Thanks,
Quoted 61 lines
Bruce
Quoted 41 lines
Thanks,
Quoted 33 lines
Bruce
Quoted 25 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +1
-1@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.scc kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc --2.25.1
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108): https://lists.yoctoproject.org/g/yocto-patches/message/108
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13176015/3618448/1484545583/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 31 lines · Mingli
Quoted 11 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt: add bfp configs by default
Quoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When
CONFIG_BPF_SYSCALLis't enabled, there comes below failure with rt kernel.# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceled
Quoted 1 line
And the above issue is resolved once
CONFIG_BPF_SYSCALLenabled.
And it seems the BPF with rt kernel issues have been fixed by Thomas as
https://lore.kernel.org/all/[email protected]/.
Thanks,
Quoted 47 lines
Thanks,
Quoted 18 lines
Bruce
Quoted 15 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>---
ktypes/preempt-rt/preempt-rt.scc | 1 +1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +0
-0@@ -39,3 +39,4 @@ include backports/backports.sccinclude features/rt/rt.scc
Quoted 15 lines
Quoted 10 lines
kconf non-hardware preempt-rt.cfg
+include features/bpf/bpf.sccSignature · 1 line
2.25.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#106): https://lists.yoctoproject.org/g/yocto-patches/message/106
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/3618448
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13176015/3618448/1484545583/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 44 lines · Mingli
Quoted 40 lines · Mingli
Quoted 13 lines · Bruce Ashfield
CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe.
In message: [yocto-patches] [yocto-kernel-cache][PATCH] preempt-rt:
add bfp configs by defaultQuoted 4 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 6 lines
bpf used to have locking issues with preempt-rt, which is why it isn't already enabled.
Can you show some logs for your testing that has happened with BPF enabled -rt so that we can document what has been done to prove it works now.
When
CONFIG_BPF_SYSCALLis't enabled, there comes below failure with rt kernel.# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c1ec31eb5944: Already exists Digest: sha256:a26bff933ddc26d5cdf7faa98b4ae1e3ec20c4985e6f87ac0973052224d24302 Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO[0059] error waiting for container: context canceled
Quoted 5 lines
Quoted 1 line
And the above issue is resolved once
CONFIG_BPF_SYSCALLenabled.And it seems the BPF with rt kernel issues have been fixed by Thomas as
https://lore.kernel.org/all/[email protected]/.
We still need to do our own proofs, as I outlined in my previous email.
Bruce
Quoted 52 lines
Thanks,
Quoted 50 lines
Thanks,
Quoted 19 lines
Bruce
Quoted 16 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>--- ktypes/preempt-rt/preempt-rt.scc | 1 + 1 file changed, 1 insertion(+)ktypes/preempt-rt/preempt-rt.scc +0
-0@@ -39,3 +39,4 @@ include backports/backports.scc include features/rt/rt.sccQuoted 15 lines
Quoted 10 lines
ktypes/preempt-rt/preempt-rt.scc +1
-1kconf non-hardware preempt-rt.cfg +include features/bpf/bpf.scc --2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#106):
https://lists.yoctoproject.org/g/yocto-patches/message/106
Mute This Topic: https://lists.yoctoproject.org/mt/105976633/3618448
Group Owner: [email protected]
Unsubscribe:
https://lists.yoctoproject.org/g/yocto-patches/leave/13176015/3618448/1484545583/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 9 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>
For a big feature (and attack vector) like bpf, I think it would make sense to create a newDISTRO_FEATURE or so. People who want bpf can enable it (probably they already do),
others do not have a feature they do not need.
PS. Yocto kernel options review is one of the things on my TODO list after we're done with
the CVE crisis...
Regards,
Marta
Quoted 10 lines · Marta Rybczynska via lists.yoctoproject.org
Quoted 6 lines · Mingli via lists.yoctoproject.org
From: Mingli Yu <[email protected]>
Userspace functionality that requires BPF is becoming more common, so enable it by default [1].
Quoted 9 lines
Quoted 3 lines
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by Mingli Yu <[email protected]>For a big feature (and attack vector) like bpf, I think it would make sense to create a new
DISTRO_FEATUREor so. People who want bpf can enable it (probably they already do), others do not have a feature they do not need.
For the kernel configuration, I'll argue against that. They should be creating their
own kernel type and re-using the fragments in their own way.
The base kernel configuration, in particular for large features, should not be conditional and cobbled together with distro features. The kernel tools themselves
have support for conditional processing, which is where anything optional/configurable
needs to be, not spread across layers, .bb files, variables, and combinations of conditionals.
Bruce
Quoted 15 lines
PS. Yocto kernel options review is one of the things on my TODO list after we're done with the CVE crisis...
Regards,
Marta
_._,_._,_
________________________________
Links:You receive all messages sent to this group.
View/Reply Online (#113) | Reply To Group | Reply To Sender | Mute This Topic | New Topic Your Subscription | Contact Group Owner | Unsubscribe [[email protected]]
_._,_._,_
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II