All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [OSSTEST PATCH 41/62] ts-debian-fixup: Use debian_overlays_fixup_cmd
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

Otherwise we get the same error for guests as was prevented for hosts
by "preseed_base: chmod ssh host private keys to placate sshd".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-debian-fixup | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ts-debian-fixup b/ts-debian-fixup
index 0e553d47..7d9d0398 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -206,7 +206,12 @@ savecfg();
 ether();
 target_kernkind_check($gho);
 access();
+
 debian_overlays($ho, \&overlay);
+target_cmd_root($ho, <<END.debian_overlays_fixup_cmd($ho, $mountpoint));
+set -ex
+END
+
 console();
 filesystems();
 otherfixupcfg();
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 38/62] ts-guests-nbd-mirror: Use target_getfile_root_stash
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

That removes the rather ad-hoc open-coding.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-guests-nbd-mirror | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index 06903aaa..0365c47b 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -154,10 +154,7 @@ sub shuffleconfigs () {
 	my $gn= $gns[$i];
 	my $gho= $ghos[$i];
 	my $cfgpath= $r{ "$gho->{Guest}_cfgpath" };
-	my $file= $cfgpath;
-	$file=~ s,/,-,g;
-	$file= "$stash/".hostnamepath($cho)."--$file";
-	target_getfile_root($sho, 60, $cfgpath, $file);
+	my $file = target_getfile_root_stash($sho, 60, $cfgpath);
 	target_putfile_root($cho, 60, $file, $cfgpath);
     }
 }
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 43/62] preseed_hook_installscript: Use partman/early_command, not preseed/
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

On iso-based installs, with stretch, preseed/early_command runs before
the network is up.  This causes the install to fail.

Our existing call sites add things to
   /usr/lib/base-installer.d/
   /lib/partman/init.d/
for which this is still early enough.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index f8ff4f46..3afea62b 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1484,11 +1484,12 @@ sub preseed_hook_command ($$$$) {
 
 sub preseed_hook_installscript ($$$$$) {
     my ($ho, $sfx, $installer_dir, $installer_leaf, $data) = @_;
+    # the specified script is installed via partman/early_command
     my $installer_pathname= "$installer_dir/$installer_leaf";
     my $urlfile= $installer_pathname;
     $urlfile =~ s/[^-_0-9a-z]/ sprintf "X%02x", ord($&) /ge;
     my $url= create_webfile($ho, $urlfile, $data);
-    preseed_hook_command($ho, 'early_command', $sfx, <<END);
+    preseed_hook_command($ho, 'partman/early_command', $sfx, <<END);
 #!/bin/sh
 set -ex
 mkdir -p '$installer_dir'
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 52/62] target_install_packages: Consistently use qw(...) rather than '...'
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

qw(...) splits its argument into words.

There is one semantic change, where two package names were passed in a
single argument.  That worked by accident.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-install | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ts-xen-install b/ts-xen-install
index 80952857..03f8c03e 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -53,18 +53,18 @@ sub packages () {
 			       qemu-utils
                                netcat-openbsd));
     if ($ho->{Suite} !~ m/squeeze|wheezy|jessie/) {
-        target_install_packages($ho, 'net-tools libnl-route-3-200');
+        target_install_packages($ho, qw(net-tools libnl-route-3-200));
     }
     if ($ho->{Suite} =~ m/jessie/) {
-        target_install_packages($ho, 'libnl-route-3-200');
+        target_install_packages($ho, qw(libnl-route-3-200));
     }
     target_install_packages($ho,
 			    $ho->{Suite} =~ /squeeze/ ? "libyajl1" : "libyajl2");
     if ($ho->{Suite} !~ m/lenny|squeeze/) {
-        target_install_packages($ho, 'libfdt1');
+        target_install_packages($ho, qw(libfdt1));
     }
     if ($r{arch} eq 'i386') {
-	target_install_packages($ho, 'libc6-xen');
+	target_install_packages($ho, qw(libc6-xen));
     }
     target_install_packages($ho, @{toolstack($ho)->{ExtraPackages}})
         if toolstack($ho)->{ExtraPackages};
@@ -88,7 +88,7 @@ sub some_extradebs ($) {
 	    $ontarget = "extrapackages-$cfgvar-$counter"; $counter++;
 	    $dpkgopts = '-iGROEB';
 	    logm("$cfgvar: updating packages from directory $path");
-	    target_install_packages($ho, 'rsync') unless $rsync_installed++;
+	    target_install_packages($ho, qw(rsync)) unless $rsync_installed++;
 	    target_putfile_root($ho,300, "$path/.", $ontarget, '-r');
 	} elsif ($path =~ m{\.deb$}) {
 	    $path =~ s{_\.deb}{ "_$r{arch}.deb" }e;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 45/62] Debian: partman scripts: Run right away too
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

We are switching the installation of these to partman/early_command
which runs as a result of a /lib/partman/init.d hook.  That means that
things we install don't get picked up, so run them right away (too).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index d1b52b5b..9dec321f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1157,7 +1157,7 @@ sub preseed_create ($$;@) {
     my $d_i = $ho->{Tftp}{Path}.'/'.di_installer_path($ho);
 
     preseed_hook_installscript($ho, $sfx,
-          '/lib/partman/init.d', '000override-parted-devices', <<END);
+          '/lib/partman/init.d', '000override-parted-devices', <<END, 1);
 #!/bin/sh
 set -ex
 cd /bin
@@ -1171,7 +1171,7 @@ chmod +x parted_devices
 END
 
     preseed_hook_installscript($ho, $sfx,
-          '/lib/partman/init.d', '25erase-other-disks', <<END);
+          '/lib/partman/init.d', '25erase-other-disks', <<END, 1);
 #!/bin/sh
 set -ex
 stamp=/var/erase-other-disks.stamp
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* Re: [PATCH v4 2/4] ASoC: fsl_audmix: remove "model" attribute from DT document
From: Fabio Estevam @ 2019-04-10 14:26 UTC (permalink / raw)
  To: Viorel Suman
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Rob Herring, Mark Rutland, Takashi Iwai,
	Shawn Guo, Sascha Hauer, Julia Lawall, Viorel Suman,
	Pengutronix Kernel Team, dl-linux-imx,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1554894380-25153-3-git-send-email-viorel.suman@nxp.com>

