[PATCH] Deprecate C virtiofsd

2022-02-09 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a nice new Rust implementation out there; recommend people do new work on that. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/

[PULL 0/1] virtiofs queue

2022-01-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit aeb0ae95b7f18c66158792641cb6ba0cde5789ab: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2022-01-22 12:03:22 +) are available in the Git repository at: https://gitlab.com/dagr

[PULL 1/1] virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)

2022-01-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal At the start, drop membership of all supplementary groups. This is not required. If we have membership of "root" supplementary group and when we switch uid/gid using setresuid/setsgid, we still retain membership of existing supplemntary groups. And that can allow some operation

[PULL 01/16] tests: fix encoding of IP addresses in x509 certs

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé We need to encode just the address bytes, not the whole struct sockaddr data. Add a test case to validate that we're matching on SAN IP addresses correctly. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-2-berra...@redhat.com> Reviewed-by: Dr. Davi

[PULL 00/16] migration queue

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 178bacb66d98d9ee7a702b9f2a4dfcd88b72a9ab: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-05-09 11:07:04 -0700) are available in the Git repository at: https://gitlab.com/dagrh/qemu.git

[PULL 06/16] tests: convert multifd migration tests to use common helper

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Most of the multifd migration test logic is common with the rest of the precopy tests, so it can use the helper without difficulty. The only exception of the multifd cancellation test which tries to run multiple migrations in a row. Reviewed-by: Peter Xu Signed-off-by:

[PULL 02/16] tests: add more helper macros for creating TLS x509 certs

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé These macros are more suited to the general consumers of certs in the test suite, where we don't need to exercise every single possible permutation. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-3-berra...@redhat.com> Reviewed-by: Eric Blake Sign

[PULL 08/16] tests: add multifd migration tests of TLS with x509 credentials

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation, but we skip a couple as we can assume that the non-mult

[PULL 03/16] tests: add migration tests of TLS with PSK credentials

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-4-berra...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Dr. David Alan Gilber

[PULL 04/16] tests: add migration tests of TLS with x509 credentials

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048

[PULL 14/16] multifd: multifd_send_sync_main now returns negative on error

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Even though multifd_send_sync_main() currently emits error_reports, it's callers don't really check it before continuing. Change multifd_send_sync_main() to return -1 on error and 0 on success. Also change all it's callers to make use of this change and possibly fail earlier.

[PULL 05/16] tests: convert XBZRLE migration test to use common helper

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Most of the XBZRLE migration test logic is common with the rest of the precopy tests, so it can use the helper with just one small tweak. Reviewed-by: Peter Xu Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-6-berra...@redhat.com> Signed-off-by: Dr

[PULL 07/16] tests: add multifd migration tests of TLS with PSK credentials

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-8-berra...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Dr. David Ala

[PULL 16/16] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Implement zero copy send on nocomp_send_write(), by making use of QIOChannel writev + flags & flush interface. Change multifd_send_sync_main() so flush_zero_copy() can be called after each iteration in order to make sure all dirty pages are sent before a new iteration is star

[PULL 15/16] multifd: Send header packet without flags if zero-copy-send is enabled

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Since d48c3a0445 ("multifd: Use a single writev on the send side"), sending the header packet and the memory pages happens in the same writev, which can potentially make the migration faster. Using channel-socket as example, this works well with the default copying mechanism

[PULL 09/16] tests: ensure migration status isn't reported as failed

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Various methods in the migration test call 'query_migrate' to fetch the current status and then access a particular field. Almost all of these cases expect the migration to be in a non-failed state. In the case of 'wait_for_migration_pass' in particular, if the status is

[PULL 10/16] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Add flags to io_writev and introduce io_flush as optional callback to QIOChannelClass, allowing the implementation of zero copy writes by subclasses. How to use them: - Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY), - Wait write completion with qi

[PULL 12/16] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Add property that allows zero-copy migration of memory pages on the sending side, and also includes a helper function migrate_use_zero_copy_send() to check if it's enabled. No code is introduced to actually do the migration, but it allow future implementations to enable/disab

[PULL 11/16] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras For CONFIG_LINUX, implement the new zero copy flag and the optional callback io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush() was imple

[PULL 13/16] migration: Add migrate_use_tls() helper

2022-05-10 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras A lot of places check parameters.tls_creds in order to evaluate if TLS is in use, and sometimes call migrate_get_current() just for that test. Add new helper function migrate_use_tls() in order to simplify testing for TLS usage. Signed-off-by: Leonardo Bras Reviewed-by: Jua

[PULL 12/17] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras For CONFIG_LINUX, implement the new zero copy flag and the optional callback io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush() was imple

[PULL 05/17] tests: convert XBZRLE migration test to use common helper

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Most of the XBZRLE migration test logic is common with the rest of the precopy tests, so it can use the helper with just one small tweak. Reviewed-by: Peter Xu Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-6-berra...@redhat.com> Signed-off-by: Dr

