[PATCH initramfs-tools 6/9] Allow disabling resume from disk at build time by setting RESUME=none

2017-04-20 Thread Ben Hutchings
Signed-off-by: Ben Hutchings 
---
 hooks/resume | 3 ++-
 init | 4 ++--
 initramfs.conf.5 | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hooks/resume b/hooks/resume
index e8a49124c3f9..3e3f6dbbc3b6 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,7 +16,8 @@ prereqs)
 esac
 
 # First check if a location is set and is a valid swap partition
-if [ -n "$RESUME" ] && blkid -p -n swap $RESUME >/dev/null 2>&1; then
+if [ -n "$RESUME" ] && \
+   { [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; }; then
# As mkinitramfs copies the config file nothing to do.
exit 0
 fi
diff --git a/init b/init
index 9552e5cab9c0..1334dca6a99d 100755
--- a/init
+++ b/init
@@ -189,8 +189,8 @@ if [ -z "${BOOT}" ]; then
BOOT=local
 fi
 
-if [ -n "${noresume}" ]; then
-   export noresume
+if [ -n "${noresume}" ] || [ "$RESUME" = none ]; then
+   export noresume=y
unset resume
 else
resume=${RESUME:-}
diff --git a/initramfs.conf.5 b/initramfs.conf.5
index 4d142dd0950a..c0d778ca1928 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -81,6 +81,7 @@ Specifies the device used for suspend-to-disk (hibernation), 
which the
 initramfs code should attempt to resume from.  If this is not defined,
 .B mkinitramfs
 will automatically select the largest available swap partition.
+Set it to \fInone\fP to disable resume from disk.
 
 .SH VARIABLES FOR NFS BOOT
 .TP



signature.asc
Description: Digital signature


[PATCH initramfs-tools 9/9] NEWS: Add entry explaining the need for RESUME=none on some systems

2017-04-20 Thread Ben Hutchings
Closes: #860403
Signed-off-by: Ben Hutchings 
---
 debian/NEWS | 21 +
 1 file changed, 21 insertions(+)

diff --git a/debian/NEWS b/debian/NEWS
index e862c6144ba9..78a0c6856edc 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,3 +1,24 @@
+initramfs-tools (0.129) unstable; urgency=medium
+
+  * Some systems that do not support suspend-to-disk (hibernation) will
+require a configuration change to explicitly disable this.
+
+From version 0.128, the boot code waits for a suspend/resume device
+to appear, rather than checking just once.  If the configured or
+automatically selected resume device is not available at boot time,
+this results in a roughly 30 second delay.
+
+You should set the RESUME variable in
+/etc/initramfs-tools/conf.d/resume or
+/etc/initramfs-tools/initramfs.conf to one of:
+
+- auto - select the resume device automatically
+- none - disable use of a resume device
+- UUID= - use a specific resume device (by UUID)
+- /dev/ - use a specific resume device (by kernel name)
+
+ -- Ben Hutchings   Thu, 20 Apr 2017 23:21:32 +0100
+
 initramfs-tools (0.121~rc1) unstable; urgency=medium
 
   * If initramfs-tools is configured to use busybox but it is not


signature.asc
Description: Digital signature


[PATCH initramfs-tools 7/9] Support requesting automatic selection of resume device with RESUME=auto

2017-04-20 Thread Ben Hutchings
For now, this is effectively the same as setting RESUME to empty or
not setting it.

Signed-off-by: Ben Hutchings 
---
 hooks/resume | 25 ++---
 initramfs.conf.5 |  3 ++-
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/hooks/resume b/hooks/resume
index 3e3f6dbbc3b6..43eb146b1f42 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,7 +16,7 @@ prereqs)
 esac
 
 # First check if a location is set and is a valid swap partition
-if [ -n "$RESUME" ] && \
+if [ -n "$RESUME" ] && [ "$RESUME" != auto ] && \
{ [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; }; then
# As mkinitramfs copies the config file nothing to do.
exit 0
@@ -24,16 +24,19 @@ fi
 
 # We need to be able to read the listed swap partitions
 if ischroot || [ ! -r /proc/swaps ]; then
-   exit 0
+   resume_auto=
+else
+   # Try to autodetect the RESUME partition, using biggest swap?
+   resume_auto=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d 
" " -f 1)
+   if [ -n "$resume_auto" ]; then
+   UUID=$(blkid -s UUID -o value "$resume_auto" || true)
+   if [ -n "$UUID" ]; then
+   resume_auto="UUID=$UUID"
+   fi
+   fi
 fi
 
-# Try to autodetect the RESUME partition, using biggest swap?
-# Write detected resume to intramfs conf.d
-RESUME=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d " " -f 1)
-if [ -n "$RESUME" ]; then
-   UUID=$(blkid -s UUID -o value "$RESUME" || true)
-   if [ -n "$UUID" ]; then
-   RESUME="UUID=$UUID"
-   fi
-   echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
+# Write selected resume device to intramfs conf.d
+if [ "$RESUME" = auto ] || [ -n "$resume_auto" ]; then
+   echo "RESUME=${resume_auto}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
 fi
