Commit Graph

318 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
5b250eb279
version 3.1.3 2015-11-11 05:12:11 +01:00
Marek Marczykowski-Górecki
dfe5c11a55
qrexec: define NOGUI_CMD_PREFIX
This is part of the qrexec protocol, so keep it in protocol definitions.

QubesOS/qubes-issues#1392
2015-11-11 05:10:59 +01:00
Marek Marczykowski-Górecki
64331d7e09
dracut: add a safety check preventing qubes_cow_setup.sh running in dom0
Theoretically it shouldn't be a problem, because module isn't installed
in initramfs by default (in dom0), but since such error would be fatal
to dom0 (will prevent it from booting), add a safety check for it.

Probably it will be required when (if) we migrate dom0 to Debian
2015-11-11 05:10:59 +01:00
Marek Marczykowski-Górecki
3cd77e4f70
debian: introduce qubes-kernel-vm-support package
This package is responsible for kernel modules and initramfs additions
needed in Qubes VM. When installed, it is possible to switch the VM to
use PV Grub and load the kernel from inside of VM. This greatly ease
installing custom kernel modules.

Changes:
 - make qubes_cow_setup.sh working with both dracut and initramfs-tools
 - add initramfs-tools configuration/scripts (including
         qubes_cow_setup.sh)
 - modify DESTDIR to handle multiple binary packages out of single
   source

QubesOS/qubes-issues#1354
2015-11-11 05:10:59 +01:00
Marek Marczykowski-Górecki
25c05a3bd3
dracut: add dmsetup --noudevsync since we're running in pre-udev hook
When udev is installed (and scheduled to be started), but not running
yet, plain dmsetup will deadlock on waiting for udev. Since we call
`dmsetup mknodes dmroot` anyway

QubesOS/qubes-issues#1354
2015-11-09 00:44:24 +01:00
Marek Marczykowski-Górecki
aaf84ba305
kernel-modules: build/install u2mfn module by default
The module is required by gui-agent, so make sure it will be actually
installed. This would also install the module in dom0 (when
qubes-kernel-vm-support is installed there), but this this is harmless.

QubesOS/qubes-issues#1354
2015-11-08 03:51:18 +01:00
Marek Marczykowski-Górecki
789e9c2549
dracut: mount only subdirectory of /lib/modules
This makes is possible to modify /lib/modules content - especially
install other kernel packages, without unmounting the whole
/lib/modules. Since dom0-provided modules will no longer conflict with
VM kernel packages (assuming kernel versions are different), there is no
need for qubes-kernel-vm-placeholder anymore.

Having only one subdirectory of /lib/modules mounted is somehow tricky,
because:
1. Directory name isn't always the same - it depends on kernel version.
This means that mountpoint must be created dynamically (so $NEWROOT must
be mounted in R/W for a moment).
2. There is one-command way to mount only a subdirectory of some
filesystem. So use a trick: mount it in some temporary directory, get
interesting subdir with `mount --bind`, then unmount temporary
directory.

QubesOS/qubes-issues#1354
2015-11-08 03:46:25 +01:00
Marek Marczykowski-Górecki
42469fdbe4
dracut: fix qubes-vm module dependencies
It needs 'dm' for 'dmsetup' utility. Additionally fix check - qubesdb
path starts with '/'.

QubesOS/qubes-issues#1354
2015-11-08 03:44:46 +01:00
Marek Marczykowski-Górecki
882052eca0
dracut: split 'full' dracut module into 'full-dmroot' and 'full-modules'
When PV Grub will be used, VM initramfs should not contain /lib/modules
mounting code, as the VM root.img will already contains kernel modules.
Make it possible by splitting the module.

QubesOS/qubes-issues#1354
2015-11-08 03:44:27 +01:00
Marek Marczykowski-Górecki
d1238ce060
qrexec-lib: add qfile packing functions to libqubes-rpc-filecopy
This is counterpart of 5774c78 "qfile-agent: move data handling code to
libqubes-rpc-filecopy" in core-agent-linux. The main purpose is to
easily reuse the code in dom0 qvm-copy-to-vm tool.

QubesOS/qubes-issues#1324
2015-11-03 03:42:49 +01:00
Marek Marczykowski-Górecki
603e8f8685
version 3.1.2 2015-10-26 20:00:08 +01:00
qubesuser
71ce41cf61
Fix u2mfn.ko for > 16TB RAM by not truncating to 32-bit improperly
At the moment, Xen has a 16TB limit on x86, so this has no practical
impact, aside for silencing compiler truncation warnings.

Also, the rest of the GUI/u2mfn code and protocol would need to be
expanded to use 64-bit mfns for Qubes to actually work there.
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
1a3be481b5
libqrexec-utils: bump SO version because of ABI change
New functions were introduced.
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
6a44eaeb09
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
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
632522b35e
libqrexec-utils: fix linker options
Fix linking with libvchan. Previously it worked because all the users
were also linked with libvchan.
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
a30d583249
dracut: initialize volatile.img partitions
Do not rely on dom0 initializing that device. Actually volatile.img
content should be none of dom0 business.

QubesOS/qubes-issues#1308
2015-10-26 20:00:08 +01:00
Marek Marczykowski-Górecki
0f954034a1
dracut: abort on dmroot assemble error
Add missing "exit 1". In the other case (TemplateVM) it is already
there.
2015-10-15 02:37:20 +02:00
Marek Marczykowski-Górecki
d3d84d5d49
dracut: expand tabs to spaces
Fix to match our code style guide.
2015-10-15 02:36:23 +02:00
Marek Marczykowski-Górecki
e9c1d12aa4
version 3.1.1 2015-10-11 02:48:12 +02:00
Marek Marczykowski-Górecki
c9335ddc5c
Merge remote-tracking branch 'origin/pr/1'
* origin/pr/1:
  use 64-bit integers for memory sizes to support > 2 TB RAM
  Report Xen balloon current size instead of Linux total memory

Fixes QubesOS/qubes-issues#1136
2015-10-11 02:47:39 +02:00
Marek Marczykowski-Górecki
c1d42f1602
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
2015-10-11 02:47:32 +02:00
qubesuser
ec9f12815b Fix u2mfn.ko for > 16TB RAM by not truncating to 32-bit improperly
At the moment, Xen has a 16TB limit on x86, so this has no practical
impact, aside for silencing compiler truncation warnings.

Also, the rest of the GUI/u2mfn code and protocol would need to be
expanded to use 64-bit mfns for Qubes to actually work there.
2015-10-10 11:59:36 +02:00
qubesuser
2f5ef8e2aa use 64-bit integers for memory sizes to support > 2 TB RAM 2015-10-10 01:37:30 +02:00
qubesuser
2d871075cc Report Xen balloon current size instead of Linux total memory
This results in qmemman knowing about the memory map overhead and
properly sizing VMs.
2015-10-10 00:47:10 +02:00
Marek Marczykowski-Górecki
e745b87939
version 3.1.0 2015-09-30 22:13:51 +02:00
Marek Marczykowski-Górecki
b853318baf impconverter: add icon data getters
Raw icon data is needed to set it on X11 windows.

QubesOS/qubes-issues#967
2015-09-20 04:47:38 +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