Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1497868lqo; Sun, 12 May 2024 05:26:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/pC4PvPW3NyiiKaHrPkDNW4zfLbeLPZYVhw6rZq1bPfz4bEsaLfOhlI6sZT/XH0LTem2Z+QeCVcAVStcO91CJvjS3AezarsqLdOTNeA== X-Google-Smtp-Source: AGHT+IF5FUBaolckMjADpZWFtplBdCu3n/BRM/eTLZ+htuKh1X1D1y4Br5TV4v95BCyX3hKgzx97 X-Received: by 2002:a05:6214:114a:b0:6a0:cd6b:63e1 with SMTP id 6a1803df08f44-6a16837f881mr66265956d6.64.1715516784815; Sun, 12 May 2024 05:26:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715516784; cv=pass; d=google.com; s=arc-20160816; b=g9ACa2ovV36PbMj2qWdfE+62FnSLQs0CuBKS0Hkx5pX5b2GrE2/0Secrd+ID9M+X9F lGyBRhd7MNCo5Ra5Kpaur726DevYDg4VsA5zBRa1ZV7EGBsRzOy6TJoTGXe0Ae0BZeuI Jxn7krL3Vv0T744R8vv3BTjgg4r8kFyvm35+5+cyg+VQYfIegqUobggsoksElztjBztH 9ve5V51LAK7bcveSpwUGGFrzKml9zWtLdDsfkagNcxYiALwhQXUe8VdN+q1rlfN4qk9s J3lyUzyq+3BRLxLwW/Q9QlRv5iD+m2F+6W0QzwHg8BUHJ48u5JfmK1Rpste8pY22RVSW aerw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=y4HBa6PbqEVei6qZB4zPYDGvE12HT8W+qNpyOGNhFek=; fh=5x+TLFE00mKBQqoeJvmwFCmBQgIWWvbBBQpxSQD8PS4=; b=1BMhxuNaXhuik2OAXKJ1B38QF1A6bP+YFQINE50UO1oXCJvadPKKMmTmKEGpIvDc+T v2g1RNPvaJfPgu5Iw7RAVTE5ZocMFLlFgk4T1Pl5QqduO+/k6IExzrriAxOU3Yaxs5wQ 1YhzwolkgI0cDnSmLd1PyaKElft8feUNwFV7ADcXD1+tG01WMY0V0BgpgyjHO62LUbCe rSy9V8nnc+symgJf/ts+h4irYox7NLNrtTG4LXCDnNKjb+7SZ11ATvQtpxLEqlQabH3E H5WtGUY8mDiWBSWx5TGVmAlz76/MjxHH4UsQ+QNe4lQ8JHnR3/nGrAAYxhzQFSmgAHG6 fgyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TQ0F5+yD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f1d6e2asi75816306d6.54.2024.05.12.05.26.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 05:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TQ0F5+yD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 89E8A1C2117B for ; Sun, 12 May 2024 12:26:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD7E846B91; Sun, 12 May 2024 12:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TQ0F5+yD" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A4A946522 for ; Sun, 12 May 2024 12:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715516737; cv=none; b=NVpTlTVFnNcwcns62lEC+G0oi64vb/BXoI2MCwMaCReVSTtOMdoZ3dTuLYgWhzVvS1LdI+9aiSmTijkuPuqvlSmFDGBYl05xwc7fh1kqkOM00j6KU84M5VEoynfrcF5SpD4LvpmrQtx9Pr65B5nIZsBuQhFmSxXAEh21x0qlHVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715516737; c=relaxed/simple; bh=vhMRuS6eNwKXkPE9Mui0EmIpIF4PlFmpdG1Io7aiLRM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BHNdRlid/OWSMxCIOrL20+gsJcQuTsN+23SwhxKthoh6OmHekWvPa46vH+zRZQXFETAwhDdCuhoU0CBAY4RHzaqQIRb2fbzx0Rkl7C8vFcRxvlpH2+KaGNVaDqPUdQ8g8032th488CxsuSagzgMCiyknYlyJC4k+vcIW+oR4aNU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TQ0F5+yD; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715516736; x=1747052736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vhMRuS6eNwKXkPE9Mui0EmIpIF4PlFmpdG1Io7aiLRM=; b=TQ0F5+yDH2QH6EhqUtiuQ/Lnvy/eciqzivuKAJHRlix6N7N54Uejkb9g U9SlX7m27dEliuK5rudOLPptE3jGY6lwEo8ZwExCUIhh3wm+nfNEYQ6Ge vmvkKln1NxxaNOOnpLgFBVex/aeq1A+V21WNIB+2f/1tTlgVbYwsp7fs9 XH90S+vtwJynjZ4vGFeh+UhqyzpXUDFEqBXOan8aGGC5KHZdk7ouIkaWc 4V9UpoTvGgcbQvliMjtW/8LUu6Mn1gbWmCZ9PSFcM5Ffk5N7xuGtXaVNh Gyml8rLhJs3elSFjRD+kOw6aYIs4uqHnYfBQwFVyEslCpg6QFDwsh8tH0 w==; X-CSE-ConnectionGUID: k5I2C0XJSR2yCyY/BPpPCA== X-CSE-MsgGUID: AEgctstdQceDVBjYdqYdsA== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="11397226" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11397226" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 05:25:36 -0700 X-CSE-ConnectionGUID: EzxU7sg5Qnu3LM1EF3yEgw== X-CSE-MsgGUID: OYs05ujEQzm3cQZQpmpd5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34761368" Received: from weis0040.iil.intel.com ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 05:25:35 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 14/14] wifi: iwlwifi: mvm: don't read past the mfuart notifcation Date: Sun, 12 May 2024 15:25:07 +0300 Message-Id: <20240512152312.66d9d0b23348.Ia91dd20f5e1ca1ad380b95e68aebf2794f553d9b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512122507.3812527-1-miriam.rachel.korenblit@intel.com> References: <20240512122507.3812527-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Emmanuel Grumbach In case the firmware sends a notification that claims it has more data than it has, we will read past that was allocated for the notification. Remove the print of the buffer, we won't see it by default. If needed, we can see the content with tracing. This was reported by KFENCE. Fixes: bdccdb854f2f ("iwlwifi: mvm: support MFUART dump in case of MFUART assert") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 87cc1471dfdd..b8a785032513 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -94,20 +94,10 @@ void iwl_mvm_mfu_assert_dump_notif(struct iwl_mvm *mvm, { struct iwl_rx_packet *pkt = rxb_addr(rxb); struct iwl_mfu_assert_dump_notif *mfu_dump_notif = (void *)pkt->data; - __le32 *dump_data = mfu_dump_notif->data; - int n_words = le32_to_cpu(mfu_dump_notif->data_size) / sizeof(__le32); - int i; if (mfu_dump_notif->index_num == 0) IWL_INFO(mvm, "MFUART assert id 0x%x occurred\n", le32_to_cpu(mfu_dump_notif->assert_id)); - - for (i = 0; i < n_words; i++) - IWL_DEBUG_INFO(mvm, - "MFUART assert dump, dword %u: 0x%08x\n", - le16_to_cpu(mfu_dump_notif->index_num) * - n_words + i, - le32_to_cpu(dump_data[i])); } static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, -- 2.34.1