diff --git a/initramfs.conf.5 b/initramfs.conf.5
index c0d778ca1928..b4eea705016f 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -78,7 +78,8 @@ Set to \fInfs\fP for an NFS root share.
 .TP
 \fB RESUME
 Specifies the device used for suspend-to-disk (hibernation), which the
-initramfs code should attempt to resume from.  If this is not defined,
+initramfs code should attempt to resume from.  If this is not defined
+or is set to \fIauto\fP,
 .B mkinitramfs
 will automatically select the largest available swap partition.
 Set it to \fInone\fP to disable resume from disk.



signature.asc
Description: Digital signature


[PATCH initramfs-tools 8/9] hooks/resume: Report when we might be doing something surprising

2017-04-20 Thread Ben Hutchings
Some systems have swap devices that aren't available at boot, but are
still selected as resume devices.  There used to be no way to disable
this at build time, but it also used to be quite harmless.  Now that
we wait for the resume device to appear, this is a real problem and
users of such systems will need to set RESUME=none.  Therefore:

- If RESUME is invalid, warn about this
- If RESUME is unset or invalid, and we automatically set a resume device,
  report this

Also:

- If RESUME=auto and we we fail to select a resume device, warn about
  this

Signed-off-by: Ben Hutchings 
---
 hooks/resume | 27 +++
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/hooks/resume b/hooks/resume
index 43eb146b1f42..06ff62af3f3c 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,12 +16,23 @@ prereqs)
 esac
 
 # First check if a location is set and is a valid swap partition
-if [ -n "$RESUME" ] && [ "$RESUME" != auto ] && \
-   { [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; }; then
-   # As mkinitramfs copies the config file nothing to do.
-   exit 0
+if [ -n "$RESUME" ] && [ "$RESUME" != auto ]; then
+   if [ "$RESUME" = none ] || blkid -p -n swap $RESUME >/dev/null 2>&1; 
then
+   # As mkinitramfs copies the config file nothing to do.
+   exit 0
+   fi
+
+   echo >&2 "W: initramfs-tools configuration sets RESUME=$RESUME"
+   echo >&2 "W: but no matching swap device is available."
 fi
 
+# If we were not explicitly requested to select a device, report that we
+# are doing so
+report_auto()
+{
+   test "$RESUME" = auto || echo >&2 "I: $*"
+}
+
 # We need to be able to read the listed swap partitions
 if ischroot || [ ! -r /proc/swaps ]; then
resume_auto=
@@ -30,13 +41,21 @@ else
resume_auto=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d 
" " -f 1)
if [ -n "$resume_auto" ]; then
UUID=$(blkid -s UUID -o value "$resume_auto" || true)
+   report_auto "The initramfs will attempt to resume from 
$resume_auto"
if [ -n "$UUID" ]; then
+   report_auto "(UUID=$UUID)"
resume_auto="UUID=$UUID"
fi
+   report_auto "Set the RESUME variable to override this."
fi
 fi
 
 # Write selected resume device to intramfs conf.d
 if [ "$RESUME" = auto ] || [ -n "$resume_auto" ]; then
+   # If we were explicitly requested to select a device, and we failed,
+   # report that
+   if [ -z "$resume_auto" ]; then
+   echo >&2 "W: initramfs-tools failed to select a resume device"
+   fi
echo "RESUME=${resume_auto}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
 fi



signature.asc
Description: Digital signature


[PATCH initramfs-tools 4/9] initramfs.conf(5): Document the RESUME variable

2017-04-20 Thread Ben Hutchings
It's already mentioned in other manual pages, but not in the most obvious one.

Signed-off-by: Ben Hutchings 
---
 initramfs.conf.5 | 8 
 1 file changed, 8 insertions(+)

diff --git a/initramfs.conf.5 b/initramfs.conf.5
index 184001ca98c2..4d142dd0950a 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -74,6 +74,14 @@ Allows one to use an nfs drive as the root of the drive.
 The default is to boot from \fIlocal\fP media (hard drive, USB stick).
 Set to \fInfs\fP for an NFS root share.
 
+.SH VARIABLES FOR LOCAL BOOT
+.TP
+\fB RESUME
+Specifies the device used for suspend-to-disk (hibernation), which the
+initramfs code should attempt to resume from.  If this is not defined,
+.B mkinitramfs
+will automatically select the largest available swap partition.
+
 .SH VARIABLES FOR NFS BOOT
 .TP
 \fB DEVICE



signature.asc
Description: Digital signature


[PATCH initramfs-tools 5/9] hooks/resume: Check for chroot earlier

2017-04-20 Thread Ben Hutchings
Avoid doing unnecessary work.

Signed-off-by: Ben Hutchings 
---
 hooks/resume | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hooks/resume b/hooks/resume
index d5a987602787..e8a49124c3f9 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -22,20 +22,17 @@ if [ -n "$RESUME" ] && blkid -p -n swap $RESUME >/dev/null 
2>&1; then
 fi
 
 # We need to be able to read the listed swap partitions
-if [ ! -r /proc/swaps ]; then
+if ischroot || [ ! -r /proc/swaps ]; then
exit 0
 fi
 
 # Try to autodetect the RESUME partition, using biggest swap?
