Commit 8457aba3 authored by Ben Hutchings's avatar Ben Hutchings

Update to 4.17-rc1

- Drop patches included upstream
- Drop "Don't WARN about expected W+X pages on Xen"; the problem appears
  to have been fixed by upstream commits 2cc42bac1c ("x86-64/Xen: eliminate
  W+X mappings") and 672c0ae09b33 ("x86/mm: Consider effective protection
  attributes in W+X check")
- Drop "Kbuild: kconfig: Verbose version of --listnewconfig"; it seems
  redundant with upstream commit 17baab68d337 ("kconfig: extend output of
  'listnewconfig'")
- Drop lockdown patch to drivers/scsi/eata.c; the driver was removed
  upstream
- Refresh various other patches
parent 84cc9cc2
linux (4.17~rc1-1~exp1) UNRELEASED; urgency=medium
* New upstream release candidate
[ Ben Hutchings ]
* [amd64] Drop our patch "Don't WARN about expected W+X pages on Xen"; the
problem appears to have been fixed upstream
* Drop our patch "Kbuild: kconfig: Verbose version of --listnewconfig";
listnewconfig now shows symbol values by default
-- Ben Hutchings <ben@decadent.org.uk> Thu, 19 Apr 2018 21:37:24 +0100
linux (4.16-1) UNRELEASED; urgency=medium
[ Ben Hutchings ]
From: Theodore Ts'o <tytso@mit.edu>
Date: Mon, 26 Mar 2018 23:54:10 -0400
Subject: ext4: add validity checks for bitmap block numbers
Origin: https://git.kernel.org/linus/7dac4a1726a9c64a517d595c40e95e2d0d135f6f
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1093
An privileged attacker can cause a crash by mounting a crafted ext4
image which triggers a out-of-bounds read in the function
ext4_valid_block_bitmap() in fs/ext4/balloc.c.
This issue has been assigned CVE-2018-1093.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199181
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1560782
Reported-by: Wen Xu <wen.xu@gatech.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
---
fs/ext4/balloc.c | 16 ++++++++++++++--
fs/ext4/ialloc.c | 7 +++++++
2 files changed, 21 insertions(+), 2 deletions(-)
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -340,20 +340,25 @@ static ext4_fsblk_t ext4_valid_block_bit
/* check whether block bitmap block number is set */
blk = ext4_block_bitmap(sb, desc);
offset = blk - group_first_block;
- if (!ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
+ !ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
/* bad block bitmap */
return blk;
/* check whether the inode bitmap block number is set */
blk = ext4_inode_bitmap(sb, desc);
offset = blk - group_first_block;
- if (!ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
+ !ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
/* bad block bitmap */
return blk;
/* check whether the inode table block number is set */
blk = ext4_inode_table(sb, desc);
offset = blk - group_first_block;
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
+ EXT4_B2C(sbi, offset + sbi->s_itb_per_group) >= sb->s_blocksize)
+ return blk;
next_zero_bit = ext4_find_next_zero_bit(bh->b_data,
EXT4_B2C(sbi, offset + sbi->s_itb_per_group),
EXT4_B2C(sbi, offset));
@@ -419,6 +424,7 @@ struct buffer_head *
ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group)
{
struct ext4_group_desc *desc;
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
struct buffer_head *bh;
ext4_fsblk_t bitmap_blk;
int err;
@@ -427,6 +433,12 @@ ext4_read_block_bitmap_nowait(struct sup
if (!desc)
return ERR_PTR(-EFSCORRUPTED);
bitmap_blk = ext4_block_bitmap(sb, desc);
+ if ((bitmap_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
+ (bitmap_blk >= ext4_blocks_count(sbi->s_es))) {
+ ext4_error(sb, "Invalid block bitmap block %llu in "
+ "block_group %u", bitmap_blk, block_group);
+ return ERR_PTR(-EFSCORRUPTED);
+ }
bh = sb_getblk(sb, bitmap_blk);
if (unlikely(!bh)) {
ext4_error(sb, "Cannot get buffer for block bitmap - "
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -160,6 +160,7 @@ static struct buffer_head *
ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
{
struct ext4_group_desc *desc;
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
struct buffer_head *bh = NULL;
ext4_fsblk_t bitmap_blk;
int err;
@@ -169,6 +170,12 @@ ext4_read_inode_bitmap(struct super_bloc
return ERR_PTR(-EFSCORRUPTED);
bitmap_blk = ext4_inode_bitmap(sb, desc);
+ if ((bitmap_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
+ (bitmap_blk >= ext4_blocks_count(sbi->s_es))) {
+ ext4_error(sb, "Invalid inode bitmap blk %llu in "
+ "block_group %u", bitmap_blk, block_group);
+ return ERR_PTR(-EFSCORRUPTED);
+ }
bh = sb_getblk(sb, bitmap_blk);
if (unlikely(!bh)) {
ext4_error(sb, "Cannot read inode bitmap - "
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 29 Mar 2018 22:10:31 -0400
Subject: ext4: always initialize the crc32c checksum driver
Origin: https://git.kernel.org/linus/a45403b51582a87872927a3e0fc0a389c26867f1
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1094
The extended attribute code now uses the crc32c checksum for hashing
purposes, so we should just always always initialize it. We also want
to prevent NULL pointer dereferences if one of the metadata checksum
features is enabled after the file sytsem is originally mounted.
This issue has been assigned CVE-2018-1094.
https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
---
fs/ext4/super.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3489,15 +3489,12 @@ static int ext4_fill_super(struct super_
}
/* Load the checksum driver */
- if (ext4_has_feature_metadata_csum(sb) ||
- ext4_has_feature_ea_inode(sb)) {
- sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
- if (IS_ERR(sbi->s_chksum_driver)) {
- ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
- ret = PTR_ERR(sbi->s_chksum_driver);
- sbi->s_chksum_driver = NULL;
- goto failed_mount;
- }
+ sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
+ if (IS_ERR(sbi->s_chksum_driver)) {
+ ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
+ ret = PTR_ERR(sbi->s_chksum_driver);
+ sbi->s_chksum_driver = NULL;
+ goto failed_mount;
}
/* Check superblock checksum */
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 29 Mar 2018 21:56:09 -0400
Subject: ext4: fail ext4_iget for root directory if unallocated
Origin: https://git.kernel.org/linus/8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1092
If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, before all of
the file system structures are set up, and this will result in an OOPS
caused by a NULL pointer dereference.
This issue has been assigned CVE-2018-1092.
https://bugzilla.kernel.org/show_bug.cgi?id=199179
https://bugzilla.redhat.com/show_bug.cgi?id=1560777
Reported-by: Wen Xu <wen.xu@gatech.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
---
fs/ext4/inode.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4745,6 +4745,12 @@ struct inode *ext4_iget(struct super_blo
goto bad_inode;
raw_inode = ext4_raw_inode(&iloc);
+ if ((ino == EXT4_ROOT_INO) && (raw_inode->i_links_count == 0)) {
+ EXT4_ERROR_INODE(inode, "root inode unallocated");
+ ret = -EFSCORRUPTED;
+ goto bad_inode;
+ }
+
if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) {
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
......@@ -23,37 +23,9 @@ upstream submission.
head = (struct fw_header *)fw->data;
if (head->magic != 0x4e657458) {
--- a/arch/cris/arch-v32/drivers/iop_fw_load.c
+++ b/arch/cris/arch-v32/drivers/iop_fw_load.c
@@ -74,12 +74,7 @@ int iop_fw_load_spu(const unsigned char
fw_name,
&iop_spu_device[spu_inst]);
if (retval != 0)
- {
- printk(KERN_ERR
- "iop_load_spu: Failed to load firmware \"%s\"\n",
- fw_name);
return retval;
- }
data = (u32 *) fw_entry->data;
/* acquire ownership of memory controller */
@@ -137,12 +132,7 @@ int iop_fw_load_mpu(unsigned char *fw_na
/* get firmware */
retval = request_firmware(&fw_entry, fw_name, &iop_mpu_device);
if (retval != 0)
- {
- printk(KERN_ERR
- "iop_load_spu: Failed to load firmware \"%s\"\n",
- fw_name);
return retval;
- }
data = (u32 *) fw_entry->data;
/* disable MPU */
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -739,10 +739,8 @@ static enum ucode_state request_microcod
@@ -747,10 +747,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);
......@@ -96,7 +68,7 @@ upstream submission.
fw_size = firmware->size / sizeof(u32);
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -425,10 +425,8 @@ static int ath3k_load_patch(struct usb_d
@@ -430,10 +430,8 @@ static int ath3k_load_patch(struct usb_d
le32_to_cpu(fw_version.rom_version));
ret = request_firmware(&firmware, filename, &udev->dev);
......@@ -108,7 +80,7 @@ upstream submission.
pt_rom_version = get_unaligned_le32(firmware->data +
firmware->size - 8);
@@ -488,10 +486,8 @@ static int ath3k_load_syscfg(struct usb_
@@ -493,10 +491,8 @@ static int ath3k_load_syscfg(struct usb_
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
ret = request_firmware(&firmware, filename, &udev->dev);
......@@ -203,7 +175,7 @@ upstream submission.
fw->size, fw_name);
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1461,11 +1461,8 @@ static void sdma_load_firmware(const str
@@ -1482,11 +1482,8 @@ static void sdma_load_firmware(const str
const struct sdma_script_start_addrs *addr;
unsigned short *ram_code;
......@@ -313,7 +285,7 @@ upstream submission.
ret = qib_ibsd_ucode_loaded(dd->pport, fw);
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2717,10 +2717,8 @@ static int mxt_load_fw(struct device *de
@@ -2724,10 +2724,8 @@ static int mxt_load_fw(struct device *de
int ret;
ret = request_firmware(&fw, fn, dev);
......@@ -436,7 +408,7 @@ upstream submission.
p = kmalloc(fw->size, GFP_KERNEL);
--- a/drivers/media/dvb-frontends/af9013.c
+++ b/drivers/media/dvb-frontends/af9013.c
@@ -1140,14 +1140,8 @@ static int af9013_download_firmware(stru
@@ -1059,14 +1059,8 @@ static int af9013_download_firmware(stru
/* Request the firmware, will block and timeout */
ret = request_firmware(&firmware, name, &client->dev);
......@@ -665,33 +637,30 @@ upstream submission.
for (i = 0; i < ARRAY_SIZE(tab2); i++) {
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -1252,13 +1252,8 @@ static int ngene_load_firm(struct ngene
@@ -1253,19 +1253,14 @@ static int ngene_load_firm(struct ngene
break;
}
- if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) {
- printk(KERN_ERR DEVICE_NAME
- ": Could not load firmware file %s.\n", fw_name);
- printk(KERN_INFO DEVICE_NAME
- ": Copy %s to your hotplug directory!\n", fw_name);
- dev_err(pdev, "Could not load firmware file %s.\n", fw_name);
- dev_info(pdev, "Copy %s to your hotplug directory!\n",
- fw_name);
+ if (request_firmware(&fw, fw_name, &dev->pci_dev->dev))
return -1;
- }
if (size == 0)
size = fw->size;
if (size != fw->size) {
@@ -1266,8 +1261,6 @@ static int ngene_load_firm(struct ngene
": Firmware %s has invalid size!", fw_name);
dev_err(pdev, "Firmware %s has invalid size!", fw_name);
err = -1;
} else {
- printk(KERN_INFO DEVICE_NAME
- ": Loading firmware file %s.\n", fw_name);
- dev_info(pdev, "Loading firmware file %s.\n", fw_name);
ngene_fw = (u8 *) fw->data;
err = ngene_command_load_firmware(dev, ngene_fw, size);
}
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -1156,10 +1156,8 @@ static int smscore_load_firmware_from_fi
@@ -1162,10 +1162,8 @@ static int smscore_load_firmware_from_fi
return -EINVAL;
rc = request_firmware(&fw, fw_filename, coredev->device);
......@@ -906,7 +875,7 @@ upstream submission.
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
@@ -2345,10 +2345,7 @@ void cx23885_card_setup(struct cx23885_d
@@ -2425,10 +2425,7 @@ void cx23885_card_setup(struct cx23885_d
cinfo.rev, filename);
ret = request_firmware(&fw, filename, &dev->pci->dev);
......@@ -1003,7 +972,7 @@ upstream submission.
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -2306,10 +2306,8 @@ static int s2255_probe(struct usb_interf
@@ -2298,10 +2298,8 @@ static int s2255_probe(struct usb_interf
}
/* load the first chunk */
if (request_firmware(&dev->fw_data->fw,
......@@ -1242,7 +1211,7 @@ upstream submission.
if (ret)
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -1290,9 +1290,6 @@ static const struct firmware *e100_reque
@@ -1291,9 +1291,6 @@ static const struct firmware *e100_reque
if (err) {
if (required) {
......@@ -1464,7 +1433,7 @@ upstream submission.
}
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -8417,12 +8417,8 @@ static int ipw2100_get_firmware(struct i
@@ -8416,12 +8416,8 @@ static int ipw2100_get_firmware(struct i
rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev);
......@@ -1480,7 +1449,7 @@ upstream submission.
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -3417,10 +3417,8 @@ static int ipw_get_fw(struct ipw_priv *p
@@ -3410,10 +3410,8 @@ static int ipw_get_fw(struct ipw_priv *p
/* ask firmware_class module to get the boot firmware off disk */
rc = request_firmware(raw, name, &priv->pci_dev->dev);
......@@ -1860,7 +1829,7 @@ upstream submission.
}
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -4094,10 +4094,8 @@ static ssize_t ipr_store_update_fw(struc
@@ -4061,10 +4061,8 @@ static ssize_t ipr_store_update_fw(struc
if (endline)
*endline = '\0';
......@@ -1898,7 +1867,7 @@ upstream submission.
}
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -7238,8 +7238,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
@@ -7267,8 +7267,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
/* Load firmware blob. */
blob = qla2x00_request_firmware(vha);
if (!blob) {
......@@ -1907,7 +1876,7 @@ upstream submission.
ql_log(ql_log_info, vha, 0x0084,
"Firmware images can be retrieved from: "QLA_FW_URL ".\n");
return QLA_FUNCTION_FAILED;
@@ -7341,8 +7339,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
@@ -7370,8 +7368,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
/* Load firmware blob. */
blob = qla2x00_request_firmware(vha);
if (!blob) {
......@@ -1918,7 +1887,7 @@ upstream submission.
QLA_FW_URL ".\n");
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -2465,11 +2465,8 @@ try_blob_fw:
@@ -2464,11 +2464,8 @@ try_blob_fw:
/* Load firmware blob. */
blob = ha->hablob = qla2x00_request_firmware(vha);
......@@ -1933,7 +1902,7 @@ upstream submission.
if (qla82xx_validate_firmware_blob(vha,
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -6496,8 +6496,6 @@ qla2x00_request_firmware(scsi_qla_host_t
@@ -6511,8 +6511,6 @@ qla2x00_request_firmware(scsi_qla_host_t
goto out;
if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) {
......@@ -2465,7 +2434,7 @@ upstream submission.
return err;
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -887,10 +887,8 @@ static int snd_emu10k1_emu1010_init(stru
@@ -888,10 +888,8 @@ static int snd_emu10k1_emu1010_init(stru
dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg);
err = snd_emu1010_load_firmware(emu, 0, &emu->firmware);
......@@ -2479,7 +2448,7 @@ upstream submission.
snd_emu1010_fpga_read(emu, EMU_HANA_ID, &reg);
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1959,10 +1959,8 @@ static void azx_firmware_cb(const struct
@@ -1970,10 +1970,8 @@ static void azx_firmware_cb(const struct
struct azx *chip = card->private_data;
struct pci_dev *pci = chip->pci;
......@@ -2564,7 +2533,7 @@ upstream submission.
"too short firmware size %d (expected %d)\n",
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -890,10 +890,8 @@ static int wm2000_i2c_probe(struct i2c_c
@@ -891,10 +891,8 @@ static int wm2000_i2c_probe(struct i2c_c
}
ret = request_firmware(&fw, filename, &i2c->dev);
......
......@@ -21,9 +21,9 @@ This does not cover the case where we fall back to a user-mode helper
NOTE: hw-detect will depend on the "firmware: failed to load %s (%d)\n"
format to detect missing firmware.
---
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -443,21 +443,22 @@ fw_get_filesystem_firmware(struct device
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -322,21 +322,22 @@ fw_get_filesystem_firmware(struct device
rc = kernel_read_file_from_path(path, &fw_priv->data, &size,
msize, id);
if (rc) {
......@@ -53,7 +53,9 @@ format to detect missing firmware.
return rc;
}
@@ -1120,7 +1121,7 @@ static int fw_load_from_user_helper(stru
--- a/drivers/base/firmware_loader/fallback.c
+++ b/drivers/base/firmware_loader/fallback.c
@@ -609,7 +609,7 @@ static int fw_load_from_user_helper(stru
if (opt_flags & FW_OPT_NOWAIT) {
timeout = usermodehelper_read_lock_wait(timeout);
if (!timeout) {
......
......@@ -22,7 +22,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -194,7 +194,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL
@@ -195,7 +195,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
cc-option = $(call __cc-option, $(CC),\
......@@ -31,7 +31,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
# hostcc-option
# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586)
@@ -204,23 +204,24 @@ hostcc-option = $(call __cc-option, $(HO
@@ -205,23 +205,24 @@ hostcc-option = $(call __cc-option, $(HO
# cc-option-yn
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
cc-option-yn = $(call try-run-cached,\
......@@ -60,18 +60,18 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
# cc-ifversion
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
@@ -238,7 +239,7 @@ cc-ldoption = $(call try-run-cached,\
@@ -234,7 +235,7 @@ cc-if-fullversion = $(shell [ $(cc-fullv
# cc-ldoption
# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
cc-ldoption = $(call try-run-cached,\
- $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
+ $(CC) $(1) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
# ld-option
# Usage: LDFLAGS += $(call ld-option, -X)
ld-option = $(call try-run-cached,\
- $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \
+ $(CC) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \
$(LD) $(LDFLAGS) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
# ar-option
--- a/Makefile
+++ b/Makefile
@@ -667,6 +667,8 @@ endif
@@ -652,6 +652,8 @@ endif
KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
$(call cc-disable-warning,maybe-uninitialized,))
......@@ -80,7 +80,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
# Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
@@ -776,7 +778,7 @@ KBUILD_CFLAGS += $(call cc-option,-fdata
@@ -803,7 +805,7 @@ KBUILD_CFLAGS += $(call cc-option,-fdata
endif
# arch Makefile may override CC so keep this after arch Makefile is included
......
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts?h=next-20180309&id=c04ffa71ff491220cac28f55237c9aad379a8656
From c04ffa71ff491220cac28f55237c9aad379a8656 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Fri, 2 Mar 2018 14:44:36 +0100
Subject: [PATCH] ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate
Different modules maybe installed by the user on the eMMC connector
of the odroid-c2. While the red modules are working without an issue,
it seems some black modules (apparently Samsung based) are having
issue at 200MHz
While the tuning algorithm introduced in v4.14 enables high speed modes
on every other tested designs, it seems a problem remains for this
particular combination of board and eMMC module.
Lowering the maximum frequency of the eMMC on this board until we can
figure out a better solution.
Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function")
Suggested-by: Ellie Reeves <ellierevves@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Cc: stable@vger.kernel.org
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 0bc0f65e4f37..54954b314a45 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -274,7 +274,7 @@
pinctrl-names = "default", "clk-gate";
bus-width = <8>;
- max-frequency = <200000000>;
+ max-frequency = <100000000>;
non-removable;
disable-wp;
cap-mmc-highspeed;
--
2.11.0
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 16 Mar 2017 03:05:43 +0000
Subject: [amd64] Don't WARN about expected W+X pages on Xen
Bug-Debian: https://bugs.debian.org/852324
Forwarded: not-needed
Currently Xen PV domains (or at least dom0) on amd64 tend to have a
large number of low kernel pages with W+X permissions. It's not
obvious how to fix this, and we're not going to get any new
information by WARNing about this, but we do still want to hear about
other W+X cases. So add a condition to the WARN_ON.
---
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
+#include <xen/xen.h>
#include <asm/pgtable.h>
@@ -231,7 +232,7 @@ static void note_page(struct seq_file *m
pgprotval_t pr = pgprot_val(st->current_prot);
if (st->check_wx && (pr & _PAGE_RW) && !(pr & _PAGE_NX)) {
- WARN_ONCE(1,
+ WARN_ONCE(!(IS_ENABLED(CONFIG_X86_64) && xen_pv_domain()),
"x86/mm: Found insecure W+X mapping at address %p/%pS\n",
(void *)st->start_address,
(void *)st->start_address);
......@@ -22,6 +22,6 @@ once it's ready to speak MBIM.
-#else
static bool prefer_mbim;
-#endif
module_param(prefer_mbim, bool, S_IRUGO | S_IWUSR);
module_param(prefer_mbim, bool, 0644);
MODULE_PARM_DESC(prefer_mbim, "Prefer MBIM setting on dual NCM/MBIM functions");
......@@ -14,9 +14,9 @@ an early check to avoid failing at a point where we cannot display
anything.
---
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -455,9 +455,12 @@ fw_get_filesystem_firmware(struct device
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -334,9 +334,12 @@ fw_get_filesystem_firmware(struct device
}
__putname(path);
......@@ -42,7 +42,7 @@ anything.
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -609,6 +609,7 @@ static int amdgpu_pci_probe(struct pci_d
@@ -626,6 +626,7 @@ static int amdgpu_pci_probe(struct pci_d
if (!amdgpu_firmware_installed()) {
DRM_ERROR("amdgpu requires firmware installed\n");
......
......@@ -7,7 +7,7 @@ Forwarded: not-needed
--- a/.gitignore
+++ b/.gitignore
@@ -61,11 +61,6 @@ modules.builtin
@@ -64,11 +64,6 @@ modules.builtin
/*.spec
#
......@@ -19,7 +19,7 @@ Forwarded: not-needed
# Snap directory (make snap-pkg)
#
/snap/
@@ -76,13 +71,6 @@ modules.builtin
@@ -79,14 +74,6 @@ modules.builtin
/tar-install/
#
......@@ -28,15 +28,16 @@ Forwarded: not-needed
-!.gitignore
-!.mailmap
-!.cocciconfig
-!.clang-format
-
-#
# Generated include files
#
include/config
@@ -131,3 +119,10 @@ all.config
#Automatically generated by ASN.1 compiler
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.c
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.h
@@ -132,3 +119,10 @@ all.config
# Kdevelop4
*.kdev4
+
+#
+# Debian packaging: ignore everything at the top level, since it isn't
......
......@@ -14,7 +14,7 @@ use of $(ARCH) needs to be moved after this.
--- a/Makefile
+++ b/Makefile
@@ -314,39 +314,6 @@ SUBARCH := $(shell uname -m | sed -e s/i
@@ -323,31 +323,6 @@ SUBARCH := $(shell uname -m | sed -e s/i
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
......@@ -42,19 +42,11 @@ use of $(ARCH) needs to be moved after this.
-ifeq ($(ARCH),sh64)
- SRCARCH := sh
-endif
-
-# Additional ARCH settings for tile
-ifeq ($(ARCH),tilepro)
- SRCARCH := tile
-endif
-ifeq ($(ARCH),tilegx)
- SRCARCH := tile
-endif
-
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
@@ -395,6 +362,38 @@ CFLAGS_KERNEL =
@@ -400,6 +375,30 @@ CFLAGS_KERNEL =
AFLAGS_KERNEL =
LDFLAGS_vmlinux =
......@@ -81,14 +73,6 @@ use of $(ARCH) needs to be moved after this.
+ifeq ($(ARCH),sh64)
+ SRCARCH := sh
+endif
+
+# Additional ARCH settings for tile
+ifeq ($(ARCH),tilepro)
+ SRCARCH := tile
+endif
+ifeq ($(ARCH),tilegx)
+ SRCARCH := tile
+endif
+
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
......
......@@ -8,8 +8,8 @@ it by default yet.
--- a/kernel/sched/autogroup.c
+++ b/kernel/sched/autogroup.c
@@ -7,7 +7,7 @@
@@ -4,7 +4,7 @@
*/
#include "sched.h"
-unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
......
......@@ -9,16 +9,16 @@ are set.
--- a/Makefile