From 78f00cf7adf2ea97384aed46c77308b91feb4b98 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 17 Jun 2014 15:43:04 +0000 Subject: [PATCH 01/14] Use https scheme for stable update changelog URLs svn path=/dists/sid/linux/; revision=21455 --- debian/bin/stable-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/bin/stable-update.sh b/debian/bin/stable-update.sh index c3eafb7f0..b5ff44e27 100755 --- a/debian/bin/stable-update.sh +++ b/debian/bin/stable-update.sh @@ -65,7 +65,7 @@ dch -v "$new_pkg_ver" --preserve --multimaint-merge -D UNRELEASED \ echo "New upstream stable update: " while [ "v$cur_ver" != "v$new_ver" ]; do cur_ver="$(next_update "$cur_ver")" - echo "http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-$cur_ver" + echo "https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-$cur_ver" done)" # Then insert the shortlogs with sed From a96d1fd530e28e9d5451f07541fd7d99dcf23df9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 17 Jun 2014 16:00:06 +0000 Subject: [PATCH 02/14] Update to 3.14.8 svn path=/dists/sid/linux/; revision=21456 --- debian/changelog | 10 + ...MSI-Fix-memory-leak-in-free_msi_irqs.patch | 33 --- ...ule-mask-accesses-need-bounds-checki.patch | 80 -------- ..._capable-to-capable_wrt_inode_uidgid.patch | 191 ------------------ ...efrag-set-local_df-flag-on-defragmen.patch | 53 ----- ...sm-thread_info-Add-_TIF_SECCOMP-flag.patch | 32 --- debian/patches/series | 5 - 7 files changed, 10 insertions(+), 394 deletions(-) delete mode 100644 debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch delete mode 100644 debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch delete mode 100644 debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch delete mode 100644 debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch delete mode 100644 debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch diff --git a/debian/changelog b/debian/changelog index 662950dfc..d42bd42a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +linux (3.14.8-1) UNRELEASED; urgency=medium + + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.14.8 + - Target/iscsi,iser: Avoid accepting transport connections during stop + stage + - iser-target: Fix multi network portal shutdown regression + + -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 + linux (3.14.7-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch b/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch deleted file mode 100644 index c3a90d88b..000000000 --- a/debian/patches/bugfix/all/PCI-MSI-Fix-memory-leak-in-free_msi_irqs.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Alexei Starovoitov -Date: Wed, 4 Jun 2014 15:49:50 -0700 -Subject: PCI/MSI: Fix memory leak in free_msi_irqs() -Origin: https://git.kernel.org/linus/b701c0b1fe819a2083fc6ec5332e0e4492b9516d - -free_msi_irqs() is leaking memory, since list_for_each_entry(entry, -&dev->msi_list, list) {...} is never executed, because dev->msi_list is -made empty by the loop just above this one. - -Fix it by relying on zero termination of attribute array like -populate_msi_sysfs() does. - -Fixes: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects") -Signed-off-by: Alexei Starovoitov -Signed-off-by: Bjorn Helgaas -Acked-by: Neil Horman -Acked-by: Greg Kroah-Hartman -CC: stable@vger.kernel.org # v3.14+ ---- - drivers/pci/msi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/pci/msi.c -+++ b/drivers/pci/msi.c -@@ -414,7 +414,7 @@ static void free_msi_irqs(struct pci_dev - if (dev->msi_irq_groups) { - sysfs_remove_groups(&dev->dev.kobj, dev->msi_irq_groups); - msi_attrs = dev->msi_irq_groups[0]->attrs; -- list_for_each_entry(entry, &dev->msi_list, list) { -+ while (msi_attrs[count]) { - dev_attr = container_of(msi_attrs[count], - struct device_attribute, attr); - kfree(dev_attr->attr.name); diff --git a/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch b/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch deleted file mode 100644 index b5c10893c..000000000 --- a/debian/patches/bugfix/all/auditsc-audit_krule-mask-accesses-need-bounds-checki.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: Andy Lutomirski -Date: Wed, 28 May 2014 23:09:58 -0400 -Subject: auditsc: audit_krule mask accesses need bounds checking -Origin: https://git.kernel.org/linus/a3c54931199565930d6d84f4c3456f6440aefd41 - -Fixes an easy DoS and possible information disclosure. - -This does nothing about the broken state of x32 auditing. - -eparis: If the admin has enabled auditd and has specifically loaded -audit rules. This bug has been around since before git. Wow... - -Cc: stable@vger.kernel.org -Signed-off-by: Andy Lutomirski -Signed-off-by: Eric Paris -Signed-off-by: Linus Torvalds ---- - kernel/auditsc.c | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - ---- a/kernel/auditsc.c -+++ b/kernel/auditsc.c -@@ -720,6 +720,22 @@ static enum audit_state audit_filter_tas - return AUDIT_BUILD_CONTEXT; - } - -+static int audit_in_mask(const struct audit_krule *rule, unsigned long val) -+{ -+ int word, bit; -+ -+ if (val > 0xffffffff) -+ return false; -+ -+ word = AUDIT_WORD(val); -+ if (word >= AUDIT_BITMASK_SIZE) -+ return false; -+ -+ bit = AUDIT_BIT(val); -+ -+ return rule->mask[word] & bit; -+} -+ - /* At syscall entry and exit time, this filter is called if the - * audit_state is not low enough that auditing cannot take place, but is - * also not high enough that we already know we have to write an audit -@@ -737,11 +753,8 @@ static enum audit_state audit_filter_sys - - rcu_read_lock(); - if (!list_empty(list)) { -- int word = AUDIT_WORD(ctx->major); -- int bit = AUDIT_BIT(ctx->major); -- - list_for_each_entry_rcu(e, list, list) { -- if ((e->rule.mask[word] & bit) == bit && -+ if (audit_in_mask(&e->rule, ctx->major) && - audit_filter_rules(tsk, &e->rule, ctx, NULL, - &state, false)) { - rcu_read_unlock(); -@@ -761,20 +774,16 @@ static enum audit_state audit_filter_sys - static int audit_filter_inode_name(struct task_struct *tsk, - struct audit_names *n, - struct audit_context *ctx) { -- int word, bit; - int h = audit_hash_ino((u32)n->ino); - struct list_head *list = &audit_inode_hash[h]; - struct audit_entry *e; - enum audit_state state; - -- word = AUDIT_WORD(ctx->major); -- bit = AUDIT_BIT(ctx->major); -- - if (list_empty(list)) - return 0; - - list_for_each_entry_rcu(e, list, list) { -- if ((e->rule.mask[word] & bit) == bit && -+ if (audit_in_mask(&e->rule, ctx->major) && - audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { - ctx->current_state = state; - return 1; diff --git a/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch b/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch deleted file mode 100644 index 2a6460a42..000000000 --- a/debian/patches/bugfix/all/fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch +++ /dev/null @@ -1,191 +0,0 @@ -From: Andy Lutomirski -Date: Tue, 10 Jun 2014 12:45:42 -0700 -Subject: fs,userns: Change inode_capable to capable_wrt_inode_uidgid -Origin: https://git.kernel.org/linus/23adbe12ef7d3d4195e80800ab36b37bee28cd03 - -The kernel has no concept of capabilities with respect to inodes; inodes -exist independently of namespaces. For example, inode_capable(inode, -CAP_LINUX_IMMUTABLE) would be nonsense. - -This patch changes inode_capable to check for uid and gid mappings and -renames it to capable_wrt_inode_uidgid, which should make it more -obvious what it does. - -Fixes CVE-2014-4014. - -Cc: Theodore Ts'o -Cc: Serge Hallyn -Cc: "Eric W. Biederman" -Cc: Dave Chinner -Cc: stable@vger.kernel.org -Signed-off-by: Andy Lutomirski -Signed-off-by: Linus Torvalds ---- - fs/attr.c | 8 ++++---- - fs/inode.c | 10 +++++++--- - fs/namei.c | 11 ++++++----- - fs/xfs/xfs_ioctl.c | 2 +- - include/linux/capability.h | 2 +- - kernel/capability.c | 20 ++++++++------------ - 6 files changed, 27 insertions(+), 26 deletions(-) - ---- a/fs/attr.c -+++ b/fs/attr.c -@@ -50,14 +50,14 @@ int inode_change_ok(const struct inode * - if ((ia_valid & ATTR_UID) && - (!uid_eq(current_fsuid(), inode->i_uid) || - !uid_eq(attr->ia_uid, inode->i_uid)) && -- !inode_capable(inode, CAP_CHOWN)) -+ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) - return -EPERM; - - /* Make sure caller can chgrp. */ - if ((ia_valid & ATTR_GID) && - (!uid_eq(current_fsuid(), inode->i_uid) || - (!in_group_p(attr->ia_gid) && !gid_eq(attr->ia_gid, inode->i_gid))) && -- !inode_capable(inode, CAP_CHOWN)) -+ !capable_wrt_inode_uidgid(inode, CAP_CHOWN)) - return -EPERM; - - /* Make sure a caller can chmod. */ -@@ -67,7 +67,7 @@ int inode_change_ok(const struct inode * - /* Also check the setgid bit! */ - if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : - inode->i_gid) && -- !inode_capable(inode, CAP_FSETID)) -+ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) - attr->ia_mode &= ~S_ISGID; - } - -@@ -160,7 +160,7 @@ void setattr_copy(struct inode *inode, c - umode_t mode = attr->ia_mode; - - if (!in_group_p(inode->i_gid) && -- !inode_capable(inode, CAP_FSETID)) -+ !capable_wrt_inode_uidgid(inode, CAP_FSETID)) - mode &= ~S_ISGID; - inode->i_mode = mode; - } ---- a/fs/inode.c -+++ b/fs/inode.c -@@ -1842,14 +1842,18 @@ EXPORT_SYMBOL(inode_init_owner); - * inode_owner_or_capable - check current task permissions to inode - * @inode: inode being checked - * -- * Return true if current either has CAP_FOWNER to the inode, or -- * owns the file. -+ * Return true if current either has CAP_FOWNER in a namespace with the -+ * inode owner uid mapped, or owns the file. - */ - bool inode_owner_or_capable(const struct inode *inode) - { -+ struct user_namespace *ns; -+ - if (uid_eq(current_fsuid(), inode->i_uid)) - return true; -- if (inode_capable(inode, CAP_FOWNER)) -+ -+ ns = current_user_ns(); -+ if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid)) - return true; - return false; - } ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -332,10 +332,11 @@ int generic_permission(struct inode *ino - - if (S_ISDIR(inode->i_mode)) { - /* DACs are overridable for directories */ -- if (inode_capable(inode, CAP_DAC_OVERRIDE)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) - return 0; - if (!(mask & MAY_WRITE)) -- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) -+ if (capable_wrt_inode_uidgid(inode, -+ CAP_DAC_READ_SEARCH)) - return 0; - return -EACCES; - } -@@ -345,7 +346,7 @@ int generic_permission(struct inode *ino - * at least one exec bit set. - */ - if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO)) -- if (inode_capable(inode, CAP_DAC_OVERRIDE)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE)) - return 0; - - /* -@@ -353,7 +354,7 @@ int generic_permission(struct inode *ino - */ - mask &= MAY_READ | MAY_WRITE | MAY_EXEC; - if (mask == MAY_READ) -- if (inode_capable(inode, CAP_DAC_READ_SEARCH)) -+ if (capable_wrt_inode_uidgid(inode, CAP_DAC_READ_SEARCH)) - return 0; - - return -EACCES; -@@ -2370,7 +2371,7 @@ static inline int check_sticky(struct in - return 0; - if (uid_eq(dir->i_uid, fsuid)) - return 0; -- return !inode_capable(inode, CAP_FOWNER); -+ return !capable_wrt_inode_uidgid(inode, CAP_FOWNER); - } - - /* ---- a/fs/xfs/xfs_ioctl.c -+++ b/fs/xfs/xfs_ioctl.c -@@ -1241,7 +1241,7 @@ xfs_ioctl_setattr( - * cleared upon successful return from chown() - */ - if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) && -- !inode_capable(VFS_I(ip), CAP_FSETID)) -+ !capable_wrt_inode_uidgid(VFS_I(ip), CAP_FSETID)) - ip->i_d.di_mode &= ~(S_ISUID|S_ISGID); - - /* ---- a/include/linux/capability.h -+++ b/include/linux/capability.h -@@ -210,7 +210,7 @@ extern bool has_ns_capability_noaudit(st - struct user_namespace *ns, int cap); - extern bool capable(int cap); - extern bool ns_capable(struct user_namespace *ns, int cap); --extern bool inode_capable(const struct inode *inode, int cap); -+extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); - extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); - - /* audit system wants to get cap info from files as well */ ---- a/kernel/capability.c -+++ b/kernel/capability.c -@@ -433,23 +433,19 @@ bool capable(int cap) - EXPORT_SYMBOL(capable); - - /** -- * inode_capable - Check superior capability over inode -+ * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped - * @inode: The inode in question - * @cap: The capability in question - * -- * Return true if the current task has the given superior capability -- * targeted at it's own user namespace and that the given inode is owned -- * by the current user namespace or a child namespace. -- * -- * Currently we check to see if an inode is owned by the current -- * user namespace by seeing if the inode's owner maps into the -- * current user namespace. -- * -+ * Return true if the current task has the given capability targeted at -+ * its own user namespace and that the given inode's uid and gid are -+ * mapped into the current user namespace. - */ --bool inode_capable(const struct inode *inode, int cap) -+bool capable_wrt_inode_uidgid(const struct inode *inode, int cap) - { - struct user_namespace *ns = current_user_ns(); - -- return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid); -+ return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) && -+ kgid_has_mapping(ns, inode->i_gid); - } --EXPORT_SYMBOL(inode_capable); -+EXPORT_SYMBOL(capable_wrt_inode_uidgid); diff --git a/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch b/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch deleted file mode 100644 index 01c56d74f..000000000 --- a/debian/patches/bugfix/all/netfilter-ipv4-defrag-set-local_df-flag-on-defragmen.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Florian Westphal -Date: Fri, 2 May 2014 15:32:16 +0200 -Subject: netfilter: ipv4: defrag: set local_df flag on defragmented skb -Origin: https://git.kernel.org/linus/895162b1101b3ea5db08ca6822ae9672717efec0 - -else we may fail to forward skb even if original fragments do fit -outgoing link mtu: - -1. remote sends 2k packets in two 1000 byte frags, DF set -2. we want to forward but only see '2k > mtu and DF set' -3. we then send icmp error saying that outgoing link is 1500 - -But original sender never sent a packet that would not fit -the outgoing link. - -Setting local_df makes outgoing path test size vs. -IPCB(skb)->frag_max_size, so we will still send the correct -error in case the largest original size did not fit -outgoing link mtu. - -Reported-by: Maxime Bizon -Suggested-by: Maxime Bizon -Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking) -Signed-off-by: Florian Westphal -Signed-off-by: Pablo Neira Ayuso ---- - net/ipv4/netfilter/nf_defrag_ipv4.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c -index 12e13bd..f40f321 100644 ---- a/net/ipv4/netfilter/nf_defrag_ipv4.c -+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c -@@ -22,7 +22,6 @@ - #endif - #include - --/* Returns new sk_buff, or NULL */ - static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user) - { - int err; -@@ -33,8 +32,10 @@ static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user) - err = ip_defrag(skb, user); - local_bh_enable(); - -- if (!err) -+ if (!err) { - ip_send_check(ip_hdr(skb)); -+ skb->local_df = 1; -+ } - - return err; - } diff --git a/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch b/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch deleted file mode 100644 index 02428d02c..000000000 --- a/debian/patches/bugfix/mips/MIPS-asm-thread_info-Add-_TIF_SECCOMP-flag.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Markos Chandras -Date: Wed, 22 Jan 2014 14:40:00 +0000 -Subject: MIPS: asm: thread_info: Add _TIF_SECCOMP flag -Origin: https://git.kernel.org/linus/137f7df8cead00688524c82360930845396b8a21 - -Add _TIF_SECCOMP flag to _TIF_WORK_SYSCALL_ENTRY to indicate -that the system call needs to be checked against a seccomp filter. - -Signed-off-by: Markos Chandras -Reviewed-by: Paul Burton -Reviewed-by: James Hogan -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/6405/ -Signed-off-by: Ralf Baechle ---- - arch/mips/include/asm/thread_info.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h -index 24846f9..e80ae50 100644 ---- a/arch/mips/include/asm/thread_info.h -+++ b/arch/mips/include/asm/thread_info.h -@@ -136,7 +136,8 @@ static inline struct thread_info *current_thread_info(void) - #define _TIF_SYSCALL_TRACEPOINT (1< Date: Tue, 17 Jun 2014 16:02:46 +0000 Subject: [PATCH 03/14] Use https scheme for Bug-Debian field in patch headers svn path=/dists/sid/linux/; revision=21457 --- debian/patches/debian/arch-sh4-fix-uimage-build.patch | 2 +- .../fs-enable-link-security-restrictions-by-default.patch | 2 +- debian/patches/debian/ia64-hardcode-arch-script-output.patch | 2 +- .../debian/iwlwifi-do-not-request-unreleased-firmware.patch | 2 +- debian/patches/debian/powerpcspe-omit-uimage.patch | 2 +- debian/patches/debian/snd-pcsp-disable-autoload.patch | 2 +- debian/patches/debian/yama-disable-by-default.patch | 2 +- debian/patches/features/all/aufs3/aufs3-add.patch | 2 +- debian/patches/features/all/aufs3/aufs3-base.patch | 2 +- debian/patches/features/all/aufs3/aufs3-kbuild.patch | 2 +- debian/patches/features/all/aufs3/aufs3-mmap.patch | 2 +- debian/patches/features/all/aufs3/aufs3-standalone.patch | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/patches/debian/arch-sh4-fix-uimage-build.patch b/debian/patches/debian/arch-sh4-fix-uimage-build.patch index fa66f450d..6fc5a08e8 100644 --- a/debian/patches/debian/arch-sh4-fix-uimage-build.patch +++ b/debian/patches/debian/arch-sh4-fix-uimage-build.patch @@ -1,6 +1,6 @@ From: Nobuhiro Iwamatsu Subject: [sh4] Fix uImage build -Bug-Debian: http://bugs.debian.org/569034 +Bug-Debian: https://bugs.debian.org/569034 Forwarded: not-needed [bwh: This was added without a description, but I think it is dealing diff --git a/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch b/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch index e4a094656..639fb3c34 100644 --- a/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch +++ b/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch @@ -1,7 +1,7 @@ From: Ben Hutchings Subject: fs: Enable link security restrictions by default Date: Fri, 02 Nov 2012 05:32:06 +0000 -Bug-Debian: http://bugs.debian.org/609455 +Bug-Debian: https://bugs.debian.org/609455 Forwarded: not-needed This reverts commit 561ec64ae67ef25cac8d72bb9c4bfc955edfd415 diff --git a/debian/patches/debian/ia64-hardcode-arch-script-output.patch b/debian/patches/debian/ia64-hardcode-arch-script-output.patch index 13cd5a865..756e1a43e 100644 --- a/debian/patches/debian/ia64-hardcode-arch-script-output.patch +++ b/debian/patches/debian/ia64-hardcode-arch-script-output.patch @@ -1,7 +1,7 @@ From: dann frazier Subject: Hardcode arch script output Date: Mon, 26 Mar 2007 16:30:51 -0600 -Bug-Debian: http://bugs.debian.org/392592 +Bug-Debian: https://bugs.debian.org/392592 Forwarded: not-needed Here's a patch that simply uses hardcoded definitions instead of diff --git a/debian/patches/debian/iwlwifi-do-not-request-unreleased-firmware.patch b/debian/patches/debian/iwlwifi-do-not-request-unreleased-firmware.patch index bad19fb06..7e05444c7 100644 --- a/debian/patches/debian/iwlwifi-do-not-request-unreleased-firmware.patch +++ b/debian/patches/debian/iwlwifi-do-not-request-unreleased-firmware.patch @@ -1,6 +1,6 @@ From: Ben Hutchings Subject: iwlwifi: Do not request unreleased firmware for IWL6000 -Bug-Debian: http://bugs.debian.org/689416 +Bug-Debian: https://bugs.debian.org/689416 Forwarded: not-needed The iwlwifi driver currently supports firmware API versions 4-6 for diff --git a/debian/patches/debian/powerpcspe-omit-uimage.patch b/debian/patches/debian/powerpcspe-omit-uimage.patch index 6c2dbb6ab..ed5971d75 100644 --- a/debian/patches/debian/powerpcspe-omit-uimage.patch +++ b/debian/patches/debian/powerpcspe-omit-uimage.patch @@ -4,7 +4,7 @@ Description: Prevent building uImage with missing mkimage available in linux's build-dependencies, and the file is not strictly necessary, so we are omitting this step in the build process, Debian-specific. Author: Roland Stigge -Bug-Debian: http://bugs.debian.org/708094 +Bug-Debian: https://bugs.debian.org/708094 Forwarded: not-needed Index: linux-3.8.12/arch/powerpc/boot/Makefile diff --git a/debian/patches/debian/snd-pcsp-disable-autoload.patch b/debian/patches/debian/snd-pcsp-disable-autoload.patch index 4776edae1..5871dc6ef 100644 --- a/debian/patches/debian/snd-pcsp-disable-autoload.patch +++ b/debian/patches/debian/snd-pcsp-disable-autoload.patch @@ -2,7 +2,7 @@ From: Ben Hutchings Date: Wed, 05 Feb 2014 23:01:30 +0000 Subject: snd-pcsp: Disable autoload Forwarded: not-needed -Bug-Debian: http://bugs.debian.org/697709 +Bug-Debian: https://bugs.debian.org/697709 There are two drivers claiming the platform:pcspkr device: - pcspkr creates an input(!) device that can only beep diff --git a/debian/patches/debian/yama-disable-by-default.patch b/debian/patches/debian/yama-disable-by-default.patch index 4b665a6ae..f217a22b3 100644 --- a/debian/patches/debian/yama-disable-by-default.patch +++ b/debian/patches/debian/yama-disable-by-default.patch @@ -1,7 +1,7 @@ From: Ben Hutchings Subject: yama: Disable by default Date: Wed, 19 Jun 2013 04:35:28 +0100 -Bug-Debian: http://bugs.debian.org/712740 +Bug-Debian: https://bugs.debian.org/712740 Forwarded: not-needed --- a/security/yama/yama_lsm.c diff --git a/debian/patches/features/all/aufs3/aufs3-add.patch b/debian/patches/features/all/aufs3/aufs3-add.patch index ecc95bb3b..9a40e93b1 100644 --- a/debian/patches/features/all/aufs3/aufs3-add.patch +++ b/debian/patches/features/all/aufs3/aufs3-add.patch @@ -2,7 +2,7 @@ From: J. R. Okajima Date: Tue May 6 22:36:39 2014 +0900 Subject: aufs3.14-20140512 Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ -Bug-Debian: http://bugs.debian.org/541828 +Bug-Debian: https://bugs.debian.org/541828 Patch generated by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-base.patch b/debian/patches/features/all/aufs3/aufs3-base.patch index 9d195f17b..23755b7b6 100644 --- a/debian/patches/features/all/aufs3/aufs3-base.patch +++ b/debian/patches/features/all/aufs3/aufs3-base.patch @@ -2,7 +2,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 base patch Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ -Bug-Debian: http://bugs.debian.org/541828 +Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-kbuild.patch b/debian/patches/features/all/aufs3/aufs3-kbuild.patch index 10b5a42ae..a11f91f26 100644 --- a/debian/patches/features/all/aufs3/aufs3-kbuild.patch +++ b/debian/patches/features/all/aufs3/aufs3-kbuild.patch @@ -2,7 +2,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 kbuild patch Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ -Bug-Debian: http://bugs.debian.org/541828 +Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-mmap.patch b/debian/patches/features/all/aufs3/aufs3-mmap.patch index bc7faf6cc..8a7c02261 100644 --- a/debian/patches/features/all/aufs3/aufs3-mmap.patch +++ b/debian/patches/features/all/aufs3/aufs3-mmap.patch @@ -2,7 +2,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 mmap patch Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ -Bug-Debian: http://bugs.debian.org/541828 +Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-standalone.patch b/debian/patches/features/all/aufs3/aufs3-standalone.patch index cd09da898..82474c4a6 100644 --- a/debian/patches/features/all/aufs3/aufs3-standalone.patch +++ b/debian/patches/features/all/aufs3/aufs3-standalone.patch @@ -2,7 +2,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 standalone patch Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ -Bug-Debian: http://bugs.debian.org/541828 +Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch From 8603f4cb9253d382b3df368ba41a2f1eb2648849 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 17 Jun 2014 16:04:58 +0000 Subject: [PATCH 04/14] Use https scheme in Bug-Debian field when updating aufs patches svn path=/dists/sid/linux/; revision=21458 --- debian/patches/features/all/aufs3/gen-patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/features/all/aufs3/gen-patch b/debian/patches/features/all/aufs3/gen-patch index b7e6c7a01..de50c5214 100755 --- a/debian/patches/features/all/aufs3/gen-patch +++ b/debian/patches/features/all/aufs3/gen-patch @@ -11,7 +11,7 @@ else echo >&2 "W: Cannot include a specific origin URL without an aufs git repo" origin_line='Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ref/master/branches/' fi -bug_line='Bug-Debian: http://bugs.debian.org/541828' +bug_line='Bug-Debian: https://bugs.debian.org/541828' for patch in aufs3-{base,kbuild,mmap,standalone}.patch; do { From 834cec74635a8110b7fbb0981a8acab3381b85de Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 17 Jun 2014 17:49:05 +0000 Subject: [PATCH 05/14] aufs: Update to aufs3.14-20140616 svn path=/dists/sid/linux/; revision=21459 --- debian/changelog | 8 + .../features/all/aufs3/aufs3-add.patch | 343 ++++++++++++++---- .../features/all/aufs3/aufs3-base.patch | 2 +- .../features/all/aufs3/aufs3-kbuild.patch | 2 +- .../features/all/aufs3/aufs3-mmap.patch | 30 +- .../features/all/aufs3/aufs3-standalone.patch | 2 +- 6 files changed, 308 insertions(+), 79 deletions(-) diff --git a/debian/changelog b/debian/changelog index d42bd42a8..7db35403c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,14 @@ linux (3.14.8-1) UNRELEASED; urgency=medium stage - iser-target: Fix multi network portal shutdown regression + [ Ben Hutchings ] + * aufs: Update to aufs3.14-20140616: + - tiny, no msg in spinlock regeion + - minor bugfix, correct error value in link(2) + - O_TMPFILE support + - bugfix, handling an error in opening a FIFO + - propagate aufs file references to new vmas created by remap_file_pages() + -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 linux (3.14.7-1) unstable; urgency=medium diff --git a/debian/patches/features/all/aufs3/aufs3-add.patch b/debian/patches/features/all/aufs3/aufs3-add.patch index 9a40e93b1..5b19e6361 100644 --- a/debian/patches/features/all/aufs3/aufs3-add.patch +++ b/debian/patches/features/all/aufs3/aufs3-add.patch @@ -1,7 +1,7 @@ From: J. R. Okajima -Date: Tue May 6 22:36:39 2014 +0900 -Subject: aufs3.14-20140512 -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ +Date: Sun Jun 15 16:10:12 2014 +0900 +Subject: aufs3.14-20140616 +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/ Bug-Debian: https://bugs.debian.org/541828 Patch generated by debian/patches/features/all/aufs3/gen-patch @@ -94,8 +94,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. --- a/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/filesystems/aufs/README 2014-05-13 19:05:05.248347320 +0100 -@@ -0,0 +1,345 @@ ++++ b/Documentation/filesystems/aufs/README 2014-06-17 18:23:40.779905015 +0100 +@@ -0,0 +1,368 @@ + +Aufs3 -- advanced multi layered unification filesystem version 3.x +http://aufs.sf.net @@ -118,10 +118,16 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +aufs2-standalone.git repository, aufs1 from CVS on SourceForge. + +Note: it becomes clear that "Aufs was rejected. Let's give it up." -+According to Christoph Hellwig, linux rejects all union-type filesystems -+but UnionMount. ++ According to Christoph Hellwig, linux rejects all union-type ++ filesystems but UnionMount. + + ++PS. Al Viro seems have a plan to merge aufs as well as overlayfs and ++ UnionMount, and he pointed out an issue around a directory mutex ++ lock and aufs addressed it. But it is still unsure whether aufs will ++ be merged (or any other union solution). ++ ++ + +1. Features +---------------------------------------- @@ -326,6 +332,23 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + then run "make install_ulib" too. And refer to the aufs manual in + detail. + ++There several other patches in aufs3-standalone.git. They are all ++optional. When you meet some problems, they will help you. ++- aufs3-loopback.patch ++ Supports a nested loopback mount in a branch-fs. This patch is ++ unnecessary until aufs produces a message like "you may want to try ++ another patch for loopback file". ++- vfs-ino.patch ++ Modifies a system global kernel internal function get_next_ino() in ++ order to stop assigning 0 for an inode-number. Not directly related to ++ aufs, but recommended generally. ++- tmpfs-idr.patch ++ Keeps the tmpfs inode number as the lowest value. Effective to reduce ++ the size of aufs XINO files for tmpfs branch. Also it prevents the ++ duplication of inode number, which is important for backup tools and ++ other utilities. When you find aufs XINO files for tmpfs branch ++ growing too much, try this patch. ++ + +4. Usage +---------------------------------------- @@ -3234,8 +3257,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +-include ${srctree}/${src}/conf_priv.mk --- a/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/cpup.c 2014-01-20 03:24:33.508760970 +0000 -@@ -0,0 +1,1277 @@ ++++ b/fs/aufs/cpup.c 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,1289 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -3299,8 +3322,11 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + + /* + * 0 can happen in revalidating. -+ * h_inode->i_mutex is not held, but it is harmless since once i_nlink -+ * reaches 0, it will never become positive. ++ * h_inode->i_mutex may not be held here, but it is harmless since once ++ * i_nlink reaches 0, it will never become positive except O_TMPFILE ++ * case. ++ * todo: O_TMPFILE+linkat(AT_SYMLINK_FOLLOW) bypassing aufs may cause ++ * the incorrect link count. + */ + set_nlink(inode, h_inode->i_nlink); + @@ -3650,7 +3676,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + int err, rerr; + loff_t l; + struct path h_path; -+ struct inode *h_src_inode; ++ struct inode *h_src_inode, *h_dst_inode; + + err = 0; + h_src_inode = au_h_iptr(cpg->dentry->d_inode, cpg->bsrc); @@ -3677,6 +3703,13 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (!err && rerr) + err = rerr; + } ++ if (!err && (h_src_inode->i_state & I_LINKABLE)) { ++ h_path.dentry = au_h_dptr(cpg->dentry, cpg->bdst); ++ h_dst_inode = h_path.dentry->d_inode; ++ spin_lock(&h_dst_inode->i_lock); ++ h_dst_inode->i_state |= I_LINKABLE; ++ spin_unlock(&h_dst_inode->i_lock); ++ } + +out: + return err; @@ -3799,7 +3832,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (!au_opt_test(mnt_flags, UDBA_NONE) + && !isdir + && au_opt_test(mnt_flags, XINO) -+ && h_inode->i_nlink == 1 ++ && (h_inode->i_nlink == 1 ++ || (h_inode->i_state & I_LINKABLE)) + /* todo: unnecessary? */ + /* && cpg->dentry->d_inode->i_nlink == 1 */ + && cpg->bdst < cpg->bsrc @@ -3991,7 +4025,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + goto out_rev; + + if (!isdir -+ && h_src->d_inode->i_nlink > 1 ++ && (h_src->d_inode->i_nlink > 1 ++ || h_src->d_inode->i_state & I_LINKABLE) + && plink) + au_plink_append(inode, cpg->bdst, h_dst); + @@ -5343,8 +5378,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return path_is_under(path + 0, path + 1); +} --- a/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dcsub.h 2014-01-20 03:24:33.508760970 +0000 -@@ -0,0 +1,98 @@ ++++ b/fs/aufs/dcsub.h 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,116 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -5417,6 +5452,18 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} + ++static inline int au_d_linkable(struct dentry *d) ++{ ++ int err; ++ struct inode *inode = d->d_inode; ++ err = au_d_hashed_positive(d); ++ if (err ++ && inode ++ && (inode->i_state & I_LINKABLE)) ++ err = 0; ++ return err; ++} ++ +static inline int au_d_alive(struct dentry *d) +{ + int err; @@ -5441,11 +5488,17 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} + ++static inline int au_qstreq(struct qstr *a, struct qstr *b) ++{ ++ return a->len == b->len ++ && !memcmp(a->name, b->name, a->len); ++} ++ +#endif /* __KERNEL__ */ +#endif /* __AUFS_DCSUB_H__ */ --- a/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/debug.c 2014-01-20 03:24:33.508760970 +0000 -@@ -0,0 +1,517 @@ ++++ b/fs/aufs/debug.c 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,518 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -5663,9 +5716,10 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + dinfo = au_di(dentry); + if (!dinfo) + return; -+ dpri("d-1: bstart %d, bend %d, bwh %d, bdiropq %d, gen %d\n", ++ dpri("d-1: bstart %d, bend %d, bwh %d, bdiropq %d, gen %d, tmp %d\n", + dinfo->di_bstart, dinfo->di_bend, -+ dinfo->di_bwh, dinfo->di_bdiropq, au_digen(dentry)); ++ dinfo->di_bwh, dinfo->di_bdiropq, au_digen(dentry), ++ dinfo->di_tmpfile); + if (dinfo->di_bstart < 0) + return; + hdp = dinfo->di_hdentry; @@ -6214,8 +6268,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ --- a/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.c 2014-03-13 00:59:36.876223577 +0000 -@@ -0,0 +1,1081 @@ ++++ b/fs/aufs/dentry.c 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,1085 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -6927,7 +6981,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (!ebrange) + ebrange = au_do_refresh_hdentry(dentry, parent); + -+ if (d_unhashed(dentry) || ebrange) { ++ if (d_unhashed(dentry) || ebrange /* || dinfo->di_tmpfile */) { + AuDebugOn(au_dbstart(dentry) < 0 && au_dbend(dentry) >= 0); + if (inode) + err = au_refresh_hinode_self(inode); @@ -7013,7 +7067,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + int err; + umode_t mode, h_mode; + aufs_bindex_t bindex, btail, bstart, ibs, ibe; -+ unsigned char plus, unhashed, is_root, h_plus, h_nfs; ++ unsigned char plus, unhashed, is_root, h_plus, h_nfs, tmpfile; + struct inode *h_inode, *h_cached_inode; + struct dentry *h_dentry; + struct qstr *name, *h_name; @@ -7026,6 +7080,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + unhashed = !!d_unhashed(dentry); + is_root = !!IS_ROOT(dentry); + name = &dentry->d_name; ++ tmpfile = au_di(dentry)->di_tmpfile; + + /* + * Theoretically, REVAL test should be unnecessary in case of @@ -7059,18 +7114,20 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + && !is_root + && ((!h_nfs + && (unhashed != !!d_unhashed(h_dentry) -+ || name->len != h_name->len -+ || memcmp(name->name, h_name->name, -+ name->len))) ++ || (!tmpfile ++ && !au_qstreq(name, h_name)) ++ )) + || (h_nfs + && !(flags & LOOKUP_OPEN) + && (h_dentry->d_flags + & DCACHE_NFSFS_RENAMED))) + )) { -+ AuDbg("unhash 0x%x 0x%x, %pd %pd\n", -+ unhashed, d_unhashed(h_dentry), -+ dentry, h_dentry); ++ int h_unhashed; ++ ++ h_unhashed = d_unhashed(h_dentry); + spin_unlock(&h_dentry->d_lock); ++ AuDbg("unhash 0x%x 0x%x, %pd %pd\n", ++ unhashed, h_unhashed, dentry, h_dentry); + goto err; + } + spin_unlock(&h_dentry->d_lock); @@ -7100,7 +7157,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + h_cached_inode = au_h_iptr(inode, bindex); + + if (!h_nfs) { -+ if (unlikely(plus != h_plus)) ++ if (unlikely(plus != h_plus && !tmpfile)) + goto err; + } else { + if (unlikely(!(h_dentry->d_flags & DCACHE_NFSFS_RENAMED) @@ -7247,6 +7304,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + err = -EINVAL; + if (!(flags & LOOKUP_OPEN) + && inode ++ && !(inode->i_state && I_LINKABLE) + && (IS_DEADDIR(inode) || !inode->i_nlink)) + goto out_inval; + @@ -7298,8 +7356,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .d_release = aufs_d_release +}; --- a/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dentry.h 2014-01-20 03:24:33.508760970 +0000 -@@ -0,0 +1,233 @@ ++++ b/fs/aufs/dentry.h 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,234 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -7339,6 +7397,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + + struct au_rwsem di_rwsem; + aufs_bindex_t di_bstart, di_bend, di_bwh, di_bdiropq; ++ unsigned char di_tmpfile; /* to allow the different name */ + struct au_hdentry *di_hdentry; +} ____cacheline_aligned_in_smp; + @@ -7534,8 +7593,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_DENTRY_H__ */ --- a/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/dinfo.c 2014-01-20 03:24:33.512760970 +0000 -@@ -0,0 +1,542 @@ ++++ b/fs/aufs/dinfo.c 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,544 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -7587,6 +7646,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + dinfo->di_bend = -1; + dinfo->di_bwh = -1; + dinfo->di_bdiropq = -1; ++ dinfo->di_tmpfile = 0; + for (i = 0; i < nbr; i++) + dinfo->di_hdentry[i].hd_id = -1; + goto out; @@ -7861,7 +7921,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +/* + * extended version of au_h_dptr(). -+ * returns a hashed and positive h_dentry in bindex, NULL, or error. ++ * returns a hashed and positive (or linkable) h_dentry in bindex, NULL, or ++ * error. + */ +struct dentry *au_h_d_alias(struct dentry *dentry, aufs_bindex_t bindex) +{ @@ -7875,7 +7936,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (au_dbstart(dentry) <= bindex + && bindex <= au_dbend(dentry)) + h_dentry = au_h_dptr(dentry, bindex); -+ if (h_dentry && !au_d_hashed_positive(h_dentry)) { ++ if (h_dentry && !au_d_linkable(h_dentry)) { + dget(h_dentry); + goto out; /* success */ + } @@ -7886,7 +7947,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + h_dentry = d_find_alias(h_inode); + if (h_dentry) { + if (!IS_ERR(h_dentry)) { -+ if (!au_d_hashed_positive(h_dentry)) ++ if (!au_d_linkable(h_dentry)) + goto out; /* success */ + dput(h_dentry); + } else @@ -10154,8 +10215,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + atomic_set(&sbinfo->si_xigen_next, u); +} --- a/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/f_op.c 2014-05-13 19:05:05.252347320 +0100 -@@ -0,0 +1,725 @@ ++++ b/fs/aufs/f_op.c 2014-06-17 18:23:40.783905015 +0100 +@@ -0,0 +1,733 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -10190,6 +10251,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct file *h_file; + struct dentry *dentry; + struct au_finfo *finfo; ++ struct inode *h_inode; + + FiMustWriteLock(file); + @@ -10203,6 +10265,13 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (IS_ERR(h_file)) + err = PTR_ERR(h_file); + else { ++ if ((flags & __O_TMPFILE) ++ && !(flags & O_EXCL)) { ++ h_inode = file_inode(h_file); ++ spin_lock(&h_inode->i_lock); ++ h_inode->i_state |= I_LINKABLE; ++ spin_unlock(&h_inode->i_lock); ++ } + au_set_fbstart(file, bindex); + au_set_h_fptr(file, bindex, h_file); + au_update_figen(file); @@ -10882,8 +10951,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif +}; --- a/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/f_op_sp.c 2014-01-20 03:24:33.512760970 +0000 -@@ -0,0 +1,382 @@ ++++ b/fs/aufs/f_op_sp.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,386 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -11177,7 +11246,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct super_block *sb; + struct file *h_file; + struct inode *h_inode; ++ struct au_finfo *finfo; + ++ finfo = au_fi(file); + err = au_fi_sp_add(file); + if (unlikely(err)) + goto out; @@ -11210,10 +11281,12 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + if (!err) { + au_init_fop_sp(file); + goto out; /* success */ -+ } ++ } else ++ au_set_h_fptr(file, au_fbstart(file), NULL); + +out_del: + au_fi_sp_del(file); ++ file->private_data = finfo; +out: + return err; +} @@ -11267,8 +11340,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return ret; +} --- a/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/file.c 2014-05-13 19:05:02.880347266 +0100 -@@ -0,0 +1,724 @@ ++++ b/fs/aufs/file.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,725 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -11530,7 +11603,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + err = au_reopen_wh(file, bcpup, hi_wh); + + if (!err -+ && inode->i_nlink > 1 ++ && (inode->i_nlink > 1 ++ || (inode->i_state & I_LINKABLE)) + && au_opt_test(au_mntflags(cpg.dentry->d_sb), PLINK)) + au_plink_append(inode, bcpup, au_h_dptr(cpg.dentry, bcpup)); + @@ -13283,8 +13357,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + } +} --- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/hnotify.c 2014-05-13 19:05:02.880347266 +0100 -@@ -0,0 +1,710 @@ ++++ b/fs/aufs/hnotify.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,711 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -13613,7 +13687,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + && a->inode + && a->h_inode) { + mutex_lock_nested(&a->h_inode->i_mutex, AuLsc_I_CHILD); -+ if (!a->h_inode->i_nlink) ++ if (!a->h_inode->i_nlink ++ && !(a->h_inode->i_state & I_LINKABLE)) + hn_xino(a->inode, a->h_inode); /* ignore this error */ + mutex_unlock(&a->h_inode->i_mutex); + } @@ -13996,8 +14071,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + au_hn_destroy_cache(); +} --- a/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op.c 2014-03-13 00:59:36.876223577 +0000 -@@ -0,0 +1,1127 @@ ++++ b/fs/aufs/i_op.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,1132 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -14266,7 +14341,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + else + BUG(); + } -+ if (!err && add_entry) { ++ if (!err && add_entry && !au_ftest_wrdir(add_entry, TMPFILE)) { + h_parent = au_h_dptr(parent, bcpup); + h_dir = h_parent->d_inode; + mutex_lock_nested(&h_dir->i_mutex, AuLsc_I_PARENT); @@ -14305,7 +14380,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + aufs_bindex_t bcpup, bstart, src_bstart; + const unsigned char add_entry + = au_ftest_wrdir(args->flags, ADD_ENTRY) -+ | au_ftest_wrdir(args->flags, TMP_WHENTRY); ++ | au_ftest_wrdir(args->flags, TMP_WHENTRY) ++ | au_ftest_wrdir(args->flags, TMPFILE); + struct super_block *sb; + struct dentry *parent; + struct au_sbinfo *sbinfo; @@ -14361,7 +14437,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + au_set_dbstart(dentry, bcpup); + au_set_dbend(dentry, bcpup); + } -+ AuDebugOn(add_entry && !au_h_dptr(dentry, bcpup)); ++ AuDebugOn(add_entry ++ && !au_ftest_wrdir(args->flags, TMPFILE) ++ && !au_h_dptr(dentry, bcpup)); + } + +out: @@ -15114,8 +15192,10 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .setattr = aufs_setattr, + .getattr = aufs_getattr, + -+ .update_time = aufs_update_time ++ .update_time = aufs_update_time, + /* no support for atomic_open() */ ++ ++ .tmpfile = aufs_tmpfile +}; + +struct inode_operations aufs_iop = { @@ -15126,8 +15206,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + .update_time = aufs_update_time +}; --- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/i_op_add.c 2014-01-20 03:24:33.512760970 +0000 -@@ -0,0 +1,762 @@ ++++ b/fs/aufs/i_op_add.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,881 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -15486,6 +15566,121 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return add_simple(dir, dentry, &arg); +} + ++int aufs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) ++{ ++ int err; ++ aufs_bindex_t bindex; ++ struct super_block *sb; ++ struct dentry *parent, *h_parent, *h_dentry; ++ struct inode *h_dir, *inode; ++ struct vfsmount *h_mnt; ++ struct au_wr_dir_args wr_dir_args = { ++ .force_btgt = -1, ++ .flags = AuWrDir_TMPFILE ++ }; ++ ++ /* copy-up may happen */ ++ mutex_lock(&dir->i_mutex); ++ ++ sb = dir->i_sb; ++ err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM); ++ if (unlikely(err)) ++ goto out; ++ ++ err = au_di_init(dentry); ++ if (unlikely(err)) ++ goto out_si; ++ ++ err = -EBUSY; ++ parent = d_find_any_alias(dir); ++ AuDebugOn(!parent); ++ di_write_lock_parent(parent); ++ if (unlikely(parent->d_inode != dir)) ++ goto out_parent; ++ ++ err = au_digen_test(parent, au_sigen(sb)); ++ if (unlikely(err)) ++ goto out_parent; ++ ++ bindex = au_dbstart(parent); ++ au_set_dbstart(dentry, bindex); ++ au_set_dbend(dentry, bindex); ++ err = au_wr_dir(dentry, /*src_dentry*/NULL, &wr_dir_args); ++ bindex = err; ++ if (unlikely(err < 0)) ++ goto out_parent; ++ ++ err = -EOPNOTSUPP; ++ h_dir = au_h_iptr(dir, bindex); ++ if (unlikely(!h_dir->i_op->tmpfile)) ++ goto out_parent; ++ ++ h_mnt = au_sbr_mnt(sb, bindex); ++ err = vfsub_mnt_want_write(h_mnt); ++ if (unlikely(err)) ++ goto out_parent; ++ ++ h_parent = au_h_dptr(parent, bindex); ++ err = inode_permission(h_parent->d_inode, MAY_WRITE | MAY_EXEC); ++ if (unlikely(err)) ++ goto out_mnt; ++ ++ err = -ENOMEM; ++ h_dentry = d_alloc(h_parent, &dentry->d_name); ++ if (unlikely(!h_dentry)) ++ goto out_mnt; ++ ++ err = h_dir->i_op->tmpfile(h_dir, h_dentry, mode); ++ if (unlikely(err)) ++ goto out_dentry; ++ ++ au_set_dbstart(dentry, bindex); ++ au_set_dbend(dentry, bindex); ++ au_set_h_dptr(dentry, bindex, dget(h_dentry)); ++ inode = au_new_inode(dentry, /*must_new*/1); ++ if (IS_ERR(inode)) { ++ err = PTR_ERR(inode); ++ au_set_h_dptr(dentry, bindex, NULL); ++ au_set_dbstart(dentry, -1); ++ au_set_dbend(dentry, -1); ++ } else { ++ if (!inode->i_nlink) ++ set_nlink(inode, 1); ++ d_tmpfile(dentry, inode); ++ au_di(dentry)->di_tmpfile = 1; ++ ++ /* update without i_mutex */ ++ if (au_ibstart(dir) == au_dbstart(dentry)) ++ au_cpup_attr_timesizes(dir); ++ } ++ ++out_dentry: ++ dput(h_dentry); ++out_mnt: ++ vfsub_mnt_drop_write(h_mnt); ++out_parent: ++ di_write_unlock(parent); ++ dput(parent); ++ di_write_unlock(dentry); ++ if (!err) ++#if 0 ++ /* verbose coding for lock class name */ ++ au_rw_class(&au_di(dentry)->di_rwsem, ++ au_lc_key + AuLcNonDir_DIINFO); ++#else ++ ; ++#endif ++ else { ++ au_di_fin(dentry); ++ dentry->d_fsdata = NULL; ++ } ++out_si: ++ si_read_unlock(sb); ++out: ++ mutex_unlock(&dir->i_mutex); ++ return err; ++} ++ +/* ---------------------------------------------------------------------- */ + +struct au_link_args { @@ -15649,7 +15844,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + AuLock_NOPLM | AuLock_GEN); + if (unlikely(err)) + goto out_kfree; -+ err = au_d_hashed_positive(src_dentry); ++ err = au_d_linkable(src_dentry); + if (unlikely(err)) + goto out_unlock; + err = au_d_may_add(dentry); @@ -15674,12 +15869,16 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + a->h_path.mnt = au_sbr_mnt(sb, a->bdst); + a->bsrc = au_ibstart(inode); + h_src_dentry = au_h_d_alias(src_dentry, a->bsrc); ++ if (!h_src_dentry && au_di(src_dentry)->di_tmpfile) ++ h_src_dentry = dget(au_hi_wh(inode, a->bsrc)); + if (!h_src_dentry) { + a->bsrc = au_dbstart(src_dentry); + h_src_dentry = au_h_d_alias(src_dentry, a->bsrc); + AuDebugOn(!h_src_dentry); -+ } else if (IS_ERR(h_src_dentry)) ++ } else if (IS_ERR(h_src_dentry)) { ++ err = PTR_ERR(h_src_dentry); + goto out_parent; ++ } + + if (au_opt_test(au_mntflags(sb), PLINK)) { + if (a->bdst < a->bsrc @@ -17435,8 +17634,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/iinfo.c 2014-01-20 03:24:33.512760970 +0000 -@@ -0,0 +1,275 @@ ++++ b/fs/aufs/iinfo.c 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,277 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -17584,7 +17783,9 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + struct inode *h_i; + + h_i = iinfo->ii_hinode[0 + bindex].hi_inode; -+ if (h_i && !h_i->i_nlink) ++ if (h_i ++ && !h_i->i_nlink ++ && !(h_i->i_state & I_LINKABLE)) + au_set_h_iptr(inode, bindex, NULL, 0); + } + } @@ -18207,8 +18408,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return au_test_h_perm(h_inode, mask); +} --- a/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/inode.h 2014-01-20 03:24:33.516760970 +0000 -@@ -0,0 +1,599 @@ ++++ b/fs/aufs/inode.h 2014-06-17 18:23:40.787905015 +0100 +@@ -0,0 +1,601 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -18367,6 +18568,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#define AuWrDir_ADD_ENTRY 1 +#define AuWrDir_TMP_WHENTRY (1 << 1) +#define AuWrDir_ISDIR (1 << 2) ++#define AuWrDir_TMPFILE (1 << 3) +#define au_ftest_wrdir(flags, name) ((flags) & AuWrDir_##name) +#define au_fset_wrdir(flags, name) \ + do { (flags) |= AuWrDir_##name; } while (0) @@ -18397,6 +18599,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +int aufs_symlink(struct inode *dir, struct dentry *dentry, const char *symname); +int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode, + bool want_excl); ++int aufs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode); +int aufs_link(struct dentry *src_dentry, struct inode *dir, + struct dentry *dentry); +int aufs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); @@ -30365,8 +30568,8 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ --- a/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/fs/aufs/xino.c 2014-01-20 03:24:33.520760970 +0000 -@@ -0,0 +1,1314 @@ ++++ b/fs/aufs/xino.c 2014-06-17 18:23:40.791905016 +0100 +@@ -0,0 +1,1312 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima + * @@ -31569,9 +31772,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + cur_parent = dget_parent(cur_xino->f_dentry); + cur_name = &cur_xino->f_dentry->d_name; + skip = (cur_parent == parent -+ && dname->len == cur_name->len -+ && !memcmp(dname->name, cur_name->name, -+ dname->len)); ++ && au_qstreq(dname, cur_name)); + dput(cur_parent); + } + if (skip) @@ -31682,7 +31883,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + return err; +} --- a/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/include/uapi/linux/aufs_type.h 2014-05-13 19:05:05.252347320 +0100 ++++ b/include/uapi/linux/aufs_type.h 2014-06-17 18:23:40.791905016 +0100 @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2005-2014 Junjiro R. Okajima @@ -31725,7 +31926,7 @@ Patch generated by debian/patches/features/all/aufs3/gen-patch + +#include + -+#define AUFS_VERSION "3.14-20140512" ++#define AUFS_VERSION "3.14-20140616" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') diff --git a/debian/patches/features/all/aufs3/aufs3-base.patch b/debian/patches/features/all/aufs3/aufs3-base.patch index 23755b7b6..c379c610d 100644 --- a/debian/patches/features/all/aufs3/aufs3-base.patch +++ b/debian/patches/features/all/aufs3/aufs3-base.patch @@ -1,7 +1,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 base patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/ Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-kbuild.patch b/debian/patches/features/all/aufs3/aufs3-kbuild.patch index a11f91f26..f373d159a 100644 --- a/debian/patches/features/all/aufs3/aufs3-kbuild.patch +++ b/debian/patches/features/all/aufs3/aufs3-kbuild.patch @@ -1,7 +1,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 kbuild patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/ Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch diff --git a/debian/patches/features/all/aufs3/aufs3-mmap.patch b/debian/patches/features/all/aufs3/aufs3-mmap.patch index 8a7c02261..8829d895a 100644 --- a/debian/patches/features/all/aufs3/aufs3-mmap.patch +++ b/debian/patches/features/all/aufs3/aufs3-mmap.patch @@ -1,7 +1,7 @@ From: J. R. Okajima -Date: Tue Apr 1 11:01:55 2014 +0900 +Date: Sun Jun 15 16:10:12 2014 +0900 Subject: aufs3.14 mmap patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/ Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch @@ -223,19 +223,39 @@ index 7a13f6a..f1805df 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/fremap.c b/mm/fremap.c -index 34feba6..d857364 100644 +index 34feba6..8d6c451 100644 --- a/mm/fremap.c +++ b/mm/fremap.c -@@ -227,7 +227,9 @@ get_write_lock: +@@ -223,16 +223,27 @@ get_write_lock: + */ + if (mapping_cap_account_dirty(mapping)) { + unsigned long addr; +- struct file *file = get_file(vma->vm_file); ++ struct file *file = vma->vm_file, ++ *prfile = vma->vm_prfile; ++ /* mmap_region may free vma; grab the info now */ vm_flags = vma->vm_flags; + vma_get_file(vma); addr = mmap_region(file, start, size, vm_flags, pgoff); +- fput(file); + vma_fput(vma); - fput(file); if (IS_ERR_VALUE(addr)) { err = addr; + } else { + BUG_ON(addr != start); ++ if (prfile) { ++ struct vm_area_struct *new_vma; ++ new_vma = find_vma(mm, addr); ++ if (!new_vma->vm_prfile) ++ new_vma->vm_prfile = prfile; ++ if (new_vma != vma) ++ get_file(prfile); ++ } + err = 0; + } + goto out_freed; diff --git a/mm/madvise.c b/mm/madvise.c index 539eeb9..5e700b1 100644 --- a/mm/madvise.c diff --git a/debian/patches/features/all/aufs3/aufs3-standalone.patch b/debian/patches/features/all/aufs3/aufs3-standalone.patch index 82474c4a6..bdda41487 100644 --- a/debian/patches/features/all/aufs3/aufs3-standalone.patch +++ b/debian/patches/features/all/aufs3/aufs3-standalone.patch @@ -1,7 +1,7 @@ From: J. R. Okajima Date: Tue Apr 1 11:01:55 2014 +0900 Subject: aufs3.14 standalone patch -Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/16de14a1266dc814561c755485f0b79efc6b25b5/tree/ +Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/d201c504500b2091b88aa648e5163589e29b6822/tree/ Bug-Debian: https://bugs.debian.org/541828 Patch headers added by debian/patches/features/all/aufs3/gen-patch From 2c6566ffb861ceb55d01888ba6da20522f1935c6 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 25 Jun 2014 21:17:52 +0000 Subject: [PATCH 06/14] [arm64] Enable COMPAT to support 32-bit binaries. svn path=/dists/sid/linux/; revision=21468 --- debian/changelog | 3 +++ debian/config/arm64/config | 1 + 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7db35403c..b18ca0c1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ linux (3.14.8-1) UNRELEASED; urgency=medium - bugfix, handling an error in opening a FIFO - propagate aufs file references to new vmas created by remap_file_pages() + [ Aurelien Jarno ] + * [arm64] Enable COMPAT to support 32-bit binaries. + -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 linux (3.14.7-1) unstable; urgency=medium diff --git a/debian/config/arm64/config b/debian/config/arm64/config index 94d894b7f..b2e2a53a8 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -3,6 +3,7 @@ ## CONFIG_ARCH_VEXPRESS=y CONFIG_ARCH_XGENE=y +CONFIG_COMPAT=y CONFIG_SMP=y CONFIG_XEN=y From b3f5537a4188e03187c9abcd024e03e5a1784a8b Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Thu, 26 Jun 2014 22:34:03 +0000 Subject: [PATCH 07/14] [mipsel] Enable initramfs for all flavours, but keep the disk related drivers built-in for now. svn path=/dists/sid/linux/; revision=21469 --- debian/changelog | 2 ++ debian/config/mipsel/defines | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b18ca0c1a..57172ebe5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ linux (3.14.8-1) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [arm64] Enable COMPAT to support 32-bit binaries. + * [mipsel] Enable initramfs for all flavours, but keep the disk related + drivers built-in for now. -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines index d3123dbac..d0ef55c9a 100644 --- a/debian/config/mipsel/defines +++ b/debian/config/mipsel/defines @@ -12,7 +12,7 @@ kernel-arch: mips image-file: vmlinux [image] -initramfs: false +initramfs: true install-stem: vmlinux [sb1-bcm91250a_description] From 4b87a520f966569d469ca9ec115adb1f29281891 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 27 Jun 2014 07:51:13 +0000 Subject: [PATCH 08/14] Also enable initramfs for all mips flavours svn path=/dists/sid/linux/; revision=21470 --- debian/changelog | 4 ++-- debian/config/mips/defines | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 57172ebe5..bb15d721b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,8 @@ linux (3.14.8-1) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [arm64] Enable COMPAT to support 32-bit binaries. - * [mipsel] Enable initramfs for all flavours, but keep the disk related - drivers built-in for now. + * [mips,mipsel] Enable initramfs for all flavours, but keep the disk + related drivers built-in for now. -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 diff --git a/debian/config/mips/defines b/debian/config/mips/defines index 3c41e3027..4542ab839 100644 --- a/debian/config/mips/defines +++ b/debian/config/mips/defines @@ -13,7 +13,7 @@ kernel-arch: mips image-file: vmlinux [image] -initramfs: false +initramfs: true install-stem: vmlinux [r4k-ip22_description] From bcff92529ee17c13db988636be5587404f91554f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 27 Jun 2014 15:38:07 +0000 Subject: [PATCH 09/14] linux-image: Make initramfs support unconditional svn path=/dists/sid/linux/; revision=21471 --- debian/bin/gencontrol.py | 27 +++++++++++------------- debian/changelog | 1 + debian/config/mips/defines | 1 - debian/config/mipsel/defines | 1 - debian/templates/image.plain.postinst.in | 15 +++++-------- debian/templates/image.plain.postrm.in | 5 ++--- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 83cea11ef..6d0e0fdc2 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -32,7 +32,6 @@ class Gencontrol(Base): 'image': { 'bootloaders': config.SchemaItemList(), 'configs': config.SchemaItemList(), - 'initramfs': config.SchemaItemBoolean(), 'initramfs-generators': config.SchemaItemList(), }, 'relations': { @@ -245,7 +244,6 @@ class Gencontrol(Base): override_localversion = config_image.get('override-localversion', None) if override_localversion is not None: vars['localversion-image'] = vars['localversion_headers'] + '-' + override_localversion - vars['initramfs'] = 'YES' if config_image.get('initramfs', True) else '' vars['image-stem'] = config_image.get('install-stem') self._setup_makeflags(self.flavour_makeflags_base, makeflags, config_base) @@ -278,19 +276,18 @@ class Gencontrol(Base): for field in 'Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts', 'Breaks': image_fields[field] = PackageRelation(config_entry_image.get(field.lower(), None), override_arches=(arch,)) - if config_entry_image.get('initramfs', True): - generators = config_entry_image['initramfs-generators'] - l = PackageRelationGroup() - for i in generators: - i = config_entry_relations.get(i, i) - l.append(i) - a = PackageRelationEntry(i) - if a.operator is not None: - a.operator = -a.operator - image_fields['Breaks'].append(PackageRelationGroup([a])) - for item in l: - item.arches = [arch] - image_fields['Depends'].append(l) + generators = config_entry_image['initramfs-generators'] + l = PackageRelationGroup() + for i in generators: + i = config_entry_relations.get(i, i) + l.append(i) + a = PackageRelationEntry(i) + if a.operator is not None: + a.operator = -a.operator + image_fields['Breaks'].append(PackageRelationGroup([a])) + for item in l: + item.arches = [arch] + image_fields['Depends'].append(l) bootloaders = config_entry_image.get('bootloaders') if bootloaders: diff --git a/debian/changelog b/debian/changelog index bb15d721b..8402a13f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ linux (3.14.8-1) UNRELEASED; urgency=medium - O_TMPFILE support - bugfix, handling an error in opening a FIFO - propagate aufs file references to new vmas created by remap_file_pages() + * linux-image: Make initramfs support unconditional [ Aurelien Jarno ] * [arm64] Enable COMPAT to support 32-bit binaries. diff --git a/debian/config/mips/defines b/debian/config/mips/defines index 4542ab839..cf975d2c4 100644 --- a/debian/config/mips/defines +++ b/debian/config/mips/defines @@ -13,7 +13,6 @@ kernel-arch: mips image-file: vmlinux [image] -initramfs: true install-stem: vmlinux [r4k-ip22_description] diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines index d0ef55c9a..50ba071dc 100644 --- a/debian/config/mipsel/defines +++ b/debian/config/mipsel/defines @@ -12,7 +12,6 @@ kernel-arch: mips image-file: vmlinux [image] -initramfs: true install-stem: vmlinux [sb1-bcm91250a_description] diff --git a/debian/templates/image.plain.postinst.in b/debian/templates/image.plain.postinst.in index fe8ba9b5b..82c92fd68 100755 --- a/debian/templates/image.plain.postinst.in +++ b/debian/templates/image.plain.postinst.in @@ -16,7 +16,6 @@ my $link_in_boot = ""; my $no_symlink = ""; my $do_symlink = "Yes"; # target machine defined my $kimage = "@image-stem@"; -my $initrd = "@initramfs@"; my $mkimage = ""; # command to generate the initrd image my $use_hard_links = ''; # hardlinks do not work across fs boundaries my $postinst_hook = ''; #Normally we do not @@ -532,9 +531,7 @@ if (-d "$modules_base/$version") { # Only change the symlinks if we are not being upgraded if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m//o) { image_magic($kimage, $image_dest); - if ($initrd) { - image_magic("initrd.img", $image_dest); - } + image_magic("initrd.img", $image_dest); } else { lstat($kimage); @@ -542,12 +539,10 @@ else { handle_missing_link($kimage, $image_dest, "$kimage-$version", $realimageloc); } - if ($initrd) { - lstat("initrd.img"); - if (! -e _) { - handle_missing_link("initrd.img", $image_dest, "initrd.img-$version", - $realimageloc); - } + lstat("initrd.img"); + if (! -e _) { + handle_missing_link("initrd.img", $image_dest, "initrd.img-$version", + $realimageloc); } } diff --git a/debian/templates/image.plain.postrm.in b/debian/templates/image.plain.postrm.in index 016ba5489..3491dfab1 100755 --- a/debian/templates/image.plain.postrm.in +++ b/debian/templates/image.plain.postrm.in @@ -22,7 +22,6 @@ $|=1; my $version = "@abiname@@localversion@"; my $link_in_boot = ""; my $kimage = "@image-stem@"; -my $initrd = "@initramfs@"; my $postrm_hook = ''; #Normally we do not my $package_name = "linux-image-$version"; @@ -230,8 +229,8 @@ if ($ARGV[0] !~ /upgrade/) { # check and remove damaged and dangling symlinks image_magic($kimage, $image_dest); image_magic($kimage . ".old", $image_dest); - image_magic("initrd.img", $image_dest) if $initrd; - image_magic("initrd.img.old", $image_dest) if $initrd; + image_magic("initrd.img", $image_dest); + image_magic("initrd.img.old", $image_dest); } From 7948accb8e8769febbaecc3a593f98713fe21ed4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 29 Jun 2014 02:19:32 +0000 Subject: [PATCH 10/14] Update to 3.14.9 Deal with the various ABI changes: * Avoid the change in ALSA * We can no longer avoid a change in sockdiag, and it doesn't seem to have any OOT users so ignore it * team driver probably doesn't have OOT users, so ignore the change svn path=/dists/sid/linux/; revision=21476 --- debian/changelog | 41 ++++++++++++++++++- debian/config/defines | 4 ++ ...oid-abi-change-for-cve-2014-4652-fix.patch | 33 +++++++++++++++ .../sockdiag-avoid-abi-change-in-3.14.5.patch | 41 ------------------- debian/patches/series | 2 +- 5 files changed, 78 insertions(+), 43 deletions(-) create mode 100644 debian/patches/debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch delete mode 100644 debian/patches/debian/sockdiag-avoid-abi-change-in-3.14.5.patch diff --git a/debian/changelog b/debian/changelog index 8402a13f0..1a3153c91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,49 @@ -linux (3.14.8-1) UNRELEASED; urgency=medium +linux (3.14.9-1) UNRELEASED; urgency=medium * New upstream stable update: https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.14.8 - Target/iscsi,iser: Avoid accepting transport connections during stop stage - iser-target: Fix multi network portal shutdown regression + https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.14.9 + - target: Fix NULL pointer dereference for XCOPY in target_put_sess_cmd + (regression in 3.14.6) + - iscsi-target: Reject mutual authentication with reflected CHAP_C + - ima: audit log files opened with O_DIRECT flag + - ima: introduce ima_kernel_read() (regression in 3.10) + - evm: prohibit userspace writing 'security.evm' HMAC value + - net: Use netlink_ns_capable to verify the permisions of netlink messages + (CVE-2014-0181) + - netlink: Only check file credentials for implicit destinations + - qlcnic: info leak in qlcnic_dcb_peer_app_info() + - ipv6: Fix regression caused by efe4208 in udp_v6_mcast_next() + (regression in 3.13) + - netlink: rate-limit leftover bytes warning and print process name + - bridge: Prevent insertion of FDB entry with disallowed vlan + - net: tunnels - enable module autoloading + - [sparc] net: filter: fix typo in sparc BPF JIT + - sfc: PIO:Restrict to 64bit arch and use 64-bit writes. + (regression in 3.13) + - ipv4: fix a race in ip4_datagram_release_cb() + - sctp: Fix sk_ack_backlog wrap-around problem + - udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup + (regression in 3.13) + - USB: cdc-acm: Fix various bugs in power management + - USB: cdc-acm: fix I/O after failed open + - [x86] hv: use correct order when freeing monitor_pages + - ASoC: dapm: Make sure to always update the DAPM graph in _put_volsw() + (regression in 3.12) + - lzo: properly check for overruns (CVE-2014-4608) + - lz4: ensure length does not wrap (CVE-2014-4608) + - ALSA: compress: Cancel the optimization of compiler and fix the size of + struct for all platform. + - ALSA: control: Protect user controls against concurrent access + (CVE-2014-4652) + - ALSA: control: Fix replacing user controls (CVE-2014-4654, CVE-2014-4655) + - ALSA: control: Don't access controls outside of protected regions + (CVE-2014-4653) + - ALSA: control: Make sure that id->index does not overflow; + Handle numid overflow (CVE-2014-4656) [ Ben Hutchings ] * aufs: Update to aufs3.14-20140616: diff --git a/debian/config/defines b/debian/config/defines index 653fb8a91..6ca079f67 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -18,6 +18,10 @@ ignore-changes: i8042_* ps2_* serio_* +# Private to the team modules + module:drivers/net/team/team +# Apparently not used OOT + sock_diag_put_filterinfo [base] arches: diff --git a/debian/patches/debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch b/debian/patches/debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch new file mode 100644 index 000000000..8543612ac --- /dev/null +++ b/debian/patches/debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch @@ -0,0 +1,33 @@ +From: Ben Hutchings +Date: Sun, 29 Jun 2014 02:05:57 +0100 +Subject: ALSA: Avoid ABI change for CVE-2014-4652 fix +Forwarded: not-needed + +Move the new member snd_card::user_ctl_lock to the end of the structure +and hide it from genksyms. struct snd_card is always allocated by +snd_card_create() in sound/core/init.c and user_ctl_lock is used in +sound/core/control.c, and these are part of the same module so they +are sure to be consistent. + +--- a/include/sound/core.h ++++ b/include/sound/core.h +@@ -121,8 +121,6 @@ struct snd_card { + int user_ctl_count; /* count of all user controls */ + struct list_head controls; /* all controls for this card */ + struct list_head ctl_files; /* active control files */ +- struct mutex user_ctl_lock; /* protects user controls against +- concurrent access */ + + struct snd_info_entry *proc_root; /* root for soundcard specific files */ + struct snd_info_entry *proc_id; /* the card id */ +@@ -149,6 +147,10 @@ struct snd_card { + struct snd_mixer_oss *mixer_oss; + int mixer_oss_change_count; + #endif ++#ifndef __GENKSYMS__ ++ struct mutex user_ctl_lock; /* protects user controls against ++ concurrent access */ ++#endif + }; + + #ifdef CONFIG_PM diff --git a/debian/patches/debian/sockdiag-avoid-abi-change-in-3.14.5.patch b/debian/patches/debian/sockdiag-avoid-abi-change-in-3.14.5.patch deleted file mode 100644 index 812e8e619..000000000 --- a/debian/patches/debian/sockdiag-avoid-abi-change-in-3.14.5.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Ben Hutchings -Date: Sun, 01 Jun 2014 20:38:59 +0100 -Subject: sockdiag: Avoid ABI change in 3.14.5 -Forwarded: not-needed - -Add the user_namespace parameter back to sock_diag_put_filterinfo(), -but don't use it there. - ---- a/include/linux/sock_diag.h -+++ b/include/linux/sock_diag.h -@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u - void sock_diag_save_cookie(void *sk, __u32 *cookie); - - int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); --int sock_diag_put_filterinfo(struct sock *sk, -+int sock_diag_put_filterinfo(struct user_namespace *user_ns, struct sock *sk, - struct sk_buff *skb, int attrtype); - - #endif ---- a/net/core/sock_diag.c -+++ b/net/core/sock_diag.c -@@ -49,7 +49,7 @@ int sock_diag_put_meminfo(struct sock *s - } - EXPORT_SYMBOL_GPL(sock_diag_put_meminfo); - --int sock_diag_put_filterinfo(struct sock *sk, -+int sock_diag_put_filterinfo(struct user_namespace *user_ns __always_unused, struct sock *sk, - struct sk_buff *skb, int attrtype) - { - struct nlattr *attr; ---- a/net/packet/diag.c -+++ b/net/packet/diag.c -@@ -172,7 +172,7 @@ static int sk_diag_fill(struct sock *sk, - goto out_nlmsg_trim; - - if ((req->pdiag_show & PACKET_SHOW_FILTER) && -- sock_diag_put_filterinfo(sk, skb, PACKET_DIAG_FILTER)) -+ sock_diag_put_filterinfo(user_ns, sk, skb, PACKET_DIAG_FILTER)) - goto out_nlmsg_trim; - - return nlmsg_end(skb, nlh); diff --git a/debian/patches/series b/debian/patches/series index 6048134dc..fd0d28c2a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -84,7 +84,6 @@ features/arm/ARM-sun4i-dt-Add-USB-host-bindings.patch debian/libata-avoid-abi-change-in-3.14.4.patch debian/dm-avoid-abi-change-in-3.14.4.patch debian/net-revert-lockdep-changes-in-3.14.5.patch -debian/sockdiag-avoid-abi-change-in-3.14.5.patch debian/target-avoid-abi-change-in-3.14.5.patch debian/netfilter-avoid-abi-change-in-3.14.5.patch bugfix/mips/MIPS-Fix-branch-emulation-of-branch-likely-instructi.patch @@ -92,3 +91,4 @@ debian/drivers-base-platform-avoid-abi-change-in-3.14.6.patch debian/dma-avoid-abi-change-in-3.14.6.patch debian/vfs-avoid-abi-change-for-cve-2014-4014.patch bugfix/all/SCSI-Fix-spurious-request-sense-in-error-handling.patch +debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch From 194b7a793f4bf47d083f27e7c9add9d255d38a53 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 29 Jun 2014 02:25:32 +0000 Subject: [PATCH 11/14] [x86] x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508) svn path=/dists/sid/linux/; revision=21477 --- debian/changelog | 1 + ...syscall-exit-work-on-badsys-CVE-2014.patch | 56 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 58 insertions(+) create mode 100644 debian/patches/bugfix/x86/x86_32-entry-Do-syscall-exit-work-on-badsys-CVE-2014.patch diff --git a/debian/changelog b/debian/changelog index 1a3153c91..5458a015d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -53,6 +53,7 @@ linux (3.14.9-1) UNRELEASED; urgency=medium - bugfix, handling an error in opening a FIFO - propagate aufs file references to new vmas created by remap_file_pages() * linux-image: Make initramfs support unconditional + * [x86] x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508) [ Aurelien Jarno ] * [arm64] Enable COMPAT to support 32-bit binaries. diff --git a/debian/patches/bugfix/x86/x86_32-entry-Do-syscall-exit-work-on-badsys-CVE-2014.patch b/debian/patches/bugfix/x86/x86_32-entry-Do-syscall-exit-work-on-badsys-CVE-2014.patch new file mode 100644 index 000000000..a533f48f4 --- /dev/null +++ b/debian/patches/bugfix/x86/x86_32-entry-Do-syscall-exit-work-on-badsys-CVE-2014.patch @@ -0,0 +1,56 @@ +From: Andy Lutomirski +Date: Mon, 23 Jun 2014 14:22:15 -0700 +Subject: x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://git.kernel.org/linus/554086d85e71f30abe46fc014fea31929a7c6a8a + +The bad syscall nr paths are their own incomprehensible route +through the entry control flow. Rearrange them to work just like +syscalls that return -ENOSYS. + +This fixes an OOPS in the audit code when fast-path auditing is +enabled and sysenter gets a bad syscall nr (CVE-2014-4508). + +This has probably been broken since Linux 2.6.27: +af0575bba0 i386 syscall audit fast-path + +Cc: stable@vger.kernel.org +Cc: Roland McGrath +Reported-by: Toralf Förster +Signed-off-by: Andy Lutomirski +Link: http://lkml.kernel.org/r/e09c499eade6fc321266dd6b54da7beb28d6991c.1403558229.git.luto@amacapital.net +Signed-off-by: H. Peter Anvin +--- + arch/x86/kernel/entry_32.S | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/entry_32.S ++++ b/arch/x86/kernel/entry_32.S +@@ -431,9 +431,10 @@ sysenter_past_esp: + jnz sysenter_audit + sysenter_do_call: + cmpl $(NR_syscalls), %eax +- jae syscall_badsys ++ jae sysenter_badsys + call *sys_call_table(,%eax,4) + movl %eax,PT_EAX(%esp) ++sysenter_after_call: + LOCKDEP_SYS_EXIT + DISABLE_INTERRUPTS(CLBR_ANY) + TRACE_IRQS_OFF +@@ -688,7 +689,12 @@ END(syscall_fault) + + syscall_badsys: + movl $-ENOSYS,PT_EAX(%esp) +- jmp resume_userspace ++ jmp syscall_exit ++END(syscall_badsys) ++ ++sysenter_badsys: ++ movl $-ENOSYS,PT_EAX(%esp) ++ jmp sysenter_after_call + END(syscall_badsys) + CFI_ENDPROC + /* diff --git a/debian/patches/series b/debian/patches/series index fd0d28c2a..024360ce6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -92,3 +92,4 @@ debian/dma-avoid-abi-change-in-3.14.6.patch debian/vfs-avoid-abi-change-for-cve-2014-4014.patch bugfix/all/SCSI-Fix-spurious-request-sense-in-error-handling.patch debian/alsa-avoid-abi-change-for-cve-2014-4652-fix.patch +bugfix/x86/x86_32-entry-Do-syscall-exit-work-on-badsys-CVE-2014.patch From 26c56f7113db18f3c59931e39f23b170fd8e9b5a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 29 Jun 2014 02:31:36 +0000 Subject: [PATCH 12/14] [rt] Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()" in 3.14.6 svn path=/dists/sid/linux/; revision=21478 --- debian/changelog | 2 + debian/config/featureset-rt/config | 5 +-- ...piry-time-before-switch_hrtimer_base.patch | 39 +++++++++++++++++++ debian/patches/series-rt | 1 + 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch diff --git a/debian/changelog b/debian/changelog index 5458a015d..8861f023f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -54,6 +54,8 @@ linux (3.14.9-1) UNRELEASED; urgency=medium - propagate aufs file references to new vmas created by remap_file_pages() * linux-image: Make initramfs support unconditional * [x86] x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508) + * [rt] Fix latency histogram after "hrtimer: Set expiry time before + switch_hrtimer_base()" in 3.14.6 [ Aurelien Jarno ] * [arm64] Enable COMPAT to support 32-bit binaries. diff --git a/debian/config/featureset-rt/config b/debian/config/featureset-rt/config index 1610bdc49..247fe31b6 100644 --- a/debian/config/featureset-rt/config +++ b/debian/config/featureset-rt/config @@ -1,10 +1,7 @@ # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT_RT_FULL=y CONFIG_SCHED_TRACER=y -#. This option is broken after commit 84ea7fe37908 -#. ('hrtimer: Set expiry time before switch_hrtimer_base()') but should be -#. enabled when this is resolved -# CONFIG_MISSED_TIMER_OFFSETS_HIST is not set +CONFIG_MISSED_TIMER_OFFSETS_HIST=y CONFIG_WAKEUP_LATENCY_HIST=y ## disable aufs as it's not needed on rt and conflicts with fs-dentry-use-seqlock.patch diff --git a/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch b/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch new file mode 100644 index 000000000..25156e95a --- /dev/null +++ b/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch @@ -0,0 +1,39 @@ +From: Ben Hutchings +Date: Sat, 28 Jun 2014 23:34:48 +0100 +Subject: Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()" +Forwarded: http://mid.gmane.org/1403994888.23472.116.camel@deadeye.wl.decadent.org.uk + +In an rt-kernel with CONFIG_MISSED_TIMER_OFFSETS_HIST enabled, +__hrtimer_start_range_ns() now crashes, as new_base is not assigned +before it is used. + +Signed-off-by: Ben Hutchings +Tested-by: Carsten Emde +Cc: stable-rt@vger.kernel.org +--- +--- a/kernel/hrtimer.c ++++ b/kernel/hrtimer.c +@@ -1106,6 +1106,11 @@ int __hrtimer_start_range_ns(struct hrti + #endif + } + ++ hrtimer_set_expires_range_ns(timer, tim, delta_ns); ++ ++ /* Switch the timer base, if necessary: */ ++ new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED); ++ + #ifdef CONFIG_MISSED_TIMER_OFFSETS_HIST + { + ktime_t now = new_base->get_time(); +@@ -1117,11 +1122,6 @@ int __hrtimer_start_range_ns(struct hrti + } + #endif + +- hrtimer_set_expires_range_ns(timer, tim, delta_ns); +- +- /* Switch the timer base, if necessary: */ +- new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED); +- + timer_stats_hrtimer_set_start_info(timer); + + leftmost = enqueue_hrtimer(timer, new_base); diff --git a/debian/patches/series-rt b/debian/patches/series-rt index d692371fc..c473c1317 100644 --- a/debian/patches/series-rt +++ b/debian/patches/series-rt @@ -658,3 +658,4 @@ features/all/rt/disable-preempt-lazy-on-x86-64.patch # Add RT to version features/all/rt/localversion.patch +features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch From e7544a8bdd93ff613ff2ba04762d3d9d94f78718 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 30 Jun 2014 15:47:08 +0000 Subject: [PATCH 13/14] Ignore target ABI change, as target modules currently must be in-tree svn path=/dists/sid/linux/; revision=21481 --- debian/config/defines | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/config/defines b/debian/config/defines index 6ca079f67..554e5a9f1 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -22,6 +22,8 @@ ignore-changes: module:drivers/net/team/team # Apparently not used OOT sock_diag_put_filterinfo +# Can't build target modules OOT + module:drivers/target/iscsi/iscsi_target_mod [base] arches: From 3ce3637f68877270e429a6f7170c610344f29f08 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 30 Jun 2014 15:47:27 +0000 Subject: [PATCH 14/14] Prepare to release linux (3.14.9-1). svn path=/dists/sid/linux/; revision=21482 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8861f023f..527bdccbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (3.14.9-1) UNRELEASED; urgency=medium +linux (3.14.9-1) unstable; urgency=medium * New upstream stable update: https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.14.8 @@ -62,7 +62,7 @@ linux (3.14.9-1) UNRELEASED; urgency=medium * [mips,mipsel] Enable initramfs for all flavours, but keep the disk related drivers built-in for now. - -- Ben Hutchings Tue, 17 Jun 2014 16:44:33 +0100 + -- Ben Hutchings Mon, 30 Jun 2014 13:57:11 +0100 linux (3.14.7-1) unstable; urgency=medium