+# Write detected resume to intramfs conf.d
 RESUME=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d " " -f 1)
 if [ -n "$RESUME" ]; then
UUID=$(blkid -s UUID -o value "$RESUME" || true)
if [ -n "$UUID" ]; then
RESUME="UUID=$UUID"
fi
-fi
-
-# Write detected resume to intramfs conf.d if not in a chroot
-if [ -n "${RESUME}" ] && ! ischroot; then
echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
 fi



signature.asc
Description: Digital signature


[PATCH initramfs-tools 1/9] hooks/resume: Use correct sort options to select the biggest swap partition

2017-04-20 Thread Ben Hutchings
We need a reverse *numeric* sort.

Signed-off-by: Ben Hutchings 
---
 hooks/resume | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hooks/resume b/hooks/resume
index 657775e4a465..c43badd03f71 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -29,7 +29,7 @@ if [ ! -r /proc/swaps ]; then
 fi
 
 # Try to autodetect the RESUME partition, using biggest swap?
-RESUME=$(grep ^/dev/ /proc/swaps | sort -rk3 | head -n 1 | cut -d " " -f 1)
+RESUME=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d " " -f 1)
 if [ -n "$RESUME" ]; then
UUID=$(blkid -s UUID -o value "$RESUME" || true)
if [ -n "$UUID" ]; then



signature.asc
Description: Digital signature


[PATCH initramfs-tools 2/9] initramfs.conf(5): Clean up split between general and NFS variables

2017-04-20 Thread Ben Hutchings
The BOOT variable selects between local and NFS mode, so it's not
really an NFS-specific variable.

Also reword the section heading.

Signed-off-by: Ben Hutchings 
---
 initramfs.conf.5 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/initramfs.conf.5 b/initramfs.conf.5
index 7eee859897bf..184001ca98c2 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -68,13 +68,13 @@ corresponding userspace utility is not present.
 Set the umask value of the generated initramfs file.
 Useful to not disclose eventual keys.
 
-.SH NFS VARIABLES
 .TP
 \fB BOOT
 Allows one to use an nfs drive as the root of the drive.
 The default is to boot from \fIlocal\fP media (hard drive, USB stick).
 Set to \fInfs\fP for an NFS root share.
 
+.SH VARIABLES FOR NFS BOOT
 .TP
 \fB DEVICE
 Specifies the network interface, like eth0.



signature.asc
Description: Digital signature


[PATCH initramfs-tools 3/9] Support setting of RESUME in initramfs.conf or anywhere in conf.d/

2017-04-20 Thread Ben Hutchings
Currently hooks/resume only reads /etc/initramfs-tools/conf.d/resume,
whereas at boot time it can be set by any configuration file.
Instead, export RESUME from mkinitramfs, which reads all the
configuration files.

When writing an auto-selected resume device, use a filename that
should sort later than user configuration files (zz-resume-auto).

Signed-off-by: Ben Hutchings 
---
 hooks/resume | 6 ++
 mkinitramfs  | 1 +
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hooks/resume b/hooks/resume
index c43badd03f71..d5a987602787 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -16,8 +16,6 @@ prereqs)
 esac
 
 # First check if a location is set and is a valid swap partition
-test -r /etc/initramfs-tools/conf.d/resume \
-   && . /etc/initramfs-tools/conf.d/resume
 if [ -n "$RESUME" ] && blkid -p -n swap $RESUME >/dev/null 2>&1; then
# As mkinitramfs copies the config file nothing to do.
exit 0
@@ -37,7 +35,7 @@ if [ -n "$RESUME" ]; then
fi
 fi
 
-# Write detected resume to intramfs conf.d/resume if not in a chroot
+# Write detected resume to intramfs conf.d if not in a chroot
 if [ -n "${RESUME}" ] && ! ischroot; then
-   echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/resume
+   echo "RESUME=${RESUME}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
 fi
diff --git a/mkinitramfs b/mkinitramfs
index 9f207a0a00df..24715d5e5287 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -205,6 +205,7 @@ export verbose
 export KEYMAP
 export MODULES
 export BUSYBOX
+export RESUME
 
 # Private, used by 'catenate_cpiogz'.
 export __TMPCPIOGZ



signature.asc
Description: Digital signature


[PATCH initramfs-tools 0/9] Fix resume device configuration

2017-04-20 Thread Ben Hutchings
The change in version 0.128 to wait for the resume device to appear
uncovered a number of systems for which the resume device is not
properly configured.  In fact, systems with swap partitions that
are never available at boot could not be configured correctly,
other than by adding 'noresume' to the kernel command line!

While working on that, I found and fixed a couple of other
longstanding bugs in resume device selection.

This patch series:

- Fixes the sorting of swap partitions
- Makes the RESUME variable work like every other configuration
  variable, and documents it
- Adds support for RESUME=none (disable resume) and RESUME=auto
  (explicitly request automatic selection)
- Adds warning and informational messages where the resume device
  configuration is automatically fixed-up

I'm stil not entirely happy with the automatic resume device
selection.  I would prefer to read the kernel's selection from
/sys/power/resume, but I found experimentally that this isn't set on a
fresh boot under older kernel versions.  Secondly I would like to
automatically filter out device types that we know won't be
available at boot (e.g. zram).  But I think this may have to do.

