diff --git a/debian/changelog b/debian/changelog index 8a36fff14..36702d83a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,11 @@ -linux (4.9.2-3) UNRELEASED; urgency=medium +linux (4.10~rc5-1~exp1) UNRELEASED; urgency=medium - [ Roger Shimizu ] - * [armel] Add DT support of Buffalo Linkstation Live v3 (LS-CHL) + * New upstream release candidate - -- Roger Shimizu Thu, 19 Jan 2017 01:06:58 +0900 + [ Ben Hutchings ] + * [rt] Disable until it is updated for 4.10 or later + + -- Ben Hutchings Tue, 24 Jan 2017 19:08:03 +0000 linux (4.9.2-2) unstable; urgency=medium diff --git a/debian/config/defines b/debian/config/defines index 07cab406c..0d6833e63 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -48,7 +48,7 @@ debug-info: true signed-modules: true [featureset-rt_base] -enabled: true +enabled: false [description] part-long-up: This kernel is not suitable for SMP (multi-processor, diff --git a/debian/patches/bugfix/all/ext4-fix-bug-838544.patch b/debian/patches/bugfix/all/ext4-fix-bug-838544.patch deleted file mode 100644 index 2bdf2b5b4..000000000 --- a/debian/patches/bugfix/all/ext4-fix-bug-838544.patch +++ /dev/null @@ -1,218 +0,0 @@ -From: "Darrick J. Wong" -Date: Mon, 19 Sep 2016 22:52:16 -0700 -Subject: Re: Trouble mounting metadata_csum ext4 filesystems with v4.7.x after c9274d891869880648c4ee9365df3ecc7ba2e285: not enough inode bytes checksummed? -Origin: https://www.spinics.net/lists/linux-fsdevel/msg101888.html -Bug-Debian: https://bugs.debian.org/838544 - -[cc Ted and the ext4 list] - -On Mon, Sep 19, 2016 at 03:19:03PM +0100, Nix wrote: -> So I ran into spurious metadata corruption warnings in v4.7.2 due to the -> problem fixed by c9274d8. I applied an early version of the fix, -> rebooted, and oh dear root filesystem mount failure with invalid -> checksum errors. -> -> The problem persists in v4.7.4, as seen here in qemu emulation on a raw -> image dd'ed directly from the thing that won't boot, with a couple of -> printk()s: -> -> # mount /dev/vda /new-root/ -> [ 8.124692] EXT4-fs (vda): couldn't mount as ext3 due to feature incompatibilities -> [ 8.126977] EXT4-fs (vda): couldn't mount as ext2 due to feature incompatibilities -> [ 9.017980] Inode size 256 > good old size 128; fits in inode: 0 -> [ 8.134897] inode 8: provided: 5c50l; calculated: 36e1i -> [ 8.135098] EXT4-fs error (device vda): ext4_iget:4479: inode #8: comm mount: checksum invalid -> [ 8.138992] EXT4-fs (vda): no journal found -> [ 8.165744] UDF-fs: warning (device vda): udf_fill_super: No partition found (2) -> mount: mounting /dev/vda on /new-root/ failed: Invalid argument -> -> I added a bit of printking to show the failure of the journal inode -> checksum to pass muster. e2fsck (from e2fsprogs 1.43.1-14) is quite -> happy with this filesystem. Reverting c9274d8 makes everything happy -> again (well, it does bring the original bug back, which is a rather -> serious one, but other than that...): -> -> [ 9.823032] EXT4-fs (vda): couldn't mount as ext3 due to feature incompatibilities -> [ 9.824647] EXT4-fs (vda): couldn't mount as ext2 due to feature incompatibilities -> [ 9.832593] inode 8: provided: 5c50l; calculated: 5c50i -> [ 9.839253] inode 2: provided: d6ea92e9l; calculated: d6ea92e9i -> [ 9.846947] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null) -> -> So c9274d8 is clearly messing up the calculation of the checksum. -> -> The problem becomes more evident if we add more printk()s to the old -> code, so we can see what region is being checksummed: -> -> # mount /dev/vda /new-root -> [ 6.827297] inode 8: unadjusted csum of 256 bytes with seed a5df92a7: 449a5c50 -> [ 6.827596] adjusted csum: 5c50 -> [ 6.835993] inode 2: unadjusted csum of 256 bytes with seed 759c6c33: d6ea92e9 -> [ 6.836173] adjusted csum: d6ea92e9 -> [ 6.844801] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: -> -> and the new: -> -> [ 11.098013] inode 8: csum of first 124 bytes with seed a5df92a7: f375b663 -> [ 11.098205] inode 8: added csum of 2 dummy_csum bytes with seed a5df92a7: 20cfebcb -> [ 11.098420] inode 8: added csum of 2 bytes from offset 126 -- 128 to existing: d79e7432 -> [ 11.098646] inode 8: > GOOD_OLD_INODE_SIZE; added csum of 2 bytes from 128 -- 130 to existing: d10936e1 -> [ 11.098890] 8: adjusted csum: 36e1 -> [ 11.099133] EXT4-fs error (device vda): ext4_iget:4483: inode #8: comm mount: checksum invalid -> -> We are not checksumming enough bytes! We used to checksum the entire -> 256-byte inode: now, we checksum only 130 bytes of it, which isn't even -> enough to cover the 28-byte extra_isize on this filesystem and is more -> or less guaranteed to give the wrong answer. I'd fix the problem, but I -> frankly can't see how the new code is meant to be equivalent to the old -> code in any sense -- most particularly what the stuff around dummy_csum -> is meant to do -- so I thought it better to let the people who wrote it -> fix it :) - -Sh*t, I missed this during the review. So your filesystem image (thank -you!) had this to say: - -debugfs> stats -Inode size: 256 -debugfs> stat <8> -Size of extra inode fields: 0 - -Basically, a 128-byte inode inside a filesystem that allocated 256 bytes -for each inode. As you point out, the old code would checksum the entire -allocated space, whether or not the inode core used it. Obviously, you -want this since inline extended attributes live in that space: - -csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)raw, - EXT4_INODE_SIZE(inode->i_sb)); - -The new code, on the other hand, carefully checksums around the -i_checksum fields and only bothers to checksum the space between the end -of i_checksum_hi and the end of the allocated space if the inode core is -big enough to store i_checksum_hi. Since we allocated 256 bytes for -each inode, we checksum the first two bytes after byte 128 -(EXT4_GOOD_OLD_INODE_SIZE), but then we see that i_extra_size == 0 so we -never bother to checksum anything after that. This is of course wrong -since we no longer checksum the xattr space and we've deviated from the -pre-4.7.4 (documented) on-disk format. - -*FORTUNATELY* since the root inode fails the read verifier, the file (in -this case the root dir) can't be modified and therefore nothing has been -corrupted. Especially fortunate for you, the fs won't mount, reducing -the chances that any serious damage has occurred. - -I /think/ the fix in this case is to hoist the last ext4_chksum call -out of the EXT4_FITS_IN_INODE blob: - -if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { - offset = offsetof(struct ext4_inode, i_checksum_hi); - csum = ext4_chksum(sbi, csum, (__u8 *)raw + - EXT4_GOOD_OLD_INODE_SIZE, - offset - EXT4_GOOD_OLD_INODE_SIZE); - if (EXT4_FITS_IN_INODE(raw, ei, i_checksum_hi)) { - csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, - csum_size); - offset += csum_size; - } - csum = ext4_chksum(sbi, csum, (__u8 *)raw + offset, - EXT4_INODE_SIZE(inode->i_sb) - offset); -} - -Can you give that a try? - -> tune2fs output for this filesystem, particularly the extra_isize and -> inode size fields are likely relevant: -> -> tune2fs 1.43.1 (08-Jun-2016) -> Filesystem volume name: root -> Last mounted on: / -> Filesystem UUID: 6c0f7fa7-d6c2-4054-bff3-3a878460bdc7 -> Filesystem magic number: 0xEF53 -> Filesystem revision #: 1 (dynamic) -> Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum -> Filesystem flags: signed_directory_hash -> Default mount options: (none) -> Filesystem state: clean -> Errors behavior: Continue -> Filesystem OS type: Linux -> Inode count: 65536 -> Block count: 262144 -> Reserved block count: 13107 -> Free blocks: 227009 -> Free inodes: 59499 -> First block: 0 -> Block size: 4096 -> Fragment size: 4096 -> Group descriptor size: 64 -> Reserved GDT blocks: 63 -> Blocks per group: 32768 -> Fragments per group: 32768 -> Inodes per group: 8192 -> Inode blocks per group: 512 -> RAID stripe width: 16 -> Flex block group size: 64 -> Filesystem created: Tue May 26 21:28:46 2009 -> Last mount time: Sun Sep 18 23:34:41 2016 -> Last write time: Mon Sep 19 13:51:59 2016 -> Mount count: 0 -> Maximum mount count: 36 -> Last checked: Mon Sep 19 13:51:59 2016 -> Check interval: 15552000 (6 months) -> Next check after: Sat Mar 18 12:51:59 2017 -> Lifetime writes: 16 GB -> Reserved blocks uid: 0 (user root) -> Reserved blocks gid: 0 (group root) -> First inode: 11 -> Inode size: 256 -> Required extra isize: 28 -> Desired extra isize: 28 -> Journal inode: 8 -> Default directory hash: half_md4 -> Directory Hash Seed: f1da2da0-057e-4ba0-a021-3d56db5b24ab -> Journal backup: inode blocks -> Checksum type: crc32c -> Checksum: 0x92acf115 -> -> This is an old, upgraded fs from before the days of checksums, but even -> so I'm surprised that with a 256-byte inode and no xattrs in use, -> EXT4_FITS_IN_INODE is false. Maybe the extra_isize isn't big enough? - -It's zero, so yes. :) - -> An lzipped e2image of the problematic filesystem is available from -> : -> I have verified that the problem recurs with this image. -> -> I can also replicate the problem in literally seconds if you need more -> debugging output. -> -> -> ... The mystery is why this isn't going wrong anywhere else: I have -> metadata_csum working on every fs on a bunch of other ext4-using -> systems, and indeed on every filesystem on this machine as well, as long -> as c9274d8 is not applied. Many of them are similarly upgraded pre-csum -> fses with the same inode size and extra_isize, but they work... - -Hard to say, but this bug only affects inodes with 0 < i_extra_size <= 4 -i.e. 128 < inode-core-size <= 130. Maybe an old ext3 fs that was -created with 256 bytes per inode but inode-core-size of 128? - -Uck. Sorry about this mess. - ---D - -[bwh: Converted to a patch] ---- ---- a/fs/ext4/inode.c -+++ b/fs/ext4/inode.c -@@ -71,10 +71,9 @@ static __u32 ext4_inode_csum(struct inod - csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, - csum_size); - offset += csum_size; -- csum = ext4_chksum(sbi, csum, (__u8 *)raw + offset, -- EXT4_INODE_SIZE(inode->i_sb) - -- offset); - } -+ csum = ext4_chksum(sbi, csum, (__u8 *)raw + offset, -+ EXT4_INODE_SIZE(inode->i_sb) - offset); - } - - return csum; diff --git a/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch b/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch index 5ecdb4c98..2e36aeea8 100644 --- a/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch +++ b/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch @@ -53,7 +53,7 @@ upstream submission. /* disable MPU */ --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c -@@ -917,10 +917,8 @@ static enum ucode_state request_microcod +@@ -918,10 +918,8 @@ static enum ucode_state request_microcod if (c->x86 >= 0x15) snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86); @@ -203,7 +203,7 @@ upstream submission. fw->size, fw_name); --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c -@@ -1433,11 +1433,8 @@ static void sdma_load_firmware(const str +@@ -1438,11 +1438,8 @@ static void sdma_load_firmware(const str const struct sdma_script_start_addrs *addr; unsigned short *ram_code; @@ -233,7 +233,7 @@ upstream submission. where = 0; --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c -@@ -1787,10 +1787,8 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr +@@ -1793,10 +1793,8 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr if (ret) { snprintf(f, sizeof(f), "nouveau/%s", fwname); ret = request_firmware(&fw, f, device->dev); @@ -345,7 +345,7 @@ upstream submission. card->name, firmware->size); --- a/drivers/media/tuners/tuner-xc2028.c +++ b/drivers/media/tuners/tuner-xc2028.c -@@ -1374,7 +1374,6 @@ static void load_firmware_cb(const struc +@@ -1370,7 +1370,6 @@ static void load_firmware_cb(const struc tuner_dbg("request_firmware_nowait(): %s\n", fw ? "OK" : "error"); if (!fw) { @@ -355,7 +355,7 @@ upstream submission. } --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c -@@ -2411,12 +2411,9 @@ static int stk9090m_frontend_attach(stru +@@ -2410,12 +2410,9 @@ static int stk9090m_frontend_attach(stru dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80); @@ -370,7 +370,7 @@ upstream submission. stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size; stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data; -@@ -2477,12 +2474,9 @@ static int nim9090md_frontend_attach(str +@@ -2476,12 +2473,9 @@ static int nim9090md_frontend_attach(str msleep(20); dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); @@ -387,13 +387,12 @@ upstream submission. nim9090md_config[1].microcode_B_fe_size = state->frontend_firmware->size; --- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c -@@ -80,14 +80,9 @@ int dvb_usb_download_firmware(struct usb +@@ -79,13 +79,9 @@ int dvb_usb_download_firmware(struct usb int ret; const struct firmware *fw = NULL; - if ((ret = request_firmware(&fw, props->firmware, &udev->dev)) != 0) { -- err("did not find the firmware file. (%s) " -- "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", +- err("did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", - props->firmware,ret); + ret = request_firmware(&fw, props->firmware, &udev->dev); + if (ret) @@ -406,13 +405,12 @@ upstream submission. case CYPRESS_AN2135: --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c -@@ -134,20 +134,14 @@ static int gp8psk_load_bcm4500fw(struct +@@ -134,19 +134,14 @@ static int gp8psk_load_bcm4500fw(struct const u8 *ptr; u8 *buf; if ((ret = request_firmware(&fw, bcm4500_firmware, - &d->udev->dev)) != 0) { -- err("did not find the bcm4500 firmware file. (%s) " -- "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", +- err("did not find the bcm4500 firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", - bcm4500_firmware,ret); + &d->udev->dev)) != 0) return ret; @@ -430,12 +428,11 @@ upstream submission. if (!buf) { --- a/drivers/media/usb/dvb-usb/opera1.c +++ b/drivers/media/usb/dvb-usb/opera1.c -@@ -453,9 +453,6 @@ static int opera1_xilinx_load_firmware(s +@@ -453,8 +453,6 @@ static int opera1_xilinx_load_firmware(s info("start downloading fpga firmware %s",filename); if ((ret = request_firmware(&fw, filename, &dev->dev)) != 0) { -- err("did not find the firmware file. (%s) " -- "Please see linux/Documentation/dvb/ for more details on firmware-problems.", +- err("did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems.", - filename); return ret; } else { @@ -484,8 +481,8 @@ upstream submission. - printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n", - __func__); - if (ret) { -- printk(KERN_ERR "%s: No firmware uploaded " -- "(timeout or file not found?)\n", __func__); +- printk(KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n", +- __func__); + if (ret) return ret; - } @@ -527,8 +524,8 @@ upstream submission. state->i2c->dev.parent); - printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n", __func__); - if (ret) { -- printk(KERN_ERR "%s: No firmware uploaded (timeout or file not " -- "found?)\n", __func__); +- printk(KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n", +- __func__); + if (ret) return ret; - } @@ -537,28 +534,28 @@ upstream submission. if (ret) --- a/drivers/media/dvb-frontends/nxt200x.c +++ b/drivers/media/dvb-frontends/nxt200x.c -@@ -891,12 +891,8 @@ static int nxt2002_init(struct dvb_front +@@ -890,12 +890,8 @@ static int nxt2002_init(struct dvb_front __func__, NXT2002_DEFAULT_FIRMWARE); ret = request_firmware(&fw, NXT2002_DEFAULT_FIRMWARE, state->i2c->dev.parent); - pr_debug("%s: Waiting for firmware upload(2)...\n", __func__); - if (ret) { -- pr_err("%s: No firmware uploaded (timeout or file not found?)" -- "\n", __func__); +- pr_err("%s: No firmware uploaded (timeout or file not found?)\n", +- __func__); + if (ret) return ret; - } ret = nxt2002_load_firmware(fe, fw); release_firmware(fw); -@@ -958,12 +954,8 @@ static int nxt2004_init(struct dvb_front +@@ -957,12 +953,8 @@ static int nxt2004_init(struct dvb_front __func__, NXT2004_DEFAULT_FIRMWARE); ret = request_firmware(&fw, NXT2004_DEFAULT_FIRMWARE, state->i2c->dev.parent); - pr_debug("%s: Waiting for firmware upload(2)...\n", __func__); - if (ret) { -- pr_err("%s: No firmware uploaded (timeout or file not found?)" -- "\n", __func__); +- pr_err("%s: No firmware uploaded (timeout or file not found?)\n", +- __func__); + if (ret) return ret; - } @@ -567,13 +564,12 @@ upstream submission. release_firmware(fw); --- a/drivers/media/dvb-frontends/or51132.c +++ b/drivers/media/dvb-frontends/or51132.c -@@ -341,11 +341,8 @@ static int or51132_set_parameters(struct +@@ -341,10 +341,8 @@ static int or51132_set_parameters(struct printk("or51132: Waiting for firmware upload(%s)...\n", fwname); ret = request_firmware(&fw, fwname, state->i2c->dev.parent); - if (ret) { -- printk(KERN_WARNING "or51132: No firmware up" -- "loaded(timeout or file not found?)\n"); +- printk(KERN_WARNING "or51132: No firmware uploaded(timeout or file not found?)\n"); + if (ret) return ret; - } @@ -582,14 +578,13 @@ upstream submission. if (ret) { --- a/drivers/media/dvb-frontends/or51211.c +++ b/drivers/media/dvb-frontends/or51211.c -@@ -375,12 +375,8 @@ static int or51211_init(struct dvb_front +@@ -375,11 +375,8 @@ static int or51211_init(struct dvb_front OR51211_DEFAULT_FIRMWARE); ret = config->request_firmware(fe, &fw, OR51211_DEFAULT_FIRMWARE); - pr_info("Got Hotplug firmware\n"); - if (ret) { -- pr_warn("No firmware uploaded " -- "(timeout or file not found?)\n"); +- pr_warn("No firmware uploaded (timeout or file not found?)\n"); + if (ret) return ret; - } @@ -612,7 +607,7 @@ upstream submission. printk("sp8870: writing firmware to device failed\n"); --- a/drivers/media/dvb-frontends/sp887x.c +++ b/drivers/media/dvb-frontends/sp887x.c -@@ -527,10 +527,8 @@ static int sp887x_init(struct dvb_fronte +@@ -526,10 +526,8 @@ static int sp887x_init(struct dvb_fronte /* request the firmware, this will block until someone uploads it */ printk("sp887x: waiting for firmware upload (%s)...\n", SP887X_DEFAULT_FIRMWARE); ret = state->config->request_firmware(fe, &fw, SP887X_DEFAULT_FIRMWARE); @@ -715,28 +710,25 @@ upstream submission. SMS_ALLOC_ALIGNMENT), GFP_KERNEL | GFP_DMA); --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c -@@ -1531,16 +1531,9 @@ static int get_firmware(struct av7110* a +@@ -1513,13 +1513,8 @@ static int get_firmware(struct av7110* a /* request the av7110 firmware, this will block until someone uploads it */ ret = request_firmware(&fw, "dvb-ttpci-01.fw", &av7110->dev->pci->dev); if (ret) { - if (ret == -ENOENT) { -- printk(KERN_ERR "dvb-ttpci: could not load firmware," -- " file not found: dvb-ttpci-01.fw\n"); -- printk(KERN_ERR "dvb-ttpci: usually this should be in " -- "/usr/lib/hotplug/firmware or /lib/firmware\n"); -- printk(KERN_ERR "dvb-ttpci: and can be downloaded from" -+ if (ret == -ENOENT) -+ printk(KERN_ERR "dvb-ttpci: firmware can be downloaded from" - " https://linuxtv.org/download/dvb/firmware/\n"); +- printk(KERN_ERR "dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw\n"); +- printk(KERN_ERR "dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware\n"); +- printk(KERN_ERR "dvb-ttpci: and can be downloaded from https://linuxtv.org/download/dvb/firmware/\n"); - } else -- printk(KERN_ERR "dvb-ttpci: cannot request firmware" -- " (error %i)\n", ret); +- printk(KERN_ERR "dvb-ttpci: cannot request firmware (error %i)\n", +- ret); ++ if (ret == -ENOENT) ++ printk(KERN_ERR "dvb-ttpci: firmware can be downloaded from https://linuxtv.org/download/dvb/firmware/\n"); return -EINVAL; } --- a/drivers/media/pci/ttpci/av7110_hw.c +++ b/drivers/media/pci/ttpci/av7110_hw.c -@@ -251,11 +251,8 @@ int av7110_bootarm(struct av7110 *av7110 +@@ -250,11 +250,8 @@ int av7110_bootarm(struct av7110 *av7110 //saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT); ret = request_firmware(&fw, fw_name, &dev->pci->dev); @@ -765,7 +757,7 @@ upstream submission. b[0] = 0xaa; --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c -@@ -1296,11 +1296,8 @@ static int ttusb_dec_boot_dsp(struct ttu +@@ -1348,11 +1348,8 @@ static int ttusb_dec_boot_dsp(struct ttu dprintk("%s\n", __func__); result = request_firmware(&fw_entry, dec->firmware_name, &dec->udev->dev); @@ -795,7 +787,7 @@ upstream submission. packet_num = ptr[0]; --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c -@@ -1249,10 +1249,8 @@ static int fm_download_firmware(struct f +@@ -1246,10 +1246,8 @@ static int fm_download_firmware(struct f ret = request_firmware(&fw_entry, fw_name, &fmdev->radio_dev->dev); @@ -809,7 +801,7 @@ upstream submission. fw_data = (void *)fw_entry->data; --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c -@@ -3912,10 +3912,8 @@ static int pvr_boot(struct bttv *btv) +@@ -3909,10 +3909,8 @@ static int pvr_boot(struct bttv *btv) int rc; rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); @@ -838,7 +830,7 @@ upstream submission. cmd.direction = TRANSFER_WRITE; --- a/drivers/media/pci/cx18/cx18-av-firmware.c +++ b/drivers/media/pci/cx18/cx18-av-firmware.c -@@ -85,10 +85,8 @@ int cx18_av_loadfw(struct cx18 *cx) +@@ -84,10 +84,8 @@ int cx18_av_loadfw(struct cx18 *cx) int i; int retries1 = 0; @@ -863,15 +855,6 @@ upstream submission. size_t sz = (*fw)->size; if (sz < 2 || sz > 64 || (sz % 2) != 0) { CX18_ERR("Firmware %s has a bad size: %lu bytes\n", -@@ -156,7 +154,7 @@ static int yuan_mpc718_mt352_reqfw(struc - - if (ret) { - CX18_ERR("The MPC718 board variant with the MT352 DVB-T" -- "demodualtor will not work without it\n"); -+ "demodulator will not work without firmware\n"); - CX18_ERR("Run 'linux/Documentation/dvb/get_dvb_firmware " - "mpc718' if you need the firmware\n"); - } --- a/drivers/media/pci/cx18/cx18-firmware.c +++ b/drivers/media/pci/cx18/cx18-firmware.c @@ -106,11 +106,8 @@ static int load_cpu_fw_direct(const char @@ -912,32 +895,29 @@ upstream submission. return retval; --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c -@@ -931,14 +931,8 @@ static int cx23885_load_firmware(struct +@@ -929,12 +929,8 @@ static int cx23885_load_firmware(struct retval = request_firmware(&firmware, CX23885_FIRM_IMAGE_NAME, &dev->pci->dev); - if (retval != 0) { -- printk(KERN_ERR -- "ERROR: Hotplug firmware request failed (%s).\n", -- CX23885_FIRM_IMAGE_NAME); -- printk(KERN_ERR "Please fix your hotplug setup, the board will " -- "not work without firmware loaded!\n"); +- pr_err("ERROR: Hotplug firmware request failed (%s).\n", +- CX23885_FIRM_IMAGE_NAME); +- pr_err("Please fix your hotplug setup, the board will not work without firmware loaded!\n"); + if (retval != 0) return -1; - } if (firmware->size != CX23885_FIRM_IMAGE_SIZE) { - printk(KERN_ERR "ERROR: Firmware size mismatch " + pr_err("ERROR: Firmware size mismatch (have %zu, expected %d)\n", --- a/drivers/media/pci/cx23885/cx23885-cards.c +++ b/drivers/media/pci/cx23885/cx23885-cards.c -@@ -2341,11 +2341,7 @@ void cx23885_card_setup(struct cx23885_d - cinfo.rev, filename); +@@ -2339,10 +2339,7 @@ void cx23885_card_setup(struct cx23885_d + cinfo.rev, filename); ret = request_firmware(&fw, filename, &dev->pci->dev); - if (ret != 0) -- printk(KERN_ERR "did not find the firmware file. (%s) " -- "Please see linux/Documentation/dvb/ for more details " -- "on firmware-problems.", filename); +- pr_err("did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems.", +- filename); - else + if (ret == 0) altera_init(&netup_config, fw); @@ -959,13 +939,13 @@ upstream submission. --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c -@@ -444,12 +444,8 @@ static int blackbird_load_firmware(struc +@@ -471,12 +471,8 @@ static int blackbird_load_firmware(struc + retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME, &dev->pci->dev); - - if (retval != 0) { - pr_err("Hotplug firmware request failed (%s).\n", -- CX2341X_FIRM_ENC_FILENAME); +- CX2341X_FIRM_ENC_FILENAME); - pr_err("Please fix your hotplug setup, the board will not work without firmware loaded!\n"); + if (retval != 0) return -EIO; @@ -1000,26 +980,22 @@ upstream submission. --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c -@@ -1382,29 +1382,6 @@ static int pvr2_locate_firmware(struct p +@@ -1381,25 +1381,6 @@ static int pvr2_locate_firmware(struct p "request_firmware fatal error with code=%d",ret); return ret; } - pvr2_trace(PVR2_TRACE_ERROR_LEGS, -- "***WARNING***" -- " Device %s firmware" -- " seems to be missing.", +- "***WARNING*** Device %s firmware seems to be missing.", - fwtypename); - pvr2_trace(PVR2_TRACE_ERROR_LEGS, -- "Did you install the pvrusb2 firmware files" -- " in their proper location?"); +- "Did you install the pvrusb2 firmware files in their proper location?"); - if (fwcount == 1) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "request_firmware unable to locate %s file %s", - fwtypename,fwnames[0]); - } else { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, -- "request_firmware unable to locate" -- " one of the following %s files:", +- "request_firmware unable to locate one of the following %s files:", - fwtypename); - for (idx = 0; idx < fwcount; idx++) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, @@ -1065,8 +1041,8 @@ upstream submission. ret = request_firmware(&fw, fwname, &dev->pci->dev); - if (ret) { -- printk(KERN_ERR "%s() Upload failed. " -- "(file not found?)\n", __func__); +- printk(KERN_ERR "%s() Upload failed. (file not found?)\n", +- __func__); + if (ret) return -ENOMEM; - } @@ -1105,7 +1081,7 @@ upstream submission. /* parse the firmware */ --- a/drivers/net/ethernet/3com/typhoon.c +++ b/drivers/net/ethernet/3com/typhoon.c -@@ -1279,11 +1279,8 @@ typhoon_request_firmware(struct typhoon +@@ -1284,11 +1284,8 @@ typhoon_request_firmware(struct typhoon return 0; err = request_firmware(&typhoon_fw, FIRMWARE_NAME, &tp->pdev->dev); @@ -1120,7 +1096,7 @@ upstream submission. remaining = typhoon_fw->size; --- a/drivers/net/ethernet/adaptec/starfire.c +++ b/drivers/net/ethernet/adaptec/starfire.c -@@ -1016,11 +1016,8 @@ static int netdev_open(struct net_device +@@ -1015,11 +1015,8 @@ static int netdev_open(struct net_device #endif /* VLAN_SUPPORT */ retval = request_firmware(&fw_rx, FIRMWARE_RX, &np->pci_dev->dev); @@ -1133,7 +1109,7 @@ upstream submission. if (fw_rx->size % 4) { printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", fw_rx->size, FIRMWARE_RX); -@@ -1028,11 +1025,8 @@ static int netdev_open(struct net_device +@@ -1027,11 +1024,8 @@ static int netdev_open(struct net_device goto out_rx; } retval = request_firmware(&fw_tx, FIRMWARE_TX, &np->pci_dev->dev); @@ -1148,7 +1124,7 @@ upstream submission. fw_tx->size, FIRMWARE_TX); --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c -@@ -2888,11 +2888,8 @@ static int ace_load_firmware(struct net_ +@@ -2892,11 +2892,8 @@ static int ace_load_firmware(struct net_ fw_name = "acenic/tg1.bin"; ret = request_firmware(&fw, fw_name, &ap->pdev->dev); @@ -1163,7 +1139,7 @@ upstream submission. --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c -@@ -3726,16 +3726,13 @@ static int bnx2_request_uncached_firmwar +@@ -3719,16 +3719,13 @@ static int bnx2_request_uncached_firmwar } rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev); @@ -1185,7 +1161,7 @@ upstream submission. if (bp->mips_firmware->size < sizeof(*mips_fw) || --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c -@@ -13489,11 +13489,8 @@ static int bnx2x_init_firmware(struct bn +@@ -13492,11 +13492,8 @@ static int bnx2x_init_firmware(struct bn BNX2X_DEV_INFO("Loading %s\n", fw_file_name); rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev); @@ -1200,7 +1176,7 @@ upstream submission. if (rc) { --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c -@@ -11346,11 +11346,8 @@ static int tg3_request_firmware(struct t +@@ -11349,11 +11349,8 @@ static int tg3_request_firmware(struct t { const struct tg3_firmware_hdr *fw_hdr; @@ -1294,7 +1270,7 @@ upstream submission. } --- a/drivers/net/ethernet/smsc/smc91c92_cs.c +++ b/drivers/net/ethernet/smsc/smc91c92_cs.c -@@ -647,10 +647,8 @@ static int osi_load_firmware(struct pcmc +@@ -646,10 +646,8 @@ static int osi_load_firmware(struct pcmc int i, err; err = request_firmware(&fw, FIRMWARE_NAME, &link->dev); @@ -1393,7 +1369,7 @@ upstream submission. fwh = (struct at76_fw_header *)(fwe->fw->data); --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -1160,9 +1160,6 @@ static void ath9k_hif_usb_firmware_cb(co +@@ -1161,9 +1161,6 @@ static void ath9k_hif_usb_firmware_cb(co if (!ret) return; @@ -1415,7 +1391,7 @@ upstream submission. --- a/drivers/net/wireless/atmel/atmel.c +++ b/drivers/net/wireless/atmel/atmel.c -@@ -3917,12 +3917,8 @@ static int reset_atmel_card(struct net_d +@@ -3912,12 +3912,8 @@ static int reset_atmel_card(struct net_d strcpy(priv->firmware_id, "atmel_at76c502.bin"); } err = request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev); @@ -1493,7 +1469,7 @@ upstream submission. } --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c -@@ -8418,12 +8418,8 @@ static int ipw2100_get_firmware(struct i +@@ -8419,12 +8419,8 @@ static int ipw2100_get_firmware(struct i rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev); @@ -1559,8 +1535,8 @@ upstream submission. --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -524,11 +524,8 @@ static void mwifiex_fw_dpc(const struct - bool init_failed = false; struct wireless_dev *wdev; + struct completion *fw_done = adapter->fw_done; - if (!firmware) { - mwifiex_dbg(adapter, ERROR, @@ -1737,7 +1713,7 @@ upstream submission. } --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c -@@ -95,7 +95,6 @@ static void rtl92se_fw_cb(const struct f +@@ -91,7 +91,6 @@ static void rtl92se_fw_cb(const struct f "Firmware callback routine entered!\n"); complete(&rtlpriv->firmware_loading_complete); if (!firmware) { @@ -1930,7 +1906,7 @@ upstream submission. } --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c -@@ -5656,8 +5656,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha, +@@ -5652,8 +5652,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha, /* Load firmware blob. */ blob = qla2x00_request_firmware(vha); if (!blob) { @@ -1939,7 +1915,7 @@ upstream submission. ql_log(ql_log_info, vha, 0x0084, "Firmware images can be retrieved from: "QLA_FW_URL ".\n"); return QLA_FUNCTION_FAILED; -@@ -5759,8 +5757,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t * +@@ -5755,8 +5753,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t * /* Load firmware blob. */ blob = qla2x00_request_firmware(vha); if (!blob) { @@ -1950,7 +1926,7 @@ upstream submission. QLA_FW_URL ".\n"); --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c -@@ -2460,11 +2460,8 @@ try_blob_fw: +@@ -2465,11 +2465,8 @@ try_blob_fw: /* Load firmware blob. */ blob = ha->hablob = qla2x00_request_firmware(vha); @@ -1965,7 +1941,7 @@ upstream submission. if (qla82xx_validate_firmware_blob(vha, --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -5641,8 +5641,6 @@ qla2x00_request_firmware(scsi_qla_host_t +@@ -5841,8 +5841,6 @@ qla2x00_request_firmware(scsi_qla_host_t goto out; if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) { @@ -2084,34 +2060,33 @@ upstream submission. return rc; } MODULE_FIRMWARE("rtlwifi/rtl8712u.bin"); ---- a/drivers/staging/slicoss/slicoss.c -+++ b/drivers/staging/slicoss/slicoss.c -@@ -376,11 +376,8 @@ static int slic_card_download_gbrcv(stru - } - - ret = request_firmware(&fw, file, &adapter->pcidev->dev); -- if (ret) { -- dev_err(&adapter->pcidev->dev, -- "Failed to load firmware %s\n", file); -+ if (ret) - return ret; +--- a/drivers/net/ethernet/alacritech/slicoss.c ++++ b/drivers/net/ethernet/alacritech/slicoss.c +@@ -1063,11 +1063,8 @@ static int slic_load_rcvseq_firmware(str + file = (sdev->model == SLIC_MODEL_OASIS) ? SLIC_RCV_FIRMWARE_OASIS : + SLIC_RCV_FIRMWARE_MOJAVE; + err = request_firmware(&fw, file, &sdev->pdev->dev); +- if (err) { +- dev_err(&sdev->pdev->dev, +- "failed to load receive sequencer firmware %s\n", file); ++ if (err) + return err; - } - - rcvucodelen = *(u32 *)(fw->data + index); - index += 4; -@@ -454,11 +451,8 @@ static int slic_card_download(struct ada - return -ENOENT; - } - ret = request_firmware(&fw, file, &adapter->pcidev->dev); -- if (ret) { -- dev_err(&adapter->pcidev->dev, -- "Failed to load firmware %s\n", file); -+ if (ret) - return ret; + /* Do an initial sanity check concerning firmware size now. A further + * check follows below. + */ +@@ -1138,10 +1135,8 @@ static int slic_load_firmware(struct sli + file = (sdev->model == SLIC_MODEL_OASIS) ? SLIC_FIRMWARE_OASIS : + SLIC_FIRMWARE_MOJAVE; + err = request_firmware(&fw, file, &sdev->pdev->dev); +- if (err) { +- dev_err(&sdev->pdev->dev, "failed to load firmware %s\n", file); ++ if (err) + return err; - } - numsects = *(u32 *)(fw->data + index); - index += 4; - for (i = 0; i < numsects; i++) { + /* Do an initial sanity check concerning firmware size now. A further + * check follows below. + */ --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c @@ -49,11 +49,8 @@ int vnt_download_firmware(struct vnt_pri @@ -2367,7 +2342,7 @@ upstream submission. --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c -@@ -1702,10 +1702,8 @@ static int ti_download_firmware(struct t +@@ -1706,10 +1706,8 @@ static int ti_download_firmware(struct t } check_firmware: @@ -2510,20 +2485,18 @@ upstream submission. return err; --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c -@@ -901,12 +901,8 @@ static int snd_emu10k1_emu1010_init(stru - } +@@ -887,10 +887,8 @@ static int snd_emu10k1_emu1010_init(stru + dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg); - err = request_firmware(&emu->firmware, filename, &emu->pci->dev); -- if (err != 0) { -- dev_info(emu->card->dev, -- "emu1010: firmware: %s not found. Err = %d\n", -- filename, err); -+ if (err != 0) - return err; -- } - dev_info(emu->card->dev, - "emu1010: firmware file = %s, size = 0x%zx\n", - filename, emu->firmware->size); + err = snd_emu1010_load_firmware(emu, 0, &emu->firmware); +- if (err < 0) { +- dev_info(emu->card->dev, "emu1010: Loading Firmware failed\n"); ++ if (err < 0) + return err; +- } + + /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ + snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1815,10 +1815,8 @@ static void azx_firmware_cb(const struct diff --git a/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch b/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch index ab8c1729b..2f0908174 100644 --- a/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch +++ b/debian/patches/bugfix/all/firmware_class-log-every-success-and-failure.patch @@ -23,7 +23,7 @@ format to detect missing firmware. --- --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c -@@ -350,21 +350,22 @@ fw_get_filesystem_firmware(struct device +@@ -418,21 +418,22 @@ fw_get_filesystem_firmware(struct device rc = kernel_read_file_from_path(path, &buf->data, &size, msize, id); if (rc) { @@ -41,7 +41,7 @@ format to detect missing firmware. + dev_info(device, "firmware: direct-loading firmware %s\n", + buf->fw_id); buf->size = size; - fw_finish_direct_load(device, buf); + fw_state_done(&buf->fw_st); break; } __putname(path); @@ -53,7 +53,7 @@ format to detect missing firmware. return rc; } -@@ -1155,7 +1156,7 @@ _request_firmware(const struct firmware +@@ -1193,7 +1194,7 @@ _request_firmware(const struct firmware if (opt_flags & FW_OPT_NOWAIT) { timeout = usermodehelper_read_lock_wait(timeout); if (!timeout) { diff --git a/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch b/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch index bde2c1f1c..83360e99c 100644 --- a/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch +++ b/debian/patches/bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch @@ -11,14 +11,14 @@ Signed-off-by: Ben Hutchings --- --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c -@@ -2456,3 +2456,4 @@ late_initcall(init_btrfs_fs); +@@ -2473,3 +2473,4 @@ late_initcall(init_btrfs_fs); module_exit(exit_btrfs_fs) MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: crypto-crc32c"); --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c -@@ -1373,5 +1373,13 @@ MODULE_DESCRIPTION +@@ -1365,5 +1365,13 @@ MODULE_DESCRIPTION ("VFS to access servers complying with the SNIA CIFS Specification " "e.g. Samba and Windows"); MODULE_VERSION(CIFS_VERSION); @@ -34,14 +34,14 @@ Signed-off-by: Ben Hutchings module_exit(exit_cifs) --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c -@@ -566,3 +566,4 @@ static void __exit fscrypt_exit(void) +@@ -614,3 +614,4 @@ static void __exit fscrypt_exit(void) module_exit(fscrypt_exit); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: crypto-aes crypto-ecb"); --- a/fs/ext4/super.c +++ b/fs/ext4/super.c -@@ -5441,5 +5441,13 @@ static void __exit ext4_exit_fs(void) +@@ -5692,5 +5692,13 @@ static void __exit ext4_exit_fs(void) MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_LICENSE("GPL"); @@ -57,14 +57,15 @@ Signed-off-by: Ben Hutchings module_exit(ext4_exit_fs) --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c -@@ -1742,3 +1742,4 @@ module_exit(exit_f2fs_fs) +@@ -2244,4 +2244,5 @@ module_exit(exit_f2fs_fs) MODULE_AUTHOR("Samsung Electronics's Praesto Team"); MODULE_DESCRIPTION("Flash Friendly File System"); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: crypto-crc32c"); + --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c -@@ -2716,6 +2716,7 @@ static void __exit journal_exit(void) +@@ -2674,6 +2674,7 @@ static void __exit journal_exit(void) } MODULE_LICENSE("GPL"); @@ -74,7 +75,7 @@ Signed-off-by: Ben Hutchings --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c -@@ -1314,5 +1314,8 @@ static void __exit exit_nfsd(void) +@@ -1308,5 +1308,8 @@ static void __exit exit_nfsd(void) MODULE_AUTHOR("Olaf Kirch "); MODULE_LICENSE("GPL"); diff --git a/debian/patches/bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch b/debian/patches/bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch deleted file mode 100644 index 5b57876e9..000000000 --- a/debian/patches/bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Vladimir Davydov -Date: Sat, 1 Oct 2016 16:39:09 +0300 -Subject: mm: memcontrol: use special workqueue for creating per-memcg caches -Origin: https://patchwork.kernel.org/patch/9361853/ -Bug: https://bugzilla.kernel.org/show_bug.cgi?id=172981 - -Creating a lot of cgroups at the same time might stall all worker -threads with kmem cache creation works, because kmem cache creation is -done with the slab_mutex held. The problem was amplified by commits -801faf0db894 ("mm/slab: lockless decision to grow cache") in case of -SLAB and 81ae6d03952c ("mm/slub.c: replace kick_all_cpus_sync() with -synchronize_sched() in kmem_cache_shrink()") in case of SLUB, which -increased the maximal time the slab_mutex can be held. - -To prevent that from happening, let's use a special ordered single -threaded workqueue for kmem cache creation. This shouldn't introduce any -functional changes regarding how kmem caches are created, as the work -function holds the global slab_mutex during its whole runtime anyway, -making it impossible to run more than one work at a time. By using a -single threaded workqueue, we just avoid creating a thread per each -work. Ordering is required to avoid a situation when a cgroup's work is -put off indefinitely because there are other cgroups to serve, in other -words to guarantee fairness. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=172981 -Signed-off-by: Vladimir Davydov -Reported-by: Doug Smythies -Cc: Christoph Lameter -Cc: David Rientjes -Cc: Johannes Weiner -Cc: Joonsoo Kim -Cc: Michal Hocko -Cc: Pekka Enberg -Acked-by: Michal Hocko ---- ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -2232,6 +2232,8 @@ struct memcg_kmem_cache_create_work { - struct work_struct work; - }; - -+static struct workqueue_struct *memcg_kmem_cache_create_wq; -+ - static void memcg_kmem_cache_create_func(struct work_struct *w) - { - struct memcg_kmem_cache_create_work *cw = -@@ -2263,7 +2265,7 @@ static void __memcg_schedule_kmem_cache_ - cw->cachep = cachep; - INIT_WORK(&cw->work, memcg_kmem_cache_create_func); - -- schedule_work(&cw->work); -+ queue_work(memcg_kmem_cache_create_wq, &cw->work); - } - - static void memcg_schedule_kmem_cache_create(struct mem_cgroup *memcg, -@@ -5811,6 +5813,17 @@ static int __init mem_cgroup_init(void) - { - int cpu, node; - -+#ifndef CONFIG_SLOB -+ /* -+ * Kmem cache creation is mostly done with the slab_mutex held, -+ * so use a special workqueue to avoid stalling all worker -+ * threads in case lots of cgroups are created simultaneously. -+ */ -+ memcg_kmem_cache_create_wq = -+ alloc_ordered_workqueue("memcg_kmem_cache_create", 0); -+ BUG_ON(!memcg_kmem_cache_create_wq); -+#endif -+ - hotcpu_notifier(memcg_cpu_hotplug_callback, 0); - - for_each_possible_cpu(cpu) diff --git a/debian/patches/bugfix/all/tools-lib-traceevent-use-ldflags.patch b/debian/patches/bugfix/all/tools-lib-traceevent-use-ldflags.patch index fe0248c1f..d1612f7bb 100644 --- a/debian/patches/bugfix/all/tools-lib-traceevent-use-ldflags.patch +++ b/debian/patches/bugfix/all/tools-lib-traceevent-use-ldflags.patch @@ -7,16 +7,16 @@ Signed-off-by: Ben Hutchings --- --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile -@@ -172,7 +172,7 @@ $(TE_IN): force +@@ -173,7 +173,7 @@ $(TE_IN): force $(Q)$(MAKE) $(build)=libtraceevent - $(OUTPUT)libtraceevent.so: $(TE_IN) -- $(QUIET_LINK)$(CC) --shared $^ -o $@ -+ $(QUIET_LINK)$(CC) $(LDFLAGS) --shared $^ -o $@ + $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN) +- $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ ++ $(QUIET_LINK)$(CC) $(LDFLAGS) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ + @ln -sf $(@F) $(OUTPUT)libtraceevent.so + @ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION) - $(OUTPUT)libtraceevent.a: $(TE_IN) - $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ -@@ -189,7 +189,7 @@ $(PLUGINS_IN): force +@@ -192,7 +192,7 @@ $(PLUGINS_IN): force $(Q)$(MAKE) $(build)=$(plugin_obj) $(OUTPUT)%.so: $(OUTPUT)%-in.o diff --git a/debian/patches/bugfix/powerpc/powerpc-fix-missing-crcs-add-yet-more-asm-prototypes.patch b/debian/patches/bugfix/powerpc/powerpc-fix-missing-crcs-add-yet-more-asm-prototypes.patch index be736e559..2fc9ab727 100644 --- a/debian/patches/bugfix/powerpc/powerpc-fix-missing-crcs-add-yet-more-asm-prototypes.patch +++ b/debian/patches/bugfix/powerpc/powerpc-fix-missing-crcs-add-yet-more-asm-prototypes.patch @@ -12,13 +12,11 @@ Signed-off-by: Ben Hutchings arch/powerpc/include/asm/asm-prototypes.h | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h -index e0baba1535e6..ba0225ff38f8 100644 --- a/arch/powerpc/include/asm/asm-prototypes.h +++ b/arch/powerpc/include/asm/asm-prototypes.h -@@ -18,6 +18,8 @@ +@@ -17,6 +17,8 @@ #include - #include + #include #include +#include +#include diff --git a/debian/patches/bugfix/s390/revert-s390-move-exports-to-definitions.patch b/debian/patches/bugfix/s390/revert-s390-move-exports-to-definitions.patch index 75cf4be0b..f550b8faa 100644 --- a/debian/patches/bugfix/s390/revert-s390-move-exports-to-definitions.patch +++ b/debian/patches/bugfix/s390/revert-s390-move-exports-to-definitions.patch @@ -16,23 +16,19 @@ hashes). 6 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 arch/s390/kernel/s390_ksyms.c -diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild -index 20f196b82a6e..9043d2e1e2ae 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild @@ -1,7 +1,6 @@ - - + generic-y += asm-offsets.h generic-y += clkdev.h + generic-y += dma-contiguous.h -generic-y += export.h generic-y += irq_work.h generic-y += mcs_spinlock.h generic-y += mm-arch-hooks.h -diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile -index 1f0fe98f6db9..72ccc41444dc 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile -@@ -61,7 +61,7 @@ obj-y += entry.o reipl.o relocate_kernel.o +@@ -68,7 +68,7 @@ obj-y += entry.o reipl.o relocate_kernel extra-y += head.o head64.o vmlinux.lds @@ -41,8 +37,6 @@ index 1f0fe98f6db9..72ccc41444dc 100644 obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o obj-$(CONFIG_HIBERNATION) += suspend.o swsusp.o -diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S -index 49a30737adde..c51650a1ed16 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -23,7 +23,6 @@ @@ -53,7 +47,7 @@ index 49a30737adde..c51650a1ed16 100644 __PT_R0 = __PT_GPRS __PT_R1 = __PT_GPRS + 8 -@@ -260,8 +259,6 @@ sie_exit: +@@ -265,8 +264,6 @@ sie_exit: EX_TABLE(.Lrewind_pad,.Lsie_fault) EX_TABLE(sie_exit,.Lsie_fault) @@ -62,7 +56,7 @@ index 49a30737adde..c51650a1ed16 100644 #endif /* -@@ -828,9 +825,6 @@ ENTRY(save_fpu_regs) +@@ -835,9 +832,6 @@ ENTRY(save_fpu_regs) oi __LC_CPU_FLAGS+7,_CIF_FPU br %r14 .Lsave_fpu_regs_end: @@ -72,8 +66,6 @@ index 49a30737adde..c51650a1ed16 100644 /* * Load floating-point controls and floating-point or vector registers. -diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S -index 9a17e4475d27..e499370fbccb 100644 --- a/arch/s390/kernel/mcount.S +++ b/arch/s390/kernel/mcount.S @@ -9,7 +9,6 @@ @@ -93,9 +85,6 @@ index 9a17e4475d27..e499370fbccb 100644 ENTRY(ftrace_caller) .globl ftrace_regs_caller .set ftrace_regs_caller,ftrace_caller -diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c -new file mode 100644 -index 000000000000..e67453b73c3c --- /dev/null +++ b/arch/s390/kernel/s390_ksyms.c @@ -0,0 +1,15 @@ @@ -114,8 +103,6 @@ index 000000000000..e67453b73c3c +#endif +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(memset); -diff --git a/arch/s390/lib/mem.S b/arch/s390/lib/mem.S -index be9fa65bfac4..c6d553e85ab1 100644 --- a/arch/s390/lib/mem.S +++ b/arch/s390/lib/mem.S @@ -5,7 +5,6 @@ @@ -125,8 +112,8 @@ index be9fa65bfac4..c6d553e85ab1 100644 -#include /* - * memset implementation -@@ -61,7 +60,6 @@ ENTRY(memset) + * void *memmove(void *dest, const void *src, size_t n) +@@ -100,7 +99,6 @@ ENTRY(memset) xc 0(1,%r1),0(%r1) .Lmemset_mvc: mvc 1(1,%r1),0(%r1) @@ -134,7 +121,7 @@ index be9fa65bfac4..c6d553e85ab1 100644 /* * memcpy implementation -@@ -88,4 +86,3 @@ ENTRY(memcpy) +@@ -127,4 +125,3 @@ ENTRY(memcpy) j .Lmemcpy_rest .Lmemcpy_mvc: mvc 0(1,%r1),0(%r3) diff --git a/debian/patches/bugfix/x86/tools-hv-fix-fortify-format-warning.patch b/debian/patches/bugfix/x86/tools-hv-fix-fortify-format-warning.patch deleted file mode 100644 index dd8b9039a..000000000 --- a/debian/patches/bugfix/x86/tools-hv-fix-fortify-format-warning.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Ben Hutchings -Date: Fri, 25 Sep 2015 20:28:10 +0100 -Subject: tools/hv: Fix fortify format warning -Forwarded: no - -With fortify enabled, gcc warns: - -tools/hv/hv_kvp_daemon.c:705:2: error: format not a string literal and no format arguments [-Werror=format-security] - snprintf(dev_id, sizeof(dev_id), kvp_net_dir); - ^ - -kvp_net_dir is a pointer to a string literal, but lacks const -qualification. As it is never modified, it should be a const -array rather than a pointer. - -Also, while snprintf() has a bounds check, the following strcat()s -do not. Combine them into a single snprintf(). - -Signed-off-by: Ben Hutchings ---- ---- a/tools/hv/hv_kvp_daemon.c -+++ b/tools/hv/hv_kvp_daemon.c -@@ -691,10 +691,10 @@ static char *kvp_mac_to_if_name(char *ma - DIR *dir; - struct dirent *entry; - FILE *file; -- char *p, *q, *x; -+ char *p, *x; - char *if_name = NULL; - char buf[256]; -- char *kvp_net_dir = "/sys/class/net/"; -+ const char kvp_net_dir[] = "/sys/class/net/"; - char dev_id[256]; - unsigned int i; - -@@ -702,17 +702,9 @@ static char *kvp_mac_to_if_name(char *ma - if (dir == NULL) - return NULL; - -- snprintf(dev_id, sizeof(dev_id), kvp_net_dir); -- q = dev_id + strlen(kvp_net_dir); -- - while ((entry = readdir(dir)) != NULL) { -- /* -- * Set the state for the next pass. -- */ -- *q = '\0'; -- -- strcat(dev_id, entry->d_name); -- strcat(dev_id, "/address"); -+ snprintf(dev_id, sizeof(dev_id), "%s%s/address", -+ kvp_net_dir, entry->d_name); - - file = fopen(dev_id, "r"); - if (file == NULL) diff --git a/debian/patches/debian/tools-perf-install.patch b/debian/patches/debian/tools-perf-install.patch index 8d3ede9ff..5c5619971 100644 --- a/debian/patches/debian/tools-perf-install.patch +++ b/debian/patches/debian/tools-perf-install.patch @@ -7,7 +7,7 @@ Forwarded: no --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -563,8 +563,8 @@ endif +@@ -677,8 +677,8 @@ endif ifndef NO_LIBPERL $(call QUIET_INSTALL, perl-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ @@ -18,7 +18,7 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif -@@ -572,23 +572,23 @@ ifndef NO_LIBPYTHON +@@ -686,23 +686,23 @@ ifndef NO_LIBPYTHON $(call QUIET_INSTALL, python-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ @@ -46,5 +46,5 @@ Forwarded: no - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' - install-bin: install-tools install-tests + install-bin: install-tools install-tests install-traceevent-plugins diff --git a/debian/patches/debian/tools-perf-version.patch b/debian/patches/debian/tools-perf-version.patch index f9fa2ca5b..aa5abc8be 100644 --- a/debian/patches/debian/tools-perf-version.patch +++ b/debian/patches/debian/tools-perf-version.patch @@ -9,7 +9,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -539,18 +539,18 @@ install-gtk: +@@ -649,22 +649,22 @@ endif install-tools: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -29,12 +29,16 @@ version-dependent name. And do the same for trace.] - $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; + $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; endif + ifndef NO_JVMTI + $(call QUIET_INSTALL, $(LIBJVMTI)) \ + $(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)'; + endif - $(call QUIET_INSTALL, libexec) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-archive) \ $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-with-kcore) \ -@@ -578,7 +578,7 @@ ifndef NO_LIBPYTHON +@@ -692,7 +692,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ @@ -43,7 +47,7 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, perf-tip) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' -@@ -599,7 +599,7 @@ install-python_ext: +@@ -713,7 +713,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -79,7 +83,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/util/Build +++ b/tools/perf/util/Build -@@ -138,6 +138,7 @@ CFLAGS_rbtree.o += -Wno-unused-pa +@@ -162,6 +162,7 @@ CFLAGS_rbtree.o += -Wno-unused-pa CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_parse-events.o += -Wno-redundant-decls diff --git a/debian/patches/debian/version.patch b/debian/patches/debian/version.patch index 505f0b711..ed327b283 100644 --- a/debian/patches/debian/version.patch +++ b/debian/patches/debian/version.patch @@ -99,7 +99,7 @@ are set. #include #include -@@ -1340,8 +1341,9 @@ void show_regs(struct pt_regs * regs) +@@ -1328,8 +1329,9 @@ void show_regs(struct pt_regs * regs) printk("NIP: "REG" LR: "REG" CTR: "REG"\n", regs->nip, regs->link, regs->ctr); @@ -119,9 +119,9 @@ are set. #include +#include - #include + #include #include -@@ -3282,11 +3283,12 @@ void __init dump_stack_set_arch_desc(con +@@ -3117,11 +3118,12 @@ void __init dump_stack_set_arch_desc(con */ void dump_stack_print_info(const char *log_lvl) { diff --git a/debian/patches/features/all/aufs4/aufs4-base.patch b/debian/patches/features/all/aufs4/aufs4-base.patch index 4c0442708..463f4deb6 100644 --- a/debian/patches/features/all/aufs4/aufs4-base.patch +++ b/debian/patches/features/all/aufs4/aufs4-base.patch @@ -8,11 +8,9 @@ Patch headers added by debian/patches/features/all/aufs4/gen-patch aufs4.9 base patch -diff --git a/MAINTAINERS b/MAINTAINERS -index 63cefa6..d78b954 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2293,6 +2293,19 @@ F: include/linux/audit.h +@@ -2308,6 +2308,19 @@ F: include/linux/audit.h F: include/uapi/linux/audit.h F: kernel/audit* @@ -32,11 +30,9 @@ index 63cefa6..d78b954 100644 AUXILIARY DISPLAY DRIVERS M: Miguel Ojeda Sandonis W: http://miguelojeda.es/auxdisplay.htm -diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index fa1b7a9..6ee9235 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -701,6 +701,24 @@ static inline int is_loop_device(struct file *file) +@@ -701,6 +701,24 @@ static inline int is_loop_device(struct return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR; } @@ -61,8 +57,6 @@ index fa1b7a9..6ee9235 100644 /* loop sysfs attributes */ static ssize_t loop_attr_show(struct device *dev, char *page, -diff --git a/fs/dcache.c b/fs/dcache.c -index 5c7cc95..df0268c 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1164,7 +1164,7 @@ enum d_walk_ret { @@ -74,8 +68,6 @@ index 5c7cc95..df0268c 100644 enum d_walk_ret (*enter)(void *, struct dentry *), void (*finish)(void *)) { -diff --git a/fs/fcntl.c b/fs/fcntl.c -index 350a2c8..6f42279 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -29,7 +29,7 @@ @@ -87,7 +79,7 @@ index 350a2c8..6f42279 100644 { struct inode * inode = file_inode(filp); int error = 0; -@@ -60,6 +60,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg) +@@ -60,6 +60,8 @@ static int setfl(int fd, struct file * f if (filp->f_op->check_flags) error = filp->f_op->check_flags(arg); @@ -96,11 +88,9 @@ index 350a2c8..6f42279 100644 if (error) return error; -diff --git a/fs/inode.c b/fs/inode.c -index 88110fd..9a9ba3a 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -1642,7 +1642,7 @@ int generic_update_time(struct inode *inode, struct timespec *time, int flags) +@@ -1642,7 +1642,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ @@ -109,11 +99,9 @@ index 88110fd..9a9ba3a 100644 { int (*update_time)(struct inode *, struct timespec *, int); -diff --git a/fs/read_write.c b/fs/read_write.c -index 190e0d36..4052813 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -515,6 +515,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, +@@ -515,6 +515,28 @@ ssize_t __vfs_write(struct file *file, c } EXPORT_SYMBOL(__vfs_write); @@ -142,11 +130,9 @@ index 190e0d36..4052813 100644 ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos) { mm_segment_t old_fs; -diff --git a/fs/splice.c b/fs/splice.c -index 5a7750b..28160a7 100644 --- a/fs/splice.c +++ b/fs/splice.c -@@ -855,8 +855,8 @@ ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, struct file *out, +@@ -856,8 +856,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); /* * Attempt to initiate a splice from pipe to file. */ @@ -157,7 +143,7 @@ index 5a7750b..28160a7 100644 { ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); -@@ -872,9 +872,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, +@@ -873,9 +873,9 @@ static long do_splice_from(struct pipe_i /* * Attempt to initiate a splice from a file to a pipe. */ @@ -170,23 +156,19 @@ index 5a7750b..28160a7 100644 { ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -diff --git a/include/linux/file.h b/include/linux/file.h -index 7444f5f..bdac0be 100644 --- a/include/linux/file.h +++ b/include/linux/file.h -@@ -19,6 +19,7 @@ +@@ -19,6 +19,7 @@ struct dentry; struct path; - extern struct file *alloc_file(struct path *, fmode_t mode, + extern struct file *alloc_file(const struct path *, fmode_t mode, const struct file_operations *fop); +extern struct file *get_empty_filp(void); static inline void fput_light(struct file *file, int fput_needed) { -diff --git a/include/linux/fs.h b/include/linux/fs.h -index dc0478c..27c05e7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1291,6 +1291,7 @@ struct fasync_struct { +@@ -1240,6 +1240,7 @@ extern void fasync_free(struct fasync_st /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -194,7 +176,7 @@ index dc0478c..27c05e7 100644 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern void f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -1715,6 +1716,7 @@ struct file_operations { +@@ -1664,6 +1665,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -202,7 +184,7 @@ index dc0478c..27c05e7 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -1768,6 +1770,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1717,6 +1719,12 @@ ssize_t rw_copy_check_uvector(int type, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -215,7 +197,7 @@ index dc0478c..27c05e7 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); -@@ -2140,6 +2148,7 @@ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, +@@ -2108,6 +2116,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec *, int); @@ -223,11 +205,9 @@ index dc0478c..27c05e7 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -diff --git a/include/linux/splice.h b/include/linux/splice.h -index 00a2116..1f0a4a2 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h -@@ -86,4 +86,10 @@ extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, +@@ -86,4 +86,10 @@ extern void spd_release_page(struct spli extern const struct pipe_buf_operations page_cache_pipe_buf_ops; extern const struct pipe_buf_operations default_pipe_buf_ops; diff --git a/debian/patches/features/all/aufs4/aufs4-mmap.patch b/debian/patches/features/all/aufs4/aufs4-mmap.patch index 04010d6cc..aea007ddd 100644 --- a/debian/patches/features/all/aufs4/aufs4-mmap.patch +++ b/debian/patches/features/all/aufs4/aufs4-mmap.patch @@ -8,11 +8,11 @@ Patch headers added by debian/patches/features/all/aufs4/gen-patch aufs4.9 mmap patch -diff --git a/fs/proc/base.c b/fs/proc/base.c -index ca651ac..0e8551a 100644 +[bwh: Forward-ported to 4.10: adjust indentation] + --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -1953,7 +1953,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) +@@ -1958,7 +1958,7 @@ static int map_files_get_link(struct den down_read(&mm->mmap_sem); vma = find_exact_vma(mm, vm_start, vm_end); if (vma && vma->vm_file) { @@ -21,11 +21,9 @@ index ca651ac..0e8551a 100644 path_get(path); rc = 0; } -diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c -index f8595e8..cb8eda0 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c -@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) +@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_ file = region->vm_file; if (file) { @@ -37,11 +35,9 @@ index f8595e8..cb8eda0 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; } -diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 35b92d8..5b981db 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -291,7 +291,10 @@ static int is_stack(struct proc_maps_private *priv, +@@ -291,7 +291,10 @@ show_map_vma(struct seq_file *m, struct const char *name = NULL; if (file) { @@ -53,7 +49,7 @@ index 35b92d8..5b981db 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1627,7 +1630,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1628,7 +1631,7 @@ static int show_numa_map(struct seq_file struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -62,11 +58,9 @@ index 35b92d8..5b981db 100644 struct mm_struct *mm = vma->vm_mm; struct mm_walk walk = { .hugetlb_entry = gather_hugetlb_stats, -diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c -index 3717562..6a328f1 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c -@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, +@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_fil file = vma->vm_file; if (file) { @@ -78,11 +72,9 @@ index 3717562..6a328f1 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; -diff --git a/include/linux/mm.h b/include/linux/mm.h -index a92c8d7..1d83a2a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1266,6 +1266,28 @@ static inline int fixup_user_fault(struct task_struct *tsk, +@@ -1257,6 +1257,28 @@ static inline int fixup_user_fault(struc } #endif @@ -111,8 +103,6 @@ index a92c8d7..1d83a2a 100644 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, unsigned int gup_flags); extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 4a8aced..badd16b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -275,6 +275,7 @@ struct vm_region { @@ -131,11 +121,9 @@ index 4a8aced..badd16b 100644 void * vm_private_data; /* was vm_pte (shared mem) */ #ifndef CONFIG_MMU -diff --git a/kernel/fork.c b/kernel/fork.c -index 997ac1d..4d0131b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -624,7 +624,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -626,7 +626,7 @@ static __latent_entropy int dup_mmap(str struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -144,11 +132,9 @@ index 997ac1d..4d0131b 100644 if (tmp->vm_flags & VM_DENYWRITE) atomic_dec(&inode->i_writecount); i_mmap_lock_write(mapping); -diff --git a/mm/Makefile b/mm/Makefile -index 295bd7a..14fa1c8 100644 --- a/mm/Makefile +++ b/mm/Makefile -@@ -37,7 +37,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ +@@ -37,7 +37,7 @@ obj-y := filemap.o mempool.o oom_kill. mm_init.o mmu_context.o percpu.o slab_common.o \ compaction.o vmacache.o \ interval_tree.o list_lru.o workingset.o \ @@ -157,11 +143,9 @@ index 295bd7a..14fa1c8 100644 obj-y += init-mm.o -diff --git a/mm/filemap.c b/mm/filemap.c -index 50b52fe..9e607f9 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2304,7 +2304,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) +@@ -2392,7 +2392,7 @@ int filemap_page_mkwrite(struct vm_area_ int ret = VM_FAULT_LOCKED; sb_start_pagefault(inode->i_sb); @@ -170,24 +154,20 @@ index 50b52fe..9e607f9 100644 lock_page(page); if (page->mapping != inode->i_mapping) { unlock_page(page); -diff --git a/mm/memory.c b/mm/memory.c -index e18c57b..7be4a39 100644 --- a/mm/memory.c +++ b/mm/memory.c -@@ -2117,7 +2117,7 @@ static inline int wp_page_reuse(struct fault_env *fe, pte_t orig_pte, - } - - if (!page_mkwrite) -- file_update_time(vma->vm_file); -+ vma_file_update_time(vma); +@@ -2091,7 +2091,7 @@ static void fault_dirty_shared_page(stru } - return VM_FAULT_WRITE; -diff --git a/mm/mmap.c b/mm/mmap.c -index 1af87c1..95b0ff4 100644 + if (!page_mkwrite) +- file_update_time(vma->vm_file); ++ vma_file_update_time(vma); + } + + /* --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -170,7 +170,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -170,7 +170,7 @@ static struct vm_area_struct *remove_vma if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -196,7 +176,7 @@ index 1af87c1..95b0ff4 100644 mpol_put(vma_policy(vma)); kmem_cache_free(vm_area_cachep, vma); return next; -@@ -879,7 +879,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -879,7 +879,7 @@ again: if (remove_next) { if (file) { uprobe_munmap(next, next->vm_start, next->vm_end); @@ -205,7 +185,7 @@ index 1af87c1..95b0ff4 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1727,8 +1727,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1727,8 +1727,8 @@ out: return addr; unmap_and_free_vma: @@ -215,7 +195,7 @@ index 1af87c1..95b0ff4 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2533,7 +2533,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2533,7 +2533,7 @@ static int __split_vma(struct mm_struct goto out_free_mpol; if (new->vm_file) @@ -224,7 +204,7 @@ index 1af87c1..95b0ff4 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2552,7 +2552,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2552,7 +2552,7 @@ static int __split_vma(struct mm_struct if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -233,7 +213,7 @@ index 1af87c1..95b0ff4 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2703,7 +2703,7 @@ int vm_munmap(unsigned long start, size_t len) +@@ -2703,7 +2703,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsign struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -242,7 +222,7 @@ index 1af87c1..95b0ff4 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n", current->comm, current->pid); -@@ -2778,10 +2778,27 @@ int vm_munmap(unsigned long start, size_t len) +@@ -2778,10 +2778,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsign } } @@ -271,7 +251,7 @@ index 1af87c1..95b0ff4 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3056,7 +3073,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3056,7 +3073,7 @@ struct vm_area_struct *copy_vma(struct v if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -280,11 +260,9 @@ index 1af87c1..95b0ff4 100644 if (new_vma->vm_ops && new_vma->vm_ops->open) new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); -diff --git a/mm/nommu.c b/mm/nommu.c -index 8b8faaf..5d26ed94 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -636,7 +636,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -636,7 +636,7 @@ static void __put_nommu_region(struct vm up_write(&nommu_region_sem); if (region->vm_file) @@ -293,7 +271,7 @@ index 8b8faaf..5d26ed94 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -794,7 +794,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -794,7 +794,7 @@ static void delete_vma(struct mm_struct if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -311,7 +289,7 @@ index 8b8faaf..5d26ed94 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1395,10 +1395,10 @@ unsigned long do_mmap(struct file *file, +@@ -1395,10 +1395,10 @@ error_just_free: up_write(&nommu_region_sem); error: if (region->vm_file) @@ -324,9 +302,6 @@ index 8b8faaf..5d26ed94 100644 kmem_cache_free(vm_area_cachep, vma); return ret; -diff --git a/mm/prfile.c b/mm/prfile.c -new file mode 100644 -index 0000000..b323b8a --- /dev/null +++ b/mm/prfile.c @@ -0,0 +1,86 @@ diff --git a/debian/patches/features/all/aufs4/aufs4-standalone.patch b/debian/patches/features/all/aufs4/aufs4-standalone.patch index de345e530..e6993e1f3 100644 --- a/debian/patches/features/all/aufs4/aufs4-standalone.patch +++ b/debian/patches/features/all/aufs4/aufs4-standalone.patch @@ -8,19 +8,17 @@ Patch headers added by debian/patches/features/all/aufs4/gen-patch aufs4.9 standalone patch -diff --git a/fs/dcache.c b/fs/dcache.c -index df0268c..755fea1 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1272,6 +1272,7 @@ void d_walk(struct dentry *parent, void *data, +@@ -1272,6 +1272,7 @@ rename_retry: seq = 1; goto again; } +EXPORT_SYMBOL_GPL(d_walk); - /* - * Search for at least 1 mount point in the dentry's subdirs. -@@ -2855,6 +2856,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) + struct check_mount { + struct vfsmount *mnt; +@@ -2864,6 +2865,7 @@ void d_exchange(struct dentry *dentry1, write_sequnlock(&rename_lock); } @@ -28,11 +26,9 @@ index df0268c..755fea1 100644 /** * d_ancestor - search for an ancestor -diff --git a/fs/exec.c b/fs/exec.c -index 4e497b9..e27d323 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path) +@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path return (path->mnt->mnt_flags & MNT_NOEXEC) || (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC); } @@ -40,11 +36,9 @@ index 4e497b9..e27d323 100644 #ifdef CONFIG_USELIB /* -diff --git a/fs/fcntl.c b/fs/fcntl.c -index 6f42279..04fd33c 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c -@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, unsigned long arg) +@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, un out: return error; } @@ -52,11 +46,9 @@ index 6f42279..04fd33c 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) -diff --git a/fs/file_table.c b/fs/file_table.c -index ad17e05..ae9f267 100644 --- a/fs/file_table.c +++ b/fs/file_table.c -@@ -147,6 +147,7 @@ struct file *get_empty_filp(void) +@@ -147,6 +147,7 @@ over: } return ERR_PTR(-ENFILE); } @@ -88,11 +80,9 @@ index ad17e05..ae9f267 100644 void __init files_init(void) { -diff --git a/fs/inode.c b/fs/inode.c -index 9a9ba3a..a3a18d8 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags) +@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, str return update_time(inode, time, flags); } @@ -100,11 +90,9 @@ index 9a9ba3a..a3a18d8 100644 /** * touch_atime - update the access time -diff --git a/fs/namespace.c b/fs/namespace.c -index e6c234b..8d13f7b 100644 --- a/fs/namespace.c +++ b/fs/namespace.c -@@ -466,6 +466,7 @@ void __mnt_drop_write(struct vfsmount *mnt) +@@ -462,6 +462,7 @@ void __mnt_drop_write(struct vfsmount *m mnt_dec_writers(real_mount(mnt)); preempt_enable(); } @@ -112,7 +100,7 @@ index e6c234b..8d13f7b 100644 /** * mnt_drop_write - give up write access to a mount -@@ -1823,6 +1824,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -1872,6 +1873,7 @@ int iterate_mounts(int (*f)(struct vfsmo } return 0; } @@ -120,8 +108,6 @@ index e6c234b..8d13f7b 100644 static void cleanup_group_ids(struct mount *mnt, struct mount *end) { -diff --git a/fs/notify/group.c b/fs/notify/group.c -index fbe3cbe..bdfc61e 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -22,6 +22,7 @@ @@ -132,7 +118,7 @@ index fbe3cbe..bdfc61e 100644 #include #include "fsnotify.h" -@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_group *group) +@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_ { atomic_inc(&group->refcnt); } @@ -140,7 +126,7 @@ index fbe3cbe..bdfc61e 100644 /* * Drop a reference to a group. Free it if it's through. -@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_group *group) +@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_ if (atomic_dec_and_test(&group->refcnt)) fsnotify_final_destroy_group(group); } @@ -148,7 +134,7 @@ index fbe3cbe..bdfc61e 100644 /* * Create a new fsnotify_group and hold a reference for the group returned. -@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) +@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_gr return group; } @@ -156,11 +142,9 @@ index fbe3cbe..bdfc61e 100644 int fsnotify_fasync(int fd, struct file *file, int on) { -diff --git a/fs/notify/mark.c b/fs/notify/mark.c -index d3fea0b..5fc06ad 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c -@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) +@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_m mark->free_mark(mark); } } @@ -168,7 +152,7 @@ index d3fea0b..5fc06ad 100644 /* Calculate mask of events for a list of marks */ u32 fsnotify_recalc_mask(struct hlist_head *head) -@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark, +@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnoti mutex_unlock(&group->mark_mutex); fsnotify_free_mark(mark); } @@ -176,7 +160,7 @@ index d3fea0b..5fc06ad 100644 void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock) { -@@ -415,6 +417,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, +@@ -415,6 +417,7 @@ err: return ret; } @@ -184,7 +168,7 @@ index d3fea0b..5fc06ad 100644 int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group, struct inode *inode, struct vfsmount *mnt, int allow_dups) -@@ -533,6 +536,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, +@@ -521,6 +524,7 @@ void fsnotify_init_mark(struct fsnotify_ atomic_set(&mark->refcnt, 1); mark->free_mark = free_mark; } @@ -192,11 +176,9 @@ index d3fea0b..5fc06ad 100644 /* * Destroy all marks in destroy_list, waits for SRCU period to finish before -diff --git a/fs/open.c b/fs/open.c -index d3ed817..20d2494 100644 --- a/fs/open.c +++ b/fs/open.c -@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, +@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l inode_unlock(dentry->d_inode); return ret; } @@ -212,8 +194,6 @@ index d3ed817..20d2494 100644 static int do_dentry_open(struct file *f, struct inode *inode, -diff --git a/fs/read_write.c b/fs/read_write.c -index 4052813..7dfd732 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file) @@ -224,7 +204,7 @@ index 4052813..7dfd732 100644 vfs_writef_t vfs_writef(struct file *file) { -@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *file) +@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *fil return new_sync_write; return ERR_PTR(-ENOSYS); } @@ -232,11 +212,9 @@ index 4052813..7dfd732 100644 ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos) { -diff --git a/fs/splice.c b/fs/splice.c -index 28160a7..98c1902 100644 --- a/fs/splice.c +++ b/fs/splice.c -@@ -868,6 +868,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out, +@@ -869,6 +869,7 @@ long do_splice_from(struct pipe_inode_in return splice_write(pipe, out, ppos, len, flags); } @@ -244,7 +222,7 @@ index 28160a7..98c1902 100644 /* * Attempt to initiate a splice from a file to a pipe. -@@ -897,6 +898,7 @@ long do_splice_to(struct file *in, loff_t *ppos, +@@ -898,6 +899,7 @@ long do_splice_to(struct file *in, loff_ return splice_read(in, ppos, pipe, len, flags); } @@ -252,11 +230,9 @@ index 28160a7..98c1902 100644 /** * splice_direct_to_actor - splices data directly between two non-pipes -diff --git a/fs/xattr.c b/fs/xattr.c -index 2d13b4e..41c2bcd 100644 --- a/fs/xattr.c +++ b/fs/xattr.c -@@ -296,6 +296,7 @@ int __vfs_setxattr_noperm(struct dentry *dentry, const char *name, +@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry *xattr_value = value; return error; } @@ -264,8 +240,6 @@ index 2d13b4e..41c2bcd 100644 ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, -diff --git a/kernel/task_work.c b/kernel/task_work.c -index d513051..e056d54 100644 --- a/kernel/task_work.c +++ b/kernel/task_work.c @@ -119,3 +119,4 @@ void task_work_run(void) @@ -273,8 +247,6 @@ index d513051..e056d54 100644 } } +EXPORT_SYMBOL_GPL(task_work_run); -diff --git a/security/commoncap.c b/security/commoncap.c -index 8df676f..6b5cc07 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr) @@ -292,8 +264,6 @@ index 8df676f..6b5cc07 100644 #ifdef CONFIG_SECURITY -diff --git a/security/device_cgroup.c b/security/device_cgroup.c -index 03c1652..f88c84b 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c @@ -7,6 +7,7 @@ @@ -304,7 +274,7 @@ index 03c1652..f88c84b 100644 #include #include #include -@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask) +@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct return __devcgroup_check_permission(type, imajor(inode), iminor(inode), access); } @@ -312,11 +282,9 @@ index 03c1652..f88c84b 100644 int devcgroup_inode_mknod(int mode, dev_t dev) { -diff --git a/security/security.c b/security/security.c -index f825304..8dd441d 100644 --- a/security/security.c +++ b/security/security.c -@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -443,6 +443,7 @@ int security_path_rmdir(const struct pat return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -324,7 +292,7 @@ index f825304..8dd441d 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -459,6 +460,7 @@ int security_path_symlink(const struct p return 0; return call_int_hook(path_symlink, 0, dir, dentry, old_name); } @@ -332,7 +300,7 @@ index f825304..8dd441d 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -467,6 +469,7 @@ int security_path_link(struct dentry *ol return 0; return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); } @@ -340,7 +308,7 @@ index f825304..8dd441d 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path) +@@ -494,6 +497,7 @@ int security_path_truncate(const struct return 0; return call_int_hook(path_truncate, 0, path); } @@ -348,7 +316,7 @@ index f825304..8dd441d 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -501,6 +505,7 @@ int security_path_chmod(const struct pat return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -356,7 +324,7 @@ index f825304..8dd441d 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -508,6 +513,7 @@ int security_path_chown(const struct pat return 0; return call_int_hook(path_chown, 0, path, uid, gid); } @@ -364,7 +332,7 @@ index f825304..8dd441d 100644 int security_path_chroot(const struct path *path) { -@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry) +@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentr return 0; return call_int_hook(inode_readlink, 0, dentry); } @@ -372,7 +340,7 @@ index f825304..8dd441d 100644 int security_inode_follow_link(struct dentry *dentry, struct inode *inode, bool rcu) -@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -608,6 +615,7 @@ int security_inode_permission(struct ino return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -380,7 +348,7 @@ index f825304..8dd441d 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask) +@@ -779,6 +787,7 @@ int security_file_permission(struct file return fsnotify_perm(file, mask); } @@ -388,7 +356,7 @@ index f825304..8dd441d 100644 int security_file_alloc(struct file *file) { -@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot, +@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file return ret; return ima_file_mmap(file, prot); } diff --git a/debian/patches/features/all/securelevel/acpi-ignore-acpi_rsdp-kernel-parameter-when-securele.patch b/debian/patches/features/all/securelevel/acpi-ignore-acpi_rsdp-kernel-parameter-when-securele.patch index 8a26e52d7..728f7b21e 100644 --- a/debian/patches/features/all/securelevel/acpi-ignore-acpi_rsdp-kernel-parameter-when-securele.patch +++ b/debian/patches/features/all/securelevel/acpi-ignore-acpi_rsdp-kernel-parameter-when-securele.patch @@ -13,8 +13,6 @@ Signed-off-by: Josh Boyer drivers/acpi/osl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c -index 814d5f83b75e..242ca81bb606 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -40,6 +40,7 @@ @@ -24,10 +22,10 @@ index 814d5f83b75e..242ca81bb606 100644 +#include #include - #include -@@ -254,7 +255,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); - acpi_physical_address __init acpi_os_get_root_pointer(void) - { + #include +@@ -192,7 +193,7 @@ acpi_physical_address __init acpi_os_get + acpi_physical_address pa = 0; + #ifdef CONFIG_KEXEC - if (acpi_rsdp) + if (acpi_rsdp && (get_securelevel() <= 0)) diff --git a/debian/patches/features/all/securelevel/arm64-add-kernel-config-option-to-set-securelevel-wh.patch b/debian/patches/features/all/securelevel/arm64-add-kernel-config-option-to-set-securelevel-wh.patch index 92f505762..d583775f2 100644 --- a/debian/patches/features/all/securelevel/arm64-add-kernel-config-option-to-set-securelevel-wh.patch +++ b/debian/patches/features/all/securelevel/arm64-add-kernel-config-option-to-set-securelevel-wh.patch @@ -10,6 +10,7 @@ Determine the state of Secure Boot in the EFI stub and pass this to the kernel using the FDT. Signed-off-by: Linn Crosetto +[bwh: Forward-ported to 4.10: adjust context] --- v2: @@ -26,7 +27,7 @@ v2: --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -972,6 +972,19 @@ config EFI +@@ -990,6 +990,19 @@ config EFI allow the kernel to be booted as an EFI application. This is only useful on systems that have UEFI firmware. @@ -56,7 +57,7 @@ v2: #include -@@ -243,6 +244,12 @@ void __init efi_init(void) +@@ -244,6 +245,12 @@ void __init efi_init(void) "Unexpected EFI_MEMORY_DESCRIPTOR version %ld", efi.memmap.desc_version); @@ -66,12 +67,12 @@ v2: + } +#endif + - if (uefi_init() < 0) + if (uefi_init() < 0) { + efi_memmap_unmap(); return; - --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c -@@ -580,7 +580,8 @@ static __initdata struct params fdt_para +@@ -612,7 +612,8 @@ static __initdata struct params fdt_para UEFI_PARAM("MemMap Address", "linux,uefi-mmap-start", mmap), UEFI_PARAM("MemMap Size", "linux,uefi-mmap-size", mmap_size), UEFI_PARAM("MemMap Desc. Size", "linux,uefi-mmap-desc-size", desc_size), @@ -94,15 +95,15 @@ v2: 'S', 'e', 'c', 'u', 'r', 'e', 'B', 'o', 'o', 't', 0 }; --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h -@@ -62,4 +62,5 @@ efi_status_t efi_random_alloc(efi_system +@@ -65,4 +65,5 @@ efi_status_t check_platform_features(efi - efi_status_t check_platform_features(efi_system_table_t *sys_table_arg); + efi_status_t efi_random_get_seed(efi_system_table_t *sys_table_arg); +int efi_get_secureboot(efi_system_table_t *sys_table_arg); #endif --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c -@@ -139,6 +139,13 @@ efi_status_t update_fdt(efi_system_table +@@ -134,6 +134,13 @@ static efi_status_t update_fdt(efi_syste return efi_status; } } @@ -118,7 +119,7 @@ v2: fdt_set_fail: --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -687,6 +687,7 @@ struct efi_fdt_params { +@@ -736,6 +736,7 @@ struct efi_fdt_params { u32 mmap_size; u32 desc_size; u32 desc_ver; diff --git a/debian/patches/features/all/securelevel/pci-lock-down-bar-access-when-securelevel-is-enabled.patch b/debian/patches/features/all/securelevel/pci-lock-down-bar-access-when-securelevel-is-enabled.patch index 06e2136d6..800ef7141 100644 --- a/debian/patches/features/all/securelevel/pci-lock-down-bar-access-when-securelevel-is-enabled.patch +++ b/debian/patches/features/all/securelevel/pci-lock-down-bar-access-when-securelevel-is-enabled.patch @@ -10,6 +10,7 @@ to paranoid - in future we can potentially relax this for sufficiently IOMMU-isolated devices. Signed-off-by: Matthew Garrett +[bwh: Forward-ported to 4.10: adjust context] --- drivers/pci/pci-sysfs.c | 9 +++++++++ drivers/pci/proc.c | 9 ++++++++- @@ -18,7 +19,7 @@ Signed-off-by: Matthew Garrett --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c -@@ -716,6 +716,9 @@ static ssize_t pci_write_config(struct f +@@ -718,6 +718,9 @@ static ssize_t pci_write_config(struct f loff_t init_off = off; u8 *data = (u8 *) buf; @@ -28,7 +29,7 @@ Signed-off-by: Matthew Garrett if (off > dev->cfg_size) return 0; if (off + count > dev->cfg_size) { -@@ -1007,6 +1010,9 @@ static int pci_mmap_resource(struct kobj +@@ -1009,6 +1012,9 @@ static int pci_mmap_resource(struct kobj resource_size_t start, end; int i; @@ -38,7 +39,7 @@ Signed-off-by: Matthew Garrett for (i = 0; i < PCI_ROM_RESOURCE; i++) if (res == &pdev->resource[i]) break; -@@ -1106,6 +1112,9 @@ static ssize_t pci_write_resource_io(str +@@ -1108,6 +1114,9 @@ static ssize_t pci_write_resource_io(str struct bin_attribute *attr, char *buf, loff_t off, size_t count) { @@ -50,14 +51,14 @@ Signed-off-by: Matthew Garrett --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c -@@ -11,6 +11,7 @@ - #include +@@ -12,6 +12,7 @@ #include #include + #include +#include - #include #include #include "pci.h" + @@ -116,6 +117,9 @@ static ssize_t proc_bus_pci_write(struct int size = dev->cfg_size; int cnt; @@ -89,14 +90,14 @@ Signed-off-by: Matthew Garrett /* Make sure the caller is mapping a real resource for this device */ --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c -@@ -10,6 +10,7 @@ - #include +@@ -11,6 +11,7 @@ #include #include + #include +#include - #include #include "pci.h" + SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, @@ -92,7 +93,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigne u32 dword; int err = 0; diff --git a/debian/patches/features/all/securelevel/restrict-dev-mem-and-dev-kmem-when-securelevel-is-se.patch b/debian/patches/features/all/securelevel/restrict-dev-mem-and-dev-kmem-when-securelevel-is-se.patch index dd8676dab..5ce942ac5 100644 --- a/debian/patches/features/all/securelevel/restrict-dev-mem-and-dev-kmem-when-securelevel-is-se.patch +++ b/debian/patches/features/all/securelevel/restrict-dev-mem-and-dev-kmem-when-securelevel-is-se.patch @@ -8,7 +8,7 @@ modification of the kernel at runtime. Prevent this if securelevel has been set. Signed-off-by: Matthew Garrett -[bwh: Forward-ported to 4.9: adjust context] +[bwh: Forward-ported to 4.10: adjust context] --- drivers/char/mem.c | 6 ++++++ 1 file changed, 6 insertions(+) @@ -25,13 +25,13 @@ Signed-off-by: Matthew Garrett if (!valid_phys_addr_range(p, count)) return -EFAULT; -@@ -513,6 +516,9 @@ static ssize_t write_kmem(struct file *f +@@ -514,6 +517,9 @@ static ssize_t write_kmem(struct file *f char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ int err = 0; + if (get_securelevel() > 0) + return -EPERM; + - if (!pfn_valid(PFN_DOWN(p))) - return -EIO; - + if (p < (unsigned long) high_memory) { + unsigned long to_write = min_t(unsigned long, count, + (unsigned long)high_memory - p); diff --git a/debian/patches/features/all/securelevel/uswsusp-disable-when-securelevel-is-set.patch b/debian/patches/features/all/securelevel/uswsusp-disable-when-securelevel-is-set.patch index 88129ec7b..fc68a851b 100644 --- a/debian/patches/features/all/securelevel/uswsusp-disable-when-securelevel-is-set.patch +++ b/debian/patches/features/all/securelevel/uswsusp-disable-when-securelevel-is-set.patch @@ -12,8 +12,6 @@ Signed-off-by: Matthew Garrett kernel/power/user.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/kernel/power/user.c b/kernel/power/user.c -index 526e8911460a..40618bf41620 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -24,6 +24,7 @@ @@ -22,9 +20,9 @@ index 526e8911460a..40618bf41620 100644 #include +#include - #include + #include -@@ -52,6 +53,9 @@ static int snapshot_open(struct inode *inode, struct file *filp) +@@ -52,6 +53,9 @@ static int snapshot_open(struct inode *i if (!hibernation_available()) return -EPERM; diff --git a/debian/patches/features/arm/ARM-dts-orion5x-convert-ls-chl-to-FDT.patch b/debian/patches/features/arm/ARM-dts-orion5x-convert-ls-chl-to-FDT.patch deleted file mode 100644 index babf87735..000000000 --- a/debian/patches/features/arm/ARM-dts-orion5x-convert-ls-chl-to-FDT.patch +++ /dev/null @@ -1,207 +0,0 @@ -From: Ashley Hughes -Date: Sat, 19 Nov 2016 08:10:27 +0100 -Subject: [PATCH] ARM: dts: orion5x: convert ls-chl to FDT -Origin: https://git.kernel.org/linus/f94f268979a2aaeb5842c5b24ed7d44497f7753c - -This patch converts my orion5x ls-chl Linkstation device to device tree. - -[gregory.clement@free-electrons.com: fix title, add back the commit log, -move the removal of the platform in an other patch] -Signed-off-by: Ashley Hughes -Reviewed-by: Andrew Lunn -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/orion5x-lschl.dts | 171 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 172 insertions(+) - create mode 100644 arch/arm/boot/dts/orion5x-lschl.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index befcd2619902..485304914916 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -597,6 +597,7 @@ dtb-$(CONFIG_ARCH_ORION5X) += \ - orion5x-lacie-ethernet-disk-mini-v2.dtb \ - orion5x-linkstation-lsgl.dtb \ - orion5x-linkstation-lswtgl.dtb \ -+ orion5x-lschl.dtb \ - orion5x-lswsgl.dtb \ - orion5x-maxtor-shared-storage-2.dtb \ - orion5x-netgear-wnr854t.dtb \ -diff --git a/arch/arm/boot/dts/orion5x-lschl.dts b/arch/arm/boot/dts/orion5x-lschl.dts -new file mode 100644 -index 000000000000..947409252845 ---- /dev/null -+++ b/arch/arm/boot/dts/orion5x-lschl.dts -@@ -0,0 +1,171 @@ -+/* -+ * Device Tree file for Buffalo Linkstation LS-CHLv3 -+ * -+ * Copyright (C) 2016 Ash Hughes -+ * Copyright (C) 2015, 2016 -+ * Roger Shimizu -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+ -+#include "orion5x-linkstation.dtsi" -+#include "mvebu-linkstation-gpio-simple.dtsi" -+#include "mvebu-linkstation-fan.dtsi" -+#include -+ -+/ { -+ model = "Buffalo Linkstation Live v3 (LS-CHL)"; -+ compatible = "buffalo,lschl", "marvell,orion5x-88f5182", "marvell,orion5x"; -+ -+ memory { /* 128 MB */ -+ device_type = "memory"; -+ reg = <0x00000000 0x8000000>; -+ }; -+ -+ gpio_keys { -+ func { -+ label = "Function Button"; -+ linux,code = ; -+ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; -+ }; -+ -+ power-on-switch { -+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; -+ }; -+ -+ power-auto-switch { -+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ gpio_leds { -+ pinctrl-0 = <&pmx_led_power &pmx_led_alarm &pmx_led_info &pmx_led_func>; -+ blue-power-led { -+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; -+ }; -+ -+ red-alarm-led { -+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; -+ }; -+ -+ amber-info-led { -+ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; -+ }; -+ -+ func { -+ label = "lschl:func:blue:top"; -+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ gpio_fan { -+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW -+ &gpio0 16 GPIO_ACTIVE_LOW>; -+ -+ alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; -+ }; -+}; -+ -+&pinctrl { -+ pmx_led_power: pmx-leds { -+ marvell,pins = "mpp0"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_power_hdd: pmx-power-hdd { -+ marvell,pins = "mpp1"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_led_alarm: pmx-leds { -+ marvell,pins = "mpp2"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_led_info: pmx-leds { -+ marvell,pins = "mpp3"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_fan_lock: pmx-fan-lock { -+ marvell,pins = "mpp6"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_power_switch: pmx-power-switch { -+ marvell,pins = "mpp8", "mpp10", "mpp15"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_power_usb: pmx-power-usb { -+ marvell,pins = "mpp9"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_fan_high: pmx-fan-high { -+ marvell,pins = "mpp14"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_fan_low: pmx-fan-low { -+ marvell,pins = "mpp16"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_led_func: pmx-leds { -+ marvell,pins = "mpp17"; -+ marvell,function = "gpio"; -+ }; -+ -+ pmx_sw_init: pmx-sw-init { -+ marvell,pins = "mpp7"; -+ marvell,function = "gpio"; -+ }; -+}; -+ -+&hdd_power { -+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; -+}; -+ -+&usb_power { -+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; -+}; -+ diff --git a/debian/patches/features/arm/arm-dts-add-support-for-turris-omnia.patch b/debian/patches/features/arm/arm-dts-add-support-for-turris-omnia.patch deleted file mode 100644 index 2650e513e..000000000 --- a/debian/patches/features/arm/arm-dts-add-support-for-turris-omnia.patch +++ /dev/null @@ -1,376 +0,0 @@ -From: Uwe Kleine-König -Date: Fri, 25 Nov 2016 15:26:58 +0100 -Subject: ARM: dts: add support for Turris Omnia -Origin: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=26ca8b52d6e18c10109cabda0f775dd9345bbfdf - -This machine is an open hardware router by cz.nic driven by a -Marvell Armada 385. - -Signed-off-by: Uwe Kleine-König -Signed-off-by: Tomas Hlavacek -Reviewed-by: Andrew Lunn -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/armada-385-turris-omnia.dts | 340 ++++++++++++++++++++++++++ - 2 files changed, 341 insertions(+) - create mode 100644 arch/arm/boot/dts/armada-385-turris-omnia.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 485304914916..9a3f07e86a5a 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -921,6 +921,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \ - armada-385-db-ap.dtb \ - armada-385-linksys-caiman.dtb \ - armada-385-linksys-cobra.dtb \ -+ armada-385-turris-omnia.dtb \ - armada-388-clearfog.dtb \ - armada-388-db.dtb \ - armada-388-gp.dtb \ -diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts b/arch/arm/boot/dts/armada-385-turris-omnia.dts -new file mode 100644 -index 000000000000..ab49acb2d452 ---- /dev/null -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -0,0 +1,340 @@ -+/* -+ * Device Tree file for the Turris Omnia -+ * -+ * Copyright (C) 2016 Uwe Kleine-König -+ * Copyright (C) 2016 Tomas Hlavacek -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is licensed under the terms of the GNU General Public -+ * License version 2. This program is licensed "as is" without -+ * any warranty of any kind, whether express or implied. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/* -+ * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf -+ */ -+ -+/dts-v1/; -+ -+#include -+#include -+#include "armada-385.dtsi" -+ -+/ { -+ model = "Turris Omnia"; -+ compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380"; -+ -+ chosen { -+ stdout-path = &uart0; -+ }; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x00000000 0x40000000>; /* 1024 MB */ -+ }; -+ -+ soc { -+ ranges = ; -+ -+ internal-regs { -+ -+ /* USB part of the PCIe2/USB 2.0 port */ -+ usb@58000 { -+ status = "okay"; -+ }; -+ -+ sata@a8000 { -+ status = "okay"; -+ }; -+ -+ sdhci@d8000 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhci_pins>; -+ status = "okay"; -+ -+ bus-width = <8>; -+ no-1-8-v; -+ non-removable; -+ }; -+ -+ usb3@f0000 { -+ status = "okay"; -+ }; -+ -+ usb3@f8000 { -+ status = "okay"; -+ }; -+ }; -+ -+ pcie-controller { -+ status = "okay"; -+ -+ pcie@1,0 { -+ /* Port 0, Lane 0 */ -+ status = "okay"; -+ }; -+ -+ pcie@2,0 { -+ /* Port 1, Lane 0 */ -+ status = "okay"; -+ }; -+ -+ pcie@3,0 { -+ /* Port 2, Lane 0 */ -+ status = "okay"; -+ }; -+ }; -+ }; -+}; -+ -+/* Connected to 88E6176 switch, port 6 */ -+ð0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ge0_rgmii_pins>; -+ status = "okay"; -+ phy-mode = "rgmii-id"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+}; -+ -+/* Connected to 88E6176 switch, port 5 */ -+ð1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ge1_rgmii_pins>; -+ status = "okay"; -+ phy-mode = "rgmii-id"; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+}; -+ -+/* WAN port */ -+ð2 { -+ status = "okay"; -+ phy-mode = "sgmii"; -+ phy = <&phy1>; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ status = "okay"; -+ -+ i2cmux@70 { -+ compatible = "nxp,pca9547"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0x70>; -+ status = "okay"; -+ -+ i2c@0 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0>; -+ -+ /* STM32F0 command interface at address 0x2a */ -+ /* leds device (in STM32F0) at address 0x2b */ -+ -+ eeprom@54 { -+ compatible = "at,24c64"; -+ reg = <0x54>; -+ -+ /* The EEPROM contains data for bootloader. -+ * Contents: -+ * struct omnia_eeprom { -+ * u32 magic; (=0x0341a034 in LE) -+ * u32 ramsize; (in GiB) -+ * char regdomain[4]; -+ * u32 crc32; -+ * }; -+ */ -+ }; -+ }; -+ -+ i2c@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <1>; -+ -+ /* routed to PCIe0/mSATA connector (CN7A) */ -+ }; -+ -+ i2c@2 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <2>; -+ -+ /* routed to PCIe1/USB2 connector (CN61A) */ -+ }; -+ -+ i2c@3 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <3>; -+ -+ /* routed to PCIe2 connector (CN62A) */ -+ }; -+ -+ i2c@4 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <4>; -+ -+ /* routed to SFP+ */ -+ }; -+ -+ i2c@5 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <5>; -+ -+ /* ATSHA204A at address 0x64 */ -+ }; -+ -+ i2c@6 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <6>; -+ -+ /* exposed on pin header */ -+ }; -+ -+ i2c@7 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <7>; -+ -+ pcawan: gpio@71 { -+ /* -+ * GPIO expander for SFP+ signals and -+ * and phy irq -+ */ -+ compatible = "nxp,pca9538"; -+ reg = <0x71>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcawan_pins>; -+ -+ interrupt-parent = <&gpio1>; -+ interrupts = <14 IRQ_TYPE_LEVEL_LOW>; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+ }; -+ }; -+ }; -+}; -+ -+&mdio { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mdio_pins>; -+ status = "okay"; -+ -+ phy1: phy@1 { -+ status = "okay"; -+ compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ -+ /* irq is connected to &pcawan pin 7 */ -+ }; -+ -+ /* Switch MV88E7176 at address 0x10 */ -+}; -+ -+&pinctrl { -+ pcawan_pins: pcawan-pins { -+ marvell,pins = "mpp46"; -+ marvell,function = "gpio"; -+ }; -+ -+ spi0cs0_pins: spi0cs0-pins { -+ marvell,pins = "mpp25"; -+ marvell,function = "spi0"; -+ }; -+ -+ spi0cs1_pins: spi0cs1-pins { -+ marvell,pins = "mpp26"; -+ marvell,function = "spi0"; -+ }; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins &spi0cs0_pins>; -+ status = "okay"; -+ -+ spi-nor@0 { -+ compatible = "spansion,s25fl164k", "jedec,spi-nor"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0>; -+ spi-max-frequency = <40000000>; -+ -+ partitions { -+ compatible = "fixed-partitions"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ partition@0 { -+ reg = <0x0 0x00100000>; -+ label = "U-Boot"; -+ }; -+ -+ partition@100000 { -+ reg = <0x00100000 0x00700000>; -+ label = "Rescue system"; -+ }; -+ }; -+ }; -+ -+ /* MISO, MOSI, SCLK and CS1 are routed to pin header CN11 */ -+}; -+ -+&uart0 { -+ /* Pin header CN10 */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins>; -+ status = "okay"; -+}; -+ -+&uart1 { -+ /* Pin header CN11 */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>; -+ status = "okay"; -+}; diff --git a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch index d606fbfc6..e05cee0ac 100644 --- a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch +++ b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch @@ -19,16 +19,18 @@ version at boot time. Add a Kconfig parameter to set the default. Signed-off-by: Ben Hutchings --- - Documentation/kernel-parameters.txt | 4 ++++ - arch/x86/Kconfig | 8 +++++++ - arch/x86/include/asm/elf.h | 8 ++++++- - arch/x86/entry/entry_64.S | 36 ++++++++++++++++++++++--------- - arch/x86/entry/syscall_64.c | 43 +++++++++++++++++++++++++++++++++++++ - 5 files changed, 88 insertions(+), 11 deletions(-) + Documentation/admin-guide/kernel-parameters.txt | 4 ++ + arch/x86/Kconfig | 8 ++++ + arch/x86/entry/common.c | 16 ++++++++- + arch/x86/entry/entry_64.S | 18 +++++++++-- + arch/x86/entry/syscall_64.c | 39 ++++++++++++++++++++++++ + arch/x86/include/asm/elf.h | 3 + + arch/x86/include/asm/syscall.h | 6 +++ + 7 files changed, 89 insertions(+), 5 deletions(-) ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -4005,6 +4005,10 @@ bytes respectively. Such letter suffixes +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -3829,6 +3829,10 @@ switches= [HW,M68k] @@ -41,9 +43,9 @@ Signed-off-by: Ben Hutchings on older distributions. When this option is enabled --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -2721,6 +2721,14 @@ config X86_X32 - elf32_x86_64 support enabled to compile a kernel with this - option set. +@@ -2757,6 +2757,14 @@ config COMPAT_32 + select HAVE_UID16 + select OLD_SIGSUSPEND3 +config X86_X32_DISABLED + bool "x32 ABI disabled by default" @@ -77,7 +79,7 @@ Signed-off-by: Ben Hutchings # error "The following code assumes __USER32_DS == __USER_DS" --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S -@@ -195,8 +195,12 @@ entry_SYSCALL_64_fastpath: +@@ -190,8 +190,12 @@ entry_SYSCALL_64_fastpath: #if __SYSCALL_MASK == ~0 cmpq $__NR_syscall_max, %rax #else @@ -92,7 +94,7 @@ Signed-off-by: Ben Hutchings #endif ja 1f /* return -ENOSYS (already in pt_regs->ax) */ movq %r10, %rcx -@@ -331,6 +335,16 @@ opportunistic_sysret_failed: +@@ -326,6 +330,16 @@ opportunistic_sysret_failed: jmp restore_c_regs_and_iret END(entry_SYSCALL_64) diff --git a/debian/patches/series b/debian/patches/series index 9c81d22ab..afc3cfaaf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -53,17 +53,13 @@ features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch features/mips/MIPS-octeon-Add-support-for-the-UBNT-E200-board.patch features/x86/x86-memtest-WARN-if-bad-RAM-found.patch features/x86/x86-make-x32-syscall-support-conditional.patch -features/arm/arm-dts-add-support-for-turris-omnia.patch features/arm/arm-dts-turris-omnia-add-support-for-ethernet-switch.patch -features/arm/ARM-dts-orion5x-convert-ls-chl-to-FDT.patch # Miscellaneous bug fixes bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch bugfix/all/disable-some-marvell-phys.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch bugfix/all/kbuild-do-not-use-hyphen-in-exported-variable-name.patch -bugfix/all/ext4-fix-bug-838544.patch -bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch bugfix/all/partially-revert-usb-kconfig-using-select-for-usb_co.patch # Miscellaneous features @@ -116,7 +112,6 @@ bugfix/all/lockdep-fix-soname.patch bugfix/all/tools-perf-remove-shebangs.patch bugfix/all/tools-lib-traceevent-use-ldflags.patch bugfix/all/tools-lib-lockdep-use-ldflags.patch -bugfix/x86/tools-hv-fix-fortify-format-warning.patch bugfix/x86/revert-perf-build-fix-libunwind-feature-detection-on.patch bugfix/alpha/alpha-uapi-add-support-for-__sane_userspace_types__.patch bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch