Commit Graph

156 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
b23ddddd3e
qubes-prepare-vm-kernel: ensure proper permissions on initramfs
By default dracut set 600 mode. While it isn't a problem for starting a
VM (which is done as root), it is a problem for creating standalone VM,
which has it's own copy of kernel directory.

(cherry picked from commit 2f1c8ea459)
2015-12-11 21:08:36 +01:00
Marek Marczykowski-Górecki
ddcbe6fbc4
qrexec: add clarification commends in qrexec.h
QubesOS/qubes-issues#1392

(cherry picked from commit cd277485bb)
2015-12-11 21:08:16 +01:00
Rusty Bird
f3ffcfe9ba
qfile-unpacker: syncfs() to avoid qvm-move-to-vm data loss
Commit https://github.com/QubesOS/qubes-linux-utils/commit/c1d42f1 --
"qfile-unpacker: do not call fdatasync() at each file" fixing
QubesOS/qubes-issues#1257 -- increased the chance of data loss with
qvm-move-to-vm: Say it nominally succeeds, and *deletes* the files from
the source VM. Soon after, the destination VM or the system could crash,
or an external drive hosting ~/QubesIncoming/srcVM could get unplugged
by accident, all before the data had really been persisted to disk.

But reverting the commit (ignoring the performance issue) wouldn't
completely solve this:

  "Calling fsync() does not necessarily ensure that the entry in the
   directory containing the file has also reached disk. For that an
   explicit fsync() on a file descriptor for the directory is also
   needed."  - fsync(2)

It gets even worse for "slow symlinks" (whose target is too long to be
stored directly in the inode metadata), apparently they can't be synced
at all individually.

So instead, just call syncfs() once after everything has been unpacked:

  + Should prevent all data loss (if fs and disk are well behaved)
  + Allows caching and reordering -> no slowdown with many small files
  - Blocks until any unrelated writes on the filesystem finish :\

(cherry picked from commit 4f59b3df6f)
2015-12-11 21:08:02 +01:00
Marek Marczykowski-Górecki
f0cfd2c080
debian: prevent upgrades without new enough qubes-core-agent
New qubes-utils package brings new libqrexec-utils (changed SO name)
and it will break qubes-core-agent linked with the old one.
2015-12-11 19:30:37 +01:00
Marek Marczykowski-Górecki
b66299eacb
version 3.0.13 2015-11-13 23:20:22 +01:00
Marek Marczykowski-Górecki
ea452e277e
rpm: disable debuginfo subpackage in qubes-kernel-vm-support
find-debuginfo.sh in Fedora 23 doesn't properly handle packages without
any binary.

QubesOS/qubes-issues#1413

(cherry picked from commit 170d46c40d)
2015-11-13 06:06:59 +01:00
Rusty Bird
c78b2c3a7a
Check if QubesIncoming filesystem supports O_TMPFILE
The filesystem hosting ~/QubesIncoming/srcVM/ needs to support O_TMPFILE
too, in addition to the kernel. If it doesn't, take the use_tmpfile = 0
fallback.

(cherry picked from commit 74a1b4cc50)
2015-11-13 06:06:50 +01:00
Marek Marczykowski-Górecki
6fcc66eae4
version 3.0.12 2015-10-30 15:33:28 +01:00
Marek Marczykowski-Górecki
d77658b115
libqrexec-utils: bump SO version because of ABI change
New functions were introduced.

(cherry picked from commit 1a3be481b5)
2015-10-30 15:33:16 +01:00
Marek Marczykowski-Górecki
61c3357ce1
libqrexec-utils: bring back buffered write helpers
It is required to prevent deadlocks in single-threaded select-based IO
programs (namely: qrexec). POSIX API doesn't support checking how much
can be written to pipe/socket without blocking, so to prevent blocking
application must use O_NONBLOCK mode, and somehow deal with non-written
data (buffer it).

QubesOS/qubes-issues#1347

(cherry picked from commit 6a44eaeb09)
2015-10-30 15:33:12 +01:00
Marek Marczykowski-Górecki
aa6e51f369
libqrexec-utils: fix linker options
Fix linking with libvchan. Previously it worked because all the users
were also linked with libvchan.