[PULL 04/17] tests: add migration tests of TLS with x509 credentials

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048

[PULL 00/17] migration queue

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 10c2a0c5e7d48e590d945c017b5b8af5b4c89a3c: Merge tag 'or1k-pull-request-20220515' of https://github.com/stffrdhrn/qemu into staging (2022-05-15 16:56:27 -0700) are available in the Git repository at: https://gitlab.com/dagrh

[PULL 15/17] multifd: multifd_send_sync_main now returns negative on error

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Even though multifd_send_sync_main() currently emits error_reports, it's callers don't really check it before continuing. Change multifd_send_sync_main() to return -1 on error and 0 on success. Also change all it's callers to make use of this change and possibly fail earlier.

[PULL 01/17] tests: fix encoding of IP addresses in x509 certs

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé We need to encode just the address bytes, not the whole struct sockaddr data. Add a test case to validate that we're matching on SAN IP addresses correctly. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-2-berra...@redhat.com> Reviewed-by: Dr. Davi

[PULL 02/17] tests: add more helper macros for creating TLS x509 certs

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé These macros are more suited to the general consumers of certs in the test suite, where we don't need to exercise every single possible permutation. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-3-berra...@redhat.com> Reviewed-by: Eric Blake Sign

[PULL 07/17] tests: add multifd migration tests of TLS with PSK credentials

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-8-berra...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Dr. David Ala

[PULL 09/17] tests: ensure migration status isn't reported as failed

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Various methods in the migration test call 'query_migrate' to fetch the current status and then access a particular field. Almost all of these cases expect the migration to be in a non-failed state. In the case of 'wait_for_migration_pass' in particular, if the status is

[PULL 16/17] multifd: Send header packet without flags if zero-copy-send is enabled

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Since d48c3a0445 ("multifd: Use a single writev on the send side"), sending the header packet and the memory pages happens in the same writev, which can potentially make the migration faster. Using channel-socket as example, this works well with the default copying mechanism

[PULL 03/17] tests: add migration tests of TLS with PSK credentials

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle migration success and failure scenarios when using TLS with pre shared keys. Signed-off-by: Daniel P. Berrangé Message-Id: <20220426160048.812266-4-berra...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Dr. David Alan Gilber

[PULL 17/17] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Implement zero copy send on nocomp_send_write(), by making use of QIOChannel writev + flags & flush interface. Change multifd_send_sync_main() so flush_zero_copy() can be called after each iteration in order to make sure all dirty pages are sent before a new iteration is star

[PULL 06/17] tests: convert multifd migration tests to use common helper

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Most of the multifd migration test logic is common with the rest of the precopy tests, so it can use the helper without difficulty. The only exception of the multifd cancellation test which tries to run multiple migrations in a row. Reviewed-by: Peter Xu Signed-off-by:

[PULL 08/17] tests: add multifd migration tests of TLS with x509 credentials

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé This validates that we correctly handle multifd migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation, but we skip a couple as we can assume that the non-mult

[PULL 10/17] meson.build: Fix docker-test-build@alpine when including linux/errqueue.h

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras A build error happens in alpine CI when linux/errqueue.h is included in io/channel-socket.c, due to redefining of 'struct __kernel_timespec': === ninja: job failed: [...] In file included from /usr/include/linux/errqueue.h:6, from ../io/channel-socket.c:29: /

[PULL 11/17] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Add flags to io_writev and introduce io_flush as optional callback to QIOChannelClass, allowing the implementation of zero copy writes by subclasses. How to use them: - Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY), - Wait write completion with qi

[PULL 13/17] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Add property that allows zero-copy migration of memory pages on the sending side, and also includes a helper function migrate_use_zero_copy_send() to check if it's enabled. No code is introduced to actually do the migration, but it allow future implementations to enable/disab

[PULL 14/17] migration: Add migrate_use_tls() helper

2022-05-16 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras A lot of places check parameters.tls_creds in order to evaluate if TLS is in use, and sometimes call migrate_get_current() just for that test. Add new helper function migrate_use_tls() in order to simplify testing for TLS usage. Signed-off-by: Leonardo Bras Reviewed-by: Jua

[PULL 3/5] virtiofsd: Add a helper to send element on virtqueue

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal We have open coded logic to take locks and push element on virtqueue at three places. Add a helper and use it everywhere. Code is easier to read and less number of lines of code. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-5-vgo...@redhat.com> Reviewed-by: S

[PULL 4/5] virtiofsd: Add a helper to stop all queues

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Use a helper to stop all the queues. Later in the patch series I am planning to use this helper at one more place later in the patch series. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-6-vgo...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. Dav

