qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] fde1f3: 9p: proxy: Fix size passed to `connec


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] fde1f3: 9p: proxy: Fix size passed to `connect`
Date: Fri, 08 Jun 2018 02:25:52 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: fde1f3e4a0644feb005894950427b622496769cb
      
https://github.com/qemu/qemu/commit/fde1f3e4a0644feb005894950427b622496769cb
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-proxy.c

  Log Message:
  -----------
  9p: proxy: Fix size passed to `connect`

The size to pass to the `connect` call is the size of the entire
`struct sockaddr_un`. Passing anything shorter than this causes errors
on darwin.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: 2306271c381b75b66d76c4231bba3e7452a0d876
      
https://github.com/qemu/qemu/commit/2306271c381b75b66d76c4231bba3e7452a0d876
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-local.c

  Log Message:
  -----------
  9p: local: Properly set errp in fstatfs error path

In the review of

    9p: Avoid warning if FS_IOC_GETVERSION is not defined

Grep Kurz noted this error path was failing to set errp.
Fix that.

Signed-off-by: Keno Fischer <address@hidden>
[added local: to commit title, Greg Kurz]
Signed-off-by: Greg Kurz <address@hidden>


  Commit: ec70b956fddf628ee2e42521c54362e80115a3c4
      
https://github.com/qemu/qemu/commit/ec70b956fddf628ee2e42521c54362e80115a3c4
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-util.c
    M hw/9pfs/9p-util.h
    M hw/9pfs/9p-xattr.c

  Log Message:
  -----------
  9p: Move a couple xattr functions to 9p-util

These functions will need custom implementations on Darwin. Since the
implementation is very similar among all of them, and 9p-util already
has the _nofollow version of fgetxattrat, let's move them all there.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: a647502c582981c395b5d16e52a22ac7aff0fb2b
      
https://github.com/qemu/qemu/commit/a647502c582981c395b5d16e52a22ac7aff0fb2b
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9p: xattr: Fix crashes due to free of uninitialized value

If the size returned from llistxattr/lgetxattr is 0, we skipped
the malloc call, leaving xattr.value uninitialized. However, this
value is later passed to `g_free` without any further checks,
causing an error. Fix that by always calling g_malloc unconditionally.
If `size` is 0, it will return NULL, which is safe to pass to g_free.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: 5b7b2f9a85bcc44485da713f60e371dd66a644b1
      
https://github.com/qemu/qemu/commit/5b7b2f9a85bcc44485da713f60e371dd66a644b1
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-local.c

  Log Message:
  -----------
  9p: local: Avoid warning if FS_IOC_GETVERSION is not defined

Both `stbuf` and `local_ioc_getversion` where unused when
FS_IOC_GETVERSION was not defined, causing a compiler warning.

Reorganize the code to avoid this warning.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: 67e87345744ac96d6c9560827ea094264c88fbff
      
https://github.com/qemu/qemu/commit/67e87345744ac96d6c9560827ea094264c88fbff
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-handle.c
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9p: Properly check/translate flags in unlinkat

The 9p-local code previously relied on P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR
having the same numerical value and deferred any errorchecking to the
syscall itself. However, while the former assumption is true on Linux,
it is not true in general. 9p-handle did this properly however. Move
the translation code to the generic 9p server code and add an error
if unrecognized flags are passed.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: aca6897fba149a2a650dcdf5a5e1ae828371f4aa
      
https://github.com/qemu/qemu/commit/aca6897fba149a2a650dcdf5a5e1ae828371f4aa
  Author: Keno Fischer <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  9p: xattr: Properly translate xattrcreate flags

As with unlinkat, these flags come from the client and need to
be translated to their host values. The protocol values happen
to match linux, but that need not be true in general.

Signed-off-by: Keno Fischer <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>


  Commit: a674da0ab7eae704c3f91749114ec6ca00c663d7
      
https://github.com/qemu/qemu/commit/a674da0ab7eae704c3f91749114ec6ca00c663d7
  Author: Peter Maydell <address@hidden>
  Date:   2018-06-07 (Thu, 07 Jun 2018)

  Changed paths:
    M hw/9pfs/9p-handle.c
    M hw/9pfs/9p-local.c
    M hw/9pfs/9p-proxy.c
    M hw/9pfs/9p-util.c
    M hw/9pfs/9p-util.h
    M hw/9pfs/9p-xattr.c
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging

Mostly bug fixes and code sanitization motivated by the upcoming
support for Darwin hosts. Thanks to Keno Fischer.

# gpg: Signature made Thu 07 Jun 2018 11:30:56 BST
# gpg:                using RSA key 71D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <address@hidden>"
# gpg:                 aka "Gregory Kurz <address@hidden>"
# gpg:                 aka "[jpeg image of size 3330]"
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/for-upstream:
  9p: xattr: Properly translate xattrcreate flags
  9p: Properly check/translate flags in unlinkat
  9p: local: Avoid warning if FS_IOC_GETVERSION is not defined
  9p: xattr: Fix crashes due to free of uninitialized value
  9p: Move a couple xattr functions to 9p-util
  9p: local: Properly set errp in fstatfs error path
  9p: proxy: Fix size passed to `connect`

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/8e36d27c5a7b...a674da0ab7ea
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]