Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3709670ybl; Sun, 8 Dec 2019 21:50:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzAMuHxFR62g2Hf6/Ic9UL75Aill4CuB3f3xUC/WGUSrPJ5RXwhaLRuaMxbgND9N9nbBVOP X-Received: by 2002:a05:6830:1e61:: with SMTP id m1mr20455249otr.68.1575870635443; Sun, 08 Dec 2019 21:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575870635; cv=none; d=google.com; s=arc-20160816; b=TcKkFzc4DIeh1saNmC9do/b/2tLf3KWr3Wdfupxyxoo+atfwSaf/ARpMwHxNjhHMu9 eEeHnJE4Bmrbrh6yfT1KvjM1ZVlWU1IspPBKZruE90ZCtB1w/4Ujqrx5rZarf0XjNIOr soxZmiMW0nneDK7tIzXb3X2aN+P9sKUNhqQRmWq8oA4nXF+GmML4gVUbwwKYU1gK0eRJ HMgFASmnt3Xmd/CHQDqHeQ8BtF5w9YTvjVc1DTFbgAnP//WVcYYFTUo1eiegUn6dRAk+ WGF5Oisokb3DapZRV6d4Oy1PTkidEyHmzYTw7xXbE1B/3ataLIxmrAIh43gId7Cn1+BQ 07Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zK5djuSKYwqaaHgHxdED8AbROBXJzib5e6bG7MyafoQ=; b=jJrY0AoepKhY6mdVCsnFsNsYU2vkYZOqUGSQEKw0WJk0IO9yf+6Xlt8JOnUy3Qhuot cqRrPCb0ChKr/mvrXmwVBf+XDkQ77d/gE2HXk4o+Mnp7PW0zhVb9elVR1lkfyMMIvarn HikZMaeukNCPJ4VdASO/e6SGxRRbTrF7jqatmBEIMdi3ufoj9db3LUMa0TmBCdXaMysT FJ8bOsXoPi8XL96hHUHFxEHaxm+0ts7n6usil+5iGXykB/OyhZwazuMtyrZO/o1EcEja 9YsTXKJ1J9hGYf2f6xybiiO5Hu5IUnnndn45SWvJNcd4NY+8m+7qEoJgVzK5gCapyLcZ i2yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=T0rnmY1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h138si11496738oib.6.2019.12.08.21.50.23; Sun, 08 Dec 2019 21:50:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=T0rnmY1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726826AbfLIFs7 (ORCPT + 99 others); Mon, 9 Dec 2019 00:48:59 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:51527 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726343AbfLIFs7 (ORCPT ); Mon, 9 Dec 2019 00:48:59 -0500 X-UUID: 902b7fe004794afd88fd55965f676b0c-20191209 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=zK5djuSKYwqaaHgHxdED8AbROBXJzib5e6bG7MyafoQ=; b=T0rnmY1g38CZXStFCH3SSNkP+iHjXCP0tF0EoP6CwBeQoRi4n9o1pk9Ho96wxCubp9pWELGxyyXm0HKFcEPuSoXA/wPFmg8ZanRnFpTpvrgHuTigNbrghjq+bWzQ2KFTzoGJE5E4XRp9r8kKGYpTxsJrJfRmd+eCOr66WRNRnJ0=; X-UUID: 902b7fe004794afd88fd55965f676b0c-20191209 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 462000421; Mon, 09 Dec 2019 13:48:52 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Dec 2019 13:48:43 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 9 Dec 2019 13:48:36 +0800 From: Walter Wu To: Matthias Brugger , Thomas Gleixner , Alexander Potapenko , Josh Poimboeuf CC: , , , wsd_upstream , Walter Wu Subject: [PATCH] lib/stackdepot: Fix global out-of-bounds in stackdepot Date: Mon, 9 Dec 2019 13:48:49 +0800 Message-ID: <20191209054849.26756-1-walter-zh.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SWYgdGhlIGRlcG90X2luZGV4ID0gU1RBQ0tfQUxMT0NfTUFYX1NMQUJTIC0gMiwgdGhlbiBpdCB3 aWxsIGNhdXNlDQphcnJheSBvdXQtb2YtYm91bmRzIGFjY2Vzcywgc28gdGhhdCB3ZSBzaG91bGQg bW9kaWZ5IHRoZSBkZXRlY3Rpb24NCnRvIGF2b2lkIHRoaXMgYXJyYXkgb3V0LW9mLWJvdW5kcyBi dWcuDQoN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