[PULL 0/5] virtiofs queue

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c5b2f559814104f4145f8bc310f4d33c7ead8f49: Merge remote-tracking branch 'remotes/vivier/tags/trivial-branch-for-6.2-pull-request' into staging (2021-10-23 14:30:10 -0700) are available in the Git repository at: https://gitl

[PULL 1/5] virtiofsd: xattr mapping add a new type "unsupported"

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Right now for xattr remapping, we support types of "prefix", "ok" or "bad". Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA. I need a new semantics where if an xattr is unsup

[PULL 2/5] virtiofsd: Remove unused virtio_fs_config definition

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal "struct virtio_fs_config" definition seems to be unused in fuse_virtio.c. Remove it. Signed-off-by: Vivek Goyal Message-Id: <20210930153037.1194279-4-vgo...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 6

[PULL 5/5] virtiofsd: Error on bad socket group name

2021-10-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Make the '--socket-group=' option fail if the group name is unknown: ./tools/virtiofsd/virtiofsd --socket-group=zaphod vhost socket: unable to find group 'zaphod' Reported-by: Xiaoling Gao Signed-off-by: Dr. David Alan Gilbert Message-Id: <20211014122554.34

[PATCH] clock-vmstate: Add missing END_OF_LIST

2022-01-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the missing VMSTATE_END_OF_LIST to vmstate_muldiv Fixes: 99abcbc7600 ("clock: Provide builtin multiplier/divider") Signed-off-by: Dr. David Alan Gilbert --- hw/core/clock-vmstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/clock-vmstate.c b/

[PATCH] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PATCH v2 1/3] ppc: Fix vmstate_pbr403 subsection name

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The pbr403 subsection is part of the tlb6xx state, so I believe it's name needs to be: .name = "cpu/tlb6xx/pbr403", Signed-off-by: Dr. David Alan Gilbert --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/

[PATCH v2 3/3] migration: Perform vmsd structure check during tests

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 39 +++ 1 file changed, 39 insertions

[PATCH v2 0/3] vmsd checks

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Aftern the patch the other day where I added a missing END_OF_LIST, Peter suggested adding something more robust. Here I: add a check for a flag at the end of the list add a check that's performed in vmstate_register_with_alias_id only within qtest recursiv

[PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PATCH v2] Deprecate C virtiofsd

2022-02-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a nice new Rust implementation out there; recommend people do new work on that. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/abo

[PATCH 0/3] x86: Switch over to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We've been using q35 heavily for a while now and it generally works quite nicely; downstream in RH we prefer it as our default, and I wanted to see what people think of making it the default. The only pain really is that it requires some more setup for hotplug; so

[PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c| 2 +- tests/qtest/hd-geo-test.c | 12 +--- tests/qtest/i440fx-test.c | 2 +-

[PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: * PC

[PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +-- tests/qtest/drive_del-test.c | 35 +- tests/qtest/hd-geo

[PATCH 0/3] x86: Switch over to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We've been using q35 heavily for a while now and it generally works quite nicely; downstream in RH we prefer it as our default, and I wanted to see what people think of making it the default. The only pain really is that it requires some more setup for hotplug; so

[PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c| 2 +- tests/qtest/hd-geo-test.c | 12 +--- tests/qtest/i440fx-test.c | 2 +-

[PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +-- tests/qtest/drive_del-test.c | 35 +- tests/qtest/hd-geo

[PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: * PC

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major 7

[PULL 00/12] virtiofs queue

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at: https://gitlab.co

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id: <20220113153249.710216-1-sebastian.has...@stuvus.uni-stuttgart.

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Mess

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context se

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is expected

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32 b

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a n

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 + in

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com> Reviewed-b

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful

[PULL 00/12] virtiofs queue

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at: https://gitlab.co

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major 7

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id: <20220113153249.710216-1-sebastian.has...@stuvus.uni-stuttgart.

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 + in

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com> Reviewed-b

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context se

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is expected

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a n

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32 b

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Mess

[PULL 00/12] virtiofs queue

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at: https://gitlab.co

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id: <20220113153249.710216-1-sebastian.has...@stuvus.uni-stuttgart.

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major 7

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 + in

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32 b

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com> Reviewed-b

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Mess

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context se

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is expected

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a n

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-17 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful

[PULL 09/11] multifd: multifd_send_sync_main now returns negative on error

2022-04-28 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Even though multifd_send_sync_main() currently emits error_reports, it's callers don't really check it before continuing. Change multifd_send_sync_main() to return -1 on error and 0 on success. Also change all it's callers to make use of this change and possibly fail earlier.

[PULL 04/11] tests: ensure migration status isn't reported as failed

2022-04-28 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Various methods in the migration test call 'query_migrate' to fetch the current status and then access a particular field. Almost all of these cases expect the migration to be in a non-failed state. In the case of 'wait_for_migration_pass' in particular, if the status is

<    7   8   9   10   11   12   13   14   15   16   >