If no-one finds issues with this these changes then I'm hoping
to make one more release for "stretch" with just these.

Ben.

Ben Hutchings (9):
  hooks/resume: Use correct sort options to select the biggest swap
partition
  initramfs.conf(5): Clean up split between general and NFS variables
  Support setting of RESUME in initramfs.conf or anywhere in conf.d/
  initramfs.conf(5): Document the RESUME variable
  hooks/resume: Check for chroot earlier
  Allow disabling resume from disk at build time by setting RESUME=none
  Support requesting automatic selection of resume device with
RESUME=auto
  hooks/resume: Report when we might be doing something surprising
  NEWS: Add entry explaining the need for RESUME=none on some systems

 debian/NEWS  | 21 +
 hooks/resume | 54 --
 init |  4 ++--
 initramfs.conf.5 | 12 +++-
 mkinitramfs  |  1 +
 5 files changed, 71 insertions(+), 21 deletions(-)



signature.asc
Description: Digital signature


Bug#860862: linux-image-3.16: fragmented ipv6 packets can't be forwarded

2017-04-20 Thread Jonathan Lane
Package: src:linux
Version: 3.16.39-1+deb8u2
Severity: important
Tags: upstream ipv6

Dear Maintainer,

The fix for Ubuntu bug #1463911 (fragmented IPv6 packets can't be forwarded) 
never made it upstream to Debian.  This breaks Jessie as an IPv6-capable router 
or VM host.  It was fixed upstream in Linux 4.2.  Please consider backporting a 
fix to 3.16 as the 4.x kernels in jessie-backports do not receive security 
patches.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1463911

Thanks,

Jon Lane

-- Package-specific info:
** Version:
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 
4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)

** Command line:
BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 
root=UUID=da0aca99-dfd8-473d-b0ce-6ec8ca5df2e7 ro quiet

** Not tainted

** Kernel log:
[2830694.134287] audit: type=1326 audit(1492739057.790:202034): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5125 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830695.471015] audit: type=1326 audit(1492739059.130:202035): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5137 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830696.863909] audit: type=1326 audit(1492739060.522:202036): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5141 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830698.312669] audit: type=1326 audit(1492739061.970:202037): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5153 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830700.838154] audit: type=1326 audit(1492739064.494:202038): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5166 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830712.368568] audit: type=1326 audit(1492739076.018:202039): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5216 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830718.091916] audit: type=1326 audit(1492739081.737:202040): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5248 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830748.993413] audit: type=1326 audit(1492739112.621:202041): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5462 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830762.044798] audit: type=1326 audit(1492739125.665:202042): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5522 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830775.181467] audit: type=1326 audit(1492739138.793:202043): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5584 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830805.669545] audit: type=1326 audit(1492739169.264:202044): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5720 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830812.181314] audit: type=1326 audit(1492739175.772:202045): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5750 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830832.528853] audit: type=1326 audit(1492739196.108:202046): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5843 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830862.377829] audit: type=1326 audit(1492739225.940:202047): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=5974 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830891.097947] audit: type=1326 audit(1492739254.644:202048): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=6097 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830912.486156] audit: type=1326 audit(1492739276.019:202049): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=6196 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830913.242553] audit: type=1326 audit(1492739276.775:202050): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=6199 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830956.202979] audit: type=1326 audit(1492739319.711:202051): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=6415 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2830974.834368] audit: type=1326 audit(1492739338.331:202052): auid=4294967295 
uid=114 gid=123 ses=4294967295 pid=6496 comm="vsftpd" exe="/usr/sbin/vsftpd" 
sig=31 syscall=37 compat=0 ip=0x7f9a5945dcc7 code=0x0
[2831012.830962] audit: type=1326 audit(1492739376.306:202053): auid=4294967295 
uid=114 gid=123 ses=4294967295 

Bug#860855: linux: [arm64] Please add support for Allwinner boards (pine64)

2017-04-20 Thread Vagrant Cascadian
Package: linux
Version: 4.10.7-1~exp1
Severity: wishlist
Tags: patch

The following config options should enable support for basic SUNXI boards on 
arm64.

Tested on Pine64+ board with MMC, USB and serial console working.

Requires linux 4.11-rc+ for all of the features to work.

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 27da44863..2106a32d8 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -847,3 +847,7 @@ CONFIG_SND_SOC_TEGRA_ALC5632=m
 CONFIG_SND_SOC_TEGRA_MAX98090=m
 CONFIG_SND_SOC_TEGRA_RT5677=m
 
+CONFIG_ARCH_SUNXI=y
+CONFIG_RTC_DRV_SUN6I=y
+CONFIG_MMC_SUNXI=m
+CONFIG_PHY_SUN4I_USB=m


signature.asc
Description: PGP signature


Bug#860784: linux-image-4.9.0-2-amd64: Hauppage WinTV Aero-M no longer works in kernel 4.9

