From 9b8be7d377a9c979bc66d152a0c3b821ae45a787 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 5 Apr 2019 14:40:37 +0000 Subject: [PATCH 1/6] Linux v5.1-rc3-206-gea2cec24c8d4 --- gitrev | 2 +- kernel.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gitrev b/gitrev index 1c08ca2e8..43a9f255c 100644 --- a/gitrev +++ b/gitrev @@ -1 +1 @@ -8ed86627f715eacbd6db6862f9499d6d96ea4ad6 +ea2cec24c8d429ee6f99040e4eb6c7ad627fe777 diff --git a/kernel.spec b/kernel.spec index 4d0e1e3c0..42f9cd23f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %global rcrev 3 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 5.%{upstream_sublevel}.0 %endif @@ -1864,6 +1864,9 @@ fi # # %changelog +* Fri Apr 05 2019 Jeremy Cline - 5.1.0-0.rc3.git3.1 +- Linux v5.1-rc3-206-gea2cec24c8d4 + * Wed Apr 03 2019 Jeremy Cline - 5.1.0-0.rc3.git2.1 - Linux v5.1-rc3-35-g8ed86627f715 diff --git a/sources b/sources index 7a174b786..b0d452dce 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (linux-5.0.tar.xz) = 3fbab70c7b03b1a10e9fa14d1e2e1f550faba4f5792b7699ca006951da74ab86e7d7f19c6a67849ab99343186e7d6f2752cd910d76222213b93c1eab90abf1b0 SHA512 (patch-5.1-rc3.xz) = 611cd9107732ddc6bc9d37568aa2021b0427a3ece506119a11b6e857a27e33be366a692dba7d6e91b885cf1f09236c5dd592fb7f74f0155b76c5c7dc44b9aade -SHA512 (patch-5.1-rc3-git2.xz) = 3e0a0efb709597b781ea66c5d1bbb0b897f287c496165f0e4c5cc8111438454e6e941eb8a3b0bcde6e812aa058c3616c909aec23adca85ea98ad92ef6dc3e3ad +SHA512 (patch-5.1-rc3-git3.xz) = 61d45fd8d90a25531e4f847f2e7e988b1f88a8a6626bb75a16938eb3abaa6a27eddb8f2b221ea6b762df91bf3b9cb72f0a078c1b95ccc27bcede39a9ada39844 From 40d683e6dba7de871cf0c35501877b11c8256abb Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 8 Apr 2019 16:58:32 +0000 Subject: [PATCH 2/6] Linux v5.1-rc4 --- ...-when-resetting-pageblock-skip-hints.patch | 113 ------------------ kernel.spec | 15 ++- sources | 3 +- 3 files changed, 10 insertions(+), 121 deletions(-) delete mode 100644 Correct-zone-boundary-handling-when-resetting-pageblock-skip-hints.patch diff --git a/Correct-zone-boundary-handling-when-resetting-pageblock-skip-hints.patch b/Correct-zone-boundary-handling-when-resetting-pageblock-skip-hints.patch deleted file mode 100644 index c0eb9bcab..000000000 --- a/Correct-zone-boundary-handling-when-resetting-pageblock-skip-hints.patch +++ /dev/null @@ -1,113 +0,0 @@ -From patchwork Wed Mar 27 08:54:24 2019 -Date: Wed, 27 Mar 2019 08:54:24 +0000 -From: Mel Gorman -To: Andrew Morton -Cc: Mikhail Gavrilov , - Daniel Jordan , Qian Cai , - linux-mm@kvack.org, vbabka@suse.cz, linux-kernel@vger.kernel.org -Subject: [PATCH] Correct zone boundary handling when resetting pageblock skip - hints - -Mikhail Gavrilo reported the following bug being triggered in a Fedora -kernel based on 5.1-rc1 but it is relevant to a vanilla kernel. - - kernel: page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) - kernel: ------------[ cut here ]------------ - kernel: kernel BUG at include/linux/mm.h:1021! - kernel: invalid opcode: 0000 [#1] SMP NOPTI - kernel: CPU: 6 PID: 116 Comm: kswapd0 Tainted: G C 5.1.0-0.rc1.git1.3.fc31.x86_64 #1 - kernel: Hardware name: System manufacturer System Product Name/ROG STRIX X470-I GAMING, BIOS 1201 12/07/2018 - kernel: RIP: 0010:__reset_isolation_pfn+0x244/0x2b0 - kernel: Code: fe 06 e8 0f 8e fc ff 44 0f b6 4c 24 04 48 85 c0 0f 85 dc fe ff ff e9 68 fe ff ff 48 c7 c6 58 b7 2e 8c 4c 89 ff e8 0c 75 00 00 <0f> 0b 48 c7 c6 58 b7 2e 8c e8 fe 74 00 00 0f 0b 48 89 fa 41 b8 01 - kernel: RSP: 0018:ffff9e2d03f0fde8 EFLAGS: 00010246 - kernel: RAX: 0000000000000034 RBX: 000000000081f380 RCX: ffff8cffbddd6c20 - kernel: RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffff8cffbddd6c20 - kernel: RBP: 0000000000000001 R08: 0000009898b94613 R09: 0000000000000000 - kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000100000 - kernel: R13: 0000000000100000 R14: 0000000000000001 R15: ffffca7de07ce000 - kernel: FS: 0000000000000000(0000) GS:ffff8cffbdc00000(0000) knlGS:0000000000000000 - kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 - kernel: CR2: 00007fc1670e9000 CR3: 00000007f5276000 CR4: 00000000003406e0 - kernel: Call Trace: - kernel: __reset_isolation_suitable+0x62/0x120 - kernel: reset_isolation_suitable+0x3b/0x40 - kernel: kswapd+0x147/0x540 - kernel: ? finish_wait+0x90/0x90 - kernel: kthread+0x108/0x140 - kernel: ? balance_pgdat+0x560/0x560 - kernel: ? kthread_park+0x90/0x90 - kernel: ret_from_fork+0x27/0x50 - -He bisected it down to commit e332f741a8dd ("mm, compaction: be selective -about what pageblocks to clear skip hints"). The problem is that the patch -in question was sloppy with respect to the handling of zone boundaries. In -some instances, it was possible for PFNs outside of a zone to be examined -and if those were not properly initialised or poisoned then it would -trigger the VM_BUG_ON. This patch corrects the zone boundary issues when -resetting pageblock skip hints and Mikhail reported that the bug did not -trigger after 30 hours of testing. - -Fixes: e332f741a8dd ("mm, compaction: be selective about what pageblocks to clear skip hints") -Reported-and-tested-by: Mikhail Gavrilov -Signed-off-by: Mel Gorman ---- - mm/compaction.c | 27 +++++++++++++++++---------- - 1 file changed, 17 insertions(+), 10 deletions(-) - -diff --git a/mm/compaction.c b/mm/compaction.c -index f171a83707ce..b4930bf93c8a 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -242,6 +242,7 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source, - bool check_target) - { - struct page *page = pfn_to_online_page(pfn); -+ struct page *block_page; - struct page *end_page; - unsigned long block_pfn; - -@@ -267,20 +268,26 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source, - get_pageblock_migratetype(page) != MIGRATE_MOVABLE) - return false; - -+ /* Ensure the start of the pageblock or zone is online and valid */ -+ block_pfn = pageblock_start_pfn(pfn); -+ block_page = pfn_to_online_page(max(block_pfn, zone->zone_start_pfn)); -+ if (block_page) { -+ page = block_page; -+ pfn = block_pfn; -+ } -+ -+ /* Ensure the end of the pageblock or zone is online and valid */ -+ block_pfn += pageblock_nr_pages; -+ block_pfn = min(block_pfn, zone_end_pfn(zone) - 1); -+ end_page = pfn_to_online_page(block_pfn); -+ if (!end_page) -+ return false; -+ - /* - * Only clear the hint if a sample indicates there is either a - * free page or an LRU page in the block. One or other condition - * is necessary for the block to be a migration source/target. - */ -- block_pfn = pageblock_start_pfn(pfn); -- pfn = max(block_pfn, zone->zone_start_pfn); -- page = pfn_to_page(pfn); -- if (zone != page_zone(page)) -- return false; -- pfn = block_pfn + pageblock_nr_pages; -- pfn = min(pfn, zone_end_pfn(zone)); -- end_page = pfn_to_page(pfn); -- - do { - if (pfn_valid_within(pfn)) { - if (check_source && PageLRU(page)) { -@@ -309,7 +316,7 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source, - static void __reset_isolation_suitable(struct zone *zone) - { - unsigned long migrate_pfn = zone->zone_start_pfn; -- unsigned long free_pfn = zone_end_pfn(zone); -+ unsigned long free_pfn = zone_end_pfn(zone) - 1; - unsigned long reset_migrate = free_pfn; - unsigned long reset_free = migrate_pfn; - bool source_set = false; diff --git a/kernel.spec b/kernel.spec index 42f9cd23f..762353970 100644 --- a/kernel.spec +++ b/kernel.spec @@ -67,9 +67,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%global rcrev 3 +%global rcrev 4 # The git snapshot level -%define gitrev 3 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 5.%{upstream_sublevel}.0 %endif @@ -122,7 +122,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 # Kernel headers are being split out into a separate package %if 0%{?fedora} @@ -588,9 +588,6 @@ Patch507: 0001-Drop-that-for-now.patch # rhbz 1688283 Patch512: v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch -# https://patchwork.kernel.org/patch/10872997/ -Patch513: Correct-zone-boundary-handling-when-resetting-pageblock-skip-hints.patch - # END OF PATCH DEFINITIONS %endif @@ -1864,6 +1861,12 @@ fi # # %changelog +* Mon Apr 08 2019 Jeremy Cline - 5.1.0-0.rc4.git0.1 +- Linux v5.1-rc4 + +* Mon Apr 08 2019 Jeremy Cline +- Disable debugging options. + * Fri Apr 05 2019 Jeremy Cline - 5.1.0-0.rc3.git3.1 - Linux v5.1-rc3-206-gea2cec24c8d4 diff --git a/sources b/sources index b0d452dce..117c553f0 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ SHA512 (linux-5.0.tar.xz) = 3fbab70c7b03b1a10e9fa14d1e2e1f550faba4f5792b7699ca006951da74ab86e7d7f19c6a67849ab99343186e7d6f2752cd910d76222213b93c1eab90abf1b0 -SHA512 (patch-5.1-rc3.xz) = 611cd9107732ddc6bc9d37568aa2021b0427a3ece506119a11b6e857a27e33be366a692dba7d6e91b885cf1f09236c5dd592fb7f74f0155b76c5c7dc44b9aade -SHA512 (patch-5.1-rc3-git3.xz) = 61d45fd8d90a25531e4f847f2e7e988b1f88a8a6626bb75a16938eb3abaa6a27eddb8f2b221ea6b762df91bf3b9cb72f0a078c1b95ccc27bcede39a9ada39844 +SHA512 (patch-5.1-rc4.xz) = 1feffe95816601137c4b2a09a5d14d8b023d05d7a3bb259ea42a05fc52ca48c8176a4477f88bfe4bcd8220f3e174793ddbefe7896807fdafaf5153934222eac2 From 3d872f43b84ec8c8016c7e5559cdf259955381ae Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 8 Apr 2019 17:08:48 +0000 Subject: [PATCH 3/6] Build libnvdimm as a module (rhbz 1696481) --- configs/fedora/generic/powerpc/CONFIG_LIBNVDIMM | 2 +- configs/fedora/generic/x86/x86_64/CONFIG_LIBNVDIMM | 2 +- kernel-ppc64le-debug.config | 2 +- kernel-ppc64le.config | 2 +- kernel-x86_64-debug.config | 2 +- kernel-x86_64.config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/fedora/generic/powerpc/CONFIG_LIBNVDIMM b/configs/fedora/generic/powerpc/CONFIG_LIBNVDIMM index f773300dc..aeaaefec7 100644 --- a/configs/fedora/generic/powerpc/CONFIG_LIBNVDIMM +++ b/configs/fedora/generic/powerpc/CONFIG_LIBNVDIMM @@ -1 +1 @@ -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m diff --git a/configs/fedora/generic/x86/x86_64/CONFIG_LIBNVDIMM b/configs/fedora/generic/x86/x86_64/CONFIG_LIBNVDIMM index f773300dc..aeaaefec7 100644 --- a/configs/fedora/generic/x86/x86_64/CONFIG_LIBNVDIMM +++ b/configs/fedora/generic/x86/x86_64/CONFIG_LIBNVDIMM @@ -1 +1 @@ -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index d0be922a6..21c7979d1 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -2571,7 +2571,7 @@ CONFIG_LIBERTAS_USB=m CONFIG_LIBFC=m CONFIG_LIBFCOE=m # CONFIG_LIBIPW_DEBUG is not set -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m # CONFIG_LIDAR_LITE_V2 is not set CONFIG_LIQUIDIO_VF=m CONFIG_LIRC=y diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index 261f3d3f7..6929cebb0 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -2552,7 +2552,7 @@ CONFIG_LIBERTAS_USB=m CONFIG_LIBFC=m CONFIG_LIBFCOE=m # CONFIG_LIBIPW_DEBUG is not set -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m # CONFIG_LIDAR_LITE_V2 is not set CONFIG_LIQUIDIO_VF=m CONFIG_LIRC=y diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index 86fe169db..f6352079c 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -2871,7 +2871,7 @@ CONFIG_LIBERTAS_USB=m CONFIG_LIBFC=m CONFIG_LIBFCOE=m # CONFIG_LIBIPW_DEBUG is not set -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m # CONFIG_LIDAR_LITE_V2 is not set CONFIG_LIQUIDIO_VF=m CONFIG_LIRC=y diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 965cfe5fb..fad3cde3f 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -2852,7 +2852,7 @@ CONFIG_LIBERTAS_USB=m CONFIG_LIBFC=m CONFIG_LIBFCOE=m # CONFIG_LIBIPW_DEBUG is not set -CONFIG_LIBNVDIMM=y +CONFIG_LIBNVDIMM=m # CONFIG_LIDAR_LITE_V2 is not set CONFIG_LIQUIDIO_VF=m CONFIG_LIRC=y From 0b76b205acbb60551154f26c7a1b5d10d4e34718 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Tue, 9 Apr 2019 15:10:12 +0000 Subject: [PATCH 4/6] Reenable debugging options. --- kernel.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 762353970..6a07fdba0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -122,7 +122,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 1 +%define debugbuildsenabled 0 # Kernel headers are being split out into a separate package %if 0%{?fedora} @@ -1861,6 +1861,9 @@ fi # # %changelog +* Tue Apr 09 2019 Jeremy Cline +- Reenable debugging options. + * Mon Apr 08 2019 Jeremy Cline - 5.1.0-0.rc4.git0.1 - Linux v5.1-rc4 From 26ae226f4de08418d2b388e47fa24f56cdafb61f Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Tue, 9 Apr 2019 15:13:32 +0000 Subject: [PATCH 5/6] Linux v5.1-rc4-34-g869e3305f23d --- gitrev | 2 +- kernel.spec | 8 +- sources | 1 + ...invalid-condition-in-tpm_common_poll.patch | 103 ------------------ 4 files changed, 6 insertions(+), 108 deletions(-) delete mode 100644 v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch diff --git a/gitrev b/gitrev index 43a9f255c..8bd9920ac 100644 --- a/gitrev +++ b/gitrev @@ -1 +1 @@ -ea2cec24c8d429ee6f99040e4eb6c7ad627fe777 +869e3305f23dfeacdaa234717c92ccb237815d90 diff --git a/kernel.spec b/kernel.spec index 6a07fdba0..596c14912 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %global rcrev 4 # The git snapshot level -%define gitrev 0 +%define gitrev 1 # Set rpm version accordingly %define rpmversion 5.%{upstream_sublevel}.0 %endif @@ -585,9 +585,6 @@ Patch501: input-rmi4-remove-the-need-for-artifical-IRQ.patch Patch506: 0001-s390-jump_label-Correct-asm-contraint.patch Patch507: 0001-Drop-that-for-now.patch -# rhbz 1688283 -Patch512: v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch - # END OF PATCH DEFINITIONS %endif @@ -1861,6 +1858,9 @@ fi # # %changelog +* Tue Apr 09 2019 Jeremy Cline - 5.1.0-0.rc4.git1.1 +- Linux v5.1-rc4-34-g869e3305f23d + * Tue Apr 09 2019 Jeremy Cline - Reenable debugging options. diff --git a/sources b/sources index 117c553f0..9ffa45b1a 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (linux-5.0.tar.xz) = 3fbab70c7b03b1a10e9fa14d1e2e1f550faba4f5792b7699ca006951da74ab86e7d7f19c6a67849ab99343186e7d6f2752cd910d76222213b93c1eab90abf1b0 SHA512 (patch-5.1-rc4.xz) = 1feffe95816601137c4b2a09a5d14d8b023d05d7a3bb259ea42a05fc52ca48c8176a4477f88bfe4bcd8220f3e174793ddbefe7896807fdafaf5153934222eac2 +SHA512 (patch-5.1-rc4-git1.xz) = 4ebc38b4213c23c1b72275a7027e7bd0bb565d6c89e2d3c2178ec6bd130acedcb98f700833b627035349fd7aa9c3aad10b26afcfece93811c6afae9612adda14 diff --git a/v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch b/v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch deleted file mode 100644 index 606373aa4..000000000 --- a/v3-tpm-fix-an-invalid-condition-in-tpm_common_poll.patch +++ /dev/null @@ -1,103 +0,0 @@ -From patchwork Thu Mar 21 23:02:12 2019 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: Tadeusz Struk -X-Patchwork-Id: 10864497 -Return-Path: -Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org - [172.30.200.125]) - by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 711816C2 - for ; - Thu, 21 Mar 2019 23:02:15 +0000 (UTC) -Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) - by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57B312A4A8 - for ; - Thu, 21 Mar 2019 23:02:15 +0000 (UTC) -Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) - id 4AA482A539; Thu, 21 Mar 2019 23:02:15 +0000 (UTC) -X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on - pdx-wl-mail.web.codeaurora.org -X-Spam-Level: -X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, - RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 -Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) - by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C399A2A4A8 - for ; - Thu, 21 Mar 2019 23:02:14 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1727157AbfCUXCO (ORCPT - ); - Thu, 21 Mar 2019 19:02:14 -0400 -Received: from mga04.intel.com ([192.55.52.120]:7149 "EHLO mga04.intel.com" - rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP - id S1727086AbfCUXCO (ORCPT ); - Thu, 21 Mar 2019 19:02:14 -0400 -X-Amp-Result: SKIPPED(no attachment in message) -X-Amp-File-Uploaded: False -Received: from orsmga004.jf.intel.com ([10.7.209.38]) - by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; - 21 Mar 2019 16:02:13 -0700 -X-ExtLoop1: 1 -X-IronPort-AV: E=Sophos;i="5.60,254,1549958400"; - d="scan'208";a="284777192" -Received: from jdemuth-mobl.amr.corp.intel.com (HELO - tstruk-mobl1.jf.intel.com) ([10.251.150.110]) - by orsmga004.jf.intel.com with ESMTP; 21 Mar 2019 16:02:13 -0700 -Subject: [PATCH v3] tpm: fix an invalid condition in tpm_common_poll -From: Tadeusz Struk -To: jarkko.sakkinen@linux.intel.com -Cc: grawity@gmail.com, James.Bottomley@HansenPartnership.com, - linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, - stable@vger.kernel.org, tadeusz.struk@intel.com -Date: Thu, 21 Mar 2019 16:02:12 -0700 -Message-ID: - <155320933278.5015.1752135965699928631.stgit@tstruk-mobl1.jf.intel.com> -User-Agent: StGit/unknown-version -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Sender: linux-integrity-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-integrity@vger.kernel.org -X-Virus-Scanned: ClamAV using ClamSMTP - -The poll condition should only check response_length, -because reads should only be issued if there is data to read. -The response_read flag only prevents double writes. -The problem was that the write set the response_read to false, -enqued a tpm job, and returned. Then application called poll -which checked the response_read flag and returned EPOLLIN. -Then the application called read, but got nothing. -After all that the async_work kicked in. -Added also mutex_lock around the poll check to prevent -other possible race conditions. - -Fixes: 9488585b21bef0df12 ("tpm: add support for partial reads") -Reported-by: Mantas Mikulėnas -Tested-by: Mantas Mikulėnas -Signed-off-by: Tadeusz Struk ---- - drivers/char/tpm/tpm-dev-common.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c -index 5eecad233ea1..7312d3214381 100644 ---- a/drivers/char/tpm/tpm-dev-common.c -+++ b/drivers/char/tpm/tpm-dev-common.c -@@ -203,12 +203,14 @@ __poll_t tpm_common_poll(struct file *file, poll_table *wait) - __poll_t mask = 0; - - poll_wait(file, &priv->async_wait, wait); -+ mutex_lock(&priv->buffer_mutex); - -- if (!priv->response_read || priv->response_length) -+ if (priv->response_length) - mask = EPOLLIN | EPOLLRDNORM; - else - mask = EPOLLOUT | EPOLLWRNORM; - -+ mutex_unlock(&priv->buffer_mutex); - return mask; - } - From ec6c211178a04f7fc779267143447224262249dd Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Wed, 10 Apr 2019 14:14:36 +0000 Subject: [PATCH 6/6] Linux v5.1-rc4-43-g771acc7e4a6e --- gitrev | 2 +- kernel.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gitrev b/gitrev index 8bd9920ac..3dd2ba3ef 100644 --- a/gitrev +++ b/gitrev @@ -1 +1 @@ -869e3305f23dfeacdaa234717c92ccb237815d90 +771acc7e4a6e5dba779cb1a7fd851a164bc81033 diff --git a/kernel.spec b/kernel.spec index 596c14912..1a5c0cde3 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %global rcrev 4 # The git snapshot level -%define gitrev 1 +%define gitrev 2 # Set rpm version accordingly %define rpmversion 5.%{upstream_sublevel}.0 %endif @@ -1858,6 +1858,9 @@ fi # # %changelog +* Wed Apr 10 2019 Jeremy Cline - 5.1.0-0.rc4.git2.1 +- Linux v5.1-rc4-43-g771acc7e4a6e + * Tue Apr 09 2019 Jeremy Cline - 5.1.0-0.rc4.git1.1 - Linux v5.1-rc4-34-g869e3305f23d diff --git a/sources b/sources index 9ffa45b1a..7d0f406ce 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (linux-5.0.tar.xz) = 3fbab70c7b03b1a10e9fa14d1e2e1f550faba4f5792b7699ca006951da74ab86e7d7f19c6a67849ab99343186e7d6f2752cd910d76222213b93c1eab90abf1b0 SHA512 (patch-5.1-rc4.xz) = 1feffe95816601137c4b2a09a5d14d8b023d05d7a3bb259ea42a05fc52ca48c8176a4477f88bfe4bcd8220f3e174793ddbefe7896807fdafaf5153934222eac2 -SHA512 (patch-5.1-rc4-git1.xz) = 4ebc38b4213c23c1b72275a7027e7bd0bb565d6c89e2d3c2178ec6bd130acedcb98f700833b627035349fd7aa9c3aad10b26afcfece93811c6afae9612adda14 +SHA512 (patch-5.1-rc4-git2.xz) = 81103e3340bc362c523c0c053157d9fe6946fffe03782302154b3be50eec7d7328b95cc50e0269405e8b610265c160ab5ca1df8de348cc0e5630d1edcebd56e8