#
32cad1ff |
| 03-Dec-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
include: Rename sysemu/ -> system/
Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer.
Files renamed man
include: Rename sysemu/ -> system/
Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer.
Files renamed manually then mechanical change using sed tool.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Message-Id: <20241203172445.28576-1-philmd@linaro.org>
show more ...
|
#
990d2c18 |
| 24-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
seccomp: Remove check for CRIS host
As per the deprecation notice in commit c7bbef4023:
The CRIS architecture was pulled from Linux in 4.17 and the compiler is no longer packaged in any distro
seccomp: Remove check for CRIS host
As per the deprecation notice in commit c7bbef4023:
The CRIS architecture was pulled from Linux in 4.17 and the compiler is no longer packaged in any distro [...].
It is now unlikely QEMU is build on CRIS host.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-ID: <20240904143603.52934-16-philmd@linaro.org>
show more ...
|
#
e79f8b8b |
| 31-Jan-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: report EPERM instead of killing process for spawn set
When something tries to run one of the spawn syscalls (eg clone), our seccomp deny filter is set to cause a fatal trap which kills the
seccomp: report EPERM instead of killing process for spawn set
When something tries to run one of the spawn syscalls (eg clone), our seccomp deny filter is set to cause a fatal trap which kills the process.
This is found to be unhelpful when QEMU has loaded the nvidia GL library. This tries to spawn a process to modprobe the nvidia kmod. This is a dubious thing to do, but at the same time, the code will gracefully continue if this fails. Our seccomp filter rightly blocks the spawning, but prevent the graceful continue.
Switching to reporting EPERM will make QEMU behave more gracefully without impacting the level of protect we have.
https://gitlab.com/qemu-project/qemu/-/issues/2116 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
8d7f2e76 |
| 04-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
system: Rename softmmu/ directory as system/
The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentat
system: Rename softmmu/ directory as system/
The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004090629.37473-14-philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0d57919a |
| 22-Sep-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: avoid shadowing of 'action' variable
This is confusing as one 'action' variable is used for storing a SCMP_ enum value, while the other 'action' variable is used for storing a SECCOMP_ enum
seccomp: avoid shadowing of 'action' variable
This is confusing as one 'action' variable is used for storing a SCMP_ enum value, while the other 'action' variable is used for storing a SECCOMP_ enum value.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20230922160644.438631-3-berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
73422d95 |
| 26-Oct-2022 |
Michal Privoznik <mprivozn@redhat.com> |
seccomp: Get actual errno value from failed seccomp functions
Upon failure, a libseccomp API returns actual errno value very rarely. Fortunately, after its commit 34bf78ab (contained in 2.5.0 releas
seccomp: Get actual errno value from failed seccomp functions
Upon failure, a libseccomp API returns actual errno value very rarely. Fortunately, after its commit 34bf78ab (contained in 2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribute can be set which makes subsequent APIs return true errno on failure.
This is especially critical when seccomp_load() fails, because generic -ECANCELED says nothing.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
46380571 |
| 29-Apr-2021 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: block setns, unshare and execveat syscalls
setns/unshare are used to change namespaces which is not something QEMU needs to be able todo.
execveat is a new variant of execve so should be b
seccomp: block setns, unshare and execveat syscalls
setns/unshare are used to change namespaces which is not something QEMU needs to be able todo.
execveat is a new variant of execve so should be blocked just like execve already is.
Acked-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
c542b302 |
| 29-Jul-2021 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: block use of clone3 syscall
Modern glibc will use clone3 instead of clone, when it detects that it is available. We need to compare flags in order to decide whether to allow clone (thread c
seccomp: block use of clone3 syscall
Modern glibc will use clone3 instead of clone, when it detects that it is available. We need to compare flags in order to decide whether to allow clone (thread create vs process fork), but in clone3 the flags are hidden inside a struct. Seccomp can't currently match on data inside a struct, so our only option is to block clone3 entirely. If we use ENOSYS to block it, then glibc transparently falls back to clone.
This may need to be revisited if Linux adds a new architecture in future and only provides clone3, without clone.
Acked-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
5a2f693f |
| 29-Jul-2021 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: fix blocking of process spawning
When '-sandbox on,spawn=deny' is given, we are supposed to block the ability to spawn processes. We naively blocked the 'fork' syscall, forgetting that any
seccomp: fix blocking of process spawning
When '-sandbox on,spawn=deny' is given, we are supposed to block the ability to spawn processes. We naively blocked the 'fork' syscall, forgetting that any modern libc will use the 'clone' syscall instead.
We can't simply block the 'clone' syscall though, as that will break thread creation. We thus list the set of flags used to create threads and block anything that doesn't match this exactly.
Acked-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
8f46f562 |
| 29-Jul-2021 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: allow action to be customized per syscall
We're currently tailoring whether to use kill process or return EPERM based on the syscall set. This is not flexible enough for future requirements
seccomp: allow action to be customized per syscall
We're currently tailoring whether to use kill process or return EPERM based on the syscall set. This is not flexible enough for future requirements where we also need to be able to return a variety of actions on a per-syscall granularity.
Acked-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
2ce949a4 |
| 30-Jun-2021 |
Daniel P. Berrangé <berrange@redhat.com> |
seccomp: don't block getters for resource control syscalls
Recent GLibC calls sched_getaffinity in code paths related to malloc and when QEMU blocks access, it sends it off into a bad codepath resul
seccomp: don't block getters for resource control syscalls
Recent GLibC calls sched_getaffinity in code paths related to malloc and when QEMU blocks access, it sends it off into a bad codepath resulting in stack exhaustion[1]. The GLibC bug is being fixed[2], but none the less, GLibC has valid reasons to want to use sched_getaffinity.
It is not unreasonable for code to want to run many resource syscalls for information gathering, so it is a bit too harsh for QEMU to block them.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1975693 [2] https://sourceware.org/pipermail/libc-alpha/2021-June/128271.html Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
a202d75a |
| 03-Mar-2021 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
seccomp: Replace the word 'blacklist'
Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.
[*]
seccomp: Replace the word 'blacklist'
Follow the inclusive terminology from the "Conscious Language in your Open Source Projects" guidelines [*] and replace the word "blacklist" appropriately.
[*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210303184644.1639691-4-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
#
90835c2b |
| 17-Nov-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
seccomp: convert to meson
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
800d4ded |
| 06-Oct-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
softmmu: move more files to softmmu/
Keep most softmmu_ss files into the system-emulation-specific directory.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
a0bdf866 |
| 12-Oct-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201012a' into staging
v3 Migration+ virtiofsd pull 2020-10-12
V3 Remove the postcopy recovery changes
Migration: Dirtyrate
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201012a' into staging
v3 Migration+ virtiofsd pull 2020-10-12
V3 Remove the postcopy recovery changes
Migration: Dirtyrate measurement API cleanup
Virtiofsd: Missing qemu_init_exec_dir call Support for setting the group on socket creation Stop a gcc warning Avoid tempdir in sandboxing
# gpg: Signature made Mon 12 Oct 2020 12:43:30 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7
* remotes/dgilbert/tags/pull-migration-20201012a: migration/dirtyrate: present dirty rate only when querying the rate has completed migration/dirtyrate: record start_time and calc_time while at the measuring state virtiofsd: avoid /proc/self/fd tempdir virtiofsd: Call qemu_init_exec_dir tools/virtiofsd: add support for --socket-group virtiofsd: Silence gcc warning
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|