2017-04-20 Thread Steve VanDevender
Out of curiousity, I tried plugging my WinTV Aero-M into another system
I had just upgraded to stretch, and found that it was fully recognized.
The difference is that the other system uses the 686-pae kernel and
ehci-pci instead of xhci_hcd.

Apr 20 13:30:25 scuzzy kernel: [11823.736052] usb 3-6: new high-speed USB 
device number 3 using ehci-pci
Apr 20 13:30:25 scuzzy kernel: [11823.884874] usb 3-6: New USB device found, 
idVendor=2040, idProduct=c61b
Apr 20 13:30:25 scuzzy kernel: [11823.884881] usb 3-6: New USB device strings: 
Mfr=1, Product=2, SerialNumber=3
Apr 20 13:30:25 scuzzy kernel: [11823.884884] usb 3-6: Product: WinTV Aero-M
Apr 20 13:30:25 scuzzy kernel: [11823.884886] usb 3-6: Manufacturer: Hauppauge
Apr 20 13:30:25 scuzzy kernel: [11823.884888] usb 3-6: SerialNumber: 4034988989
Apr 20 13:30:25 scuzzy kernel: [11824.424407] usb 3-6: dvb_usb_v2: found a 
'Hauppauge WinTV-Aero-M' in warm state
Apr 20 13:30:25 scuzzy kernel: [11824.427956] usb 3-6: dvb_usb_v2: will pass 
the complete MPEG2 transport stream to the software demuxer
Apr 20 13:30:25 scuzzy kernel: [11824.433486] DVB: registering new adapter 
(Hauppauge WinTV-Aero-M)
Apr 20 13:30:26 scuzzy kernel: [11825.025553] MxL111SF detected, v8_200 (0x18)
Apr 20 13:30:26 scuzzy kernel: [11825.035446] usb 3-6: DVB: registering adapter 
0 frontend 0 (LG Electronics LGDT3305 VSB/QAM Frontend)...
Apr 20 13:30:26 scuzzy kernel: [11825.035727] usb 3-6: DVB: registering adapter 
0 frontend 1 (MaxLinear MxL111SF DVB-T demodulator)...
Apr 20 13:30:26 scuzzy kernel: [11825.040799] usb 3-6: DVB: registering adapter 
0 frontend 2 (LG Electronics LG2161 ATSC/MH Frontend)...
Apr 20 13:30:26 scuzzy kernel: [11825.088554] tveeprom 7-0050: Hauppauge model 
126001, rev F2G4, serial# 4034988989
Apr 20 13:30:26 scuzzy kernel: [11825.088563] tveeprom 7-0050: MAC address is 
00:0d:fe:81:0b:bd
Apr 20 13:30:26 scuzzy kernel: [11825.088567] tveeprom 7-0050: tuner model is 
MaxLinear 111 (idx 164, type 4)
Apr 20 13:30:26 scuzzy kernel: [11825.088569] tveeprom 7-0050: TV standards 
ATSC/DVB Digital (eeprom 0x80)
Apr 20 13:30:26 scuzzy kernel: [11825.088571] tveeprom 7-0050: audio processor 
is None (idx 0)
Apr 20 13:30:26 scuzzy kernel: [11825.088574] tveeprom 7-0050: has no radio, 
has IR receiver, has no IR transmitter
Apr 20 13:30:26 scuzzy kernel: [11825.088584] usb 3-6: dvb_usb_v2: 'Hauppauge 
WinTV-Aero-M' successfully initialized and connected
Apr 20 13:30:26 scuzzy kernel: [11825.088763] usbcore: registered new interface 
driver dvb_usb_mxl111sf
Apr 20 13:30:32 scuzzy kernel: [11831.064720] usb 3-6: USB disconnect, device 
number 3
Apr 20 13:30:32 scuzzy kernel: [11831.067881] usb 3-6: dvb_usb_v2: 'Hauppauge 
WinTV-Aero-M' successfully deinitialized and disconnected
^C
scuzzy:/home/stevev# uname -a
Linux scuzzy 4.9.0-2-686-pae #1 SMP Debian 4.9.18-1 (2017-03-30) i686 GNU/Linux

For comparision here is the output for a jessie kernel, also on 686-pae:

Apr 20 11:25:39 hexadecimal kernel: [3705894.940040] usb 6-5: new high-speed 
USB device number 7 using ehci-pci
Apr 20 11:25:39 hexadecimal kernel: [3705895.072918] usb 6-5: New USB device 
found, idVendor=2040, idProduct=c61b
Apr 20 11:25:39 hexadecimal kernel: [3705895.072923] usb 6-5: New USB device 
strings: Mfr=1, Product=2, SerialNumber=3
Apr 20 11:25:39 hexadecimal kernel: [3705895.072924] usb 6-5: Product: WinTV 
Aero-M
Apr 20 11:25:39 hexadecimal kernel: [3705895.072926] usb 6-5: Manufacturer: 
Hauppauge
Apr 20 11:25:39 hexadecimal kernel: [3705895.072928] usb 6-5: SerialNumber: 
4034988989
Apr 20 11:25:39 hexadecimal mtp-probe: checking bus 6, device 7: 
"/sys/devices/pci:00/:00:1d.7/usb6/6-5"
Apr 20 11:25:39 hexadecimal mtp-probe: bus: 6, device: 7 was not an MTP device
Apr 20 11:25:40 hexadecimal kernel: [3705896.407955] usb 6-5: dvb_usb_v2: found 
a 'Hauppauge WinTV-Aero-M' in warm state
Apr 20 11:25:40 hexadecimal kernel: [3705896.407995] usb 6-5: dvb_usb_v2: will 
pass the complete MPEG2 transport stream to the software demuxer
Apr 20 11:25:40 hexadecimal kernel: [3705896.408115] DVB: registering new 
adapter (Hauppauge WinTV-Aero-M)
Apr 20 11:25:41 hexadecimal kernel: [3705897.241179] MxL111SF detected, v8_200 
(0x18)
Apr 20 11:25:41 hexadecimal kernel: [3705897.247519] usb 6-5: DVB: registering 
adapter 0 frontend 0 (LG Electronics LGDT3305 VSB/QAM Frontend)...
Apr 20 11:25:41 hexadecimal kernel: [3705897.247589] usb 6-5: DVB: registering 
adapter 0 frontend 1 (MaxLinear MxL111SF DVB-T demodulator)...
Apr 20 11:25:41 hexadecimal kernel: [3705897.247728] usb 6-5: DVB: registering 
adapter 0 frontend 2 (LG Electronics LG2161 ATSC/MH Frontend)...
Apr 20 11:25:41 hexadecimal kernel: [3705897.270931] tveeprom 6-0050: Hauppauge 
model 126001, rev F2G4, serial# 8457149
Apr 20 11:25:41 hexadecimal kernel: [3705897.270934] tveeprom 6-0050: MAC 
address is 00:0d:fe:81:0b:bd
Apr 20 11:25:41 hexadecimal kernel: [3705897.270937] tveeprom 6-0050: tuner 
model is MaxLinear 111 (idx 164, type 4)
Apr 20 

Bug#860808: ocfs2 blocks jbd2

2017-04-20 Thread Russell Mosemann

Package: src:linux
Version: 4.9.13-1~bpo8+1
Severity: important

Dear Maintainer,

   * What led up to the situation?
 
Apr 20 12:03:24 vhost002 kernel: [ cut here ]
Apr 20 12:03:24 vhost002 kernel: WARNING: CPU: 1 PID: 19193 at 
/home/zumbi/linux-4.9.13/fs/jbd2/transaction.c:297 
start_this_handle+0x3fb/0x400 [jbd2]
Apr 20 12:03:24 vhost002 kernel: Modules linked in: vhost_net vhost macvtap 
macvlan tun ocfs2 quota_tree hmac veth iptable_filter ip_tables x_tables nfsd 
auth_rpcgss nfs_acl nfs lockd grace fscache ocfs2_dlmfs sunrpc ocfs2_stack_o2cb 
ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue configfs bridge stp llc bonding 
intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp 
kvm_intel ipmi_watchdog kvm ast irqbypass crct10dif_pclmul crc32_pclmul ttm 
ghash_clmulni_intel intel_cstate drm_kms_helper xhci_pci xhci_hcd iTCO_wdt drm 
igb intel_uncore iTCO_vendor_support ehci_pci e1000e mxm_wmi ehci_hcd dca 
i2c_algo_bit evdev i2c_i801 mei_me lpc_ich ptp usbcore intel_rapl_perf pcspkr 
mfd_core pps_core i2c_smbus shpchp mei sg usb_common fjes wmi tpm_tis 
tpm_tis_core acpi_power_meter tpm acpi_pad button ipmi_si ipmi_poweroff
Apr 20 12:03:24 vhost002 kernel:  ipmi_devintf ipmi_msghandler fuse drbd 
lru_cache libcrc32c crc32c_generic autofs4 ext4 crc16 jbd2 fscrypto mbcache 
dm_mod md_mod sd_mod crc32c_intel ahci libahci libata aesni_intel aes_x86_64 
glue_helper lrw gf128mul ablk_helper cryptd scsi_mod
Apr 20 12:03:24 vhost002 kernel: CPU: 1 PID: 19193 Comm: qemu-system-x86 Not 
tainted 4.9.0-0.bpo.2-amd64 #1 Debian 4.9.13-1~bpo8+1
Apr 20 12:03:24 vhost002 kernel: Hardware name: To Be Filled By O.E.M. To Be 
Filled By O.E.M./EPC612D4I, BIOS P2.10 03/31/2016
Apr 20 12:03:24 vhost002 kernel:   b6529cd5 
 
Apr 20 12:03:24 vhost002 kernel:  b62778a4 9c58aa658800 
9c58aa658800 9c587ee6f420
Apr 20 12:03:24 vhost002 kernel:   ffe4 
 c04807db