On Wed, Apr 10, 2019 at 8:06 AM Viorel Suman <viorel.suman@nxp.com> wrote:
>
> Remove "model" attribute from fsl_audmix DT document.

Please provide the reasoning.

^ permalink raw reply

* [Xen-devel] [OSSTEST PATCH 24/62] overlay-persistent-net: Copy from jessie
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

These were copied from a system running Debian jessie.

The nontrivial files are:
 # Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
 # Copyright (C) 2007 Kay Sievers <kay.sievers@vrfy.org>
and licenced GPLv2+.  That is compatible with osstest's AGPLv3+.

Right now we do nothing with these.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 overlay-persistent-net/etc/init.d/udev-finish      |  22 +++
 .../etc/udev/rule_generator.functions              | 113 +++++++++++++++
 .../etc/udev/rules.d/73-usb-net-by-mac.rules       |   0
 .../etc/udev/rules.d/75-net-description.rules      |   0
 .../udev/rules.d/75-persistent-net-generator.rules | 143 +++++++++++++++++++
 overlay-persistent-net/etc/udev/udev-finish        |   9 ++
 overlay-persistent-net/etc/udev/write_net_rules    | 152 +++++++++++++++++++++
 .../lib/udev/rule_generator.functions              |   1 +
 overlay-persistent-net/lib/udev/udev-finish        |   1 +
 overlay-persistent-net/lib/udev/write_net_rules    |   1 +
 10 files changed, 442 insertions(+)
 create mode 100755 overlay-persistent-net/etc/init.d/udev-finish
 create mode 100644 overlay-persistent-net/etc/udev/rule_generator.functions
 create mode 100644 overlay-persistent-net/etc/udev/rules.d/73-usb-net-by-mac.rules
 create mode 100644 overlay-persistent-net/etc/udev/rules.d/75-net-description.rules
 create mode 100644 overlay-persistent-net/etc/udev/rules.d/75-persistent-net-generator.rules
 create mode 100755 overlay-persistent-net/etc/udev/udev-finish
 create mode 100755 overlay-persistent-net/etc/udev/write_net_rules
 create mode 120000 overlay-persistent-net/lib/udev/rule_generator.functions
 create mode 120000 overlay-persistent-net/lib/udev/udev-finish
 create mode 120000 overlay-persistent-net/lib/udev/write_net_rules

