linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	Joerg Roedel <jroedel@suse.de>,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: [PATCH 4.14 52/99] iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Date: Thu, 19 Mar 2020 14:03:30 +0100	[thread overview]
Message-ID: <20200319123957.678951953@linuxfoundation.org> (raw)
In-Reply-To: <20200319123941.630731708@linuxfoundation.org>

From: Hans de Goede <hdegoede@redhat.com>

commit 59833696442c674acbbd297772ba89e7ad8c753d upstream.

Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:

 * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
 * significant kernel issues that need prompt attention if they should ever
 * appear at runtime.
 *
 * Do not use these macros when checking for invalid external inputs

The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.

Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.

This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.

Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iommu/dmar.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -451,12 +451,13 @@ static int __init dmar_parse_one_andd(st
 
 	/* Check for NUL termination within the designated length */
 	if (strnlen(andd->device_name, header->length - 8) == header->length - 8) {
-		WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
+		pr_warn(FW_BUG
 			   "Your BIOS is broken; ANDD object name is not NUL-terminated\n"
 			   "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
 			   dmi_get_system_info(DMI_BIOS_VENDOR),
 			   dmi_get_system_info(DMI_BIOS_VERSION),
 			   dmi_get_system_info(DMI_PRODUCT_VERSION));
+		add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
 		return -EINVAL;
 	}
 	pr_info("ANDD device: %x name: %s\n", andd->device_number,
@@ -482,14 +483,14 @@ static int dmar_parse_one_rhsa(struct ac
 			return 0;
 		}
 	}
-	WARN_TAINT(
-		1, TAINT_FIRMWARE_WORKAROUND,
+	pr_warn(FW_BUG
 		"Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n"
 		"BIOS vendor: %s; Ver: %s; Product Version: %s\n",
 		drhd->reg_base_addr,
 		dmi_get_system_info(DMI_BIOS_VENDOR),
 		dmi_get_system_info(DMI_BIOS_VERSION),
 		dmi_get_system_info(DMI_PRODUCT_VERSION));
+	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
 
 	return 0;
 }
@@ -835,14 +836,14 @@ int __init dmar_table_init(void)
 
 static void warn_invalid_dmar(u64 addr, const char *message)
 {
-	WARN_TAINT_ONCE(
-		1, TAINT_FIRMWARE_WORKAROUND,
+	pr_warn_once(FW_BUG
 		"Your BIOS is broken; DMAR reported at address %llx%s!\n"
 		"BIOS vendor: %s; Ver: %s; Product Version: %s\n",
 		addr, message,
 		dmi_get_system_info(DMI_BIOS_VENDOR),
 		dmi_get_system_info(DMI_BIOS_VERSION),
 		dmi_get_system_info(DMI_PRODUCT_VERSION));
+	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
 }
 
 static int __ref



  parent reply	other threads:[~2020-03-19 13:16 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 13:02 [PATCH 4.14 00/99] 4.14.174-rc1 review Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 01/99] phy: Revert toggling reset changes Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 02/99] net: phy: Avoid multiple suspends Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 03/99] cgroup, netclassid: periodically release file_lock on classid updating Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 04/99] gre: fix uninit-value in __iptunnel_pull_header Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 05/99] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 06/99] ipvlan: add cond_resched_rcu() while processing muticast backlog Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 07/99] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 08/99] netlink: Use netlink header as base to calculate bad attribute offset Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 09/99] net: macsec: update SCI upon MAC address change Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 10/99] net: nfc: fix bounds checking bugs on "pipe" Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 11/99] net/packet: tpacket_rcv: do not increment ring index on drop Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 12/99] r8152: check disconnect status after long sleep Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 13/99] sfc: detach from cb_page in efx_copy_channel() Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 14/99] bnxt_en: reinitialize IRQs when MTU is modified Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 15/99] cgroup: memcg: net: do not associate sock with unrelated cgroup Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 16/99] net: memcg: late association of sock to memcg Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 17/99] net: memcg: fix lockdep splat in inet_csk_accept() Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 18/99] fib: add missing attribute validation for tun_id Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 19/99] nl802154: add missing attribute validation Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 20/99] nl802154: add missing attribute validation for dev_type Greg Kroah-Hartman