(cherry picked from commit 632522b35e)
2015-10-30 15:33:07 +01:00
Marek Marczykowski-Górecki
0e26602071
version 3.0.11 2015-10-11 02:51:07 +02:00
Marek Marczykowski-Górecki
eb11cf6989
qfile-unpacker: do not call fdatasync() at each file (#1257)
POSIX  requires  that  a  read(2)  which  can be proved to occur after a
write() has returned returns the new data.
We want here only that other processes in the same VM will see the
file either fully written, or not see it at all. So ensuring that
linkat(2) is called after write is completed should be enough.

Fixes QubesOS/qubes-issues#1257

(cherry picked from commit c1d42f1602)
2015-10-11 02:51:00 +02:00
qubesuser
d2a8725217
Report Xen balloon current size instead of Linux total memory
This results in qmemman knowing about the memory map overhead and
properly sizing VMs.

(cherry picked from commit 2d871075cc)
2015-10-11 02:51:00 +02:00
Marek Marczykowski-Górecki
8d5157a8ab
version 3.0.10 2015-08-08 04:23:00 +02:00
Marek Marczykowski-Górecki
fc3347c914
imgconverter: ensure that connection to the VM is properly closed
Even in case of some error (for example invalid image).
2015-08-08 04:22:05 +02:00
Marek Marczykowski-Górecki
f5b65101ad
Merge remote-tracking branch 'origin/pr/1'
* origin/pr/1:
  archlinux: ensure /usr/sbin is not use to follow archlinux packaging guidelines
  archlinux: update to match new dependancies and archlinux /usr/lib guidelines
2015-08-02 19:55:54 +02:00
Olivier MEDOC
9ee8281ab7 archlinux: ensure /usr/sbin is not use to follow archlinux packaging guidelines 2015-07-08 14:33:48 +02:00
Olivier MEDOC
80b4c2ecd5 archlinux: update to match new dependancies and archlinux /usr/lib guidelines 2015-07-08 11:08:47 +02:00
Marek Marczykowski-Górecki
a1af4eb719 version 3.0.9 2015-07-08 05:58:15 +02:00
Marek Marczykowski-Górecki
6e69ce2234 imgconverter: use more meaningful error for empty icon image 2015-07-07 23:12:56 +02:00
Marek Marczykowski-Górecki
7ce11969b1 version 3.0.8 2015-07-01 07:11:28 +02:00
Marek Marczykowski-Górecki
643ff5876d udev: do not use a separate lock for udev block scripts
Since migration to QubesDB, it isn't needed anymore (QubesDB have no
problem with concurrent writes, as transactions are not supported).
This should speedup system startup.
2015-06-28 21:59:39 +02:00
Marek Marczykowski-Górecki
ceb0e25d3b fedora: fix systemd service files permission 2015-06-16 02:59:49 +02:00
Marek Marczykowski-Górecki
5d49d78a7c version 3.0.7 2015-04-28 13:23:09 +02:00
Marek Marczykowski-Górecki
4e7b4e17c3 imgconverter: add eq operation for Image class
This is used to check if the new icon is in any way different from the
old one and possibly avoid regenerating all of them.
2015-04-28 13:22:48 +02:00
Marek Marczykowski-Górecki
e9eedf2c6a version 3.0.6 2015-04-15 18:49:02 +02:00
Marek Marczykowski-Górecki
21ca16fbdd imgconverter: do not start gui daemon
It is not needed and will cause problems in case of firstboot.
2015-04-15 14:25:31 +02:00
Marek Marczykowski-Górecki
b9d914ce5c version 3.0.5 2015-04-03 11:26:47 +02:00
Marek Marczykowski-Górecki
68bbd408d7 udev: fix block devices ignoring rule
First of all there was missing ']'. Bu additionally change that rule to
detect partitioned loop devices instead of device-mapper.
2015-04-03 11:14:15 +02:00
Marek Marczykowski-Górecki
0eeb7b8bf0 version 3.0.4 2015-04-01 00:11:15 +02:00
Marek Marczykowski-Górecki
c731fa5b28 udev: ignore temporary devices created during VM startup 2015-03-30 04:54:37 +02:00
Marek Marczykowski-Górecki
99d96a9f73 version 3.0.3 2015-03-26 23:57:42 +01:00
Marek Marczykowski-Górecki
ba51d32758 Compile u2mfn module only when not already present
If someone want to force rebuild, he/she always can call dkms manually.
2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
bc7a2091db dracut: load ext4 module manually in minimalistic dracut module 2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
15cc3b2d51 dracut: Provide minimalistic initramfs files - no udev, no systemd
Provide simple script to run under busybox, this is all we need in the
VM.
2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
c64b94e9d6 Provide a script to generate VM kernel files 2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
2b6fd27839 dracut: do not assume full udevd running inside initramfs
Limited udev (or just limited rule set) will not create device-mapper
entries in /dev, so create them manually.
2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
0c4c2323c0 Add VM kernel related files as qubes-core-vm-kernel-support package
This is preparation for pvgrub support, where all VM kernel files will
be installed inside of VM instead of dom0.
But also the same could be used to prepare VM kernel image from any dom0
kernel.
2015-03-25 23:25:33 +01:00
Marek Marczykowski-Górecki
501cbca4c1 udev: allow normal user to access /dev/xen/xenbus for vchan connections
Recently we've switched all xenstore access to the new interface
(instead of deprecated /proc/xen/xenbus). Mostly because of deadlock in
/proc/xen/xenbus implementation.
2015-03-25 00:04:45 +01:00
Marek Marczykowski-Górecki
015015d940 qrexec-lib: enable compiler optimization 2015-03-20 12:17:32 +01:00
Marek Marczykowski-Górecki
6bb3ca16fd version 3.0.2 2015-02-17 14:22:38 +01:00
Marek Marczykowski-Górecki
14f7f284d4 Revert "Removed -Werror from qrexec Makefile to allow unpack to compile for both Fedora 20 and 21"
This reverts commit 96a3d98f60.
This problem is already fixed.
2015-02-17 14:21:39 +01:00
Marek Marczykowski-Górecki
b92b87388e Tag for commit 96301f3cc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU3OKsAAoJEBu5sftaTG2teD4P/2AgLmFI2x8RHqHz17T+lDZW
 gD4QoQlTFm1jysvexwLSCKYh4yYOKmMOaCs8UVc44k1KTxr1l/XYPhTFpzDg1gmb
 6zAKV36yxRZuB/3oRQ1tpUFN8obgV3GQh9Uz7zyOV8a34xSLkulUqp86ceW8gEyR
 XHlUF2XSNpOLca56IOTHzSlvje+kTxTON9OAfNv18cPv+Um27xt+IAz2nl7jytlc
 2SgZnJgcdf+blFvdxoEJQ9Dky3jLxcE/W4HMNmMPBEknSJYhoVNaSWtfgvJO66E9
 M0CIUk2v068vDSdmC7OUIDgQ/URE6SW85OyTvQlKOft3k33mZkSWog6y7FEbuXAS
 lWpXMR4xwnOqJtFTpKsGNyylqhNZhS1UQ4TpMgQijjxqs6oCWH42KwzSpPjd+zyq
 Vn151qsBg2UGMT5OqePDBq0fLFbN1Jfk1Oja78XFZ4PAKsvTmKdMd2oEaU10Wzkr
 jOpiEXtOK6QBWQYRySJH5GdFqEc2K4HFtHJPZPg6oIX7nMq9p8k3khfRDTgQ94nW
 qMwOoGa/rfuh/8PmSoMsvsceGHDzVV1zZtIVPHnzoQcDjp4wkKodD0dSRV/FC/4B
 lFsBS+UJMgOIvywzoRaU4lJowY0TPokg/MYPPYou3efWzDZCvB555n75gtRxYdg1
 TQz5tLSVBp9E2JNqt7is
 =ZgPE
 -----END PGP SIGNATURE-----