diff --git a/overlay-persistent-net/etc/init.d/udev-finish b/overlay-persistent-net/etc/init.d/udev-finish
new file mode 100755
index 00000000..10602017
--- /dev/null
+++ b/overlay-persistent-net/etc/init.d/udev-finish
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides:          udev-finish
+# Required-Start:    udev $local_fs
+# Required-Stop:     
+# Default-Start:     S
+# Default-Stop:
+# Short-Description: Copy rules generated while the root was ro
+### END INIT INFO
+
+PATH="/sbin:/bin"
+
+. /lib/lsb/init-functions
+
+case "$1" in
+  start) ;;
+  stop|restart|force-reload) exit 0 ;;
+  *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;;
+esac
+
+exec /lib/udev/udev-finish
+
diff --git a/overlay-persistent-net/etc/udev/rule_generator.functions b/overlay-persistent-net/etc/udev/rule_generator.functions
new file mode 100644
index 00000000..925193e4
--- /dev/null
+++ b/overlay-persistent-net/etc/udev/rule_generator.functions
@@ -0,0 +1,113 @@
+# functions used by the udev rule generator
+
+# Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+PATH='/sbin:/bin'
+
+# Read a single line from file $1 in the $DEVPATH directory.
+# The function must not return an error even if the file does not exist.
+sysread() {
+	local file="$1"
+	[ -e "/sys$DEVPATH/$file" ] || return 0
+	local value
+	read value < "/sys$DEVPATH/$file" || return 0
+	echo "$value"
+}
+
+sysreadlink() {
+	local file="$1"
+	[ -e "/sys$DEVPATH/$file" ] || return 0
+	readlink -f /sys$DEVPATH/$file 2> /dev/null || true
+}
+
+# Return true if a directory is writeable.
+writeable() {
+	if ln -s test-link $1/.is-writeable 2> /dev/null; then
+		rm -f $1/.is-writeable
+		return 0
+	else
+		return 1
+	fi
+}
+
+# Create a lock file for the current rules file.
+lock_rules_file() {
+	RUNDIR=/run/udev
+	[ -e "$RUNDIR" ] || return 0
+
+	RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}"
+
+	retry=30
+	while ! mkdir $RULES_LOCK 2> /dev/null; do
+		if [ $retry -eq 0 ]; then
+			 echo "Cannot lock $RULES_FILE!" >&2
+			 exit 2
+		fi
+		sleep 1
+		retry=$(($retry - 1))
+	done
+}
+
+unlock_rules_file() {
+	[ "$RULES_LOCK" ] || return 0
+	rmdir $RULES_LOCK || true
+}
+
+# Choose the real rules file if it is writeable or a temporary file if not.
+# Both files should be checked later when looking for existing rules.
+choose_rules_file() {
+	RUNDIR=/run/udev
+	local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}"
+	[ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1
+
+	if writeable ${RULES_FILE%/*}; then
+		RO_RULES_FILE='/dev/null'
+	else
+		RO_RULES_FILE=$RULES_FILE
+		RULES_FILE=$tmp_rules_file
+	fi
+}
+
+# Return the name of the first free device.
+raw_find_next_available() {
+	local links="$1"
+
+	local basename=${links%%[ 0-9]*}
+	local max=-1
+	for name in $links; do
+		local num=${name#$basename}
+		[ "$num" ] || num=0
+		[ $num -gt $max ] && max=$num
+	done
+
+	local max=$(($max + 1))
+	# "name0" actually is just "name"
+	[ $max -eq 0 ] && return
+	echo "$max"
+}
+
+# Find all rules matching a key (with action) and a pattern.
+find_all_rules() {
+	local key="$1"
+	local linkre="$2"
+	local match="$3"
+
+	local search='.*[[:space:],]'"$key"'"('"$linkre"')".*'
+	echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \
+		$RO_RULES_FILE \
+		$([ -e $RULES_FILE ] && echo $RULES_FILE) \
+		2>/dev/null)
+}
diff --git a/overlay-persistent-net/etc/udev/rules.d/73-usb-net-by-mac.rules b/overlay-persistent-net/etc/udev/rules.d/73-usb-net-by-mac.rules
new file mode 100644
index 00000000..e69de29b
diff --git a/overlay-persistent-net/etc/udev/rules.d/75-net-description.rules b/overlay-persistent-net/etc/udev/rules.d/75-net-description.rules
new file mode 100644
index 00000000..e69de29b
diff --git a/overlay-persistent-net/etc/udev/rules.d/75-persistent-net-generator.rules b/overlay-persistent-net/etc/udev/rules.d/75-persistent-net-generator.rules
new file mode 100644
index 00000000..13551cfb
--- /dev/null
+++ b/overlay-persistent-net/etc/udev/rules.d/75-persistent-net-generator.rules
@@ -0,0 +1,143 @@
+# These rules generate rules to keep network interface names unchanged
+# across reboots and write them to /etc/udev/rules.d/70-persistent-net.rules.
+
+# variables used to communicate:
+#   MATCHADDR		MAC address used for the match
+#   MATCHID		bus_id used for the match
+#   MATCHDRV		driver name used for the match
+#   MATCHIFTYPE		interface type match
+#   COMMENT		comment to add to the generated rule
+#   INTERFACE_NAME	requested name supplied by external tool
+#   INTERFACE_NEW	new interface name returned by rule writer
+
+ACTION!="add",				GOTO="persistent_net_generator_end"
+SUBSYSTEM!="net",			GOTO="persistent_net_generator_end"
+
+# ignore the interface if a name has already been set
+NAME=="?*",				GOTO="persistent_net_generator_end"
+
+# new predictable network interface naming scheme
+# http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+#IMPORT{cmdline}="net.ifnames"
+#ENV{net.ifnames}=="1",			GOTO="persistent_net_generator_end"
+
+# device name whitelist
+KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
+					GOTO="persistent_net_generator_end"
+
+# ignore Xen virtual interfaces
+SUBSYSTEMS=="xen",			GOTO="persistent_net_generator_end"
+
+# ignore UML virtual interfaces
+DRIVERS=="uml-netdev",			GOTO="persistent_net_generator_end"
+
+# ignore "secondary" raw interfaces of the madwifi driver
+KERNEL=="ath*", ATTRS{type}=="802",	GOTO="persistent_net_generator_end"
+
+# ignore "secondary" monitor interfaces of mac80211 drivers
+KERNEL=="wlan*", ATTRS{type}=="803",	GOTO="persistent_net_generator_end"
+
+# by default match on the MAC address and interface type
+ENV{MATCHADDR}="$attr{address}"
+ENV{MATCHIFTYPE}="$attr{type}"
+
+# match interface dev_id
+ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}"
+
+# These vendors are known to violate the local MAC address assignment scheme
+# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom
+ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist"
+# 3Com
+ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist"
+# 3Com IBM PC; Imagen; Valid; Cisco; Apple
+ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist"
+# Intel
+ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist"
+# Olivetti
+ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist"
+# CMC Masscomp; Silicon Graphics; Prime EXL
+ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist"
+# Prominet Corporation Gigabit Ethernet Switch
+ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist"
+# BTI (Bus-Tech, Inc.) IBM Mainframes
+ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist"
+# Novell 2000
+ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist"
+# Realtec
+ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist"
+# Kingston Technologies
+ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist"
+
+
+# ignore interfaces with locally administered or null MAC addresses
+# and VMWare, Hyper-V, KVM, Virtualbox and Xen virtual interfaces
+ENV{MATCHADDR}=="?[2367abef]:*",	ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:00:00:00:00:00",	ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*|00:05:69:*|00:1C:14:*", \
+					ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:15:5d:*",		ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="52:54:00:*|54:52:00:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="08:00:27:*",		ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:16:3e:*",		ENV{MATCHADDR}=""
+
+# ignore Windows Azure Hyper-V virtual interfaces
+ENV{MATCHADDR}=="00:03:ff:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:0d:3a:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:1d:d8:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:12:5a:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:17:fa:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:22:48:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:25:ae:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="00:50:f2:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="28:18:78:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="50:1a:c5:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="60:45:bd:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="7c:1e:52:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="7c:ed:8d:*", ENV{MATCHADDR}=""
+ENV{MATCHADDR}=="dc:b4:c4:*", ENV{MATCHADDR}=""
+
+# ignore Ravello virtual interfaces
+ENV{MATCHADDR}=="2c:c2:60:*", ENV{MATCHADDR}=""
+
+LABEL="globally_administered_whitelist"
+
+# ibmveth interfaces have stable locally administered MAC addresses
+SUBSYSTEMS=="ibmveth",			ENV{MATCHADDR}="$attr{address}"
+
+# S/390 interfaces are matched only by id
+SUBSYSTEMS=="ccwgroup", \
+	ENV{MATCHDRV}="$driver", ENV{MATCHID}="$id", \
+	ENV{MATCHADDR}="", ENV{MATCHDEVID}=""
+
+# terminate processing if there are not enough conditions to create a rule
+ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", \
+					GOTO="persistent_net_generator_end"
+
+
+# provide nice comments for the generated rules
+SUBSYSTEMS=="pci", \
+ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}"
+SUBSYSTEMS=="pcmcia", \
+ ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id}"
+SUBSYSTEMS=="usb", \
+ ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct}"
+SUBSYSTEMS=="ccwgroup", \
+ ENV{COMMENT}="S/390 device at $id"
+SUBSYSTEMS=="ibmveth", \
+ ENV{COMMENT}="LPAR virtual device at $id"
+SUBSYSTEMS=="ieee1394", \
+ ENV{COMMENT}="Firewire device $attr{host_id}"
+ENV{COMMENT}=="", \
+ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})"
+ATTRS{driver}=="?*", \
+ ENV{COMMENT}="$env{COMMENT} ($attr{driver})"
+
+# ignore interfaces without a driver link like bridges and VLANs, otherwise
+# generate and write the rule
+DRIVERS=="?*", IMPORT{program}="write_net_rules"
+
+# rename the interface if requested
+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
+
+LABEL="persistent_net_generator_end"
+
diff --git a/overlay-persistent-net/etc/udev/udev-finish b/overlay-persistent-net/etc/udev/udev-finish
new file mode 100755
index 00000000..85e3c720
--- /dev/null
+++ b/overlay-persistent-net/etc/udev/udev-finish
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+# Copy any rules generated while the root filesystem was read-only
+for file in /run/udev/tmp-rules--*; do
+  [ -e "$file" ] || continue
+  cat "$file" >> "/etc/udev/rules.d/${file##*tmp-rules--}"
+  rm -f "$file"
+done
+
diff --git a/overlay-persistent-net/etc/udev/write_net_rules b/overlay-persistent-net/etc/udev/write_net_rules
new file mode 100755
index 00000000..fedc0f1e
--- /dev/null
+++ b/overlay-persistent-net/etc/udev/write_net_rules
@@ -0,0 +1,152 @@
+#!/bin/sh -e
+
+# This script is run to create persistent network device naming rules
+# based on properties of the device.
+# If the interface needs to be renamed, INTERFACE_NEW=<name> will be printed
+# on stdout to allow udev to IMPORT it.
+
+# variables used to communicate:
+#   MATCHADDR             MAC address used for the match
+#   MATCHID               bus_id used for the match
+#   MATCHDEVID            dev_id used for the match
+#   MATCHDRV              driver name used for the match
+#   MATCHIFTYPE           interface type match
+#   COMMENT               comment to add to the generated rule
+#   INTERFACE_NAME        requested name supplied by external tool
+#   INTERFACE_NEW         new interface name returned by rule writer
+
+# Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
+# Copyright (C) 2007 Kay Sievers <kay.sievers@vrfy.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# debug, if UDEV_LOG=<debug>
+if [ -n "$UDEV_LOG" ]; then
+	if [ "$UDEV_LOG" -ge 7 ]; then
+		set -x
+	fi
+fi
+
+RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
+
+. /lib/udev/rule_generator.functions
+
+interface_name_taken() {
+	local value="$(find_all_rules 'NAME=' $INTERFACE)"
+	if [ "$value" ]; then
+		return 0
+	else
+		return 1
+	fi
+}
+
+find_next_available() {
+	raw_find_next_available "$(find_all_rules 'NAME=' "$1")"
+}
+
+write_rule() {
+	local match="$1"
+	local name="$2"
+	local comment="$3"
+
+	{
+	if [ "$PRINT_HEADER" ]; then
+		PRINT_HEADER=
+		echo "# This file was automatically generated by the $0"
+		echo "# program, run by the persistent-net-generator.rules rules file."
+		echo "#"
+		echo "# You can modify it, as long as you keep each rule on a single"
+		echo "# line, and change only the value of the NAME= key."
+	fi
+
+	echo ""
+	[ "$comment" ] && echo "# $comment"
+	echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\""
+	} >> $RULES_FILE
+}
+
+if [ -z "$INTERFACE" ]; then
+	echo "missing \$INTERFACE" >&2
+	exit 1
+fi
+
+# Prevent concurrent processes from modifying the file at the same time.
+lock_rules_file
+
+# Check if the rules file is writeable.
+choose_rules_file
+
+# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces
+if [ "$MATCHADDR" ]; then
+	match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\""
+fi
+
+if [ "$MATCHDRV" ]; then
+	match="$match, DRIVERS==\"$MATCHDRV\""
+fi
+
+if [ "$MATCHDEVID" ]; then
+	match="$match, ATTR{dev_id}==\"$MATCHDEVID\""
+fi
+
+if [ "$MATCHID" ]; then
+	match="$match, KERNELS==\"$MATCHID\""
+fi
+
+if [ "$MATCHIFTYPE" ]; then
+	match="$match, ATTR{type}==\"$MATCHIFTYPE\""
+fi
+
+if [ -z "$match" ]; then
+	echo "missing valid match" >&2
+	unlock_rules_file
+	exit 1
+fi
+
+basename=${INTERFACE%%[0-9]*}
+match="$match, KERNEL==\"$basename*\""
+
+# build a regular expression that matches the new rule that we want to write
+new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*\{\}])/\\\1/g')
+
+# Double check if the new rule has already been written. This happens if
+# multiple add events are generated before the script returns and udevd
+# renames the interfaces. See #765577 for details.
+if egrep -qs "$new_rule_pattern" $RO_RULES_FILE $RULES_FILE; then
+	unlock_rules_file
+	exit 0
+fi
+
+if [ "$INTERFACE_NAME" ]; then
+	# external tools may request a custom name
+	COMMENT="$COMMENT (custom name provided by external tool)"
+	if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then
+		INTERFACE=$INTERFACE_NAME;
+		echo "INTERFACE_NEW=$INTERFACE"
+	fi
+else
+	# if a rule using the current name already exists, find a new name
+	if interface_name_taken; then
+		INTERFACE="$basename$(find_next_available "$basename[0-9]*")"
+		# prevent INTERFACE from being "eth" instead of "eth0"
+		[ "$INTERFACE" = "${INTERFACE%%[ \[\]0-9]*}" ] && INTERFACE=${INTERFACE}0
+		echo "INTERFACE_NEW=$INTERFACE"
+	fi
+fi
+
+write_rule "$match" "$INTERFACE" "$COMMENT"
+
+unlock_rules_file
+
+exit 0
diff --git a/overlay-persistent-net/lib/udev/rule_generator.functions b/overlay-persistent-net/lib/udev/rule_generator.functions
new file mode 120000
index 00000000..3b225ebf
--- /dev/null
+++ b/overlay-persistent-net/lib/udev/rule_generator.functions
@@ -0,0 +1 @@
+/etc/udev/rule_generator.functions
\ No newline at end of file
diff --git a/overlay-persistent-net/lib/udev/udev-finish b/overlay-persistent-net/lib/udev/udev-finish
new file mode 120000
index 00000000..2c2e3042
--- /dev/null
+++ b/overlay-persistent-net/lib/udev/udev-finish
@@ -0,0 +1 @@
+/etc/udev/udev-finish
\ No newline at end of file
diff --git a/overlay-persistent-net/lib/udev/write_net_rules b/overlay-persistent-net/lib/udev/write_net_rules
new file mode 120000
index 00000000..bfe37cc3
--- /dev/null
+++ b/overlay-persistent-net/lib/udev/write_net_rules
@@ -0,0 +1 @@
+/etc/udev/write_net_rules
\ No newline at end of file
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 48/62] dm restrict audit: actually install right package for fishdescriptor
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

In
  dm restrict audit: install newer chiark-scripts for fishdescriptor
a locally-provided chiark-scripts_6.0.2_all.deb was installed for
jessie.  For stretch a backport was installed, but mistakenly
of chiark-utils-bin rather than chiark-scripts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 79b7960d..9aa88822 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1060,7 +1060,7 @@ sub preseed_create_guest ($$$;@) {
     if (grep { m/_dmrestrict$/ && $r{$_} } keys %r and
 	$suite =~ m/stretch/) {
 	preseed_backports_packages($ho, $sfx, \%xopts, $suite,
-				   qw(chiark-utils-bin));
+				   qw(chiark-scripts));
     }
 
     my $preseed_file= preseed_base($ho, $sfx, $extra_packages, %xopts);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 49/62] Debian: Move preseed_backports_packages earlier
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 88 +++++++++++++++++++++++++++----------------------------
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 9aa88822..25bf8e88 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -823,6 +823,50 @@ chmod 600 $subdir/etc/ssh/ssh_host_*_key ||:
 END
 }
 
+sub preseed_backports_packages ($$$$@) {
+    my ($ho, $sfx, $xopts, $suite, @pkgs) = @_;
+
+    if (! $xopts->{BackportsSourcesAlreadyAdded}++) {
+	my $bp_url = $c{"DebianSnapshotBackports_$suite"};
+	$bp_url ||= "http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath}";
+
+	my $apt_insert='';
+	my $extra_rune='';
+	if ($suite =~ m/wheezy|jessie/) {
+	    # this has global effect, unfortunately
+	    $extra_rune = <<END;
+d=/target/etc/apt/apt.conf.d
+mkdir -p \$d
+cat >\$d/50osstestsnapshot <<EOF
+Acquire::Check-Valid-Until false;
+EOF
+END
+	} else {
+	    $apt_insert = '[check-valid-until=no]';
+	}
+
+	preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+cat <<EOF >>/target/etc/apt/sources.list
+
+# $suite backports
+deb $apt_insert $bp_url $suite-backports main
+EOF
+$extra_rune
+in-target apt-get update
+END
+    }
+
+    preseed_hook_command($ho, 'late_command', $sfx, <<END);
+#!/bin/sh
+set -ex
+
+in-target apt-get install -y -t $suite-backports @pkgs
+END
+}
+
 sub preseed_base ($$$;@) {
     my ($ho,$sfx,$extra_packages,%xopts) = @_;
 
@@ -986,50 +1030,6 @@ END
     return $preseed;
 }
 
-sub preseed_backports_packages ($$$$@) {
-    my ($ho, $sfx, $xopts, $suite, @pkgs) = @_;
-
-    if (! $xopts->{BackportsSourcesAlreadyAdded}++) {
-	my $bp_url = $c{"DebianSnapshotBackports_$suite"};
-	$bp_url ||= "http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath}";
-
-	my $apt_insert='';
-	my $extra_rune='';
-	if ($suite =~ m/wheezy|jessie/) {
-	    # this has global effect, unfortunately
-	    $extra_rune = <<END;
-d=/target/etc/apt/apt.conf.d
-mkdir -p \$d
-cat >\$d/50osstestsnapshot <<EOF
-Acquire::Check-Valid-Until false;
-EOF
-END
-	} else {
-	    $apt_insert = '[check-valid-until=no]';
-	}
-
-	preseed_hook_command($ho, 'late_command', $sfx, <<END);
-#!/bin/sh
-set -ex
-
-cat <<EOF >>/target/etc/apt/sources.list
-
-# $suite backports
-deb $apt_insert $bp_url $suite-backports main
-EOF
-$extra_rune
-in-target apt-get update
-END
-    }
-
-    preseed_hook_command($ho, 'late_command', $sfx, <<END);
-#!/bin/sh
-set -ex
-
-in-target apt-get install -y -t $suite-backports @pkgs
-END
-}
-
 sub preseed_create_guest ($$$;@) {
     my ($ho, $arch, $sfx, %xopts) = @_;
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 55/62] make-flight: shadow test: Disable kpti in guests
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

Since Spectre/Meltdown, shadow has been a lot slower, especially with
KPTI in the guest.  Empirically, too slow (with the kernel from Debian
stretch).

CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 make-flight | 1 +
 1 file changed, 1 insertion(+)

diff --git a/make-flight b/make-flight
index 151b1435..1e3ebd5c 100755
--- a/make-flight
+++ b/make-flight
@@ -493,6 +493,7 @@ do_shadow_tests () {
             $debian_runvars all_hostflags=$most_hostflags
 
   do_hvm_debian_test_one debianhvm xl seabios false '' -shadow \
+                         all_guest_linux_boot_append=nopti \
                          "xen_boot_append=hap=false"
 }
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 50/62] dm restrict audit: actually install fishdescriptor in host
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

In
  dm restrict audit: install newer chiark-scripts for fishdescriptor
arrangements were made to install a backport of chiark-scripts
but the code was mistakenly placed in preseed_create_guest but
of course it's needed in the host.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 25bf8e88..8d53bbe1 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1022,6 +1022,12 @@ END
     # security.d.o CDN seems unreliable right now
     # and jessie-updates is no more
 
+    if (grep { m/_dmrestrict$/ && $r{$_} } keys %r and
+	$suite =~ m/stretch/) {
+	preseed_backports_packages($ho, $sfx, \%xopts, $suite,
+				   qw(chiark-scripts));
+    }
+
     $preseed .= <<"END";
 
 ### END OF DEBIAN PRESEED BASE
@@ -1057,11 +1063,6 @@ sub preseed_create_guest ($$$;@) {
             $extra_packages = "pv-grub-menu";
         }
     }
-    if (grep { m/_dmrestrict$/ && $r{$_} } keys %r and
-	$suite =~ m/stretch/) {
-	preseed_backports_packages($ho, $sfx, \%xopts, $suite,
-				   qw(chiark-scripts));
-    }
 
     my $preseed_file= preseed_base($ho, $sfx, $extra_packages, %xopts);
     $preseed_file.= (<<END);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* Re: [PATCH v4 2/4] ASoC: fsl_audmix: remove "model" attribute from DT document
From: Fabio Estevam @ 2019-04-10 14:26 UTC (permalink / raw)
  To: Viorel Suman
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Rob Herring, Mark Rutland, Takashi Iwai,
	Shawn Guo, Sascha Hauer, Julia Lawall, Viorel Suman,
	Pengutronix Kernel Team, dl-linux-imx,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
In-Reply-To: <1554894380-25153-3-git-send-email-viorel.suman@nxp.com>

On Wed, Apr 10, 2019 at 8:06 AM Viorel Suman <viorel.suman@nxp.com> wrote:
>
> Remove "model" attribute from fsl_audmix DT document.

Please provide the reasoning.

^ permalink raw reply

* [Xen-devel] [OSSTEST PATCH 56/62] platforms: Pass suite to get_arch_platforms
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

The available platforms may depend on the suite to be used.

For now we use $defsuite from make-flight, which is not entirely right
but it will do for now because we don't use other suites much.

No functional change yet since neither implementation uses it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/HostDB/Executive.pm | 4 ++--
 Osstest/HostDB/Static.pm    | 4 ++--
 cri-getplatforms            | 2 +-
 make-flight                 | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Osstest/HostDB/Executive.pm b/Osstest/HostDB/Executive.pm
index d42250f6..bf6ec57d 100644
--- a/Osstest/HostDB/Executive.pm
+++ b/Osstest/HostDB/Executive.pm
@@ -90,8 +90,8 @@ END
     return $flags;
 }
 
-sub get_arch_platforms ($$) {
-    my ($hd, $blessing, $arch) = @_;
+sub get_arch_platforms ($$$) {
+    my ($hd, $blessing, $arch, $suite) = @_;
 
     my @plats = ( );
     my $platsq = $dbh_tests->prepare(<<END);
diff --git a/Osstest/HostDB/Static.pm b/Osstest/HostDB/Static.pm
index ab9542dd..0c6be3ee 100644
--- a/Osstest/HostDB/Static.pm
+++ b/Osstest/HostDB/Static.pm
@@ -72,8 +72,8 @@ sub get_flags ($$) { #method
     return $flags;
 }
 
-sub get_arch_platforms ($$) {
-    my ($hd, $blessing, $arch) = @_;
+sub get_arch_platforms ($$$) {
+    my ($hd, $blessing, $arch, $suite) = @_;
 
     my $prop = "Platforms".ucfirst($arch);
 
diff --git a/cri-getplatforms b/cri-getplatforms
index 2bf13483..2b8cee0b 100755
--- a/cri-getplatforms
+++ b/cri-getplatforms
@@ -20,6 +20,6 @@ getplatforms () {
         perl -e '
                 use Osstest;
                 csreadconfig();
-                print join " ", $mhostdb->get_arch_platforms("'$blessing'", "'$1'") or die $!;
+                print join " ", $mhostdb->get_arch_platforms("'$blessing'", "'$1'", "'$2'") or die $!;
         '
 }
diff --git a/make-flight b/make-flight
index 1e3ebd5c..92dacb35 100755
--- a/make-flight
+++ b/make-flight
@@ -27,9 +27,9 @@ buildflight=$4
 flight=`./cs-flight-create $blessing $branch`
 
 . ./cri-common
-. ./cri-getplatforms
 . ./ap-common
 . ./mfi-common
+. ./cri-getplatforms
 
 # Older versions of Xen may not build with the current default.  Note
 # that branches older than 4.3 might need something even older than
@@ -612,7 +612,7 @@ do_pv_debian_tests () {
 
   for xsm in $xsms ; do
     # Basic PV Linux test with xl
-    for platform in '' `getplatforms $xenarch` ; do
+    for platform in '' `getplatforms $xenarch $defsuite` ; do
 
       # xsm test is not platform specific
       if [ x$xsm = xtrue -a x$platform != x ]; then
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* Re: [PATCH v4 2/4] ASoC: fsl_audmix: remove "model" attribute from DT document
From: Fabio Estevam @ 2019-04-10 14:26 UTC (permalink / raw)
  To: Viorel Suman
  Cc: Mark Rutland, Viorel Suman, alsa-devel@alsa-project.org,
	linuxppc-dev@lists.ozlabs.org, Timur Tabi, Xiubo Li,
	linux-kernel@vger.kernel.org, Sascha Hauer, Takashi Iwai,
	Liam Girdwood, Rob Herring, Jaroslav Kysela, Nicolin Chen,
	Julia Lawall, devicetree@vger.kernel.org, Mark Brown,
	dl-linux-imx, Pengutronix Kernel Team, Shawn Guo,
	linux-arm-kernel@lists.infradead.org
In-Reply-To: <1554894380-25153-3-git-send-email-viorel.suman@nxp.com>

On Wed, Apr 10, 2019 at 8:06 AM Viorel Suman <viorel.suman@nxp.com> wrote:
>
> Remove "model" attribute from fsl_audmix DT document.

Please provide the reasoning.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* [Xen-devel] [OSSTEST PATCH 60/62] Debian: Fix /lib/udev/ifupdown-hotplug in guests from debootstrap
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

The ifupdown-hotplug problem just described affects guests too.

Empirically, this occurs only with the guests from xen-tools.  In my
osstest stretch series development tests this resulted in occasional
failures of ts-guest-start.  The problem is not deterministic; and it
may be that it is a race between the guest's random dhcp retry and
osstest's timeout, or something.  The race affected both x86 and ARM.

I conjecture that it only affects xen-tools created guests because
those guests use sysvinit.  Presumably the other guests have systemd
which has some different ordering.  I conjecture that the sysvinit
boot arrangements were damaged by some changes made in stretch to
shared components (udev, probably) to support systemd.

An alternative explanation for seeing the failure only with xen-tools
created guests might be that all guests are affected, but only
xen-tools created guests are booted with a short timeout; whereas the
d-i created ones have a long timeout for firstboot at least.  I don't
believe this theory because all guests are restarted with
ts-guest-start and a short timeout.

So: in ts-debian-fixup, execute the sed rune to fix
/lib/udev/ifupdown-hotplug.  This then happens before first boot.

Debian guests installed via d-i are not affected by this patch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-debian-fixup | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ts-debian-fixup b/ts-debian-fixup
index 7d9d0398..fef9836e 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -212,6 +212,8 @@ target_cmd_root($ho, <<END.debian_overlays_fixup_cmd($ho, $mountpoint));
 set -ex
 END
 
+target_cmd_root($ho, debian_dhcp_rofs_fix($ho, $mountpoint));
+
 console();
 filesystems();
 otherfixupcfg();
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 58/62] dm restrict, fishdescriptor: Update to a fixed chiark-scripts
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

I have only just fixed a bug which stops our test from working
and the fix is not upstream yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 production-config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/production-config b/production-config
index 59c74cca..fadfe8b9 100644
--- a/production-config
+++ b/production-config
@@ -106,6 +106,7 @@ MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
 TftpGrubVersion XXXX-XX-XX
 
 DebianExtraPackages_jessie chiark-scripts_6.0.3~citrix1_all.deb
+DebianExtraPackages_stretch chiark-scripts_6.0.4~citrix1_all.deb
 
 DebianExtraPackages_uefi_i386_jessie   extradebs-uefi-i386-2018-04-01/
 DebianExtraPackages_uefi_amd64_jessie  extradebs-uefi-amd64-2018-04-01/
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 54/62] ts-debian-hvm-install: Honour linux_boot_append target var
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

This looks for:
  <guest>_linux_boot_append
  all_guest_linux_boot_append

Nothing sets these yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-debian-hvm-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 54d5d1c2..ed8803ed 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -129,6 +129,9 @@ sub gcmdline (;$) {
 					    PreseedScheme => 'file');
     push @dicmdline, $extra if $extra;
 
+    my $append = target_var($gho,'linux_boot_append');
+    push @dicmdline, $append if $append;
+
     push @dicmdline, "--";
     # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762007 for
     # why console= is repeated.
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 44/62] Debian: preseed_hook_installscript: New $atonce option
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

This runs the script right away as well as merely installing it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 3afea62b..d1b52b5b 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1482,20 +1482,23 @@ sub preseed_hook_command ($$$$) {
     push @{ $preseed_cmds{$di_key} }, $cmd_cmd;
 }
 
-sub preseed_hook_installscript ($$$$$) {
-    my ($ho, $sfx, $installer_dir, $installer_leaf, $data) = @_;
+sub preseed_hook_installscript ($$$$$;$) {
+    my ($ho, $sfx, $installer_dir, $installer_leaf, $data, $atonce) = @_;
     # the specified script is installed via partman/early_command
     my $installer_pathname= "$installer_dir/$installer_leaf";
     my $urlfile= $installer_pathname;
     $urlfile =~ s/[^-_0-9a-z]/ sprintf "X%02x", ord($&) /ge;
     my $url= create_webfile($ho, $urlfile, $data);
-    preseed_hook_command($ho, 'partman/early_command', $sfx, <<END);
+    preseed_hook_command($ho, 'partman/early_command', $sfx,
+			 <<END.($atonce?<<END_ATONCE:''));
 #!/bin/sh
 set -ex
 mkdir -p '$installer_dir'
 $preseed_wget -O '$installer_pathname' '$url'
 chmod +x '$installer_pathname'
 END
+'$installer_pathname'
+END_ATONCE
 }
 
 sub preseed_hook_overlay ($$$$) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 57/62] platforms: Honour suite in get_arch_platforms
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

The available platforms may depend on the suite to be used.

Actually implement that for HostDB::Executive.
For Static, we leave it to the user.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/HostDB/Executive.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Osstest/HostDB/Executive.pm b/Osstest/HostDB/Executive.pm
index bf6ec57d..7ffca6c4 100644
--- a/Osstest/HostDB/Executive.pm
+++ b/Osstest/HostDB/Executive.pm
@@ -99,18 +99,20 @@ SELECT DISTINCT hostflag
            FROM hostflags h0
    WHERE EXISTS (
        SELECT *
-         FROM hostflags h1, hostflags h2, hostflags h3
+         FROM hostflags h1, hostflags h2, hostflags h3, hostflags h4
         WHERE h0.hostname = h1.hostname
           AND h1.hostname = h2.hostname
           AND h2.hostname = h3.hostname
+          AND h3.hostname = h4.hostname
           AND h1.hostflag = ?
           AND h2.hostflag = ?
           AND h3.hostflag = 'purpose-test'
+          AND h4.hostflag = ?
    )
    AND hostflag like 'platform-%';
 END
 
-    $platsq->execute("blessed-$blessing", "arch-$arch");
+    $platsq->execute("blessed-$blessing", "arch-$arch", "suite-$suite");
 
     while (my ($plat) = $platsq->fetchrow_array()) {
 	$plat =~ s/^platform-//g or die;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 61/62] production-config-cambridge: Provide TftpDiVersion_stretch
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 production-config-cambridge | 1 +
 1 file changed, 1 insertion(+)

diff --git a/production-config-cambridge b/production-config-cambridge
index ce6239bd..a50b19b3 100644
--- a/production-config-cambridge
+++ b/production-config-cambridge
@@ -77,6 +77,7 @@ TftpNetGrubTemplatesReal Netgrub.cfg/%ether%
 TftpNetbootGroup osstest
 TftpDiVersion_wheezy 2016-06-08
 TftpDiVersion_jessie 2018-06-26
+TftpDiVersion_stretch 2019-04-10
 
 DebianSnapshotBackports_jessie http://snapshot.debian.org/archive/debian/20190206T211314Z/
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 46/62] Debian: set partman-lvm/device_remove_lvm_span
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

Web searching[1] suggests that this suppresses this error:

  !! ERROR: Unable to automatically remove LVM data
  Because the volume group(s) on the selected device also consist of
  physical volumes on other devices, it is not considered safe to
  remove its LVM data automatically. If you wish to use this device
  for partitioning, please remove its LVM data first.

[1] eg https://serverfault.com/questions/571363/unable-to-automatically-remove-lvm-data

It doesn't, though.  I am only experiencing it now because the ad-hoc
disk-erasing (25erase-other-disks) is broken for other reasons.  But
let's have it anyway as it sounds like a thing we might want.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 9dec321f..073b776c 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -907,6 +907,7 @@ d-i partman-partitioning/confirm_write_new_label boolean true
 d-i partman/choose_partition select finish
 d-i partman/confirm boolean true
 d-i partman-lvm/confirm boolean true
+d-i partman-lvm/device_remove_lvm_span boolean true
 
 d-i partman/confirm_nooverwrite true
 d-i partman-lvm/confirm_nooverwrite true
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 51/62] dm restrict audit: always install (some) chiark-scripts
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

In
  dm restrict audit: install newer chiark-scripts for fishdescriptor
arrangements were made to install suitable chiark-scripts for
for jessie and stretch.

For buster and later, the mainline Debian version of chiark-scripts is
indeed sufficient, but nothing installed it.  Do that.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 8d53bbe1..9d7d1518 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -997,7 +997,7 @@ d-i apt-setup/another boolean false
 d-i apt-setup/non-free boolean false
 d-i apt-setup/contrib boolean false
 
-d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bin, wget, $extra_packages
+d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bin, chiark-scripts, wget, $extra_packages
 
 d-i grub-installer/force-efi-extra-removable boolean true
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 59/62] Debian: Fix /lib/udev/ifupdown-hotplug to not run if / is ro
From: Ian Jackson @ 2019-04-10 14:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

Empirically, without this, on Debian stretch:

 1. udev starts before / is remounted rw
 2. udev spots eth0 and runs /lib/udev/ifupdown-hotplug
 3. ifupdown-hotplug runs ifup which runs isc-dhcp-client
 4. isc-dhcp-client talks to the dhcp server to get an address
 5. isc-dhcp-client tries to write the lease and run the hook
    scripts but something here fails with EROFS
 6. isc-dhcp-client sends DHCPDECLINE to the server
 7. GOTO 4

This loop continues for several seconds, until / is remounted rw.

None of this is appears in any of the guest's logs because syslog is
not running yet, and none of this stuff goes to the console either.
But it does appear in the dhcp *server* logs so that a conscientious
administrator will suffer consternation and concern.

It is not ever sensible to run /lib/udev/ifupdown-hotplug with /
mounted ro.  (Maybe it is not sensible to run udev so early.)
Skipping it is fine because the boot sequence contains an explicit
call to ifup which occurs *after* / is remounted, and that will
collect any interfaces which were skipped earlier.

In my osstest stretch series development tests I don't think I saw any
actual host install failures due to this situation.  The timeouts are
generous enough not to matter, and of course when we install Xen we
reconfigure the host networking to have a static IP address so then
the problem goes away.

In this patch we do this for the host.  We provide a function to
return the appropriate rune which we will use in a moment.

I have not yet reported this situation to the appropriate Debian
channels.  That's on my backlog.  But in any case I have limited the
workaround to stretch so we will revisit this for buster.

The approach to fixing this is somewhat awkward.

Firstly, since the bug is in /lib/udev/ifupdown-hotplug we want to
edit that script.  But we need to do it in the installer environment
as a late_command, because after first boot, via ssh, is too late.
The installer environment has no `patch'.  I didn't want to just
supply a whole new script.  So instead we use sed and mv.

Secondly, as for the contents of /lib/udev/ifupdown-hotplug: I wasn't
able to think of a convenient shell command which will tell us the
errno value from trying to write a file.  Plenty will print the
strerror but I balked at LC_MESSAGES=C and grep.  Perl, however, can
do this, and is always available on Debian.  So perl it is.

Thirdly, the code has a bad case of toothpicks (lots of \), because it
needs to pass through (i) perl (ii) the shell (iii) sed's regexp
syntax and/or i command.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 9d7d1518..41aa28b0 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -48,6 +48,7 @@ BEGIN {
                       preseed_hook_cmds
                       di_installcmdline_core
                       di_vg_name
+                      debian_dhcp_rofs_fix
                       );
     %EXPORT_TAGS = ( );
 
@@ -931,6 +932,9 @@ END
 set -ex
 END
 
+    preseed_hook_command($ho, 'late_command', $sfx,
+			 debian_dhcp_rofs_fix($ho, '/target'));
+
     my $preseed = <<"END";
 d-i debian-installer/locale string en_GB
 d-i console-keymaps-at/keymap select gb
@@ -1563,4 +1567,22 @@ sub debian_guest_di_version ($) {
     return $gho->{DiVersion};
 }
 
+sub debian_dhcp_rofs_fix ($$) {
+    my ($ho, $rootdir) = @_;
+    # Works around bug where /lib/udev/ifupdown-hotplug runs while
+    # / is still ro.  In stretch, the isc dhcp client spins requesting
+    # an address and then sending a DHCPDECLINE (and then, usually,
+    # eventually works).
+    return '' unless $ho->{Suite} =~ m/stretch/;
+    my $script = "$rootdir/lib/udev/ifupdown-hotplug";
+    <<END.<<'ENDQ'.<<END
+set -ex
+sed -e <'$script' >'$script.new' \\
+END
+'/^if \[ -d \/run\/systemd\/system ]; then/ i perl -e '\''use POSIX; my $f="/var/lib/dhcp/rw-fs-check"; exit 0 if open T, ">", $f; die "quitting: $f: $!\\n" if $!==EROFS; warn "warning: $f: $!\\n"'\'' || exit 0'
+ENDQ
+mv '$script.new' '$script'
+END
+}
+
 1;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 53/62] ts-xen-install: Install libpciaccess0
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

In "ts-xen-build-prep: install packages for suites >jessie",
libpciaccess-dev was added for the benefit of qemu.  libvirt needs it
too.

We also need the runtime library.  Without it, libvirt does not start:

  2019-04-04 22:35:36.760+0000: 3623: error : virModuleLoadFile:53 : internal error: Failed to load module '/usr/local/lib/libvirt/connection-driver/libvirt_driver_nodedev.so': libpciaccess.so.0: cannot open shared object file: No such file or directory

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-install | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ts-xen-install b/ts-xen-install
index 03f8c03e..9f78a75f 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -53,7 +53,8 @@ sub packages () {
 			       qemu-utils
                                netcat-openbsd));
     if ($ho->{Suite} !~ m/squeeze|wheezy|jessie/) {
-        target_install_packages($ho, qw(net-tools libnl-route-3-200));
+        target_install_packages($ho, qw(net-tools libnl-route-3-200 
+					libpciaccess0));
     }
     if ($ho->{Suite} =~ m/jessie/) {
         target_install_packages($ho, qw(libnl-route-3-200));
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related

* [Xen-devel] [OSSTEST PATCH 07/62] ts-leak-check: suppress systemd-shim, which leaks in stretch
From: Ian Jackson @ 2019-04-10 14:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu
In-Reply-To: <20190410142408.22848-1-ian.jackson@eu.citrix.com>

From: Wei Liu <wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-leak-check | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ts-leak-check b/ts-leak-check
index 678d0696..41e6245d 100755
--- a/ts-leak-check
+++ b/ts-leak-check
@@ -202,6 +202,7 @@ xenstore /vm
 xenstore /libxl
 
 process .* udevd
+process .* /.+/systemd-shim
 
 file /var/run/xenstored/db
 file /var/run/xenstored/db.debug
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.