summaryrefslogtreecommitdiff
path: root/tools/hv/hv_fcopy_uio_daemon.c
AgeCommit message (Collapse)Author
2024-12-09tools/hv: terminate fcopy daemon if read from uio failsOlaf Hering
Terminate endless loop in reading fails, to avoid flooding syslog. This happens if the state of "Guest services" integration service is changed from "enabled" to "disabled" at runtime in the VM settings. In this case pread returns EIO. Also handle an interrupted system call, and continue in this case. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Link: https://lore.kernel.org/r/20241105081437.15689-1-olaf@aepfle.de Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20241105081437.15689-1-olaf@aepfle.de>
2024-12-09tools: hv: Fix a complier warning in the fcopy uio daemonDexuan Cui
hv_fcopy_uio_daemon.c:436:53: warning: '%s' directive output may be truncated writing up to 14 bytes into a region of size 10 [-Wformat-truncation=] 436 | snprintf(uio_dev_path, sizeof(uio_dev_path), "/dev/%s", uio_name); Also added 'static' for the array 'desc[]'. Fixes: 82b0945ce2c2 ("tools: hv: Add new fcopy application based on uio driver") Cc: stable@vger.kernel.org # 6.10+ Signed-off-by: Dexuan Cui <decui@microsoft.com> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Link: https://lore.kernel.org/r/20240910004433.50254-1-decui@microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20240910004433.50254-1-decui@microsoft.com>
2024-09-09tools/hv: Add memory allocation check in hv_fcopy_startZhu Jun
Added error handling for memory allocation failures of file_name and path_name. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Reviewed-by: Dexuan Cui <decui@microsoft.com> Tested-by: Saurabh Sengar <ssengar@linux.microsoft.com> Link: https://lore.kernel.org/r/20240906091333.11419-1-zhujun2@cmss.chinamobile.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20240906091333.11419-1-zhujun2@cmss.chinamobile.com>
2024-04-11tools: hv: Add new fcopy application based on uio driverSaurabh Sengar
New fcopy application using uio_hv_generic driver. This application copies file from Hyper-V host to guest VM. A big part of this code is copied from tools/hv/hv_fcopy_daemon.c which this new application is replacing. Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Link: https://lore.kernel.org/r/1711788723-8593-6-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>