Merge tag 'jm_96301f3c'

Tag for commit 96301f3cc1

# gpg: Signature made Thu Feb 12 18:28:12 2015 CET using RSA key ID 5A4C6DAD
# gpg: Good signature from "Jason Mehring (Qubes OS Signing Key) <nrgaway@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: E0E3 2283 FDCA C1A5 1007  8F27 1BB9 B1FB 5A4C 6DAD
2015-02-17 14:21:24 +01:00
Marek Marczykowski-Górecki
d5c0761da5 debian: O_TMPFILE already defined 2015-02-17 13:15:32 +01:00
Marek Marczykowski-Górecki
1b5533ae10 qrexec: create stdin/out/err as sockets instead of pipes
Instead of pipes, stdin/out/err are created as sockets. This allows
qrexec-agent/daemon to decide to use some of them bidirectional. This is
up to qrexec-agent/daemon, such socket can still be used as
unidirectional channel.

The main reason for this feature is to use USBIP over qrexec, which
require single socket.
2015-02-16 23:11:37 +01:00
Jason Mehring
96301f3cc1
debian: Revert back to using libxen-dev as depend 2015-02-12 12:28:03 -05:00
Jason Mehring
fb09e42078
debian: Added qubesdb-vm as a depend 2015-02-11 12:11:04 -05:00
Jason Mehring
65b1d6ac73
debian: Updated changelog to reflect 3.0.1 version change 2015-02-10 11:10:12 -05:00
Jason Mehring
b909404a59
debian: Modified control file for new R3 Debian depends 2015-02-10 11:09:19 -05:00