[PATCH 0/8] security_dac: Couple of cleanups

Michal Privoznik posted 8 patches 2 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1623926317.git.mprivozn@redhat.com
src/qemu/qemu_driver.c          |  22 +---
src/security/security_dac.c     | 201 ++++++++++++++------------------
src/security/security_manager.h |  13 ++-
3 files changed, 98 insertions(+), 138 deletions(-)
[PATCH 0/8] security_dac: Couple of cleanups
Posted by Michal Privoznik 2 years, 10 months ago
I've started looking at how we could fix the following bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1786222

Long story short, we are not using just async signal safe functions in a
forked off thread that runs chown() from within the domain's private
namespace. Hence, we ran into a deadlock (although the case of the bug
the deadlock is in glibc not gluster).

So far I don't have any fix, but I have couple of cleanups.

Michal Prívozník (8):
  security_dac: Use g_autofree
  security_dac: Introduce virSecurityDACChownItemFree()
  security_dac: Introduce g_autoptr for virSecurityDACChownList
  security_dac: Don't check for !priv in
    virSecurityDACSetOwnershipInternal()
  virSecurityDACSetOwnershipInternal: Drop dead code
  virSecurityDACSetOwnershipInternal: Don't overwrite @path argument
  virSecurityDACSetOwnershipInternal: Fix WIN32 code
  qemu: Deduplicate code in qemuSecurityChownCallback()

 src/qemu/qemu_driver.c          |  22 +---
 src/security/security_dac.c     | 201 ++++++++++++++------------------
 src/security/security_manager.h |  13 ++-
 3 files changed, 98 insertions(+), 138 deletions(-)

-- 
2.31.1

Re: [PATCH 0/8] security_dac: Couple of cleanups
Posted by Jano Tomko 2 years, 10 months ago
On 6/17/21 12:42 PM, Michal Privoznik wrote:
> I've started looking at how we could fix the following bug:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1786222
> 
> Long story short, we are not using just async signal safe functions in a
> forked off thread that runs chown() from within the domain's private
> namespace. Hence, we ran into a deadlock (although the case of the bug
> the deadlock is in glibc not gluster).
> 
> So far I don't have any fix, but I have couple of cleanups.
> 
> Michal Prívozník (8):
>   security_dac: Use g_autofree
>   security_dac: Introduce virSecurityDACChownItemFree()
>   security_dac: Introduce g_autoptr for virSecurityDACChownList
>   security_dac: Don't check for !priv in
>     virSecurityDACSetOwnershipInternal()
>   virSecurityDACSetOwnershipInternal: Drop dead code
>   virSecurityDACSetOwnershipInternal: Don't overwrite @path argument
>   virSecurityDACSetOwnershipInternal: Fix WIN32 code
>   qemu: Deduplicate code in qemuSecurityChownCallback()
> 
>  src/qemu/qemu_driver.c          |  22 +---
>  src/security/security_dac.c     | 201 ++++++++++++++------------------
>  src/security/security_manager.h |  13 ++-
>  3 files changed, 98 insertions(+), 138 deletions(-)
> 

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano