Commit Graph

255 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
b1d359bec0
rpm: add BR: python-devel
For python-related macros and python interpreter itself.
2018-05-07 04:01:16 +02:00
Marek Marczykowski-Górecki
ab4532855f
rpm: provide python2-qubesimgconverter
This is needed for compatibility with common
qubes-app-linux-img-converter package.
2018-05-06 16:12:01 +02:00
Frédéric Pierret
7a8119abd9
travis: add fc27 and fc28 2018-05-06 10:21:26 +02:00
Frédéric Pierret
fb887a0b6d
spec.in: add changelog placeholder
(cherry picked from commit f049d63571)
2018-05-05 17:24:52 +02:00
Frédéric Pierret
2e365ef3f6
Fix debug symbols
(cherry picked from commit 2b3b684107)
2018-05-05 17:24:52 +02:00
Frédéric Pierret
4e622c381c
Remove _builddir
(cherry picked from commit a716102a08)
2018-05-05 17:24:50 +02:00
Frédéric Pierret
67e956bb04
Makefile.builder: currently disable Mock
(cherry picked from commit 0630c17588)
2018-05-05 17:24:06 +02:00
Marek Marczykowski-Górecki
cb63ab7616
rpm: preparation for src.rpm building
QubesOS/qubes-issues#1508

(cherry picked from commit 84c9ae4bf1)
2018-05-05 17:24:06 +02:00
Marek Marczykowski-Górecki
782e8b7a14
version 3.2.7 2018-02-20 00:15:54 +01:00
Marek Marczykowski-Górecki
f88170ba6f
debian: adjust required version after adding new function 2018-02-20 00:15:32 +01:00
Marek Marczykowski-Górecki
5440e323aa
qrexec: provide common function for handling service call
Reduce code duplication by moving parsing of "QUBESRPC" magic command to
one place.
Call qubes-rpc-multiplexer directly with execve(), to avoid string
expansions in its parameters.

(cherry picked from commit 50412a8a8f)
2018-02-19 02:36:23 +01:00
Marek Marczykowski-Górecki
51f22438c9
version 3.2.6 2018-01-13 03:35:31 +01:00
HW42
7e6bee6281 u2mfn: get mfn via pte
Before this commit u2mfn got the address via kmap(get_user_pages(...)).
This has the problem that get_user_pages() does not work in some cases.
For example when qemu in a stubdom tries to get the mfn for a page which
is mapped from the target domain u2mfn fails because get_user_pages()
cannot be used for such mappings.

So get the address from the pte with apply_to_page_range(). Since we are
only interested in one page get_locked_pte() would be simpler but it's
not available to modules.
2018-01-08 04:17:32 +01:00
Marek Marczykowski-Górecki
7458893b8f
version 3.2.5 2017-09-24 21:54:29 +02:00
Marek Marczykowski-Górecki
dd2fce0e1b
travis: add fc25 and fc26 build targets 2017-09-24 21:24:28 +02:00
Paras Chetal
d81acf81d4
Fix include header syntax
(cherry picked from commit e9b8e5a4d1)
2017-09-24 21:18:12 +02:00
Marek Marczykowski-Górecki
5428ce06ee
initramfs: move qubes_cow_setup hook to pre-trigger
This hook require new device nodes to appear in /dev. If devtmpfs is
used, it's not a problem ("simple" initramfs case), but otherwise udevd
is needed - and it isn't running in pre-udev hook yet.

QubesOS/qubes-issues#2577

(cherry picked from commit 5c7c54adab)
2017-09-24 21:16:23 +02:00
Olivier MEDOC
ea0c714139 Fix gcc Werror because of a typo in a switch/case explicit fallthrough comment
GCC crash because of -Werror=implicit-fallthrough. However the fallthrough exists but has a typo.

Thanks for omac777 analysis (7d0b8155a3)

However the fallthrough exists but has a typo
2017-09-12 21:05:40 +02:00
Rusty Bird
0677fce533
Fall back to sync() if syncfs() is unavailable
It seems better to err on the side of safety (vs. performance).

(cherry picked from commit 90a1e6abbd)
2017-07-04 13:30:18 +02:00
Marek Marczykowski-Górecki
7e42fb5efd
rpm: add missing build requires
(cherry picked from commit ae56d597f3)
2017-04-21 16:55:41 +02:00
unman
d359d63fd6
Improve error message when file exists
(cherry picked from commit 1db0daea9c)
Notes from origin:
    Fixes QubesOS/qubes-issues#1240
2017-04-21 16:15:31 +02:00
Marek Marczykowski-Górecki
4de6e4d9be
version 3.2.4 2017-03-23 11:34:01 +01:00
Marek Marczykowski-Górecki
ee5badddd5
Merge remote-tracking branch 'qubesos/pr/9'
* qubesos/pr/9:
  qubes-prepare-vm-kernel: Do not hardcode path to dracut
2017-03-17 13:46:55 +01:00
M. Vefa Bicakci
7470251cb8
qubes-prepare-vm-kernel: Do not hardcode path to dracut
dracut has apparently moved from /sbin to /bin some time in the past.
Accommodate this change to avoid failures.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
2017-03-14 19:02:03 +03:00
Olivier MEDOC
e83c8036e6 archlinux: use dracut native file instead of our own 2017-01-29 15:10:33 +01:00
Marek Marczykowski-Górecki
d3cda230b4
travis: drop debootstrap workaround
Move to qubes-builder

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2017-01-04 23:24:45 +01:00
Olivier MEDOC
dfde69e9a7 archlinux: clean up PKGBUILD and bump version number 2016-12-28 08:38:01 +01:00
Olivier MEDOC
e398441481 archlinux: clean up qubes-prepare-vm-kernel
Archlinux now support pacman hooks that automatically handle both
building modules through dkms and rebuilding the initcpio.
For this reason, support scripts are not required anymore.
2016-12-28 08:29:01 +01:00
Marek Marczykowski-Górecki
db2b027153
udev: use DM ignore device flag only for DM devices
For example do not exclude (from exposing to qvm-block) loop devices
with this flag set, otherwise `qvm-block -l` would not list just
attached disk image files.

Fixes QubesOS/qubes-issues#2453
2016-11-23 03:40:37 +01:00
Johanna A
e01745f66f Builds against 4.9
The function signature for get_user_pages() has changed in linux 4.9.
2016-10-29 10:01:01 +02:00
Marek Marczykowski-Górecki
fbcad1cb17
version 3.2.3 2016-07-17 05:17:40 +02:00
Marek Marczykowski-Górecki
e0acdee23c
udev-block-add-change: fix checking if partition is mounted
is_used() function should operate on its argument, not global $DEVNAME.
2016-07-17 05:08:25 +02:00
Marek Marczykowski-Górecki
3422cffe0d
Merge remote-tracking branch 'qubesos/pr/6'
* qubesos/pr/6:
  udev-block-add-change: simplify a check
  udev-block-add-change: don't exclude already attached devs
  udev-block-add-change: better mount status check
2016-07-16 21:34:17 +02:00
Rusty Bird
a032129b80
udev-block-add-change: simplify a check 2016-07-15 16:15:42 +00:00
Rusty Bird
6b32378158
udev-block-add-change: don't exclude already attached devs
For example, attaching a device-mapper device to another VM increases
its "dmsetup info" open count in is_used(), which triggered its removal
from qvm-block.
2016-07-15 16:15:41 +00:00
Rusty Bird
e7d7111f13
udev-block-add-change: better mount status check
The canonical device name is not necessarily used in /proc/mounts or
/proc/self/mountinfo, see /dev/dm-0 vs. /dev/mapper/dmroot. (And only
checking by major:minor is not possible in the case of btrfs.)

