4.14.81-stable review
Subsystems (8)
Greg Kroah-Hartman
maintainerPATCH 193/222 arm64: dts: stratix10: Correct System Manager register size
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thor Thayer <[email protected]>
commit 74121b9aa3cd571ddfff014a9f47db36cae3cda9 upstream.
Correct the register size of the System Manager node.
--- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1 -1
@@ -249,7 +249,7 @@ sysmgr: sysmgr@ffd12000 { compatible = "altr,sys-mgr", "syscon"; - reg = <0xffd12000 0x1000>; + reg = <0xffd12000 0x228>; }; /* Local timer */
Greg Kroah-Hartman
maintainerPATCH 188/222 media: media colorspaces*.rst: rename AdobeRGB to opRGB
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <[email protected]>
commit a58c37978cf02f6d35d05ee4e9288cb8455f1401 upstream.
Drop all Adobe references and use the official opRGB standard instead.
--- Documentation/media/uapi/v4l/biblio.rst | 10 ---------- Documentation/media/uapi/v4l/colorspaces-defs.rst | 8 ++++---- Documentation/media/uapi/v4l/colorspaces-details.rst | 13 ++++++------- 3 files changed, 10 insertions(+), 21 deletions(-)
Documentation/media/uapi/v4l/biblio.rst +0 -10
@@ -226,16 +226,6 @@ xvYCC :author: International Electrotechnical Commission (http://www.iec.ch) -.. _adobergb: - -AdobeRGB -======== - - -:title: Adobe© RGB (1998) Color Image Encoding Version 2005-05 - -:author: Adobe Systems Incorporated (http://www.adobe.com) - .. _oprgb: opRGB
Documentation/media/uapi/v4l/colorspaces-defs.rst +4 -4
@@ -51,8 +51,8 @@ whole range, 0-255, dividing the angular - See :ref:`col-rec709`. * - ``V4L2_COLORSPACE_SRGB`` - See :ref:`col-srgb`. - * - ``V4L2_COLORSPACE_ADOBERGB`` - - See :ref:`col-adobergb`. + * - ``V4L2_COLORSPACE_OPRGB`` + - See :ref:`col-oprgb`. * - ``V4L2_COLORSPACE_BT2020`` - See :ref:`col-bt2020`. * - ``V4L2_COLORSPACE_DCI_P3``
@@ -90,8 +90,8 @@ whole range, 0-255, dividing the angular - Use the Rec. 709 transfer function. * - ``V4L2_XFER_FUNC_SRGB`` - Use the sRGB transfer function. - * - ``V4L2_XFER_FUNC_ADOBERGB`` - - Use the AdobeRGB transfer function. + * - ``V4L2_XFER_FUNC_OPRGB`` + - Use the opRGB transfer function. * - ``V4L2_XFER_FUNC_SMPTE240M`` - Use the SMPTE 240M transfer function. * - ``V4L2_XFER_FUNC_NONE``
Documentation/media/uapi/v4l/colorspaces-details.rst +6 -7
@@ -290,15 +290,14 @@ Y' is clamped to the range [0…1] and C 170M/BT.601. The Y'CbCr quantization is limited range. -.. _col-adobergb: +.. _col-oprgb: -Colorspace Adobe RGB (V4L2_COLORSPACE_ADOBERGB) +Colorspace opRGB (V4L2_COLORSPACE_OPRGB) =============================================== -The :ref:`adobergb` standard defines the colorspace used by computer -graphics that use the AdobeRGB colorspace. This is also known as the -:ref:`oprgb` standard. The default transfer function is -``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is +The :ref:`oprgb` standard defines the colorspace used by computer +graphics that use the opRGB colorspace. The default transfer function is +``V4L2_XFER_FUNC_OPRGB``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range.
@@ -312,7 +311,7 @@ The chromaticities of the primary colors .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| -.. flat-table:: Adobe RGB Chromaticities +.. flat-table:: opRGB Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2
Greg Kroah-Hartman
maintainerPATCH 192/222 ARM: dts: socfpga: Fix SDRAM node address for Arria10
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thor Thayer <[email protected]>
commit ce3bf934f919a7d675c5b7fa4cc233ded9c6256e upstream.
The address in the SDRAM node was incorrect. Fix this to agree with the correct address and to match the reg definition block.
--- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/socfpga_arria10.dtsi +1 -1
@@ -601,7 +601,7 @@ status = "disabled"; }; - sdr: sdr@ffc25000 { + sdr: sdr@ffcfb100 { compatible = "altr,sdr-ctl", "syscon"; reg = <0xffcfb100 0x80>; };
Greg Kroah-Hartman
maintainerPATCH 191/222 Cramfs: fix abad comparison when wrap-arounds occur
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Pitre <[email protected]>
commit 672ca9dd13f1aca0c17516f76fc5b0e8344b3e46 upstream.
It is possible for corrupted filesystem images to produce very large block offsets that may wrap when a length is added, and wrongly pass the buffer size test.
--- fs/cramfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cramfs/inode.c +2 -1
@@ -186,7 +186,8 @@ static void *cramfs_read(struct super_blcontinue ; blk_offset = (blocknr - buffer_blocknr[i]) <<PAGE_SHIFT ; blk_offset += offset; -if (blk_offset + len >BUFFER_SIZE ) +if (blk_offset >BUFFER_SIZE || + blk_offset + len >BUFFER_SIZE )continue ;return read_buffers[i] + blk_offset; }
Greg Kroah-Hartman
maintainerPATCH 185/222 media: tvp5150: avoid going past array on v4l2_querymenu()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <[email protected]>
commit 5c4c4505b716cb782ad7263091edc466c4d1fbd4 upstream.
The parameters of v4l2_ctrl_new_std_menu_items() are tricky: instead of the number of possible values, it requires the number of the maximum value. In other words, the ARRAY_SIZE() value should be decremented, otherwise it will go past the array bounds, as warned by KASAN:
[ 279.839688] BUG: KASAN: global-out-of-bounds in v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839709] Read of size 8 at addr ffffffffc10a4cb0 by task v4l2-compliance/16676
[ 279.839736] CPU: 1 PID: 16676 Comm: v4l2-compliance Not tainted 4.18.0-rc2+ #120 [ 279.839741] Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0364.2017.0511.0949 05/11/2017 [ 279.839743] Call Trace: [ 279.839758] dump_stack+0x71/0xab [ 279.839807] ? v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839817] print_address_description+0x1c9/0x270 [ 279.839863] ? v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839871] kasan_report+0x237/0x360 [ 279.839918] v4l2_querymenu+0x10d/0x180 [videodev] [ 279.839964] __video_do_ioctl+0x2c8/0x590 [videodev] [ 279.840011] ? copy_overflow+0x20/0x20 [videodev] [ 279.840020] ? avc_ss_reset+0xa0/0xa0 [ 279.840028] ? check_stack_object+0x21/0x60 [ 279.840036] ? __check_object_size+0xe7/0x240 [ 279.840080] video_usercopy+0xed/0x730 [videodev] [ 279.840123] ? copy_overflow+0x20/0x20 [videodev] [ 279.840167] ? v4l_enumstd+0x40/0x40 [videodev] [ 279.840177] ? __handle_mm_fault+0x9f9/0x1ba0 [ 279.840186] ? __pmd_alloc+0x2c0/0x2c0 [ 279.840193] ? __vfs_write+0xb6/0x350 [ 279.840200] ? kernel_read+0xa0/0xa0 [ 279.840244] ? video_usercopy+0x730/0x730 [videodev] [ 279.840284] v4l2_ioctl+0xa1/0xb0 [videodev] [ 279.840295] do_vfs_ioctl+0x117/0x8a0 [ 279.840303] ? selinux_file_ioctl+0x211/0x2f0 [ 279.840313] ? ioctl_preallocate+0x120/0x120 [ 279.840319] ? selinux_capable+0x20/0x20 [ 279.840332] ksys_ioctl+0x70/0x80 [ 279.840342] __x64_sys_ioctl+0x3d/0x50 [ 279.840351] do_syscall_64+0x6d/0x1c0 [ 279.840361] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 279.840367] RIP: 0033:0x7fdfb46275d7 [ 279.840369] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48 [ 279.840474] RSP: 002b:00007ffee1179038 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 279.840483] RAX: ffffffffffffffda RBX: 00007ffee1179180 RCX: 00007fdfb46275d7 [ 279.840488] RDX: 00007ffee11790c0 RSI: 00000000c02c5625 RDI: 0000000000000003 [ 279.840493] RBP: 0000000000000002 R08: 0000000000000020 R09: 00000000009f0902 [ 279.840497] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffee117a5a0 [ 279.840501] R13: 00007ffee11790c0 R14: 0000000000000002 R15: 0000000000000000
[ 279.840515] The buggy address belongs to the variable: [ 279.840535] tvp5150_test_patterns+0x10/0xffffffffffffe360 [tvp5150]
--- drivers/media/i2c/tvp5150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/tvp5150.c +1 -1
@@ -1530,7 +1530,7 @@ static int tvp5150_probe(struct i2c_clie 27000000, 1, 27000000);v4l2_ctrl_new_std_menu_items (&core->hdl, &tvp5150_ctrl_ops,V4L2_CID_TEST_PATTERN , -ARRAY_SIZE (tvp5150_test_patterns), +ARRAY_SIZE (tvp5150_test_patterns) -1 ,0 ,0 , tvp5150_test_patterns); sd->ctrl_handler = &core->hdl;if (core->hdl.error) {
Greg Kroah-Hartman
maintainerPATCH 189/222 arm64: lse: remove -fcall-used-x0 flag
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tri Vo <[email protected]>
commit 2a6c7c367de82951c98a290a21156770f6f82c84 upstream.
x0 is not callee-saved in the PCS. So there is no need to specify -fcall-used-x0.
Clang doesn't currently support -fcall-used flags. This patch will help building the kernel with clang.
--- arch/arm64/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/lib/Makefile +1 -1
@@ -12,7 +12,7 @@ lib-y := bitops.o clear_user.o delay.o # when supported by the CPU. Result and argument registers are handled # correctly, based on the function prototype. lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o -CFLAGS_atomic_ll_sc.o := -fcall-used-x0 -ffixed-x1 -ffixed-x2 \ +CFLAGS_atomic_ll_sc.o := -ffixed-x1 -ffixed-x2 \ -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 \ -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9 \ -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12 \
Greg Kroah-Hartman
maintainerPATCH 141/222 HID: hiddev: fix potential Spectre v1
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
commit f11274396a538b31bc010f782e05c2ce3f804c13 upstream.
uref->usage_index can be indirectly controlled by userspace, hence leading to a potential exploitation of the Spectre variant 1 vulnerability.
This field is used as an array index by the hiddev_ioctl_usage() function, when 'cmd' is either HIDIOCGCOLLECTIONINDEX, HIDIOCGUSAGES or HIDIOCSUSAGES.
For cmd == HIDIOCGCOLLECTIONINDEX case, uref->usage_index is compared to field->maxusage and then used as an index to dereference field->usage array. The same thing happens to the cmd == HIDIOC{G,S}USAGES cases, where uref->usage_index is checked against an array maximum value and then it is used as an index in an array.
This is a summary of the HIDIOCGCOLLECTIONINDEX case, which matches the traditional Spectre V1 first load:
copy_from_user(uref, user_arg, sizeof(*uref)) if (uref->usage_index >= field->maxusage) goto inval; i = field->usage[uref->usage_index].collection_index; return i;
This patch fixes this by sanitizing field uref->usage_index before using it to index field->usage (HIDIOCGCOLLECTIONINDEX) or field->value in HIDIOC{G,S}USAGES arrays, thus, avoiding speculation in the first load.
v2: Contemplate cmd == HIDIOC{G,S}USAGES case
--- drivers/hid/usbhid/hiddev.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/hid/usbhid/hiddev.c +14 -4
@@ -512,14 +512,24 @@ static noinline int hiddev_ioctl_usage(sif (cmd ==HIDIOCGCOLLECTIONINDEX ) {if (uref->usage_index >= field->maxusage) goto inval; + uref->usage_index = +array_index_nospec (uref->usage_index, + field->maxusage); }else if (uref->usage_index >= field->report_count) goto inval; } -if ((cmd ==HIDIOCGUSAGES || cmd ==HIDIOCSUSAGES ) && - (uref_multi->num_values >HID_MAX_MULTI_USAGES || - uref->usage_index + uref_multi->num_values > field->report_count)) - goto inval; +if (cmd ==HIDIOCGUSAGES || cmd ==HIDIOCSUSAGES ) { +if (uref_multi->num_values >HID_MAX_MULTI_USAGES || + uref->usage_index + uref_multi->num_values > + field->report_count) + goto inval; + + uref->usage_index = +array_index_nospec (uref->usage_index, + field->report_count - + uref_multi->num_values); + }switch (cmd) {case HIDIOCGUSAGE :
Greg Kroah-Hartman
maintainerPATCH 174/222 dm zoned: fix metadata block ref counting
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit 33c2865f8d011a2ca9f67124ddab9dc89382e9f1 upstream.
Since the ref field of struct dmz_mblock is always used with the spinlock of struct dmz_metadata locked, there is no need to use an atomic_t type. Change the type of the ref field to an unsigne integer.
--- drivers/md/dm-zoned-metadata.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/md/dm-zoned-metadata.c +11 -9
@@ -99,7 +99,7 @@ struct dmz_mblock {struct rb_node node;struct list_head link;sector_t no; -atomic_t ref; +unsigned int ref;unsigned long state;struct page *page;void *data;
@@ -296,7 +296,7 @@ static struct dmz_mblock *dmz_alloc_mbloRB_CLEAR_NODE (&mblk->node);INIT_LIST_HEAD (&mblk->link); -atomic_set (&mblk->ref,0 ); + mblk->ref =0 ; mblk->state =0 ; mblk->no = mblk_no; mblk->data =page_address (mblk->page);
@@ -397,7 +397,7 @@ static struct dmz_mblock *dmz_fetch_mbloreturn NULL ;spin_lock (&zmd->mblk_lock); -atomic_inc (&mblk->ref); + mblk->ref++;set_bit (DMZ_META_READING , &mblk->state);dmz_insert_mblock (zmd, mblk);spin_unlock (&zmd->mblk_lock);
@@ -484,7 +484,8 @@ static void dmz_release_mblock(struct dmspin_lock (&zmd->mblk_lock); -if (atomic_dec_and_test (&mblk->ref)) { + mblk->ref--; +if (mblk->ref ==0 ) {if (test_bit (DMZ_META_ERROR , &mblk->state)) {rb_erase (&mblk->node, &zmd->mblk_rbtree);dmz_free_mblock (zmd, mblk);
@@ -511,7 +512,8 @@ static struct dmz_mblock *dmz_get_mblock mblk =dmz_lookup_mblock (zmd, mblk_no);if (mblk) {/* Cache hit: remove block from LRU list */ -if (atomic_inc_return (&mblk->ref) ==1 && + mblk->ref++; +if (mblk->ref ==1 && !test_bit (DMZ_META_DIRTY , &mblk->state))list_del_init (&mblk->link); }
@@ -753,7 +755,7 @@ int dmz_flush_metadata(struct dmz_metadaspin_lock (&zmd->mblk_lock);clear_bit (DMZ_META_DIRTY , &mblk->state); -if (atomic_read (&mblk->ref) ==0 ) +if (mblk->ref ==0 )list_add_tail (&mblk->link, &zmd->mblk_lru_list);spin_unlock (&zmd->mblk_lock); }
@@ -2308,7 +2310,7 @@ static void dmz_cleanup_metadata(struct mblk =list_first_entry (&zmd->mblk_dirty_list, struct dmz_mblock, link);dmz_dev_warn (zmd->dev,"mblock %llu still in dirty list (ref %u)" , - (u64 )mblk->no,atomic_read (&mblk->ref)); + (u64 )mblk->no, mblk->ref);list_del_init (&mblk->link);rb_erase (&mblk->node, &zmd->mblk_rbtree);dmz_free_mblock (zmd, mblk);
@@ -2326,8 +2328,8 @@ static void dmz_cleanup_metadata(struct root = &zmd->mblk_rbtree;rbtree_postorder_for_each_entry_safe (mblk, next, root, node) {dmz_dev_warn (zmd->dev,"mblock %llu ref %u still in rbtree" , - (u64 )mblk->no,atomic_read (&mblk->ref)); -atomic_set (&mblk->ref,0 ); + (u64 )mblk->no, mblk->ref); + mblk->ref =0 ;dmz_free_mblock (zmd, mblk); }
Greg Kroah-Hartman
maintainerPATCH 172/222 lockd: fix access beyond unterminated strings in prints
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amir Goldstein <[email protected]>
commit 93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee upstream.
printk format used %*s instead of %.*s, so hostname_len does not limit the number of bytes accessed from hostname.
--- fs/lockd/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/lockd/host.c +1 -1
@@ -341,7 +341,7 @@ struct nlm_host *nlmsvc_lookup_host(cons };struct lockd_net *ln =net_generic (net, lockd_net_id); -dprintk ("lockd: %s(host='%*s', vers=%u, proto=%s)\n" , __func__, +dprintk ("lockd: %s(host='%.*s', vers=%u, proto=%s)\n" , __func__, (int )hostname_len, hostname, rqstp->rq_vers, (rqstp->rq_prot ==IPPROTO_UDP ?"udp" :"tcp" ));
Greg Kroah-Hartman
maintainerPATCH 169/222 NFSv4.1: Fix the r/wsize checking
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
commit 943cff67b842839f4f35364ba2db5c2d3f025d94 upstream.
The intention of nfs4_session_set_rwsize() was to cap the r/wsize to the buffer sizes negotiated by the CREATE_SESSION. The initial code had a bug whereby we would not check the values negotiated by nfs_probe_fsinfo() (the assumption being that CREATE_SESSION will always negotiate buffer values that are sane w.r.t. the server's preferred r/wsizes) but would only check values set by the user in the 'mount' command.
The code was changed in 4.11 to _always_ set the r/wsize, meaning that we now never use the server preferred r/wsizes. This is the regression that this patch fixes.
Also rename the function to nfs4_session_limit_rwsize() in order to avoid future confusion.
--- fs/nfs/nfs4client.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
fs/nfs/nfs4client.c +9 -7
@@ -925,10 +925,10 @@ EXPORT_SYMBOL_GPL(nfs4_set_ds_client);/* * Session has been established, and the client marked ready. -* Set the mount rsize and wsize with negotiated fore channel -* attributes which will be bound checked in nfs_server_set_fsinfo. +* Limit the mount rsize, wsize and dtsize using negotiated fore +* channel attributes. */ -static void nfs4_session_set_rwsize (struct nfs_server *server) +static void nfs4_session_limit_rwsize (struct nfs_server *server) {#ifdef CONFIG_NFS_V4_1 struct nfs4_session *sess;
@@ -941,9 +941,11 @@ static void nfs4_session_set_rwsize(stru server_resp_sz = sess->fc_attrs.max_resp_sz - nfs41_maxread_overhead; server_rqst_sz = sess->fc_attrs.max_rqst_sz - nfs41_maxwrite_overhead; -if (!server->rsize || server->rsize > server_resp_sz) +if (server->dtsize > server_resp_sz) + server->dtsize = server_resp_sz; +if (server->rsize > server_resp_sz) server->rsize = server_resp_sz; -if (!server->wsize || server->wsize > server_rqst_sz) +if (server->wsize > server_rqst_sz) server->wsize = server_rqst_sz;#endif /* CONFIG_NFS_V4_1 */ }
@@ -990,12 +992,12 @@ static int nfs4_server_common_setup(stru (unsigned long long) server->fsid.minor);nfs_display_fhandle (mntfh,"Pseudo-fs root FH" ); -nfs4_session_set_rwsize (server); - error =nfs_probe_fsinfo (server, mntfh, fattr);if (error <0 ) goto out; +nfs4_session_limit_rwsize (server); +if (server->namelen ==0 || server->namelen >NFS4_MAXNAMLEN ) server->namelen =NFS4_MAXNAMLEN ;
Greg Kroah-Hartman
maintainerPATCH 168/222 genirq: Fix race on spurious interrupt detection
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit 746a923b863a1065ef77324e1e43f19b1a3eab5c upstream.
Commit 1e77d0a1ed74 ("genirq: Sanitize spurious interrupt detection of threaded irqs") made detection of spurious interrupts work for threaded handlers by:
a) incrementing a counter every time the thread returns IRQ_HANDLED, and
b) checking whether that counter has increased every time the thread is woken.
However for oneshot interrupts, the commit unmasks the interrupt before incrementing the counter. If another interrupt occurs right after unmasking but before the counter is incremented, that interrupt is incorrectly considered spurious:
time
| irq_thread() | irq_thread_fn() | action->thread_fn() | irq_finalize_oneshot() | unmask_threaded_irq() /* interrupt is unmasked */ | | /* interrupt fires, incorrectly deemed spurious */ | | atomic_inc(&desc->threads_handled); /* counter is incremented */
v
This is observed with a hi3110 CAN controller receiving data at high volume (from a separate machine sending with "cangen -g 0 -i -x"): The controller signals a huge number of interrupts (hundreds of millions per day) and every second there are about a dozen which are deemed spurious.
In theory with high CPU load and the presence of higher priority tasks, the number of incorrectly detected spurious interrupts might increase beyond the 99,900 threshold and cause disablement of the interrupt.
In practice it just increments the spurious interrupt count. But that can cause people to waste time investigating it over and over.
Fix it by moving the accounting before the invocation of irq_finalize_oneshot().
[ tglx: Folded change log update ]
--- kernel/irq/manage.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/irq/manage.c +6 -2
@@ -882,6 +882,9 @@ irq_forced_thread_fn(struct irq_desc *delocal_bh_disable (); ret = action->thread_fn (action->irq, action->dev_id); +if (ret ==IRQ_HANDLED ) +atomic_inc (&desc->threads_handled); +irq_finalize_oneshot (desc, action);local_bh_enable ();return ret;
@@ -898,6 +901,9 @@ static irqreturn_t irq_thread_fn(structirqreturn_t ret; ret = action->thread_fn (action->irq, action->dev_id); +if (ret ==IRQ_HANDLED ) +atomic_inc (&desc->threads_handled); +irq_finalize_oneshot (desc, action);return ret; }
@@ -975,8 +981,6 @@ static int irq_thread(void *data)irq_thread_check_affinity (desc, action); action_ret =handler_fn (desc, action); -if (action_ret ==IRQ_HANDLED ) -atomic_inc (&desc->threads_handled);if (action_ret ==IRQ_WAKE_THREAD )irq_wake_secondary (desc, action);
Greg Kroah-Hartman
maintainerPATCH 140/222 ext4: fix use-after-free race in ext4_remount()s error path
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <[email protected]>
commit 33458eaba4dfe778a426df6a19b7aad2ff9f7eec upstream.
It's possible for ext4_show_quota_options() to try reading s_qf_names[i] while it is being modified by ext4_remount() --- most notably, in ext4_remount's error path when the original values of the quota file name gets restored.
--- fs/ext4/ext4.h | 3 +- fs/ext4/super.c | 73 ++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 26 deletions(-)
fs/ext4/ext4.h +2 -1
@@ -1421,7 +1421,8 @@ struct ext4_sb_info {u32 s_min_batch_time;struct block_device *journal_bdev;#ifdef CONFIG_QUOTA -char *s_qf_names[EXT4_MAXQUOTAS ];/* Names of quota files with journalled quota */ +/* Names of quota files with journalled quota */ +char __rcu *s_qf_names[EXT4_MAXQUOTAS ];int s_jquota_fmt;/* Format of quota to use */ #endif unsigned int s_want_extra_isize;/* New inodes should reserve # bytes */
fs/ext4/super.c +48 -25
167 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 166/222 smb3: on kerberos mount if server doesnt specify auth type use krb5
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve French <[email protected]>
commit 926674de6705f0f1dbf29a62fd758d0977f535d6 upstream.
Some servers (e.g. Azure) do not include a spnego blob in the SMB3 negotiate protocol response, so on kerberos mounts ("sec=krb5") we can fail, as we expected the server to list its supported auth types (OIDs in the spnego blob in the negprot response). Change this so that on krb5 mounts we default to trying krb5 if the server doesn't list its supported protocol mechanisms.
--- fs/cifs/cifs_spnego.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/cifs/cifs_spnego.c +4 -2
@@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *sessprintf (dp,";sec=krb5" ); else if (server->sec_mskerberos) sprintf(dp, ";sec=mskrb5"); - else - goto out; + else { +cifs_dbg (VFS ,"unknown or missing server auth type, use krb5\n" ); +sprintf (dp,";sec=krb5" ); + } dp = description +strlen (description); sprintf(dp, ";uid=0x%x",
Greg Kroah-Hartman
maintainerPATCH 164/222 smb3: allow stats which track session and share reconnects to be reset
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve French <[email protected]>
commit 2c887635cd6ab3af619dc2be94e5bf8f2e172b78 upstream.
Currently, "echo 0 > /proc/fs/cifs/Stats" resets all of the stats except the session and share reconnect counts. Fix it to reset those as well.
--- fs/cifs/cifs_debug.c | 3 +++ 1 file changed, 3 insertions(+)
fs/cifs/cifs_debug.c +3 -0
@@ -289,6 +289,9 @@ static ssize_t cifs_stats_proc_write(stratomic_set (&totBufAllocCount,0 );atomic_set (&totSmBufAllocCount,0 );#endif /* CONFIG_CIFS_STATS2 */ +atomic_set (&tcpSesReconnectCount,0 ); +atomic_set (&tconInfoReconnectCount,0 ); +spin_lock (&GlobalMid_Lock); GlobalMaxActiveXid =0 ; GlobalCurrentXid =0 ;
Greg Kroah-Hartman
maintainerPATCH 156/222 mm/rmap: map_pte() was not handling private ZONE_DEVICE page properly
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ralph Campbell <[email protected]>
commit aab8d0520e6e7c2a61f71195e6ce7007a4843afb upstream.
Private ZONE_DEVICE pages use a special pte entry and thus are not present. Properly handle this case in map_pte(), it is already handled in check_pte(), the map_pte() part was lost in some rebase most probably.
Without this patch the slow migration path can not migrate back to any private ZONE_DEVICE memory to regular memory. This was found after stress testing migration back to system memory. This ultimatly can lead to the CPU constantly page fault looping on the special swap entry.
--- mm/page_vma_mapped.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
mm/page_vma_mapped.c +23 -1
@@ -21,7 +21,29 @@ static bool map_pte(struct page_vma_mappif (!is_swap_pte (*pvmw->pte))return false; }else { -if (!pte_present (*pvmw->pte)) +/* +* We get here when we are trying to unmap a private +* device page from the process address space. Such +* page is not CPU accessible and thus is mapped as +* a special swap entry, nonetheless it still does +* count as a valid regular mapping for the page (and +* is accounted as such in page maps count). +* +* So handle this special case as if it was a normal +* page mapping ie lock CPU page table and returns +* true. +* +* For more details on device private memory see HMM +* (include/linux/hmm.h or mm/hmm.c). +*/ +if (is_swap_pte (*pvmw->pte)) { +swp_entry_t entry; + +/* Handle un-addressable ZONE_DEVICE memory */ + entry =pte_to_swp_entry (*pvmw->pte); +if (!is_device_private_entry (entry)) +return false; + }else if (!pte_present (*pvmw->pte))return false; } }
Greg Kroah-Hartman
maintainerPATCH 161/222 iio: adc: at91: fix acking DRDY irq on simple conversions
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eugen Hristev <[email protected]>
commit bc1b45326223e7e890053cf6266357adfa61942d upstream.
When doing simple conversions, the driver did not acknowledge the DRDY irq. If this irq status is not acked, it will be left pending, and as soon as a trigger is enabled, the irq handler will be called, it doesn't know why this status has occurred because no channel is pending, and then it will go int a irq loop and board will hang.
To avoid this situation, read the LCDR after a raw conversion is done.
--- drivers/iio/adc/at91_adc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/iio/adc/at91_adc.c +2 -0
@@ -279,6 +279,8 @@ static void handle_adc_eoc_trigger(int iiio_trigger_poll (idev->trig); }else { st->last_value =at91_adc_readl (st,AT91_ADC_CHAN (st, st->chnb)); +/* Needed to ACK the DRDY interruption */ +at91_adc_readl (st,AT91_ADC_LCDR ); st->done = true;wake_up_interruptible (&st->wq_data_avail); }
Greg Kroah-Hartman
maintainerPATCH 159/222 iio: ad5064: Fix regulator handling
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <[email protected]>
commit 8911a43bc198877fad9f4b0246a866b26bb547ab upstream.
The correct way to handle errors returned by regualtor_get() and friends is to propagate the error since that means that an regulator was specified, but something went wrong when requesting it.
For handling optional regulators, e.g. when the device has an internal vref, regulator_get_optional() should be used to avoid getting the dummy regulator that the regulator core otherwise provides.
--- drivers/iio/dac/ad5064.c | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-)
drivers/iio/dac/ad5064.c +38 -15
@@ -809,6 +809,40 @@ static int ad5064_set_config(struct ad50return ad5064_write (st, cmd,0 , val,0 ); } +static int ad5064_request_vref (struct ad5064_state *st,struct device *dev) +{ +unsigned int i; +int ret; + +for (i =0 ; i <ad5064_num_vref (st); ++i) + st->vref_reg[i].supply =ad5064_vref_name (st, i); + +if (!st->chip_info->internal_vref) +return devm_regulator_bulk_get (dev,ad5064_num_vref (st), + st->vref_reg); + +/* +* This assumes that when the regulator has an internal VREF +* there is only one external VREF connection, which is +* currently the case for all supported devices. +*/ + st->vref_reg[0 ].consumer =devm_regulator_get_optional (dev,"vref" ); +if (!IS_ERR (st->vref_reg[0 ].consumer)) +return 0 ; + + ret =PTR_ERR (st->vref_reg[0 ].consumer); +if (ret != -ENODEV ) +return ret; + +/* If no external regulator was supplied use the internal VREF */ + st->use_internal_vref = true; + ret =ad5064_set_config (st,AD5064_CONFIG_INT_VREF_ENABLE ); +if (ret) +dev_err (dev,"Failed to enable internal vref: %d\n" , ret); + +return ret; +} +static int ad5064_probe (struct device *dev,enum ad5064_type type,const char *name,ad5064_write_func write) {
@@ -829,22 +863,11 @@ static int ad5064_probe(struct device *d st->dev = dev; st->write = write; -for (i =0 ; i <ad5064_num_vref (st); ++i) - st->vref_reg[i].supply =ad5064_vref_name (st, i); + ret =ad5064_request_vref (st, dev); +if (ret) +return ret; - ret =devm_regulator_bulk_get (dev,ad5064_num_vref (st), - st->vref_reg); -if (ret) { -if (!st->chip_info->internal_vref) -return ret; - st->use_internal_vref = true; - ret =ad5064_set_config (st,AD5064_CONFIG_INT_VREF_ENABLE ); -if (ret) { -dev_err (dev,"Failed to enable internal vref: %d\n" , - ret); -return ret; - } - }else { +if (!st->use_internal_vref) { ret =regulator_bulk_enable (ad5064_num_vref (st), st->vref_reg);if (ret)return ret;
Greg Kroah-Hartman
maintainerPATCH 158/222 kbuild: fix kernel/bounds.c W=1 warning
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 6a32c2469c3fbfee8f25bcd20af647326650a6cf upstream.
Building any configuration with 'make W=1' produces a warning:
kernel/bounds.c:16:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
When also passing -Werror, this prevents us from building any other files. Nobody ever calls the function, but we can't make it 'static' either since we want the compiler output.
Calling it 'main' instead however avoids the warning, because gcc does not insist on having a declaration for main.
--- kernel/bounds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/bounds.c +3 -1
@@ -13,7 +13,7 @@#include <linux/log2.h> #include <linux/spinlock_types.h> -void foo (void ) +int main (void ) {/* The enum constants to put into include/generated/bounds.h */ DEFINE (NR_PAGEFLAGS , __NR_PAGEFLAGS);
@@ -23,4 +23,6 @@ void foo(void)#endif DEFINE (SPINLOCK_SIZE ,sizeof (spinlock_t));/* End of constants */ + +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 152/222 crypto: tcrypt - fix ghash-generic speed test
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horia Geantă <[email protected]>
commit 331351f89c36bf7d03561a28b6f64fa10a9f6f3a upstream.
ghash is a keyed hash algorithm, thus setkey needs to be called. Otherwise the following error occurs:
$ modprobe tcrypt mode=318 sec=1 testing speed of async ghash-generic (ghash-generic) tcrypt: test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): tcrypt: hashing failed ret=-126
--- crypto/tcrypt.c | 3 +++ 1 file changed, 3 insertions(+)
crypto/tcrypt.c +3 -0
@@ -727,6 +727,9 @@ static void test_ahash_speed_common(consbreak ; } +if (speed[i].klen) +crypto_ahash_setkey (tfm, tvmem[0 ], speed[i].klen); +pr_info ("test%3u " "(%5u byte blocks,%5u bytes per update,%4u updates): " , i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);
Greg Kroah-Hartman
maintainerPATCH 157/222 KVM: arm64: Fix caching of host MDCR_EL2 value
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Rutland <[email protected]>
commit da5a3ce66b8bb51b0ea8a89f42aac153903f90fb upstream.
At boot time, KVM stashes the host MDCR_EL2 value, but only does this when the kernel is not running in hyp mode (i.e. is non-VHE). In these cases, the stashed value of MDCR_EL2.HPMN happens to be zero, which can lead to CONSTRAINED UNPREDICTABLE behaviour.
Since we use this value to derive the MDCR_EL2 value when switching to/from a guest, after a guest have been run, the performance counters do not behave as expected. This has been observed to result in accesses via PMXEVTYPER_EL0 and PMXEVCNTR_EL0 not affecting the relevant counters, resulting in events not being counted. In these cases, only the fixed-purpose cycle counter appears to work as expected.
Fix this by always stashing the host MDCR_EL2 value, regardless of VHE.
--- virt/kvm/arm/arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
virt/kvm/arm/arm.c +2 -2
@@ -1148,8 +1148,6 @@ static void cpu_init_hyp_mode(void *dumm__cpu_init_hyp_mode (pgd_ptr, hyp_stack_ptr, vector_ptr);__cpu_init_stage2 (); - -kvm_arm_init_debug (); }static void cpu_hyp_reset (void )
@@ -1173,6 +1171,8 @@ static void cpu_hyp_reinit(void)cpu_init_hyp_mode (NULL ); } +kvm_arm_init_debug (); +if (vgic_present)kvm_vgic_init_cpu_hardware (); }
Greg Kroah-Hartman
maintainerPATCH 153/222 mm: /proc/pid/smaps_rollup: fix NULL pointer deref in smaps_pte_range()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlastimil Babka <[email protected]>
commit fa76da461bb0be13c8339d984dcf179151167c8f upstream.
Leonardo reports an apparent regression in 4.19-rc7:
BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 6032 Comm: python Not tainted 4.19.0-041900rc7-lowlatency #201810071631 Hardware name: LENOVO 80UG/Toronto 4A2, BIOS 0XCN45WW 08/09/2018 RIP: 0010:smaps_pte_range+0x32d/0x540 Code: 80 00 00 00 00 74 a9 48 89 de 41 f6 40 52 40 0f 85 04 02 00 00 49 2b 30 48 c1 ee 0c 49 03 b0 98 00 00 00 49 8b 80 a0 00 00 00 <48> 8b b8 f0 00 00 00 e8 b7 ef ec ff 48 85 c0 0f 84 71 ff ff ff a8 RSP: 0018:ffffb0cbc484fb88 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000560ddb9e9000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000560ddb9e9 RDI: 0000000000000001 RBP: ffffb0cbc484fbc0 R08: ffff94a5a227a578 R09: ffff94a5a227a578 R10: 0000000000000000 R11: 0000560ddbbe7000 R12: ffffe903098ba728 R13: ffffb0cbc484fc78 R14: ffffb0cbc484fcf8 R15: ffff94a5a2e9cf48 FS: 00007f6dfb683740(0000) GS:ffff94a5aaf80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000f0 CR3: 000000011c118001 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __walk_page_range+0x3c2/0x6f0 walk_page_vma+0x42/0x60 smap_gather_stats+0x79/0xe0 ? gather_pte_stats+0x320/0x320 ? gather_hugetlb_stats+0x70/0x70 show_smaps_rollup+0xcd/0x1c0 seq_read+0x157/0x400 __vfs_read+0x3a/0x180 ? security_file_permission+0x93/0xc0 ? security_file_permission+0x93/0xc0 vfs_read+0x8f/0x140 ksys_read+0x55/0xc0 __x64_sys_read+0x1a/0x20 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Decoded code matched to local compilation+disassembly points to smaps_pte_entry():
} else if (unlikely(IS_ENABLED(CONFIG_SHMEM) && mss->check_shmem_swap
&& pte_none(*pte))) {
page = find_get_entry(vma->vm_file->f_mapping,
linear_page_index(vma, addr));Here, vma->vm_file is NULL. mss->check_shmem_swap should be false in that case, however for smaps_rollup, smap_gather_stats() can set the flag true for one vma and leave it true for subsequent vma's where it should be false.
To fix, reset the check_shmem_swap flag to false. There's also related bug which sets mss->swap to shmem_swapped, which in the context of smaps_rollup overwrites any value accumulated from previous vma's. Fix that as well.
Note that the report suggests a regression between 4.17.19 and 4.19-rc7, which makes the 4.19 series ending with commit 258f669e7e88 ("mm:/proc/pid/smaps_rollup: convert to single value seq_file") suspicious. But the mss was reused for rollup since 493b0e9d945f ("mm: add /proc/pid/smaps_rollup") so let's play it safe with the stable backport.
--- fs/proc/task_mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/proc/task_mmu.c +3 -1
@@ -768,6 +768,8 @@ static int show_smap(struct seq_file *m, smaps_walk.private = mss;#ifdef CONFIG_SHMEM +/* In case of smaps_rollup, reset the value from previous vma */ + mss->check_shmem_swap = false;if (vma->vm_file &&shmem_mapping (vma->vm_file->f_mapping)) {/* * For shared or readonly shmem mappings we know that all
@@ -783,7 +785,7 @@ static int show_smap(struct seq_file *m,if (!shmem_swapped || (vma->vm_flags &VM_SHARED ) || !(vma->vm_flags &VM_WRITE )) { - mss->swap = shmem_swapped; + mss->swap += shmem_swapped; }else { mss->check_shmem_swap = true; smaps_walk.pte_hole = smaps_pte_hole;
Greg Kroah-Hartman
maintainerPATCH 154/222 ima: fix showing large violations or runtime_measurements_count
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Biggers <[email protected]>
commit 1e4c8dafbb6bf72fb5eca035b861e39c5896c2b7 upstream.
The 12 character temporary buffer is not necessarily long enough to hold a 'long' value. Increase it.
--- security/integrity/ima/ima_fs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
security/integrity/ima/ima_fs.c +3 -3
@@ -39,14 +39,14 @@ static int __init default_canonical_fmt___setup ("ima_canonical_fmt" , default_canonical_fmt_setup);static int valid_policy =1 ; -#define TMPBUFLEN 12 +static ssize_t ima_show_htable_value (char __user *buf,size_t count,loff_t *ppos,atomic_long_t *val) { -char tmpbuf[TMPBUFLEN ]; +char tmpbuf[32 ];/* greater than largest 'long' string value */ ssize_t len; - len =scnprintf (tmpbuf,TMPBUFLEN ,"%li\n" ,atomic_long_read (val)); + len =scnprintf (tmpbuf,sizeof (tmpbuf),"%li\n" ,atomic_long_read (val));return simple_read_from_buffer (buf, count, ppos, tmpbuf, len); }
Greg Kroah-Hartman
maintainerPATCH 155/222 hugetlbfs: dirty pages as they are added to pagecache
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Kravetz <[email protected]>
commit 22146c3ce98962436e401f7b7016a6f664c9ffb5 upstream.
Some test systems were experiencing negative huge page reserve counts and incorrect file block counts. This was traced to /proc/sys/vm/drop_caches removing clean pages from hugetlbfs file pagecaches. When non-hugetlbfs explicit code removes the pages, the appropriate accounting is not performed.
This can be recreated as follows:
fallocate -l 2M /dev/hugepages/foo
echo 1 > /proc/sys/vm/drop_caches
fallocate -l 2M /dev/hugepages/foo
grep -i huge /proc/meminfo
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
HugePages_Total: 2048
HugePages_Free: 2047
HugePages_Rsvd: 18446744073709551615
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 4194304 kB
ls -lsh /dev/hugepages/foo
4.0M -rw-r--r--. 1 root root 2.0M Oct 17 20:05 /dev/hugepages/foo
To address this issue, dirty pages as they are added to pagecache. This can easily be reproduced with fallocate as shown above. Read faulted pages will eventually end up being marked dirty. But there is a window where they are clean and could be impacted by code such as drop_caches. So, just dirty them all as they are added to the pagecache.
--- mm/hugetlb.c | 6 ++++++ 1 file changed, 6 insertions(+)
mm/hugetlb.c +6 -0
@@ -3644,6 +3644,12 @@ int huge_add_to_page_cache(struct page *return err;ClearPagePrivate (page); +/* +* set page dirty so that it will not be removed from cache/file +* by non-hugetlbfs specific code paths. +*/ +set_page_dirty (page); +spin_lock (&inode->i_lock); inode->i_blocks +=blocks_per_huge_page (h);spin_unlock (&inode->i_lock);
Greg Kroah-Hartman
maintainerPATCH 139/222 ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Shilong <[email protected]>
commit 182a79e0c17147d2c2d3990a9a7b6b58a1561c7a upstream.
We return most failure of dquota_initialize() except inode evict, this could make a bit sense, for example we allow file removal even quota files are broken?
But it dosen't make sense to allow setting project if quota files etc are broken.
--- fs/ext4/ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ext4/ioctl.c +3 -1
@@ -364,7 +364,9 @@ static int ext4_ioctl_setproject(structbrelse (iloc.bh); } -dquot_initialize (inode); + err =dquot_initialize (inode); +if (err) +return err; handle = ext4_journal_start(inode, EXT4_HT_QUOTA, EXT4_QUOTA_INIT_BLOCKS(sb) +
Greg Kroah-Hartman
maintainerPATCH 151/222 crypto: lrw - Fix out-of bounds access on counter overflow
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ondrej Mosnacek <[email protected]>
commit fbe1a850b3b1522e9fc22319ccbbcd2ab05328d2 upstream.
When the LRW block counter overflows, the current implementation returns 128 as the index to the precomputed multiplication table, which has 128 entries. This patch fixes it to return the correct value (127).
--- crypto/lrw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
crypto/lrw.c +6 -1
@@ -139,7 +139,12 @@ static inline int get_index128(be128 *blreturn x +ffz (val); } -return x; +/* +* If we get here, then x == 128 and we are incrementing the counter +* from all ones to all zeros. This means we must return index 127, i.e. +* the one corresponding to key2*{ 1,...,1 }. +*/ +return 127 ; }static int post_crypt (struct skcipher_request *req)
Greg Kroah-Hartman
maintainerPATCH 149/222 signal/GenWQE: Fix sending of SIGKILL
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric W. Biederman <[email protected]>
commit 0ab93e9c99f8208c0a1a7b7170c827936268c996 upstream.
The genweq_add_file and genwqe_del_file by caching current without using reference counting embed the assumption that a file descriptor will never be passed from one process to another. It even embeds the assumption that the the thread that opened the file will be in
existence when the process terminates. Neither of which are
guaranteed to be true.
Therefore replace caching the task_struct of the opener with pid of the openers thread group id. All the knowledge of the opener is used for is as the target of SIGKILL and a SIGKILL will kill the entire process group.
Rename genwqe_force_sig to genwqe_terminate, remove it's unncessary signal argument, update it's ownly caller, and use kill_pid instead of force_sig.
The work force_sig does in changing signal handling state is not relevant to SIGKILL sent as SEND_SIG_PRIV. The exact same processess will be killed just with less work, and less confusion. The work done by force_sig is really only needed for handling syncrhonous exceptions.
It will still be possible to cause genwqe_device_remove to wait 8 seconds by passing a file descriptor to another process but the possible user after free is fixed.
--- drivers/misc/genwqe/card_base.h | 2 +- drivers/misc/genwqe/card_dev.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/misc/genwqe/card_base.h +1 -1
@@ -403,7 +403,7 @@ struct genwqe_file {struct file *filp;struct fasync_struct *async_queue; -struct task_struct *owner; +struct pid *opener;struct list_head list;/* entry in list of open files */ spinlock_t map_lock;/* lock for dma_mappings */
drivers/misc/genwqe/card_dev.c +5 -4
@@ -52,7 +52,7 @@ static void genwqe_add_file(struct genwq {unsigned long flags; - cfile->owner = current; + cfile->opener =get_pid (task_tgid (current));spin_lock_irqsave (&cd->file_lock, flags);list_add (&cfile->list, &cd->file_list);spin_unlock_irqrestore (&cd->file_lock, flags);
@@ -65,6 +65,7 @@ static int genwqe_del_file(struct genwqespin_lock_irqsave (&cd->file_lock, flags);list_del (&cfile->list);spin_unlock_irqrestore (&cd->file_lock, flags); +put_pid (cfile->opener);return 0 ; }
@@ -275,7 +276,7 @@ static int genwqe_kill_fasync(struct genreturn files; } -static int genwqe_force_sig (struct genwqe_dev *cd,int sig) +static int genwqe_terminate (struct genwqe_dev *cd) {unsigned int files =0 ;unsigned long flags;
@@ -283,7 +284,7 @@ static int genwqe_force_sig(struct genwqspin_lock_irqsave (&cd->file_lock, flags);list_for_each_entry (cfile, &cd->file_list, list) { -force_sig (sig, cfile->owner); +kill_pid (cfile->opener,SIGKILL ,1 ); files++; }spin_unlock_irqrestore (&cd->file_lock, flags);
@@ -1356,7 +1357,7 @@ static int genwqe_inform_and_stop_procesdev_warn (&pci_dev->dev,"[%s] send SIGKILL and wait ...\n" , __func__); - rc =genwqe_force_sig (cd,SIGKILL );/* force terminate */ + rc =genwqe_terminate (cd);if (rc) {/* Give kill_timout more seconds to end processes */ for (i = 0; (i < genwqe_kill_timeout) &&
Greg Kroah-Hartman
maintainerPATCH 138/222 ext4: fix setattr project check in fssetxattr ioctl
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Shilong <[email protected]>
commit dc7ac6c4cae3b58724c2f1e21a7c05ce19ecd5a8 upstream.
Currently, project quota could be changed by fssetxattr ioctl, and existed permission check inode_owner_or_capable() is obviously not enough, just think that common users could change project id of file, that could make users to break project quota easily.
This patch try to follow same regular of xfs project quota:
"Project Quota ID state is only allowed to change from within the init namespace. Enforce that restriction only if we are trying to change the quota ID state. Everything else is allowed in user namespaces."
Besides that, check and set project id'state should be an atomic operation, protect whole operation with inode lock, ext4_ioctl_setproject() is only used for ioctl EXT4_IOC_FSSETXATTR, we have held mnt_want_write_file() before ext4_ioctl_setflags(), and ext4_ioctl_setproject() is called after ext4_ioctl_setflags(), we could share codes, so remove it inside ext4_ioctl_setproject().
--- fs/ext4/ioctl.c | 60 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 23 deletions(-)
fs/ext4/ioctl.c +37 -23
@@ -344,19 +344,14 @@ static int ext4_ioctl_setproject(structif (projid_eq (kprojid,EXT4_I (inode)->i_projid))return 0 ; - err =mnt_want_write_file (filp); -if (err) -return err; - err = -EPERM ; -inode_lock (inode);/* Is it quota file? Do not allow user to mess with it */ if (ext4_is_quota_file (inode)) - goto out_unlock; +return err; err =ext4_get_inode_loc (inode, &iloc);if (err) - goto out_unlock; +return err; raw_inode =ext4_raw_inode (&iloc);if (!EXT4_FITS_IN_INODE (raw_inode, ei, i_projid)) {
@@ -364,7 +359,7 @@ static int ext4_ioctl_setproject(structEXT4_SB (sb)->s_want_extra_isize, &iloc);if (err) - goto out_unlock; +return err; }else {brelse (iloc.bh); }
@@ -374,10 +369,8 @@ static int ext4_ioctl_setproject(struct handle =ext4_journal_start (inode,EXT4_HT_QUOTA ,EXT4_QUOTA_INIT_BLOCKS (sb) +EXT4_QUOTA_DEL_BLOCKS (sb) +3 ); -if (IS_ERR (handle)) { - err =PTR_ERR (handle); - goto out_unlock; - } +if (IS_ERR (handle)) +return PTR_ERR (handle); err =ext4_reserve_inode_write (handle, inode, &iloc);if (err)
@@ -405,9 +398,6 @@ out_dirty: err = rc; out_stop:ext4_journal_stop (handle); -out_unlock: -inode_unlock (inode); -mnt_drop_write_file (filp); return err; }#else
@@ -592,6 +582,30 @@ static int ext4_ioc_getfsmap(struct supereturn 0 ; } +static int ext4_ioctl_check_project (struct inode *inode,struct fsxattr *fa) +{ +/* +* Project Quota ID state is only allowed to change from within the init +* namespace. Enforce that restriction only if we are trying to change +* the quota ID state. Everything else is allowed in user namespaces. +*/ +if (current_user_ns () == &init_user_ns) +return 0 ; + +if (__kprojid_val (EXT4_I (inode)->i_projid) != fa->fsx_projid) +return -EINVAL ; + +if (ext4_test_inode_flag (inode,EXT4_INODE_PROJINHERIT )) { +if (!(fa->fsx_xflags &FS_XFLAG_PROJINHERIT )) +return -EINVAL ; + }else { +if (fa->fsx_xflags &FS_XFLAG_PROJINHERIT ) +return -EINVAL ; + } + +return 0 ; +} +long ext4_ioctl (struct file *filp,unsigned int cmd,unsigned long arg) {struct inode *inode =file_inode (filp);
@@ -1029,19 +1043,19 @@ resizefs_out:return err;inode_lock (inode); + err =ext4_ioctl_check_project (inode, &fa); +if (err) + goto out; flags = (ei->i_flags & ~EXT4_FL_XFLAG_VISIBLE ) | (flags &EXT4_FL_XFLAG_VISIBLE ); err =ext4_ioctl_setflags (inode, flags); -inode_unlock (inode); -mnt_drop_write_file (filp);if (err) -return err; - + goto out; err =ext4_ioctl_setproject (filp, fa.fsx_projid); -if (err) -return err; - -return 0 ; +out: +inode_unlock (inode); +mnt_drop_write_file (filp); +return err; }case EXT4_IOC_SHUTDOWN :return ext4_shutdown (sb, arg);
Greg Kroah-Hartman
maintainerPATCH 147/222 PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bin Meng <[email protected]>
commit d0c9606b31a21028fb5b753c8ad79626292accfd upstream.
Add Device IDs to the Intel GPU "spurious interrupt" quirk table.
For these devices, unplugging the VGA cable and plugging it in again causes spurious interrupts from the IGD. Linux eventually disables the interrupt, but of course that disables any other devices sharing the interrupt.
The theory is that this is a VGA BIOS defect: it should have disabled the IGD interrupt but failed to do so.
See f67fd55fa96f ("PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs") and 7c82126a94e6 ("PCI: Add new ID for Intel GPU "spurious interrupt" quirk") for some history.
[bhelgaas: See link below for discussion about how to fix this more generically instead of adding device IDs for every new Intel GPU. I hope this is the last patch to add device IDs.]
--- drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pci/quirks.c +4 -0
@@ -3163,7 +3163,11 @@ static void disable_igfx_irq(struct pci_pci_iounmap (dev, regs); } +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0042 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0046 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x004a , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0102 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0106 , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0152 , disable_igfx_irq);
Greg Kroah-Hartman
maintainerPATCH 132/222 libnvdimm, region: Fail badblocks listing for inactive regions
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <[email protected]>
commit 5d394eee2c102453278d81d9a7cf94c80253486a upstream.
While experimenting with region driver loading the following backtrace was triggered:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
[..]
Call Trace: dump_stack+0x85/0xcb register_lock_class+0x571/0x580 ? __lock_acquire+0x2ba/0x1310 ? kernfs_seq_start+0x2a/0x80 __lock_acquire+0xd4/0x1310 ? dev_attr_show+0x1c/0x50 ? __lock_acquire+0x2ba/0x1310 ? kernfs_seq_start+0x2a/0x80 ? lock_acquire+0x9e/0x1a0 lock_acquire+0x9e/0x1a0 ? dev_attr_show+0x1c/0x50 badblocks_show+0x70/0x190 ? dev_attr_show+0x1c/0x50 dev_attr_show+0x1c/0x50
This results from a missing successful call to devm_init_badblocks() from nd_region_probe(). Block attempts to show badblocks while the region is not enabled.
--- drivers/nvdimm/region_devs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/nvdimm/region_devs.c +9 -2
@@ -513,10 +513,17 @@ static ssize_t region_badblocks_show(str struct device_attribute *attr, char *buf) { struct nd_region *nd_region = to_nd_region(dev); +ssize_t rc; -return badblocks_show (&nd_region->bb, buf,0 ); -} +device_lock (dev); +if (dev->driver) + rc =badblocks_show (&nd_region->bb, buf,0 ); +else + rc = -ENXIO ; +device_unlock (dev); +return rc; +} static DEVICE_ATTR(badblocks, 0444, region_badblocks_show, NULL); static ssize_t resource_show(struct device *dev,
Greg Kroah-Hartman
maintainerPATCH 133/222 ASoC: intel: skylake: Add missing break in skl_tplg_get_token()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 9c80c5a8831471e0a3e139aad1b0d4c0fdc50b2f upstream.
skl_tplg_get_token() misses a break in the big switch() block for SKL_TKN_U8_CORE_ID entry.
Spotted nicely by -Wimplicit-fallthrough compiler option.
--- sound/soc/intel/skylake/skl-topology.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/intel/skylake/skl-topology.c +1 -0
@@ -2360,6 +2360,7 @@ static int skl_tplg_get_token(struct devcase SKL_TKN_U8_CORE_ID : mconfig->core_id = tkn_elem->value; +break ;case SKL_TKN_U8_MOD_TYPE : mconfig->m_type = tkn_elem->value;
Greg Kroah-Hartman
maintainerPATCH 135/222 jbd2: fix use after free in jbd2_log_do_checkpoint()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit ccd3c4373eacb044eb3832966299d13d2631f66f upstream.
The code cleaning transaction's lists of checkpoint buffers has a bug where it increases bh refcount only after releasing journal->j_list_lock. Thus the following race is possible:
CPU0 CPU1jbd2_log_do_checkpoint()
jbd2_journal_try_to_free_buffers()
__journal_try_to_free_buffer(bh)
...
while (transaction->t_checkpoint_io_list)
...
if (buffer_locked(bh)) {<-- IO completes now, buffer gets unlocked -->
spin_unlock(&journal->j_list_lock);
spin_lock(&journal->j_list_lock);
__jbd2_journal_remove_checkpoint(jh);
spin_unlock(&journal->j_list_lock);
try_to_free_buffers(page);
get_bh(bh) <-- accesses freed bhFix the problem by grabbing bh reference before unlocking journal->j_list_lock.
--- fs/jbd2/checkpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/jbd2/checkpoint.c +2 -2
@@ -254,8 +254,8 @@ restart: bh =jh2bh (jh);if (buffer_locked (bh)) { -spin_unlock (&journal->j_list_lock);get_bh (bh); +spin_unlock (&journal->j_list_lock);wait_on_buffer (bh);/* the journal_head may have gone by now */ BUFFER_TRACE (bh,"brelse" );
@@ -336,8 +336,8 @@ restart2: jh = transaction->t_checkpoint_io_list; bh =jh2bh (jh);if (buffer_locked (bh)) { -spin_unlock (&journal->j_list_lock);get_bh (bh); +spin_unlock (&journal->j_list_lock);wait_on_buffer (bh);/* the journal_head may have gone by now */ BUFFER_TRACE (bh,"brelse" );
Greg Kroah-Hartman
maintainerPATCH 134/222 IB/mlx5: Fix MR cache initialization
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Artemy Kovalyov <[email protected]>
commit 013c2403bf32e48119aeb13126929f81352cc7ac upstream.
Schedule MR cache work only after bucket was initialized.
--- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mr.c +1 -1
@@ -675,7 +675,6 @@ int mlx5_mr_cache_init(struct mlx5_ib_deinit_completion (&ent->compl);INIT_WORK (&ent->work, cache_work_func);INIT_DELAYED_WORK (&ent->dwork, delayed_cache_work_func); -queue_work (cache->wq, &ent->work);if (i >MR_CACHE_LAST_STD_ENTRY ) {mlx5_odp_init_mr_cache_entry (ent);
@@ -694,6 +693,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_de ent->limit = dev->mdev->profile->mr_cache[i].limit; else ent->limit = 0; +queue_work (cache->wq, &ent->work); } err =mlx5_mr_cache_debugfs_init (dev);
Greg Kroah-Hartman
maintainerPATCH 127/222 iwlwifi: mvm: check return value of rs_rate_from_ucode_rate()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Coelho <[email protected]>
commit 3d71c3f1f50cf309bd20659422af549bc784bfff upstream.
The rs_rate_from_ucode_rate() function may return -EINVAL if the rate is invalid, but none of the callsites check for the error, potentially making us access arrays with index IWL_RATE_INVALID, which is larger than the arrays, causing an out-of-bounds access. This will trigger KASAN warnings, such as the one reported in the bugzilla issue mentioned below.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=200659
--- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/rs.c +19 -5
@@ -1226,7 +1226,11 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm !(info->flags & IEEE80211_TX_STAT_AMPDU)) return; -rs_rate_from_ucode_rate (tx_resp_hwrate, info->band, &tx_resp_rate); +if (rs_rate_from_ucode_rate (tx_resp_hwrate, info->band, + &tx_resp_rate)) { +WARN_ON_ONCE (1 ); +return ; + }#ifdef CONFIG_MAC80211_DEBUGFS /* Disable last tx check if we are debugging with fixed rate but
@@ -1277,7 +1281,10 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm*/ table = &lq_sta->lq; lq_hwrate =le32_to_cpu (table->rs_table[0 ]); -rs_rate_from_ucode_rate (lq_hwrate, info->band, &lq_rate); +if (rs_rate_from_ucode_rate (lq_hwrate, info->band, &lq_rate)) { +WARN_ON_ONCE (1 ); +return ; + }/* Here we actually compare this rate to the latest LQ command */ if (lq_color !=LQ_FLAG_COLOR_GET (table->flags)) {
@@ -1379,8 +1386,12 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm/* Collect data for each rate used during failed TX attempts */ for (i =0 ; i <= retries; ++i) { lq_hwrate =le32_to_cpu (table->rs_table[i]); -rs_rate_from_ucode_rate (lq_hwrate, info->band, - &lq_rate); +if (rs_rate_from_ucode_rate (lq_hwrate, info->band, + &lq_rate)) { +WARN_ON_ONCE (1 ); +return ; + } +/* * Only collect stats if retried rate is in the same RS * table as active/search.
@@ -3244,7 +3255,10 @@ static void rs_build_rates_table_from_fifor (i =0 ; i < num_rates; i++) lq_cmd->rs_table[i] = ucode_rate_le32; -rs_rate_from_ucode_rate (ucode_rate, band, &rate); +if (rs_rate_from_ucode_rate (ucode_rate, band, &rate)) { +WARN_ON_ONCE (1 ); +return ; + }if (is_mimo (&rate)) lq_cmd->mimo_delim = num_rates -1 ;
Greg Kroah-Hartman
maintainerPATCH 129/222 dmaengine: ppc4xx: fix off-by-one build failure
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Lamparter <[email protected]>
commit 27d8d2d7a9b7eb05c4484b74b749eaee7b50b845 upstream.
There are two poly_store, but one should have been poly_show.
|adma.c:4382:16: error: conflicting types for 'poly_store' | static ssize_t poly_store(struct device_driver *dev, const char *buf, | ^~~~~~~~~~ |adma.c:4363:16: note: previous definition of 'poly_store' was here | static ssize_t poly_store(struct device_driver *dev, char *buf) | ^~~~~~~~~~
--- drivers/dma/ppc4xx/adma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ppc4xx/adma.c +1 -1
@@ -4360,7 +4360,7 @@ static ssize_t enable_store(struct devic }static DRIVER_ATTR_RW (enable); -static ssize_t poly_store (struct device_driver *dev,char *buf) +static ssize_t poly_show (struct device_driver *dev,char *buf) {ssize_t size =0 ;u32 reg;
Greg Kroah-Hartman
maintainerPATCH 128/222 net/ipv4: defensive cipso option parsing
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Nuernberger <[email protected]>
commit 076ed3da0c9b2f88d9157dbe7044a45641ae369e upstream.
commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed a possible infinite loop in the IP option parsing of CIPSO. The fix assumes that ip_options_compile filtered out all zero length options and that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist. While this assumption currently holds true, add explicit checks for zero length and invalid length options to be safe for the future. Even though ip_options_compile should have validated the options, the introduction of new one-byte options can still confuse this code without the additional checks.
--- net/ipv4/cipso_ipv4.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
net/ipv4/cipso_ipv4.c +7 -4
@@ -1512,7 +1512,7 @@ static int cipso_v4_parsetag_loc(const s* * Description: * Parse the packet's IP header looking for a CIPSO option. Returns a pointer -* to the start of the CIPSO option on success, NULL if one if not found. +* to the start of the CIPSO option on success, NULL if one is not found. * */ unsigned char *cipso_v4_optptr (const struct sk_buff *skb)
@@ -1522,10 +1522,8 @@ unsigned char *cipso_v4_optptr(const strint optlen;int taglen; -for (optlen = iph->ihl*4 -sizeof (struct iphdr ); optlen >0 ; ) { +for (optlen = iph->ihl*4 -sizeof (struct iphdr ); optlen >1 ; ) {switch (optptr[0 ]) { -case IPOPT_CIPSO : -return optptr;case IPOPT_END :return NULL ;case IPOPT_NOOP :
@@ -1534,6 +1532,11 @@ unsigned char *cipso_v4_optptr(const strdefault : taglen = optptr[1 ]; } +if (!taglen || taglen > optlen) +return NULL ; +if (optptr[0 ] ==IPOPT_CIPSO ) +return optptr; + optlen -= taglen; optptr += taglen; }
Greg Kroah-Hartman
maintainerPATCH 125/222 usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuah Khan (Samsung OSG) <[email protected]>
commit e28fd56ad5273be67d0fae5bedc7e1680e729952 upstream.
In rmmod path, usbip_vudc does platform_device_put() twice once from platform_device_unregister() and then from put_vudc_device().
The second put results in:
BUG kmalloc-2048 (Not tainted): Poison overwritten error or
BUG: KASAN: use-after-free in kobject_put+0x1e/0x230 if KASAN is
enabled.
[ 169.042156] calling init+0x0/0x1000 [usbip_vudc] @ 1697 [ 169.042396] ============================================================================= [ 169.043678] probe of usbip-vudc.0 returned 1 after 350 usecs [ 169.044508] BUG kmalloc-2048 (Not tainted): Poison overwritten [ 169.044509] ----------------------------------------------------------------------------- ... [ 169.057849] INFO: Freed in device_release+0x2b/0x80 age=4223 cpu=3 pid=1693 [ 169.057852] kobject_put+0x86/0x1b0 [ 169.057853] 0xffffffffc0c30a96 [ 169.057855] __x64_sys_delete_module+0x157/0x240
Fix it to call platform_device_del() instead and let put_vudc_device() do the platform_device_put().
--- drivers/usb/usbip/vudc_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/usbip/vudc_main.c +9 -1
@@ -85,6 +85,10 @@ static int __init init(void) cleanup:list_for_each_entry_safe (udc_dev, udc_dev2, &vudc_devices, dev_entry) {list_del (&udc_dev->dev_entry); +/* +* Just do platform_device_del() here, put_vudc_device() +* calls the platform_device_put() +*/ platform_device_del (udc_dev->pdev);put_vudc_device (udc_dev); }
@@ -101,7 +105,11 @@ static void __exit cleanup(void)list_for_each_entry_safe (udc_dev, udc_dev2, &vudc_devices, dev_entry) {list_del (&udc_dev->dev_entry); -platform_device_unregister (udc_dev->pdev); +/* +* Just do platform_device_del() here, put_vudc_device() +* calls the platform_device_put() +*/ +platform_device_del (udc_dev->pdev);put_vudc_device (udc_dev); }platform_driver_unregister (&vudc_driver);
Greg Kroah-Hartman
maintainerPATCH 124/222 libertas: dont set URB_ZERO_PACKET on IN USB transfer
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lubomir Rintel <[email protected]>
commit 6528d88047801b80d2a5370ad46fb6eff2f509e0 upstream.
The USB core gets rightfully upset:
usb 1-1: BOGUS urb flags, 240 --> 200
WARNING: CPU: 0 PID: 60 at drivers/usb/core/urb.c:503 usb_submit_urb+0x2f8/0x3ed Modules linked in: CPU: 0 PID: 60 Comm: kworker/0:3 Not tainted 4.19.0-rc6-00319-g5206d00a45c7 #39 Hardware name: OLPC XO/XO, BIOS OLPC Ver 1.00.01 06/11/2014 Workqueue: events request_firmware_work_func EIP: usb_submit_urb+0x2f8/0x3ed Code: 75 06 8b 8f 80 00 00 00 8d 47 78 89 4d e4 89 55 e8 e8 35 1c f6 ff 8b 55 e8 56 52 8b 4d e4 51 50 68 e3 ce c7 c0 e8 ed 18 c6 ff <0f> 0b 83 c4 14 80 7d ef 01 74 0a 80 7d ef 03 0f 85 b8 00 00 00 8b EAX: 00000025 EBX: ce7d4980 ECX: 00000000 EDX: 00000001 ESI: 00000200 EDI: ce7d8800 EBP: ce7f5ea8 ESP: ce7f5e70 DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 EFLAGS: 00210292 CR0: 80050033 CR2: 00000000 CR3: 00e80000 CR4: 00000090 Call Trace: ? if_usb_fw_timeo+0x64/0x64 __if_usb_submit_rx_urb+0x85/0xe6 ? if_usb_fw_timeo+0x64/0x64 if_usb_submit_rx_urb_fwload+0xd/0xf if_usb_prog_firmware+0xc0/0x3db ? _request_firmware+0x54/0x47b ? _request_firmware+0x89/0x47b ? if_usb_probe+0x412/0x412 lbs_fw_loaded+0x55/0xa6 ? debug_smp_processor_id+0x12/0x14 helper_firmware_cb+0x3c/0x3f request_firmware_work_func+0x37/0x6f process_one_work+0x164/0x25a worker_thread+0x1c4/0x284 kthread+0xec/0xf1 ? cancel_delayed_work_sync+0xf/0xf ? kthread_create_on_node+0x1a/0x1a ret_from_fork+0x2e/0x38 ---[ end trace 3ef1e3b2dd53852f ]---
--- drivers/net/wireless/marvell/libertas/if_usb.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/marvell/libertas/if_usb.c +0 -2
@@ -456,8 +456,6 @@ static int __if_usb_submit_rx_urb(structMRVDRV_ETH_RX_PACKET_BUFFER_SIZE , callbackfn, cardp); - cardp->rx_urb->transfer_flags |=URB_ZERO_PACKET ; -lbs_deb_usb2 (&cardp->udev->dev,"Pointer for rx_urb %p\n" , cardp->rx_urb);if ((ret =usb_submit_urb (cardp->rx_urb,GFP_ATOMIC ))) {lbs_deb_usbd (&cardp->udev->dev,"Submit Rx URB failed: %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 121/222 xen: make xen_qlock_wait() nestable
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Juergen Gross <[email protected]>
commit a856531951dc8094359dfdac21d59cee5969c18e upstream.
xen_qlock_wait() isn't safe for nested calls due to interrupts. A call of xen_qlock_kick() might be ignored in case a deeper nesting level was active right before the call of xen_poll_irq():
CPU 1: CPU 2:spin_lock(lock1)
spin_lock(lock1)
-> xen_qlock_wait()
-> xen_clear_irq_pending()
Interrupt happens
spin_unlock(lock1)
-> xen_qlock_kick(CPU 2)
spin_lock_irqsave(lock2)
spin_lock_irqsave(lock2)
-> xen_qlock_wait()
-> xen_clear_irq_pending()
clears kick for lock1
-> xen_poll_irq()spin_unlock_irq_restore(lock2)
-> xen_qlock_kick(CPU 2)
wakes up
spin_unlock_irq_restore(lock2) IRET
resumes in xen_qlock_wait() -> xen_poll_irq() never wakes up
The solution is to disable interrupts in xen_qlock_wait() and not to poll for the irq in case xen_qlock_wait() is called in nmi context.
--- arch/x86/xen/spinlock.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
arch/x86/xen/spinlock.c +10 -14
@@ -40,29 +40,25 @@ static void xen_qlock_kick(int cpu)*/ static void xen_qlock_wait (u8 *byte,u8 val) { +unsigned long flags;int irq =__this_cpu_read (lock_kicker_irq);/* If kicker interrupts not initialized yet, just spin */ -if (irq ==-1 ) +if (irq ==-1 ||in_nmi ())return ; -/* If irq pending already clear it and return. */ +/* Guard against reentry. */ +local_irq_save (flags); + +/* If irq pending already clear it. */ if (xen_test_irq_pending (irq)) {xen_clear_irq_pending (irq); -return ; + }else if (READ_ONCE (*byte) == val) { +/* Block until irq becomes pending (or a spurious wakeup) */ +xen_poll_irq (irq); } -if (READ_ONCE (*byte) != val) -return ; - -/* -* If an interrupt happens here, it will leave the wakeup irq -* pending, which will cause xen_poll_irq() to return -* immediately. -*/ - -/* Block until irq becomes pending (or perhaps a spurious wakeup) */ -xen_poll_irq (irq); +local_irq_restore (flags); }static irqreturn_t dummy_handler (int irq,void *dev_id)
Greg Kroah-Hartman
maintainerPATCH 123/222 xen/pvh: dont try to unplug emulated devices
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Juergen Gross <[email protected]>
commit e6111161c0a02d58919d776eec94b313bb57911f upstream.
A Xen PVH guest has no associated qemu device model, so trying to unplug any emulated devices is making no sense at all.
Bail out early from xen_unplug_emulated_devices() when running as PVH guest. This will avoid issuing the boot message:
[ 0.000000] Xen Platform PCI: unrecognised magic value
--- arch/x86/xen/platform-pci-unplug.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/xen/platform-pci-unplug.c +4 -0
@@ -146,6 +146,10 @@ void xen_unplug_emulated_devices(void) {int r; +/* PVH guests don't have emulated devices. */ +if (xen_pvh_domain ()) +return ; +/* user explicitly requested no unplug */ if (xen_emul_unplug &XEN_UNPLUG_NEVER )return ;
Greg Kroah-Hartman
maintainerPATCH 120/222 xen: fix race in xen_qlock_wait()
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Juergen Gross <[email protected]>
commit 2ac2a7d4d9ff4e01e36f9c3d116582f6f655ab47 upstream.
In the following situation a vcpu waiting for a lock might not be woken up from xen_poll_irq():
CPU 1: CPU 2: CPU 3:
takes a spinlock
tries to get lock
-> xen_qlock_wait()
frees the lock
-> xen_qlock_kick(cpu2)
-> xen_clear_irq_pending()
takes lock again
tries to get lock
-> *lock = _Q_SLOW_VAL
-> *lock == _Q_SLOW_VAL ?
-> xen_poll_irq()frees the lock
-> xen_qlock_kick(cpu3)
And cpu 2 will sleep forever.
This can be avoided easily by modifying xen_qlock_wait() to call xen_poll_irq() only if the related irq was not pending and to call xen_clear_irq_pending() only if it was pending.
--- arch/x86/xen/spinlock.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/xen/spinlock.c +5 -10
@@ -46,17 +46,12 @@ static void xen_qlock_wait(u8 *byte, u8if (irq ==-1 )return ; -/* clear pending */ -xen_clear_irq_pending (irq); -barrier (); +/* If irq pending already clear it and return. */ +if (xen_test_irq_pending (irq)) { +xen_clear_irq_pending (irq); +return ; + } -/* -* We check the byte value after clearing pending IRQ to make sure -* that we won't miss a wakeup event because of the clearing. -* -* The sync_clear_bit() call in xen_clear_irq_pending() is atomic. -* So it is effectively a memory barrier for x86. -*/ if (READ_ONCE (*byte) != val)return ;
Greg Kroah-Hartman
maintainerPATCH 118/222 xen/blkfront: avoid NULL blkfront_info dereference on device removal
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasilis Liaskovitis <[email protected]>
commit f92898e7f32e3533bfd95be174044bc349d416ca upstream.
If a block device is hot-added when we are out of grants, gnttab_grant_foreign_access fails with -ENOSPC (log message "28 granting access to ring page") in this code path:
talk_to_blkback ->
setup_blkring -> xenbus_grant_ring -> gnttab_grant_foreign_access
and the failing path in talk_to_blkback sets the driver_data to NULL:
destroy_blkring:
blkif_free(info, 0);
mutex_lock(&blkfront_mutex);
free_info(info);
mutex_unlock(&blkfront_mutex);
dev_set_drvdata(&dev->dev, NULL);This results in a NULL pointer BUG when blkfront_remove and blkif_free try to access the failing device's NULL struct blkfront_info.
--- drivers/block/xen-blkfront.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/block/xen-blkfront.c +3 -0
@@ -2471,6 +2471,9 @@ static int blkfront_remove(struct xenbusdev_dbg (&xbdev->dev,"%s removed" , xbdev->nodename); +if (!info) +return 0 ; +blkif_free (info,0 );mutex_lock (&info->mutex);
Greg Kroah-Hartman
maintainerPATCH 114/222 ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit eb9e16d8573e243f8175647f851eb5085dbe97a4 upstream.
Convert Exynos5250 to OPP-v2 bindings. This is a preparation to add proper support for suspend operation point, which cannot be marked in opp-v1.
--- arch/arm/boot/dts/exynos5250.dtsi | 130 +++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 42 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +88 -42
@@ -57,62 +57,108 @@ device_type = "cpu"; compatible = "arm,cortex-a15"; reg = <0>; - clock-frequency = <1700000000>; clocks = <&clock CLK_ARM_CLK>; clock-names = "cpu"; - clock-latency = <140000>; - - operating-points = < - 1700000 1300000 - 1600000 1250000 - 1500000 1225000 - 1400000 1200000 - 1300000 1150000 - 1200000 1125000 - 1100000 1100000 - 1000000 1075000 - 900000 1050000 - 800000 1025000 - 700000 1012500 - 600000 1000000 - 500000 975000 - 400000 950000 - 300000 937500 - 200000 925000 - >; + operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; /* min followed by max */ }; cpu@1 { device_type = "cpu"; compatible = "arm,cortex-a15"; reg = <1>; - clock-frequency = <1700000000>; clocks = <&clock CLK_ARM_CLK>; clock-names = "cpu"; - clock-latency = <140000>; - - operating-points = < - 1700000 1300000 - 1600000 1250000 - 1500000 1225000 - 1400000 1200000 - 1300000 1150000 - 1200000 1125000 - 1100000 1100000 - 1000000 1075000 - 900000 1050000 - 800000 1025000 - 700000 1012500 - 600000 1000000 - 500000 975000 - 400000 950000 - 300000 937500 - 200000 925000 - >; + operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; /* min followed by max */ }; }; + cpu0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <925000>; + clock-latency-ns = <140000>; + }; + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <937500>; + clock-latency-ns = <140000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <950000>; + clock-latency-ns = <140000>; + }; + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <975000>; + clock-latency-ns = <140000>; + }; + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1000000>; + clock-latency-ns = <140000>; + }; + opp-700000000 { + opp-hz = /bits/ 64 <700000000>; + opp-microvolt = <1012500>; + clock-latency-ns = <140000>; + }; + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1025000>; + clock-latency-ns = <140000>; + }; + opp-900000000 { + opp-hz = /bits/ 64 <900000000>; + opp-microvolt = <1050000>; + clock-latency-ns = <140000>; + }; + opp-1000000000 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <1075000>; + clock-latency-ns = <140000>; + }; + opp-1100000000 { + opp-hz = /bits/ 64 <1100000000>; + opp-microvolt = <1100000>; + clock-latency-ns = <140000>; + }; + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1125000>; + clock-latency-ns = <140000>; + }; + opp-1300000000 { + opp-hz = /bits/ 64 <1300000000>; + opp-microvolt = <1150000>; + clock-latency-ns = <140000>; + }; + opp-1400000000 { + opp-hz = /bits/ 64 <1400000000>; + opp-microvolt = <1200000>; + clock-latency-ns = <140000>; + }; + opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-microvolt = <1225000>; + clock-latency-ns = <140000>; + }; + opp-1600000000 { + opp-hz = /bits/ 64 <1600000000>; + opp-microvolt = <1250000>; + clock-latency-ns = <140000>; + }; + opp-1700000000 { + opp-hz = /bits/ 64 <1700000000>; + opp-microvolt = <1300000>; + clock-latency-ns = <140000>; + }; + }; + soc: soc { sysram@02020000 { compatible = "mmio-sram";
Greg Kroah-Hartman
maintainerPATCH 115/222 ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit 645b23da6f8b47f295fa87051335d41d139717a5 upstream.
1 GHz CPU OPP is the default boot value for the Exynos5250 SOC, so mark it as suspend OPP. This fixes suspend/resume on Samsung Exynos5250 Snow Chomebook, which was broken since switching to generic cpufreq-dt driver in v4.3.
--- arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5250.dtsi +1 -0
@@ -121,6 +121,7 @@ opp-hz = /bits/ 64 <1000000000>; opp-microvolt = <1075000>; clock-latency-ns = <140000>; + opp-suspend; }; opp-1100000000 { opp-hz = /bits/ 64 <1100000000>;
Greg Kroah-Hartman
maintainerPATCH 111/222 f2fs: fix to account IO correctly
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chao Yu <[email protected]>
commit 4c58ed076875f36dae0f240da1e25e99e5d4afb8 upstream.
Below race can cause reversed reference on dirty count, fix it by relocating __submit_bio() and inc_page_count().
Thread A Thread B
- f2fs_inplace_write_data
- f2fs_submit_page_bio
- __submit_bio
- f2fs_write_end_io
- dec_page_count
- inc_page_count
--- fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/data.c +2 -2
@@ -381,10 +381,10 @@ int f2fs_submit_page_bio(struct f2fs_io_ }bio_set_op_attrs (bio, fio->op, fio->op_flags); -__submit_bio (fio->sbi, bio, fio->type); -if (!is_read_io (fio->op))inc_page_count (fio->sbi,WB_DATA_TYPE (fio->page)); + +__submit_bio (fio->sbi, bio, fio->type);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 9/222 ACPICA: AML interpreter: add region addresses in global list during initialization
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Erik Schmauss <[email protected]>
commit 4abb951b73ff0a8a979113ef185651aa3c8da19b upstream.
The table load process omitted adding the operation region address range to the global list. This omission is problematic because the OS queries the global list to check for address range conflicts before deciding which drivers to load. This commit may result in warning messages that look like the following:
[ 7.871761] ACPI Warning: system_IO range 0x00000428-0x0000042F conflicts with op_region 0x00000400-0x0000047F (\PMIO) (20180531/utaddress-213) [ 7.871769] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
However, these messages do not signify regressions. It is a result of properly adding address ranges within the global address list.
--- drivers/acpi/acpica/dsopcode.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/acpica/dsopcode.c +4 -0
@@ -451,6 +451,10 @@ acpi_ds_eval_region_operands(struct acpiACPI_FORMAT_UINT64 (obj_desc->region.address), obj_desc->region.length)); + status =acpi_ut_add_address_range (obj_desc->region.space_id, + obj_desc->region.address, + obj_desc->region.length, node); +/* Now the address and length are valid for this opregion */ obj_desc->region.flags |=AOPOBJ_DATA_VALID ;
Greg Kroah-Hartman
maintainerPATCH 8/222 pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maciej S. Szmigiero <[email protected]>
commit 95691e3eddc41da2d1cd3cca51fecdfb46bd85bc upstream.
Currently, "disable_clkrun" yenta_socket module parameter is only implemented for TI CardBus bridges.
Add also an implementation for Ricoh bridges that have the necessary setting documented in publicly available datasheets.
Tested on a RL5C476II with a Sunrich C-160 CardBus NIC that doesn't work correctly unless the CLKRUN protocol is disabled.
Let's also make it clear in its description that the "disable_clkrun" module parameter only works on these two previously mentioned brands of CardBus bridges.
--- drivers/pcmcia/ricoh.h | 35 +++++++++++++++++++++++++++++++++++ drivers/pcmcia/yenta_socket.c | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-)
drivers/pcmcia/ricoh.h +35 -0
@@ -119,6 +119,10 @@#define RL5C4XX_MISC_CONTROL 0x2F/* 8 bit */ #define RL5C4XX_ZV_ENABLE 0x08 +/* Misc Control 3 Register */ +#define RL5C4XX_MISC3 0x00A2/* 16 bit */ +#define RL5C47X_MISC3_CB_CLKRUN_DIS BIT(1) +#ifdef __YENTA_H#define rl_misc (socket) ((socket)->private[0])
@@ -156,6 +160,35 @@ static void ricoh_set_zv(struct yenta_so } } +static void ricoh_set_clkrun (struct yenta_socket *socket,bool quiet) +{ +u16 misc3; + +/* +* RL5C475II likely has this setting, too, however no datasheet +* is publicly available for this chip +*/ +if (socket->dev->device !=PCI_DEVICE_ID_RICOH_RL5C476 && + socket->dev->device !=PCI_DEVICE_ID_RICOH_RL5C478 ) +return ; + +if (socket->dev->revision <0x80 ) +return ; + + misc3 =config_readw (socket,RL5C4XX_MISC3 ); +if (misc3 &RL5C47X_MISC3_CB_CLKRUN_DIS ) { +if (!quiet) +dev_dbg (&socket->dev->dev, +"CLKRUN feature already disabled\n" ); + }else if (disable_clkrun) { +if (!quiet) +dev_info (&socket->dev->dev, +"Disabling CLKRUN feature\n" ); + misc3 |=RL5C47X_MISC3_CB_CLKRUN_DIS ; +config_writew (socket,RL5C4XX_MISC3 , misc3); + } +} +static void ricoh_save_state (struct yenta_socket *socket) {rl_misc (socket) =config_readw (socket,RL5C4XX_MISC );
@@ -172,6 +205,7 @@ static void ricoh_restore_state(struct yconfig_writew (socket,RL5C4XX_16BIT_IO_0 ,rl_io (socket));config_writew (socket,RL5C4XX_16BIT_MEM_0 ,rl_mem (socket));config_writew (socket,RL5C4XX_CONFIG ,rl_config (socket)); +ricoh_set_clkrun (socket, true); }
@@ -197,6 +231,7 @@ static int ricoh_override(struct yenta_sconfig_writew (socket,RL5C4XX_CONFIG , config);ricoh_set_zv (socket); +ricoh_set_clkrun (socket, false);return 0 ; }
drivers/pcmcia/yenta_socket.c +2 -1
@@ -26,7 +26,8 @@static bool disable_clkrun;module_param (disable_clkrun, bool,0444 ); -MODULE_PARM_DESC (disable_clkrun,"If PC card doesn't function properly, please try this option" ); +MODULE_PARM_DESC (disable_clkrun, +"If PC card doesn't function properly, please try this option (TI and Ricoh bridges only)" );static bool isa_probe =1 ;module_param (isa_probe, bool,0444 );
Greg Kroah-Hartman
maintainercover 4.14.81-stable review
This is the start of the stable review cycle for the 4.14.81 release. There are 222 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Tue Nov 13 22:15:32 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.81-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.14.81-rc1
Daniel Colascione <[email protected]>
bpf: wait for running BPF programs when updating map-in-map
David Ahern <[email protected]>
net: sched: Remove TCA_OPTIONS from policy
Filipe Manana <[email protected]>
Btrfs: fix fsync after hole punching when using no-holes feature
Filipe Manana <[email protected]>
Btrfs: fix use-after-free when dumping free space
Filipe Manana <[email protected]>
Btrfs: fix use-after-free during inode eviction
Josef Bacik <[email protected]>
btrfs: move the dio_sem higher up the callchain
Josef Bacik <[email protected]>
btrfs: don't run delayed_iputs in commit
Josef Bacik <[email protected]>
btrfs: only free reserved extent if we didn't insert it
Josef Bacik <[email protected]>
btrfs: don't use ctl->free_space for max_extent_size
Josef Bacik <[email protected]>
btrfs: set max_extent_size properly
Filipe Manana <[email protected]>
Btrfs: fix assertion on fsync of regular file when using no-holes feature
Filipe Manana <[email protected]>
Btrfs: fix null pointer dereference on compressed write path error
Qu Wenruo <[email protected]>
btrfs: qgroup: Dirty all qgroups before rescan
Filipe Manana <[email protected]>
Btrfs: fix wrong dentries after fsync of file that got its parent replaced
Filipe Manana <[email protected]>
Btrfs: fix warning when replaying log after fsync of a tmpfile
Josef Bacik <[email protected]>
btrfs: make sure we create all new block groups
Josef Bacik <[email protected]>
btrfs: reset max_extent_size on clear in a bitmap
Josef Bacik <[email protected]>
btrfs: protect space cache inode alloc with GFP_NOFS
Josef Bacik <[email protected]>
btrfs: wait on caching when putting the bg cache
Jeff Mahoney <[email protected]>
btrfs: don't attempt to trim devices that don't support it
Jeff Mahoney <[email protected]>
btrfs: iterate all devices during trim, instead of fs_devices::alloc_list
Qu Wenruo <[email protected]>
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
Qu Wenruo <[email protected]>
btrfs: Enhance btrfs_trim_fs function to handle error better
Jeff Mahoney <[email protected]>
btrfs: fix error handling in free_log_tree
Qu Wenruo <[email protected]>
btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock
Qu Wenruo <[email protected]>
btrfs: Handle owner mismatch gracefully when walking up tree
Qu Wenruo <[email protected]>
btrfs: qgroup: Avoid calling qgroup functions if qgroup is not enabled
Breno Leitao <[email protected]>
selftests/powerpc: Fix ptrace tm failure
Johan Hovold <[email protected]>
soc/tegra: pmc: Fix child-node lookup
Thor Thayer <[email protected]>
arm64: dts: stratix10: Correct System Manager register size
Thor Thayer <[email protected]>
ARM: dts: socfpga: Fix SDRAM node address for Arria10
Nicolas Pitre <[email protected]>
Cramfs: fix abad comparison when wrap-arounds occur
Colin Ian King <[email protected]>
rpmsg: smd: fix memory leak on channel create
Tri Vo <[email protected]>
arm64: lse: remove -fcall-used-x0 flag
Hans Verkuil <[email protected]>
media: media colorspaces*.rst: rename AdobeRGB to opRGB
Mauro Carvalho Chehab <[email protected]>
media: em28xx: make v4l2-compliance happier by starting sequence on zero
Mauro Carvalho Chehab <[email protected]>
media: em28xx: fix input name for Terratec AV 350
Mauro Carvalho Chehab <[email protected]>
media: tvp5150: avoid going past array on v4l2_querymenu()
Mauro Carvalho Chehab <[email protected]>
media: em28xx: use a default format if TRY_FMT fails
Manjunath Patil <[email protected]>
xen-blkfront: fix kernel panic with negotiate_mq error path
Juergen Gross <[email protected]>
xen: fix xen_qlock_wait()
He Zhe <[email protected]>
kgdboc: Passing ekgdboc to command line causes panic
Hans Verkuil <[email protected]>
media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD
Maciej W. Rozycki <[email protected]>
TC: Set DMA masks for devices
Will Deacon <[email protected]>
iommu/arm-smmu: Ensure that page-table updates are visible before TLBI
Aaro Koskinen <[email protected]>
MIPS: OCTEON: fix out of bounds array access on CN68XX
Christophe Leroy <[email protected]>
powerpc/msi: Fix compile error on mpc83xx
Damien Le Moal <[email protected]>
dm zoned: fix various dmz_get_mblock() issues
Damien Le Moal <[email protected]>
dm zoned: fix metadata block ref counting
Wenwen Wang <[email protected]>
dm ioctl: harden copy_params()'s copy_from_user() from malicious users
Amir Goldstein <[email protected]>
lockd: fix access beyond unterminated strings in prints
Trond Myklebust <[email protected]>
nfsd: Fix an Oops in free_session()
Benjamin Coddington <[email protected]>
nfs: Fix a missed page unlock after pg_doio()
Trond Myklebust <[email protected]>
NFSv4.1: Fix the r/wsize checking
Lukas Wunner <[email protected]>
genirq: Fix race on spurious interrupt detection
He Zhe <[email protected]>
printk: Fix panic caused by passing log_buf_len to command line
Steve French <[email protected]>
smb3: on kerberos mount if server doesn't specify auth type use krb5
Steve French <[email protected]>
smb3: do not attempt cifs operation in smb3 query info error path
Steve French <[email protected]>
smb3: allow stats which track session and share reconnects to be reset
Andreas Kemnade <[email protected]>
w1: omap-hdq: fix missing bus unregister at removal
Eugen Hristev <[email protected]>
iio: adc: at91: fix wrong channel number in triggered buffer mode
Eugen Hristev <[email protected]>
iio: adc: at91: fix acking DRDY irq on simple conversions
Alexey Khoroshilov <[email protected]>
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
Lars-Peter Clausen <[email protected]>
iio: ad5064: Fix regulator handling
Arnd Bergmann <[email protected]>
kbuild: fix kernel/bounds.c 'W=1' warning
Mark Rutland <[email protected]>
KVM: arm64: Fix caching of host MDCR_EL2 value
Ralph Campbell <[email protected]>
mm/rmap: map_pte() was not handling private ZONE_DEVICE page properly
Mike Kravetz <[email protected]>
hugetlbfs: dirty pages as they are added to pagecache
Eric Biggers <[email protected]>
ima: fix showing large 'violations' or 'runtime_measurements_count'
Vlastimil Babka <[email protected]>
mm: /proc/pid/smaps_rollup: fix NULL pointer deref in smaps_pte_range()
Horia Geantă <[email protected]>
crypto: tcrypt - fix ghash-generic speed test
Ondrej Mosnacek <[email protected]>
crypto: lrw - Fix out-of bounds access on counter overflow
Eric W. Biederman <[email protected]>
signal: Guard against negative signal numbers in copy_siginfo_from_user32
Eric W. Biederman <[email protected]>
signal/GenWQE: Fix sending of SIGKILL
Keith Busch <[email protected]>
PCI: vmd: White list for fast interrupt handlers
Bin Meng <[email protected]>
PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
Lukas Wunner <[email protected]>
PCI/ASPM: Fix link_state teardown on device removal
Vignesh R <[email protected]>
ARM: dts: dra7: Fix up unaligned access setting for PCIe EP
Qiuxu Zhuo <[email protected]>
EDAC, skx_edac: Fix logical channel intermediate decoding
Tony Luck <[email protected]>
EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting
Michael Jin <[email protected]>
EDAC, amd64: Add Family 17h, models 10h-2fh support
Breno Leitao <[email protected]>
HID: hiddev: fix potential Spectre v1
Theodore Ts'o <[email protected]>
ext4: fix use-after-free race in ext4_remount()'s error path
Wang Shilong <[email protected]>
ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR
Wang Shilong <[email protected]>
ext4: fix setattr project check in fssetxattr ioctl
Lukas Czerner <[email protected]>
ext4: initialize retries variable in ext4_da_write_inline_data_begin()
Al Viro <[email protected]>
gfs2_meta: ->mount() can get NULL dev_name
Jan Kara <[email protected]>
jbd2: fix use after free in jbd2_log_do_checkpoint()
Artemy Kovalyov <[email protected]>
IB/mlx5: Fix MR cache initialization
Takashi Iwai <[email protected]>
ASoC: intel: skylake: Add missing break in skl_tplg_get_token()
Dan Williams <[email protected]>
libnvdimm, region: Fail badblocks listing for inactive regions
Alexander Duyck <[email protected]>
libnvdimm: Hold reference on parent while scheduling async init
Pierre Yves MORDRET <[email protected]>
dmaengine: stm32-dma: fix incomplete configuration in cyclic mode
Christian Lamparter <[email protected]>
dmaengine: ppc4xx: fix off-by-one build failure
Stefan Nuernberger <[email protected]>
net/ipv4: defensive cipso option parsing
Luca Coelho <[email protected]>
iwlwifi: mvm: check return value of rs_rate_from_ucode_rate()
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: Fix b-device mode for "workaround"
Shuah Khan (Samsung OSG) <[email protected]>
usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten
Lubomir Rintel <[email protected]>
libertas: don't set URB_ZERO_PACKET on IN USB transfer
Juergen Gross <[email protected]>
xen/pvh: don't try to unplug emulated devices
Roger Pau Monne <[email protected]>
xen/pvh: increase early stack size
Juergen Gross <[email protected]>
xen: make xen_qlock_wait() nestable
Juergen Gross <[email protected]>
xen: fix race in xen_qlock_wait()
Boris Ostrovsky <[email protected]>
xen/balloon: Support xend-based toolstack
Vasilis Liaskovitis <[email protected]>
xen/blkfront: avoid NULL blkfront_info dereference on device removal
Dr. Greg Wettstein <[email protected]>
tpm: Restore functionality to xen vtpm driver.
Joe Jin <[email protected]>
xen-swiotlb: use actually allocated size on check physical continuous
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings
Viresh Kumar <[email protected]>
arm: dts: exynos: Add missing cooling device properties for CPUs
Viresh Kumar <[email protected]>
ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes
Chao Yu <[email protected]>
f2fs: fix to account IO correctly
Jaegeuk Kim <[email protected]>
Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()"
Prarit Bhargava <[email protected]>
cpupower: Fix AMD Family 0x17 msr_pstate size
Takashi Iwai <[email protected]>
ALSA: hda: Check the non-cached stream buffers more explicitly
Vijay Immanuel <[email protected]>
IB/rxe: fix for duplicate request processing and ack psns
Paul Cercueil <[email protected]>
dmaengine: dma-jz4780: Return error if not probed from DT
Alexandre Belloni <[email protected]>
mfd: menelaus: Fix possible race condition and leak
Eric W. Biederman <[email protected]>
signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init
Yunlei He <[email protected]>
f2fs: report error if quota off error during umount
James Smart <[email protected]>
scsi: lpfc: Correct race with abort on completion path
James Smart <[email protected]>
scsi: lpfc: Correct soft lockup when running mds diagnostics
Alexandre Belloni <[email protected]>
uio: ensure class is registered before devices
Waiman Long <[email protected]>
driver/dma/ioat: Call del_timer_sync() without holding prep_lock
Loic Poulain <[email protected]>
usb: chipidea: Prevent unbalanced IRQ disable
Horia Geantă <[email protected]>
crypto: caam - fix implicit casts in endianness helpers
Vignesh R <[email protected]>
PCI: dwc: pci-dra7xx: Enable errata i870 for both EP and RC mode
Suzuki K Poulose <[email protected]>
coresight: etb10: Fix handling of perf mode
Tonghao Zhang <[email protected]>
PCI/MSI: Warn and return error if driver enables MSI/MSI-X twice
Chao Yu <[email protected]>
f2fs: fix to recover inode's i_flags during POR
Shaohua Li <[email protected]>
MD: fix invalid stored role for a disk
Theodore Ts'o <[email protected]>
ext4: fix argument checking in EXT4_IOC_MOVE_EXT
Alexandre Belloni <[email protected]>
usb: gadget: udc: atmel: handle at91sam9rl PMC
Mika Westerberg <[email protected]>
PCI / ACPI: Enable wake automatically for power managed bridges
Jorgen Hansen <[email protected]>
VMCI: Resource wildcard match fixed
Dexuan Cui <[email protected]>
Drivers: hv: vmbus: Use cpumask_var_t for on-stack cpu mask
Javier Martinez Canillas <[email protected]>
tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated
Honghui Zhang <[email protected]>
PCI: mediatek: Fix mtk_pcie_find_port() endpoint/port matching logic
[email protected] <[email protected]>
usb: host: ohci-at91: fix request of irq for optional gpio
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Fix recursive lock warning in debug kernel
Denis Drozdov <[email protected]>
IB/ipoib: Clear IPCB before icmp_send
Parav Pandit <[email protected]>
RDMA/core: Do not expose unsupported counters
Wenwen Wang <[email protected]>
scsi: megaraid_sas: fix a missing-check bug
Jim Mattson <[email protected]>
KVM: nVMX: Clear reserved bits of #DB exit qualification
David Howells <[email protected]>
UAPI: ndctl: Fix g++-unsupported initialisation in headers
Finn Thain <[email protected]>
scsi: esp_scsi: Track residual for PIO transfers
Michal Hocko <[email protected]>
cgroup, netclassid: add a preemption point to write_classid
Geert Uytterhoeven <[email protected]>
thermal: da9062/61: Prevent hardware access during system suspend
Martin Willi <[email protected]>
ath10k: schedule hardware restart if WMI command times out
Sebastian Basierski <[email protected]>
ixgbevf: VF2VF TCP RSS
Sara Sharon <[email protected]>
iwlwifi: mvm: fix BAR seq ctrl reporting
Andrew Lunn <[email protected]>
net: dsa: mv88e6xxx: Fix writing to a PHY page.
Douglas Anderson <[email protected]>
pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant
Douglas Anderson <[email protected]>
pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant
Stephen Boyd <[email protected]>
pinctrl: qcom: spmi-mpp: Fix drive strength setting
Hans de Goede <[email protected]>
ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers
Masami Hiramatsu <[email protected]>
kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()
Paolo Valente <[email protected]>
block, bfq: correctly charge and reset entity service in all cases
Antoine Tenart <[email protected]>
net: phy: phylink: ensure the carrier is off when starting phylink
Arend van Spriel <[email protected]>
brcmfmac: fix for proper support of 160MHz bandwidth
YueHaibing <[email protected]>
pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
Ben Hutchings <[email protected]>
x86: boot: Fix EFI stub alignment
Christian Hewitt <[email protected]>
Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth
Will Deacon <[email protected]>
signal: Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack
Gustavo A. R. Silva <[email protected]>
mtd: rawnand: atmel: Fix potential NULL pointer dereference
Viresh Kumar <[email protected]>
cpufreq: dt: Try freeing static OPPs only if we have added them
Dou Liyang <[email protected]>
ACPI / processor: Fix the return value of acpi_processor_ids_walk()
Lubomir Rintel <[email protected]>
x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC
Emmanuel Grumbach <[email protected]>
iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface
Shaul Triebitz <[email protected]>
iwlwifi: pcie: avoid empty free RB queue
Yu Zhao <[email protected]>
mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01
Prarit Bhargava <[email protected]>
cpupower: Fix coredump on VMWare
Sanskriti Sharma <[email protected]>
perf strbuf: Match va_{add,copy} with va_end
Sanskriti Sharma <[email protected]>
perf tools: Cleanup trace-event-info 'tdata' leak
Sanskriti Sharma <[email protected]>
perf tools: Free temporary 'sys' string in read_event_files()
Nathan Chancellor <[email protected]>
spi: spi-ep93xx: Use dma_data_direction for ep93xx_spi_dma_{finish,prepare}Jia-Ju Bai <[email protected]>
lightnvm: pblk: fix two sleep-in-atomic-context bugs
Thierry Reding <[email protected]>
hwmon: (pwm-fan) Set fan speed to 0 on suspend
Janosch Frank <[email protected]>
s390/sthyi: Fix machine name validity indication
Serhey Popovych <[email protected]>
tun: Consistently configure generic netdev params via rtnetlink
Ryan C Goodfellow <[email protected]>
nfp: devlink port split support for 1x100G CXP NIC
Omar Sandoval <[email protected]>
swim: fix cleanup on setup error
Omar Sandoval <[email protected]>
ataflop: fix error handling during setup
Waiman Long <[email protected]>
locking/lockdep: Fix debug_locks off performance problem
Wolfram Sang <[email protected]>
i2c: rcar: cleanup DMA for all kinds of failure
Masami Hiramatsu <[email protected]>
selftests: ftrace: Add synthetic event syntax testcase
Nathan Chancellor <[email protected]>
net: qla3xxx: Remove overflowing shift statement
Sebastian Andrzej Siewior <[email protected]>
x86/fpu: Remove second definition of fpu in __fpu__restore_sig()
David Miller <[email protected]>
perf cpu_map: Align cpu map synthesized events properly.
Jarod Wilson <[email protected]>
perf tools: Fix use of alternatives to find JDIR
Song Muchun <[email protected]>
sched/fair: Fix the min_vruntime update logic in dequeue_entity()
David S. Miller <[email protected]>
sparc64: Make proc_id signed.
David S. Miller <[email protected]>
sparc: Throttle perf events properly.
David S. Miller <[email protected]>
sparc: Fix single-pcr perf event counter management.
Jiri Olsa <[email protected]>
perf vendor events intel: Fix wrong filter_band* values for uncore events
Florian Westphal <[email protected]>
xfrm: policy: use hlist rcu variants on insert
Jiri Olsa <[email protected]>
Revert "perf tools: Fix PMU term format max value calculation"
Eric Dumazet <[email protected]>
bpf: do not blindly change rlimit in reuseport net selftest
Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for MAX8997 interrupts on Origen
Sai Praneeth <[email protected]>
x86/speculation: Support Enhanced IBRS on future CPUs
Sebastian Andrzej Siewior <[email protected]>
x86/mm/pat: Disable preemption around __flush_tlb_all()
He Zhe <[email protected]>
x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
Juergen Gross <[email protected]>
x86/xen: Fix boot loader version reported for PVH guests
Jiri Kosina <[email protected]>
x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
Alex Stanoev <[email protected]>
ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
Jeremy Cline <[email protected]>
ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)
Hui Wang <[email protected]>
ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715
Takashi Iwai <[email protected]>
ALSA: hda - Fix headphone pin config for ASUS G751
Takashi Iwai <[email protected]>
ALSA: hda - Add quirk for ASUS G751 laptop
Helge Deller <[email protected]>
parisc: Fix exported address of os_hpmc handler
Helge Deller <[email protected]>
parisc: Fix map_pages() to not overwrite existing pte entries
John David Anglin <[email protected]>
parisc: Fix address in HPMC IVA
Jan Glauber <[email protected]>
ipmi: Fix timer race with module unload
Erik Schmauss <[email protected]>
ACPICA: AML interpreter: add region addresses in global list during initialization
Maciej S. Szmigiero <[email protected]>
pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
Rafael J. Wysocki <[email protected]>
cpufreq: conservative: Take limits changes into account properly
Hou Tao <[email protected]>
jffs2: free jffs2_sb_info through jffs2_kill_sb()
Dmitry Bazhenov <[email protected]>
hwmon: (pmbus) Fix page count auto-detection.
Tang Junhui <[email protected]>
bcache: fix miss key refill->end in writeback
Tang Junhui <[email protected]>
bcache: trace missed reading by cache_missed
Rafał Miłecki <[email protected]>
spi: bcm-qspi: switch back to reading flash using smaller chunks
Liu Xiang <[email protected]>
mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB
-------------
Diffstat:
Documentation/media/uapi/v4l/biblio.rst | 10 -- Documentation/media/uapi/v4l/colorspaces-defs.rst | 8 +- .../media/uapi/v4l/colorspaces-details.rst | 13 ++- Makefile | 4 +- arch/arm/boot/dts/dra7.dtsi | 2 +- arch/arm/boot/dts/exynos3250.dtsi | 16 +++ arch/arm/boot/dts/exynos4210-origen.dts | 9 ++ arch/arm/boot/dts/exynos4210.dtsi | 15 ++- arch/arm/boot/dts/exynos4412.dtsi | 2 - arch/arm/boot/dts/exynos5250.dtsi | 116 ++++++++++++++++----- arch/arm/boot/dts/exynos5420-cpus.dtsi | 16 --- arch/arm/boot/dts/exynos5422-cpus.dtsi | 16 --- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- arch/arm64/lib/Makefile | 2 +- arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- arch/parisc/kernel/entry.S | 2 +- arch/parisc/kernel/hpmc.S | 3 +- arch/parisc/kernel/traps.c | 3 +- arch/parisc/mm/init.c | 8 +- arch/powerpc/include/asm/mpic.h | 7 ++ arch/s390/kvm/sthyi.c | 8 +- arch/sparc/include/asm/cpudata_64.h | 2 +- arch/sparc/kernel/perf_event.c | 26 ++++- arch/x86/boot/tools/build.c | 7 ++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/nospec-branch.h | 1 + arch/x86/include/asm/tlbflush.h | 6 ++ arch/x86/kernel/check.c | 15 +++ arch/x86/kernel/cpu/bugs.c | 77 ++++++++++++-- arch/x86/kernel/cpu/common.c | 3 + arch/x86/kernel/fpu/signal.c | 1 - arch/x86/kvm/vmx.c | 7 +- arch/x86/mm/pageattr.c | 6 +- arch/x86/platform/olpc/olpc-xo1-rtc.c | 3 + arch/x86/xen/enlighten_pvh.c | 2 +- arch/x86/xen/platform-pci-unplug.c | 4 + arch/x86/xen/spinlock.c | 35 +++---- arch/x86/xen/xen-pvh.S | 2 +- block/bfq-wf2q.c | 13 ++- crypto/lrw.c | 7 +- crypto/tcrypt.c | 3 + drivers/acpi/acpi_lpss.c | 2 + drivers/acpi/acpi_processor.c | 7 +- drivers/acpi/acpica/dsopcode.c | 4 + drivers/block/ataflop.c | 25 +++-- drivers/block/swim.c | 13 ++- drivers/block/xen-blkfront.c | 4 + drivers/bluetooth/btbcm.c | 1 + drivers/char/ipmi/ipmi_ssif.c | 10 +- drivers/char/tpm/tpm-interface.c | 3 +- drivers/char/tpm/xen-tpmfront.c | 2 +- drivers/cpufreq/cpufreq-dt.c | 34 +++--- drivers/cpufreq/cpufreq_conservative.c | 6 +- drivers/crypto/caam/regs.h | 28 ++--- drivers/dma/dma-jz4780.c | 5 + drivers/dma/ioat/init.c | 9 +- drivers/dma/ppc4xx/adma.c | 2 +- drivers/dma/stm32-dma.c | 8 +- drivers/edac/amd64_edac.c | 14 +++ drivers/edac/amd64_edac.h | 3 + drivers/edac/i7core_edac.c | 1 + drivers/edac/sb_edac.c | 1 + drivers/edac/skx_edac.c | 3 +- drivers/hid/usbhid/hiddev.c | 18 +++- drivers/hv/channel_mgmt.c | 14 ++- drivers/hwmon/pmbus/pmbus.c | 2 + drivers/hwmon/pmbus/pmbus_core.c | 5 +- drivers/hwmon/pwm-fan.c | 12 ++- drivers/hwtracing/coresight/coresight-etb10.c | 4 + drivers/i2c/busses/i2c-rcar.c | 6 +- drivers/iio/adc/at91_adc.c | 6 +- drivers/iio/adc/fsl-imx25-gcq.c | 6 ++ drivers/iio/dac/ad5064.c | 53 +++++++--- drivers/infiniband/core/sysfs.c | 19 ++-- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 13 ++- drivers/infiniband/hw/mlx5/mr.c | 2 +- drivers/infiniband/sw/rxe/rxe_resp.c | 8 +- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 + drivers/infiniband/ulp/ipoib/ipoib_cm.c | 8 +- drivers/iommu/arm-smmu.c | 6 ++ drivers/lightnvm/pblk-recovery.c | 6 +- drivers/md/bcache/btree.c | 2 +- drivers/md/bcache/request.c | 2 +- drivers/md/dm-ioctl.c | 18 ++-- drivers/md/dm-zoned-metadata.c | 80 ++++++++------ drivers/md/md.c | 4 + drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 +- drivers/media/i2c/tvp5150.c | 2 +- drivers/media/usb/em28xx/em28xx-cards.c | 4 +- drivers/media/usb/em28xx/em28xx-video.c | 8 +- drivers/mfd/menelaus.c | 13 ++- drivers/misc/genwqe/card_base.h | 2 +- drivers/misc/genwqe/card_dev.c | 9 +- drivers/misc/vmw_vmci/vmci_driver.c | 2 +- drivers/misc/vmw_vmci/vmci_resource.c | 3 +- drivers/mmc/host/sdhci-pci-o2micro.c | 3 + drivers/mtd/nand/atmel/nand-controller.c | 4 + drivers/mtd/spi-nor/fsl-quadspi.c | 1 + drivers/net/dsa/mv88e6xxx/phy.c | 3 + drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 + drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 17 ++- drivers/net/ethernet/qlogic/qla3xxx.c | 2 - drivers/net/phy/phylink.c | 3 + drivers/net/tun.c | 2 + drivers/net/wireless/ath/ath10k/wmi.c | 6 ++ .../net/wireless/broadcom/brcm80211/brcmutil/d11.c | 34 +++++- .../broadcom/brcm80211/include/brcmu_wifi.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 24 ++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 9 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 32 ++++-- drivers/net/wireless/marvell/libertas/if_usb.c | 2 - drivers/nvdimm/bus.c | 4 + drivers/nvdimm/region_devs.c | 11 +- drivers/pci/dwc/pci-dra7xx.c | 11 +- drivers/pci/host/pcie-mediatek.c | 11 ++ drivers/pci/host/vmd.c | 13 ++- drivers/pci/msi.c | 9 +- drivers/pci/pci-acpi.c | 16 ++- drivers/pci/pcie/aspm.c | 2 +- drivers/pci/quirks.c | 4 + drivers/pci/remove.c | 4 +- drivers/pcmcia/ricoh.h | 35 +++++++ drivers/pcmcia/yenta_socket.c | 3 +- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 27 +++-- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 28 +++-- drivers/rpmsg/qcom_smd.c | 7 +- drivers/scsi/esp_scsi.c | 1 + drivers/scsi/esp_scsi.h | 2 + drivers/scsi/lpfc/lpfc_scsi.c | 14 ++- drivers/scsi/lpfc/lpfc_sli.c | 7 ++ drivers/scsi/mac_esp.c | 2 + drivers/scsi/megaraid/megaraid_sas_base.c | 3 + drivers/soc/tegra/pmc.c | 2 +- drivers/spi/spi-bcm-qspi.c | 2 +- drivers/spi/spi-ep93xx.c | 36 +++++-- drivers/tc/tc.c | 8 +- drivers/thermal/da9062-thermal.c | 4 +- drivers/tty/serial/kgdboc.c | 5 + drivers/uio/uio.c | 9 ++ drivers/usb/chipidea/otg.h | 3 +- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 + drivers/usb/gadget/udc/renesas_usb3.c | 3 + drivers/usb/host/ohci-at91.c | 2 + drivers/usb/usbip/vudc_main.c | 10 +- drivers/w1/masters/omap_hdq.c | 2 + drivers/xen/swiotlb-xen.c | 6 ++ drivers/xen/xen-balloon.c | 13 ++- fs/btrfs/extent-tree.c | 113 ++++++++++++++------ fs/btrfs/file.c | 12 +++ fs/btrfs/free-space-cache.c | 42 ++++++-- fs/btrfs/inode.c | 15 ++- fs/btrfs/ioctl.c | 11 +- fs/btrfs/qgroup.c | 5 + fs/btrfs/qgroup.h | 2 + fs/btrfs/relocation.c | 2 +- fs/btrfs/transaction.c | 9 -- fs/btrfs/tree-log.c | 116 +++++++++++++++++---- fs/cifs/cifs_debug.c | 3 + fs/cifs/cifs_spnego.c | 6 +- fs/cifs/inode.c | 10 +- fs/cramfs/inode.c | 3 +- fs/ext4/ext4.h | 3 +- fs/ext4/inline.c | 2 +- fs/ext4/ioctl.c | 64 +++++++----- fs/ext4/move_extent.c | 8 +- fs/ext4/super.c | 73 ++++++++----- fs/f2fs/data.c | 8 +- fs/f2fs/recovery.c | 1 + fs/f2fs/super.c | 19 +++- fs/gfs2/ops_fstype.c | 3 + fs/jbd2/checkpoint.c | 4 +- fs/jffs2/super.c | 4 +- fs/lockd/host.c | 2 +- fs/nfs/nfs4client.c | 16 +-- fs/nfs/pagelist.c | 40 +++---- fs/proc/task_mmu.c | 4 +- include/linux/compat.h | 3 + include/linux/signal.h | 2 +- include/linux/tc.h | 1 + include/uapi/linux/ndctl.h | 48 ++++----- kernel/bounds.c | 4 +- kernel/bpf/syscall.c | 13 +++ kernel/cpu.c | 11 +- kernel/irq/manage.c | 8 +- kernel/kprobes.c | 27 +++-- kernel/locking/lockdep.c | 4 +- kernel/printk/printk.c | 7 +- kernel/sched/fair.c | 2 +- kernel/signal.c | 18 ++-- lib/debug_locks.c | 2 +- mm/hugetlb.c | 6 ++ mm/page_vma_mapped.c | 24 ++++- net/core/netclassid_cgroup.c | 1 + net/ipv4/cipso_ipv4.c | 11 +- net/sched/sch_api.c | 1 - net/sunrpc/svc_xprt.c | 2 +- net/xfrm/xfrm_policy.c | 8 +- security/integrity/ima/ima_fs.c | 6 +- sound/pci/ca0106/ca0106.h | 2 +- sound/pci/hda/hda_controller.h | 1 + sound/pci/hda/hda_intel.c | 11 +- sound/pci/hda/patch_conexant.c | 1 + sound/pci/hda/patch_realtek.c | 26 +++++ sound/soc/intel/skylake/skl-topology.c | 1 + tools/perf/Makefile.config | 2 +- .../pmu-events/arch/x86/ivytown/uncore-power.json | 16 +-- .../pmu-events/arch/x86/jaketown/uncore-power.json | 16 +-- tools/perf/util/event.c | 1 + tools/perf/util/pmu.c | 13 +-- tools/perf/util/strbuf.c | 10 +- tools/perf/util/trace-event-info.c | 2 + tools/perf/util/trace-event-read.c | 5 +- tools/power/cpupower/utils/cpufreq-info.c | 2 + tools/power/cpupower/utils/helpers/amd.c | 7 +- .../inter-event/trigger-synthetic-event-syntax.tc | 80 ++++++++++++++ tools/testing/selftests/net/reuseport_bpf.c | 13 ++- .../selftests/powerpc/ptrace/ptrace-tm-spd-gpr.c | 4 +- virt/kvm/arm/arm.c | 4 +- 221 files changed, 1841 insertions(+), 677 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 4/222 bcache: fix miss key refill->end in writeback
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tang Junhui <[email protected]>
commit 2d6cb6edd2c7fb4f40998895bda45006281b1ac5 upstream.
refill->end record the last key of writeback, for example, at the first time, keys (1,128K) to (1,1024K) are flush to the backend device, but the end key (1,1024K) is not included, since the bellow code:
if (bkey_cmp(k, refill->end) >= 0) {
ret = MAP_DONE;
goto out;
}And in the next time when we refill writeback keybuf again, we searched key start from (1,1024K), and got a key bigger than it, so the key (1,1024K) missed.
This patch modify the above code, and let the end key to be included to the writeback key buffer.
--- drivers/md/bcache/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/btree.c +1 -1
@@ -2371,7 +2371,7 @@ static int refill_keybuf_fn(struct btreestruct keybuf *buf = refill->buf;int ret =MAP_CONTINUE ; -if (bkey_cmp (k, refill->end) >=0 ) { +if (bkey_cmp (k, refill->end) >0 ) { ret =MAP_DONE ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 5/222 hwmon: (pmbus) Fix page count auto-detection.
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Bazhenov <[email protected]>
commit e7c6a55606b5c46b449d76588968b4d8caae903f upstream.
Devices with compatible="pmbus" field have zero initial page count, and pmbus_clear_faults() being called before the page count auto- detection does not actually clear faults because it depends on the page count. Non-cleared faults in its turn may fail the subsequent page count auto-detection.
This patch fixes this problem by calling pmbus_clear_fault_page() for currently set page and calling pmbus_clear_faults() after the page count was detected.
--- drivers/hwmon/pmbus/pmbus.c | 2 ++ drivers/hwmon/pmbus/pmbus_core.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/hwmon/pmbus/pmbus.c +2 -0
@@ -118,6 +118,8 @@ static int pmbus_identify(struct i2c_cli }else { info->pages =1 ; } + +pmbus_clear_faults (client); }if (pmbus_check_byte_register (client,0 ,PMBUS_VOUT_MODE )) {
drivers/hwmon/pmbus/pmbus_core.c +4 -1
@@ -1802,7 +1802,10 @@ static int pmbus_init_common(struct i2c_if (ret >=0 && (ret &PB_CAPABILITY_ERROR_CHECK )) client->flags |=I2C_CLIENT_PEC ; -pmbus_clear_faults (client); +if (data->info->pages) +pmbus_clear_faults (client); +else +pmbus_clear_fault_page (client,-1 );if (info->identify) { ret = (*info->identify)(client, info);
Greg Kroah-Hartman
maintainerPATCH 21/222 x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: He Zhe <[email protected]>
commit ccde460b9ae5c2bd5e4742af0a7f623c2daad566 upstream.
memory_corruption_check[{_period|_size}]()'s handlers do not check input argument before passing it to kstrtoul() or simple_strtoull(). The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic.
PANIC: early exception 0xe3 IP 10:ffffffff73587c22 error 0 cr2 0x0
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.18-rc8+ #2 [ 0.000000] RIP: 0010:kstrtoull+0x2/0x10 ... [ 0.000000] Call Trace [ 0.000000] ? set_corruption_check+0x21/0x49 [ 0.000000] ? do_early_param+0x4d/0x82 [ 0.000000] ? parse_args+0x212/0x330 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_options+0x20/0x23 [ 0.000000] ? rdinit_setup+0x26/0x26 [ 0.000000] ? parse_early_param+0x2d/0x39 [ 0.000000] ? setup_arch+0x2f7/0xbf4 [ 0.000000] ? start_kernel+0x5e/0x4c2 [ 0.000000] ? load_ucode_bsp+0x113/0x12f [ 0.000000] ? secondary_startup_64+0xa5/0xb0
This patch adds checks to prevent the panic.
--- arch/x86/kernel/check.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/x86/kernel/check.c +15 -0
@@ -31,6 +31,11 @@ static __init int set_corruption_check(cssize_t ret;unsigned long val; +if (!arg) { +pr_err ("memory_corruption_check config string not provided\n" ); +return -EINVAL ; + } + ret =kstrtoul (arg,10 , &val);if (ret)return ret;
@@ -45,6 +50,11 @@ static __init int set_corruption_check_pssize_t ret;unsigned long val; +if (!arg) { +pr_err ("memory_corruption_check_period config string not provided\n" ); +return -EINVAL ; + } + ret =kstrtoul (arg,10 , &val);if (ret)return ret;
@@ -59,6 +69,11 @@ static __init int set_corruption_check_schar *end;unsigned size; +if (!arg) { +pr_err ("memory_corruption_check_size config string not provided\n" ); +return -EINVAL ; + } + size =memparse (arg, &end);if (*end =='\0' )
Greg Kroah-Hartman
maintainerPATCH 3/222 bcache: trace missed reading by cache_missed
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tang Junhui <[email protected]>
commit 502b291568fc7faf1ebdb2c2590f12851db0ff76 upstream.
Missed reading IOs are identified by s->cache_missed, not the s->cache_miss, so in trace_bcache_read() using trace_bcache_read to identify whether the IO is missed or not.
--- drivers/md/bcache/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/request.c +1 -1
@@ -792,7 +792,7 @@ static void cached_dev_read_done_bh(strubch_mark_cache_accounting (s->iop.c, s->d, !s->cache_missed, s->iop.bypass); -trace_bcache_read (s->orig_bio, !s->cache_miss, s->iop.bypass); +trace_bcache_read (s->orig_bio, !s->cache_missed, s->iop.bypass);if (s->iop.status)continue_at_nobarrier (cl, cached_dev_read_error, bcache_wq);
Greg Kroah-Hartman
maintainerPATCH 14/222 ALSA: hda - Add quirk for ASUS G751 laptop
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 11ba6111160290ccd35562f4e05cec08942a6c4c upstream.
ASUS G751 requires the extra COEF initialization to make it microphone working properly.
--- sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/pci/hda/patch_realtek.c +10 -0
@@ -7515,6 +7515,7 @@ enum { ALC662_FIXUP_ASUS_Nx50, ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, ALC668_FIXUP_ASUS_Nx51, +ALC668_FIXUP_ASUS_G751 ,ALC891_FIXUP_HEADSET_MODE ,ALC891_FIXUP_DELL_MIC_NO_PRESENCE , ALC662_FIXUP_ACER_VERITON,
@@ -7784,6 +7785,14 @@ static const struct hda_fixup alc662_fix .chained = true, .chain_id = ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, }, + [ALC668_FIXUP_ASUS_G751] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb []) { + {0x20 ,AC_VERB_SET_COEF_INDEX ,0xc3 }, + {0x20 ,AC_VERB_SET_PROC_COEF ,0x4000 }, + {} + }, + }, [ALC891_FIXUP_HEADSET_MODE] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_headset_mode,
@@ -7857,6 +7866,7 @@ static const struct snd_pci_quirk alc662SND_PCI_QUIRK (0x1043 ,0x11cd ,"Asus N550" , ALC662_FIXUP_ASUS_Nx50),SND_PCI_QUIRK (0x1043 ,0x13df ,"Asus N550JX" ,ALC662_FIXUP_BASS_1A ),SND_PCI_QUIRK (0x1043 ,0x129d ,"Asus N750" , ALC662_FIXUP_ASUS_Nx50), +SND_PCI_QUIRK (0x1043 ,0x12ff ,"ASUS G751" ,ALC668_FIXUP_ASUS_G751 ),SND_PCI_QUIRK (0x1043 ,0x1477 ,"ASUS N56VZ" ,ALC662_FIXUP_BASS_MODE4_CHMAP ),SND_PCI_QUIRK (0x1043 ,0x15a7 ,"ASUS UX51VZH" ,ALC662_FIXUP_BASS_16 ), SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
Greg Kroah-Hartman
maintainerPATCH 17/222 ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeremy Cline <[email protected]>
commit e7bb6ad5685f05685dd8a6a5eda7bfcd14d5f95b upstream.
The Lenovo G50-30, like other G50 models, has a Conexant codec that requires a quirk for its inverted stereo dmic.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364
--- sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_conexant.c +1 -0
@@ -981,6 +981,7 @@ static const struct snd_pci_quirk cxt506SND_PCI_QUIRK (0x17aa ,0x21da ,"Lenovo X220" ,CXT_PINCFG_LENOVO_TP410 ),SND_PCI_QUIRK (0x17aa ,0x21db ,"Lenovo X220-tablet" ,CXT_PINCFG_LENOVO_TP410 ),SND_PCI_QUIRK (0x17aa ,0x38af ,"Lenovo IdeaPad Z560" ,CXT_FIXUP_MUTE_LED_EAPD ), +SND_PCI_QUIRK (0x17aa ,0x3905 ,"Lenovo G50-30" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x390b ,"Lenovo G50-80" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x3975 ,"Lenovo U300s" ,CXT_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
Greg Kroah-Hartman
maintainerPATCH 13/222 parisc: Fix exported address of os_hpmc handler
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
commit 99a3ae51d557d8e38a7aece65678a31f9db215ee upstream.
In the C-code we need to put the physical address of the hpmc handler in the interrupt vector table (IVA) in order to get HPMCs working. Since on parisc64 function pointers are indirect (in fact they are function descriptors) we instead export the address as variable and not as function.
This reverts a small part of commit f39cce654f9a ("parisc: Add cfi_startproc and cfi_endproc to assembly code").
--- arch/parisc/kernel/hpmc.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/parisc/kernel/hpmc.S +1 -2
@@ -85,7 +85,7 @@ END(hpmc_pim_data) .import intr_save, code .align 16 -ENTRY_CFI(os_hpmc) +ENTRY(os_hpmc) .os_hpmc: /*
@@ -302,7 +302,6 @@ os_hpmc_6: b . nop .align 16 /* make function length multiple of 16 bytes */ -ENDPROC_CFI(os_hpmc) .os_hpmc_end:
Greg Kroah-Hartman
maintainerPATCH 11/222 parisc: Fix address in HPMC IVA
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: John David Anglin <[email protected]>
commit 1138b6718ff74d2a934459643e3754423d23b5e2 upstream.
Helge noticed that the address of the os_hpmc handler was not being correctly calculated in the hpmc macro. As a result, PDCE_CHECK would fail to call os_hpmc:
<Cpu2> e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC <Cpu2> 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY <Cpu2> f600105e02e00000 fffffff0f0c00000 CC_MC_HPMC_MONARCH_SELECTED <Cpu2> 140003b202e00000 000000000000000b CC_ERR_HPMC_STATE_ENTRY <Cpu2> 5600100b02e00000 00000000000001a0 CC_MC_OS_HPMC_LEN_ERR <Cpu2> 5600106402e00000 fffffff0f0438e70 CC_MC_BR_TO_OS_HPMC_FAILED <Cpu2> e800009802e00000 0000000000000000 CC_ERR_CHECK_HPMC <Cpu2> 37000f7302e00000 8040004000000000 CC_ERR_CPU_CHECK_SUMMARY <Cpu2> 4000109f02e00000 0000000000000000 CC_MC_HPMC_INITIATED <Cpu2> 4000101902e00000 0000000000000000 CC_MC_MULTIPLE_HPMCS <Cpu2> 030010d502e00000 0000000000000000 CC_CPU_STOP
The address problem can be seen by dumping the fault vector:
0000000040159000 <fault_vector_20>:
40159000: 63 6f 77 73 stb r15,-2447(dp)
40159004: 20 63 61 6e ldil L%b747000,r3
40159008: 20 66 6c 79 ldil L%-1c3b3000,r3
...
40159020: 08 00 02 40 nop
40159024: 20 6e 60 02 ldil L%15d000,r3
40159028: 34 63 00 00 ldo 0(r3),r3
4015902c: e8 60 c0 02 bv,n r0(r3)
40159030: 08 00 02 40 nop
40159034: 00 00 00 00 break 0,0
40159038: c0 00 70 00 bb,*< r0,sar,40159840 <fault_vector_20+0x840>
4015903c: 00 00 00 00 break 0,0Location 40159038 should contain the physical address of os_hpmc:
000000004015d000 <os_hpmc>:
4015d000: 08 1a 02 43 copy r26,r3
4015d004: 01 c0 08 a4 mfctl iva,r4
4015d008: 48 85 00 68 ldw 34(r4),r5This patch moves the address setup into initialize_ivt to resolve the above problem. I tested the change by dumping the HPMC entry after setup:
0000000040209020: 8000240
0000000040209024: 206a2004
0000000040209028: 34630ac0000000004020902c: e860c002
0000000040209030: 8000240
0000000040209034: 1bdddce6
0000000040209038: 15d000000000004020903c: 1a0
--- arch/parisc/kernel/entry.S | 2 +- arch/parisc/kernel/traps.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/parisc/kernel/entry.S +1 -1
@@ -185,7 +185,7 @@ bv,n 0(%r3) nop .word 0 /* checksum (will be patched) */ - .word PA(os_hpmc) /* address of handler */ + .word 0 /* address of handler */ .word 0 /* length of handler */ .endm
arch/parisc/kernel/traps.c +2 -1
@@ -836,7 +836,8 @@ void __init initialize_ivt(const void *iif (pdc_instr (&instr) ==PDC_OK ) ivap[0 ] = instr; -/* Compute Checksum for HPMC handler */ +/* Setup IVA and compute checksum for HPMC handler */ + ivap[6 ] = (u32 )__pa (os_hpmc); length = os_hpmc_size; ivap[7 ] = length;
Greg Kroah-Hartman
maintainerPATCH 1/222 mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB
In reply to Greg Kroah-Hartman4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liu Xiang <[email protected]>
commit 41fe242979e463d6ad251077ded01b825a330b7e upstream.
If the size of spi-nor flash is larger than 16MB, the read_opcode is set to SPINOR_OP_READ_1_1_4_4B, and fsl_qspi_get_seqid() will return -EINVAL when cmd is SPINOR_OP_READ_1_1_4_4B. This can cause read operation fail.
--- drivers/mtd/spi-nor/fsl-quadspi.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/spi-nor/fsl-quadspi.c +1 -0
@@ -468,6 +468,7 @@ static int fsl_qspi_get_seqid(struct fsl {switch (cmd) {case SPINOR_OP_READ_1_1_4 : +case SPINOR_OP_READ_1_1_4_4B :return SEQID_READ ;case SPINOR_OP_WREN :return SEQID_WREN ;
stable-rc/linux-4.14.y boot: 94 boots: 4 failed, 66 passed with 16 offline, 8 conflicts (v4.14.80-223-gaa871c61a152)
stable-rc/linux-4.14.y boot: 94 boots: 4 failed, 66 passed with 16 offline, 8 conflicts (v4.14.80-223-gaa871c61a152)
Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.14.y/kernel/v4.14.80-223-gaa871c61a152/
Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.14.y/kernel/v4.14.80-223-gaa871c61a152/
Tree: stable-rc
Branch: linux-4.14.y
Git Describe: v4.14.80-223-gaa871c61a152
Git Commit: aa871c61a15249c475462be9156df7a359395ecf
Git URL: http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Tested: 54 unique boards, 21 SoC families, 15 builds out of 185
Boot Regressions Detected:
arm:
bcm2835_defconfig:
bcm2837-rpi-3-b:
lab-baylibre: failing since 1 day (last pass: v4.14.79-32-g24f453c41e18 - first fail: v4.14.80)
multi_v7_defconfig:
imx6q-sabrelite:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
meson8b-odroidc1:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
qemu:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
vexpress_defconfig:
qemu:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)arm64:
defconfig:
bcm2837-rpi-3-b:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
meson-gxbb-nanopi-k2:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
meson-gxbb-p200:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
meson-gxl-s905x-khadas-vim:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
meson-gxl-s905x-libretech-cc:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)
qemu:
lab-baylibre: failing since 1 day (last pass: v4.14.79 - first fail: v4.14.80)x86:
x86_64_defconfig:
qemu:
lab-baylibre: failing since 1 day (last pass: v4.14.79-32-g24f453c41e18 - first fail: v4.14.80)Boot Failures Detected:
arm:
bcm2835_defconfig
bcm2837-rpi-3-b: 1 failed lab
multi_v7_defconfig
imx6q-sabrelite: 1 failed labarm64:
defconfig
meson-gxbb-nanopi-k2: 1 failed lab meson-gxl-s905x-libretech-cc: 1 failed lab
Offline Platforms:
arm:
omap2plus_defconfig:
am335x-boneblack: 1 offline lab
sunxi_defconfig:
sun5i-r8-chip: 1 offline lab
tegra_defconfig:
tegra124-jetson-tk1: 1 offline lab
bcm2835_defconfig:
bcm2835-rpi-b: 1 offline lab
sama5_defconfig:
at91-sama5d4_xplained: 1 offline lab
multi_v7_defconfig:
alpine-db: 1 offline lab
am335x-boneblack: 1 offline lab
at91-sama5d4_xplained: 1 offline lab socfpga_cyclone5_de0_sockit: 1 offline lab
sun5i-r8-chip: 1 offline lab
tegra124-jetson-tk1: 1 offline lab
arm64:
defconfig:
apq8016-sbc: 1 offline lab
juno-r2: 1 offline lab
meson-gxl-s905d-p230: 1 offline lab
meson-gxl-s905x-p212: 1 offline lab
mt7622-rfb1: 1 offline labConflicting Boot Failures Detected: (These likely are not failures as other labs are reporting PASS. Needs review.)
arm:
multi_v7_defconfig:
meson8b-odroidc1:
lab-baylibre: FAIL
lab-baylibre-seattle: PASS
qemu:
lab-baylibre: FAIL
lab-mhart: PASS
vexpress_defconfig:
qemu:
lab-baylibre: FAIL
lab-mhart: PASS
arm64:
defconfig:
meson-gxl-s905x-khadas-vim:
lab-baylibre: FAIL
lab-baylibre-seattle: PASS
qemu:
lab-baylibre: FAIL
lab-mhart: PASS
meson-gxbb-p200:
lab-baylibre: FAIL
lab-baylibre-seattle: PASS
bcm2837-rpi-3-b:
lab-baylibre: FAIL
lab-mhart: PASSx86:
x86_64_defconfig:
qemu:
lab-baylibre: FAIL
lab-mhart: PASS---
For more info write to <[email protected]>
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.81 release. There are 222 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Tue Nov 13 22:15:32 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.81-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.14.81-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.14.y
git commit: 8ea94372bf0017762d8c4f9e2a53800304820e0e
git describe: v4.14.80-223-g8ea94372bf00
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.14-oe/build/v4.14.80-223-g8ea94372bf00
No regressions (compared to build v4.14.80)
Ran 21309 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* boot
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-cve-tests
* ltp-fcntl-locktests-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-timers-tests
* ltp-containers-tests
* ltp-filecaps-tests
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
--
Linaro LKFT
https://lkft.linaro.org
RE: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
In reply to Greg Kroah-HartmanQuoted 12 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Sunday, November 11, 2018 2:22 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Jean-Marc Lenoir <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>
Subject: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
Hi Greg,
Quoted 1 line
4.14-stable review patch. If anyone has any objections, please let me know.
This patch is only meant to be added for kernels that are 4.17 or later.
Please drop this from kernel 4.16 or older.
Thanks,
Erik
Quoted 46 lines
------------------
From: Erik Schmauss <[email protected]>
commit
4abb951b73ff0a8a979113ef185651aa3c8da19bupstream.The table load process omitted adding the operation region address range to the global list. This omission is problematic because the OS queries the global list to check for address range conflicts before deciding which drivers to load. This commit may result in warning messages that look like the following:
[ 7.871761] ACPI Warning: system_IO range 0x00000428-0x0000042F conflicts with op_region 0x00000400-0x0000047F (\PMIO) (20180531/utaddress-213) [ 7.871769] ACPI: If an ACPI driver is available for this device, you should useit instead of the native driver
However, these messages do not signify regressions. It is a result of properly adding address ranges within the global address list.
Tested-by Jean-Marc Lenoir <[email protected]>Signed-off-by Erik Schmauss <[email protected]>Cc All applicable <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/acpi/acpica/dsopcode.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/acpi/acpica/dsopcode.c +4
-0@@ -451,6 +451,10 @@ acpi_ds_eval_region_operands(struct acpiACPI_FORMAT_UINT64 (obj_desc->region.address), obj_desc->region.length)); + status =acpi_ut_add_address_range (obj_desc->region.space_id, + obj_desc->region.address, + obj_desc->region.length, node); +/* Now the address and length are valid for this opregion */ obj_desc->region.flags |=AOPOBJ_DATA_VALID ;
Greg Kroah-Hartman
maintainerRe: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
Quoted 12 lines · Erik
Quoted 12 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Sunday, November 11, 2018 2:22 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Jean-Marc Lenoir <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>
Subject: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
Quoted 7 lines
Hi Greg,
Quoted 1 line
4.14-stable review patch. If anyone has any objections, please let me know.
This patch is only meant to be added for kernels that are 4.17 or later.
Please drop this from kernel 4.16 or older.
Ok, but next time be a bit more careful when you add a line like this to the patch:
Quoted 1 line
Quoted 1 line
Cc All applicable <[email protected]>
I take this to mean "everything it can apply cleanly to".
I'll go drop it from the 3.18.y, 4.4.y, and 4.9.y stable queues as well.
thanks,
greg k-h
RE: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
Quoted 24 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Monday, November 12, 2018 9:47 AM
To: Schmauss, Erik <[email protected]>
Cc: [email protected]; [email protected]; Jean-Marc Lenoir <[email protected]>; Wysocki, Rafael J <[email protected]>
Subject: Re: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initializationQuoted 12 lines · Erik
Quoted 12 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Sunday, November 11, 2018 2:22 PM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; Jean-Marc Lenoir <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>
Subject: [PATCH 4.14 009/222] ACPICA: AML interpreter: add region addresses in global list during initialization
Quoted 9 lines
Quoted 3 lines
Hi Greg,
Quoted 1 line
4.14-stable review patch. If anyone has any objections, please let me
know.
Quoted 4 lines
This patch is only meant to be added for kernels that are 4.17 or later.
Please drop this from kernel 4.16 or older.
Hi Greg,
Quoted 6 lines
Ok, but next time be a bit more careful when you add a line like this to the patch:
Quoted 1 line
Quoted 1 line
Cc All applicable <[email protected]>I take this to mean "everything it can apply cleanly to".
Thanks for the information! I will be more careful in the future
Erik
Quoted 6 lines
I'll go drop it from the 3.18.y, 4.4.y, and 4.9.y stable queues as well.
thanks,
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.81 release. There are 222 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Tue Nov 13 22:15:32 UTC 2018. Anything received after that time might be too late.
Build results:
total: 150 pass: 150 fail: 0 Qemu test results: total: 293 pass: 293 fail: 0
Details are available at https://kerneltests.org/builders/.
Guenter
Jon Hunter
maintainerQuoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.81 release. There are 222 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Tue Nov 13 22:15:32 UTC 2018. Anything received after that time might be too late.
All tests are passing for Tegra ...
Test results for stable-v4.14:
8 builds: 8 pass, 0 fail
16 boots: 16 pass, 0 fail
14 tests: 14 pass, 0 failLinux version: 4.14.81-rc1-g8ea9437
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04
Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 11 lines · Jon Hunter
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.81 release. There are 222 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Tue Nov 13 22:15:32 UTC 2018. Anything received after that time might be too late.
All tests are passing for Tegra ...
Quoted 9 lines
Test results for stable-v4.14:
8 builds: 8 pass, 0 fail 16 boots: 16 pass, 0 fail 14 tests: 14 pass, 0 failLinux version: 4.14.81-rc1-g8ea9437
Boards tested: tegra124-jetson-tk1, tegra20-ventana,tegra210-p2371-2180, tegra30-cardhu-a04
Thanks for testing and letting me know.
greg k-h