Apr 20 12:03:24 vhost002 kernel: Call Trace:
Apr 20 12:03:24 vhost002 kernel:  [] ? dump_stack+0x5c/0x77
Apr 20 12:03:24 vhost002 kernel:  [] ? __warn+0xc4/0xe0
Apr 20 12:03:24 vhost002 kernel:  [] ? 
start_this_handle+0x3fb/0x400 [jbd2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
jbd2__journal_start+0xe9/0x1f0 [jbd2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_start_trans+0xf8/0x1d0 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_dio_end_io_write+0x2fb/0x600 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? __schedule+0x245/0x6d0
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_allocate_extend_trans+0x180/0x180 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_dio_end_io+0x3b/0x60 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? dio_complete+0x7e/0x190
Apr 20 12:03:24 vhost002 kernel:  [] ? 
do_blockdev_direct_IO+0x2168/0x2860
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_write_end_nolock+0x550/0x550 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_direct_IO+0x83/0x90 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? 
generic_file_direct_write+0xb3/0x180
Apr 20 12:03:24 vhost002 kernel:  [] ? 
__generic_file_write_iter+0xb6/0x1e0
Apr 20 12:03:24 vhost002 kernel:  [] ? 
ocfs2_file_write_iter+0x44e/0xae0 [ocfs2]
Apr 20 12:03:24 vhost002 kernel:  [] ? wake_up_q+0x60/0x60
Apr 20 12:03:24 vhost002 kernel:  [] ? 
new_sync_write+0xde/0x130
Apr 20 12:03:24 vhost002 kernel:  [] ? vfs_write+0xb3/0x1a0
Apr 20 12:03:24 vhost002 kernel:  [] ? SyS_futex+0x83/0x180
Apr 20 12:03:24 vhost002 kernel:  [] ? SyS_pwrite64+0x86/0xb0
Apr 20 12:03:24 vhost002 kernel:  [] ? 
system_call_fast_compare_end+0xc/0x9b
Apr 20 12:03:24 vhost002 kernel: ---[ end trace 7c48549819590e08 ]---


-- Package-specific info:
** Version:
Linux version 4.9.0-0.bpo.2-amd64 (debian-kernel@lists.debian.org) (gcc version 
4.9.2 (Debian 4.9.2-10) ) #1 SMP Debian 4.9.13-1~bpo8+1 (2017-02-27)

** Command line:
BOOT_IMAGE=/vmlinuz-4.9.0-0.bpo.2-amd64 
root=UUID=00960d68-5f91-43de-9508-02f3b432cca3 ro console=tty0 
console=ttyS1,115200n8 quiet

** Tainted: W (512)
 * Taint on warning.

** Kernel log:
Unable to read kernel log; any relevant messages should be attached

** Model information
sys_vendor: To Be Filled By O.E.M.
product_name: To Be Filled By O.E.M.
product_version: To Be Filled By O.E.M.
chassis_vendor: To Be Filled By O.E.M.
chassis_version: To Be Filled By O.E.M.
bios_vendor: American Megatrends Inc.
bios_version: P2.10
board_vendor: ASRockRack
board_name: EPC612D4I
board_version:

** Loaded modules:
vhost_net
vhost
macvtap
macvlan
tun
ocfs2
quota_tree
hmac
veth
iptable_filter
ip_tables
x_tables
nfsd
auth_rpcgss
nfs_acl
nfs
lockd
grace
fscache
ocfs2_dlmfs
sunrpc
ocfs2_stack_o2cb
ocfs2_dlm
ocfs2_nodemanager
ocfs2_stackglue
configfs
bridge
stp
llc
bonding
intel_rapl
sb_edac
edac_core
x86_pkg_temp_thermal
intel_powerclamp
coretemp
kvm_intel
ipmi_watchdog
kvm
ast
irqbypass
crct10dif_pclmul
crc32_pclmul
ttm
ghash_clmulni_intel
intel_cstate

Processed: retitle 860236 to Xen PV domU crash - MCE timer migrated and not removed after hotplug?

2017-04-20 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> retitle 860236 Xen PV domU crash - MCE timer migrated and not removed after 
> hotplug?
Bug #860236 [src:linux] xen pv domU crash with 3.16 kernel and xen 4.8
Changed Bug title to 'Xen PV domU crash - MCE timer migrated and not removed 
after hotplug?' from 'xen pv domU crash with 3.16 kernel and xen 4.8'.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
860236: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860236
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target

2017-04-20 Thread Riku Voipio
Hi,

Thanks for taking time to review.

On 18 April 2017 at 17:31, Masahiro Yamada
 wrote:
> Before expanding this even more,
> please help me understand this script.
>
> Commit 3716001b implemented source package build
> at the end of the builddeb script.
> However, the binary packages are still built in its own way.
> (So, debian/rules is not used in general workflows,
> so we need to test it explicitly somehow.)

Historic reasons.. since the builddeb already existed, the easiest way
to implement debian/rules was to make a skeleton debian/rules that
calls builddeb indrectly.

> Why do not we create a source package first,
> then build binary packages from it?

I wouldn't do a source package per se, but we could create a debian/
directory tree and the call dpkg-buildpackage. This would be a more
substantial overhaul that might break some expected behavior of
deb-pkg targets. If people think its worth, I can give it a shot.

> rpm-pkg does that way.
> (generate a spec-file, then run rpmbuild)

speaking of the mkspec script, it would be nice to refactor it to here
documents over endless lines of echo.

Riku



Bug#860781: High system load, probably due to interrupts

2017-04-20 Thread Stefan Ott
The message about rtc interrupts seems to be related to the
irqpoll kernel option - without irqpoll I no longer get that
one.

The other issues are still there.

-- 
Stefan Ott
http://www.ott.net/



Re: [PATCH v2] Update to 4.11-rc6

2017-04-20 Thread Lukas Wunner
On Thu, Apr 20, 2017 at 12:54:39AM +0100, Ben Hutchings wrote:
> On Wed, 2017-04-19 at 11:30 +0200, Lukas Wunner wrote:
> > Remove merged patches and rebase remaining patches.
> > 
> > A portion of the secureboot patches have been upstreamed, but were
> > changed substantially during review, primarily to avoid code
> > duplication among arches.  I've stripped the patches of the merged
> > bits and rebased the remainder.
> 
> This is great work!  I did find a few errors, though:
> 
> - You made some changes to context in
>   bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch
>   which didn't match 4.11-rc6.  Huh?

Ugh, my apologies, I forgot to mention that my kernel tree was based on
drm-tip as of last Saturday, rather than Linus' v4.11-rc6 tag, so I was
already taking into account all the drm and sound changes queued for 4.12.

> - You deleted part of
>   bugfix/all/tools-lib-traceevent-fix-use-of-uninitialized-variables.patch
>   but it looks like it can actually be dropped entirely.
> - In
>   
> features/all/securelevel/arm64-add-kernel-config-option-to-set-securelevel-wh.patch
>   the return value of efi_get_secureboot() is treated as a boolean,
>   but that's no longer true.

Sorry, missed that.  Thanks a lot for double-checking.  Good work pulling
in David Howells' new version of the lockdown patches, I knew of them but
had already purged them from my mailbox, was too lazy to scrape them together
from mailing list archives or patchwork, and had forgotten that he had
provided a branch that I just could have pulled from.

Kind regards,

Lukas



Bug#854348: ipv6: refcnt pb when removing a peer address

2017-04-20 Thread Nicolas Dichtel
Le 20/04/2017 à 00:15, Ben Hutchings a écrit :
> On Mon, 2017-02-06 at 11:09 +0100, Nicolas Dichtel wrote:
>> Package: src:linux
>> Version: 3.16.39-1
>> Severity: important
>> Tags: patch
>>
>> Dear Maintainer,
>>
>> Under some circumstances, when an ipv6 peer addresse is removed, there is a
>> refcnt problem:
>>   kernel:[ 9614.220549] unregister_netdevice: waiting for lo to become free. 
>> Usage count = 2
>>
>> This bug has been fixed by the following upstream patch:
>>   f24062b07dda ipv6: fix a refcnt leak with peer addr
>>
>> You may also consider backporting thoses patches:
>>   e7478dfc4656 ipv6: use addrconf_get_prefix_route() to remove peer addr
> 
> I'm happy to apply those two.
Thank you.

> 
>>   8e3d5be73681 ipv6: Avoid double dst_free
> [...]
> 
> I don't understand this well enough to safely backport it.  Do you know
> whether the issue it fixes actually exists in 3.16?  Also, it needs at
No, I don't known. We have caught it when trying to solve the initial problem.


Regards,
Nicolas



Bug#860236: xen pv domU crash with 3.16 kernel and xen 4.8

2017-04-20 Thread Vincent Legout
On Wed, Apr 19, 2017 at 08:39:05PM +0100, Ben Hutchings wrote :
> On Fri, 2017-04-14 at 11:18 +0200, Vincent Legout wrote:
> [...]
> > Could cpu hotplug be buggy in 3.16? And Xen triggers this bug after 5
> > minutes even without doing any 'xl vcpu-set'?
> 
> The MCE polling timer for each CPU runs every 5 minutes, so this is
> presumably the first time it runs.  Perhaps this domain is configured
> such that CPUs are hot-removed shortly after boot?

I didn't explicitly set anything like that, but I guess it could also be
a default configuration in Xen.

> In the first crash, it looks like the timer for CPU x!=0 is being
> called on CPU 0.  In general this can happen if CPU x is hot-removed;
> its timers are migrated to another CPU.  This should *not* be possible
> with the MCE timer, as there is a hotplug callback that removes the
> timer when a CPU is removed.  There is a check for the timer having
> been migrated anyway, which triggers the WARNING.  The timer function
> then tries to re-add the timer for the current CPU, but that's still
> pending, which triggers the BUG.  Either the hotplug callback was not
> called, or the timer was migrated before being removed resulting in a
> race condition.
> 
> > With "maxvcpus" set larger "vcpus", xl vcpu-set seems to work most of
> > the time (between 1 and 16 vcpus), but after several tries, I got the
> > attached trace.
> 
> I'm not sure what's going on in this crash, but as it's a null
> dereference in migrate_timer_list it seems somewhat related.
> 
> I didn't find any changes that would explain how this was fixed between
> 4.0 and 4.2.  I suggest you work around it by adding 'nomce' to the
> kernel command line as I would expect Xen or dom0 to handle MCEs.

Thanks a lot Ben, I can't reproduce the issue with 'nomce'.

Thanks,
Vincent


signature.asc
Description: PGP signature