Commit Graph

164 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
f324f9b3f9
version 3.0.17 2016-05-01 22:42:15 +02:00
Marek Marczykowski-Górecki
09bdeab290
udev: fix hiding devices from qvm-block
When device becomes non-attachable (for example because it gets mounted,
or used as part of LVM/RAID/whatever), it should be removed from
advertised available devices. The code for removing QubesDB entry was
buggy - the device is actually a directory in QubesDB, not a single
entry.

QubesOS/qubes-issues#1600

(cherry picked from commit 22d6892ec9)
2016-05-01 21:55:25 +02:00
Marek Marczykowski-Górecki
919a1e8fa2
version 3.0.16 2016-01-15 12:40:17 +01:00
Marek Marczykowski-Górecki
7fb5b27fea
udev: ignore devices set to be ignore elsewhere
There are already some other rules to ignore not interesting devices.
This includes device-mapper assembled in initramfs manually. 'dmroot'
isn't properly detected as mounted because /dev/mapper/dmroot isn't a
symlink to /dev/dm-0 and /proc/mounts contains the former name, while
udev event the later.

Fixes QubesOS/qubes-issues#1586

(cherry picked from commit 6ac3fc3247)
2016-01-14 05:05:24 +01:00
Marek Marczykowski-Górecki
c347d7e0df
udev: do not assume static device-mapper major number
It is not static.

QubesOS/qubes-issues#1586

(cherry picked from commit 50145d448a)
2016-01-14 05:05:24 +01:00
Marek Marczykowski-Górecki
bfffb05fcd
version 3.0.15 2015-12-11 21:44:12 +01:00
Marek Marczykowski-Górecki
8e6bbc7187
qrexec-lib: add glibc version test check for having syncfs
Compile fix for wheezy, which has too old glibc (2.13).

(cherry picked from commit c2c36d9c09)
2015-12-11 21:44:06 +01:00
Marek Marczykowski-Górecki
6ce2b79438
version 3.0.14 2015-12-11 21:09:45 +01:00
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