2020-03-19 13:02 ` [PATCH 4.14 21/99] can: add missing attribute validation for termination Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 22/99] macsec: add missing attribute validation for port Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 23/99] net: fq: add missing attribute validation for orphan mask Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 24/99] team: add missing attribute validation for port ifindex Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 25/99] team: add missing attribute validation for array index Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 26/99] nfc: add missing attribute validation for SE API Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 27/99] nfc: add missing attribute validation for vendor subcommand Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 28/99] net: phy: fix MDIO bus PM PHY resuming Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 29/99] bonding/alb: make sure arp header is pulled before accessing it Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 30/99] slip: make slhc_compress() more robust against malicious packets Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 31/99] net: fec: validate the new settings in fec_enet_set_coalesce() Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 32/99] macvlan: add cond_resched() during multicast processing Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 33/99] inet_diag: return classid for all socket types Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 34/99] ipvlan: do not add hardware address of master to its unicast filter list Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 35/99] ipvlan: egress mcast packets are not exceptional Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 36/99] ipvlan: dont deref eth hdr before checking its set Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 37/99] cgroup: cgroup_procs_next should increase position index Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 38/99] cgroup: Iterate tasks that did not finish do_exit() Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 39/99] iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 40/99] virtio-blk: fix hw_queue stopped on arbitrary error Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 41/99] iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 42/99] workqueue: dont use wq_select_unbound_cpu() for bound works Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 43/99] drm/amd/display: remove duplicated assignment to grph_obj_type Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 44/99] ktest: Add timeout for ssh sync testing Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 45/99] cifs_atomic_open(): fix double-put on late allocation failure Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 46/99] gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 47/99] KVM: x86: clear stale x86_emulate_ctxt->intercept value Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 48/99] ARC: define __ALIGN_STR and __ALIGN symbols for ARC Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 49/99] efi: Fix a race and a buffer overflow while reading efivars via sysfs Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 50/99] x86/mce: Fix logic and comments around MSR_PPIN_CTL Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 51/99] iommu/dma: Fix MSI reservation allocation Greg Kroah-Hartman
2020-03-19 13:03 ` Greg Kroah-Hartman [this message]
2020-03-19 13:03 ` [PATCH 4.14 53/99] iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 54/99] pinctrl: meson-gxl: fix GPIOX sdio pins Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 55/99] pinctrl: core: Remove extra kref_get which blocks hogs being freed Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 56/99] nl80211: add missing attribute validation for critical protocol indication Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 57/99] nl80211: add missing attribute validation for beacon report scanning Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 58/99] nl80211: add missing attribute validation for channel switch Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 59/99] netfilter: cthelper: add missing attribute validation for cthelper Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 60/99] netfilter: nft_payload: add missing attribute validation for payload csum flags Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 61/99] iommu/vt-d: Fix the wrong printing in RHSA parsing Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 62/99] iommu/vt-d: Ignore devices with out-of-spec domain number Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 63/99] i2c: acpi: put device when verifying client fails Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 64/99] ipv6: restrict IPV6_ADDRFORM operation Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 65/99] net/smc: check for valid ib_client_data Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 66/99] efi: Add a sanity check to efivar_store_raw() Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 67/99] batman-adv: Avoid spurious warnings from bat_v neigh_cmp implementation Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 68/99] batman-adv: Always initialize fragment header priority Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 69/99] batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 70/99] batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 71/99] batman-adv: Fix internal interface indices types Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 72/99] batman-adv: update data pointers after skb_cow() Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 73/99] batman-adv: Avoid race in TT TVLV allocator helper Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 74/99] batman-adv: Fix TT sync flags for intermediate TT responses Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 75/99] batman-adv: prevent TT request storms by not sending inconsistent TT TLVLs Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 76/99] batman-adv: Fix debugfs path for renamed hardif Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 77/99] batman-adv: Fix debugfs path for renamed softif Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 78/99] batman-adv: Fix duplicated OGMs on NETDEV_UP Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 79/99] batman-adv: Avoid free/alloc race when handling OGM2 buffer Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 80/99] batman-adv: Avoid free/alloc race when handling OGM buffer Greg Kroah-Hartman
2020-03-19 13:03 ` [PATCH 4.14 81/99] batman-adv: Dont schedule OGM for disabled interface Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 82/99] perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 83/99] ACPI: watchdog: Allow disabling WDAT at boot Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 84/99] HID: apple: Add support for recent firmware on Magic Keyboards Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 85/99] HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 86/99] cfg80211: check reg_rule for NULL in handle_channel_custom() Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 87/99] scsi: libfc: free response frame from GPN_ID Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 88/99] net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 89/99] net: ks8851-ml: Fix IRQ handling and locking Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 90/99] mac80211: rx: avoid RCU list traversal under mutex Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 91/99] signal: avoid double atomic counter increments for user accounting Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 92/99] slip: not call free_netdev before rtnl_unlock in slip_open Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 93/99] hinic: fix a bug of setting hw_ioctxt Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 94/99] net: rmnet: fix NULL pointer dereference in rmnet_newlink() Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 95/99] jbd2: fix data races at struct journal_head Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 96/99] ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional() Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 97/99] ARM: 8958/1: rename missed uaccess .fixup section Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 98/99] mm: slub: add missing TID bump in kmem_cache_alloc_bulk() Greg Kroah-Hartman
2020-03-19 13:04 ` [PATCH 4.14 99/99] ipv4: ensure rcu_read_lock() in cipso_v4_error() Greg Kroah-Hartman
2020-03-19 18:35 ` [PATCH 4.14 00/99] 4.14.174-rc1 review Naresh Kamboju
2020-03-19 23:36 ` Guenter Roeck
2020-03-21  0:44 ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200319123957.678951953@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).