Also fixes another bug where e.g. dm-10 would match when really only
dm-1 was mounted, or when the mountpoint path included the device name,
etc.

Also catches enabled swap.
2016-07-15 16:15:41 +00:00
Marek Marczykowski-Górecki
e9a21c03c2
debian: add pkg-config to Build-Depends 2016-07-08 11:51:56 +02:00
Marek Marczykowski-Górecki
a9d26d6ed0
debian: reformat Build-Depends 2016-07-08 11:51:19 +02:00
Marek Marczykowski-Górecki
f7eea5548a
udev: make USB device version detection more generic
Apparently some devices do not comply with standards (there is no such
thing as USB version 2.01), but other than that works fine. So take into
account only the major number of bcdUSB field.

Fixes QubesOS/qubes-issues#2158
2016-07-08 10:40:12 +02:00
Marek Marczykowski-Górecki
281c628b0e
version 3.2.2 2016-06-02 02:55:12 +02:00
Marek Marczykowski-Górecki
b040debb36
travis: initial version
QubesOS/qubes-issues#1926
2016-06-02 02:36:30 +02:00
Marek Marczykowski-Górecki
410ad3d25f
qrexec-lib: convert tabs to spaces
- Fix compile error on gcc 6 (-Werror=misleading-indentation)
- Follow coding style: https://www.qubes-os.org/doc/coding-style/
2016-06-02 02:32:46 +02:00
Marek Marczykowski-Górecki
93f676d998
udev: fix removing USB entries
QubesOS/qubes-issues#531
2016-06-01 14:04:10 +02:00
Marek Marczykowski-Górecki
cf5f382d7a
udev: ignore usbip-connected USB devices
Those devices are most likely attached using "PV USB" from another
domain, so it doesn't make sense to list them as available for further
passthrough.

QubesOS/qubes-issues#531
2016-06-01 14:03:01 +02:00
Marek Marczykowski-Górecki
c926f4565d
udev: expose USB 3.0 devices for PV USB
Even if particular PV USB implementation doesn't support it, still have
it included in QubesDB. It should be up to attaching code to decide.

Also, don't fail if xen-usbback module doesn't exist. This isn't the
only option (the other one is usbip over qrexec).

QubesOS/qubes-issues#531
2016-05-25 03:41:54 +02:00
Marek Marczykowski-Górecki
b442929695
version 3.2.1 2016-05-18 02:59:37 +02:00
Marek Marczykowski-Górecki
cdbcb2eb55
udev: fix deadlock on xenstore access during dom0 boot
During early dom0 boot, before xenstored is started any access to it
through /proc/xen/xenbus (or /dev/xen/xenbus) will wait until xenstored
is started. If that happens in script ordered to start before xenstored,
we have a deadlock. Prevent this by using `xenstore-ls -s` in dom0,
which will fail immediately when xenstored isn't running yet. This fail
isn't a problem, because when xenstored isn't running yet, surely device
isn't attached anywhere.

QubesOS/qubes-issues#1081
2016-05-17 22:41:51 +02:00
Marek Marczykowski-Górecki
b25bab4421
version 3.2.0 2016-05-16 11:54:16 +02:00
Marek Marczykowski-Górecki
098bfb634d
udev/qvm-block: exclude device if its partition is already attached
This prevents simultaneous attachment of the same device (in practice)
to multiple VMs.
This change to be effective requires udev action being called when such
device is attached/detached to some domain. Script
/etc/xen/scripts/block will take care of it.

Fixes QubesOS/qubes-issues#1081
2016-05-16 11:53:30 +02:00
Marek Marczykowski-Górecki
efd9854376
udev/qvm-block: exclude devices used elsewhere
Exclude exclude device if mounted/part of other device, or any of its
partition is used (same definition). Update this state whenever device
or it's partition receives udev event.

Fixes QubesOS/qubes-issues#1600
2016-05-16 11:52:57 +02:00