Message ID | 20210614175901.532683-6-mathieu.poirier@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=Lfaw=LI=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CB2CC2B9F4 for <linux-arm-kernel@archiver.kernel.org>; Mon, 14 Jun 2021 18:02:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5BDF610A3 for <linux-arm-kernel@archiver.kernel.org>; Mon, 14 Jun 2021 18:02:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5BDF610A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rfSiqUX5s82kaBkDqgm9+vGDr5wEKOF+mSCCDqMLv+g=; b=bXAggHui8CjsKr 0mncf1nel5MLyVBfxoRyGjIS2Lzkt9c+sJDb7ArFpmlHAt0y/kk6SSP4SMKLRnXjbjS6YKJnjPigh y93QATd1tGan9EivMsDgCjZC9VlfAEypn0qjNcUFl0g4+g3huUc5E7pBCL2JHDSQkN/dQ7SN3gErN S1oHbsZrpzVi0J/H6yYiwMdA1opy4GJIxZra4n7UCh3jVU7/O5VL1LwOjGaHrejYNFB35+m3Us0jz nVrRvAH8e6rgZ+Mqrq1dmjnFu6Zgq6SDCfGCPV0Abvy/jKKFSVxxn+mmPwWzmtwEEafS0IHg0VdgK MPH622HoTI1p+QfJq7aQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsqsR-00FZOB-EE; Mon, 14 Jun 2021 18:00:00 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsqrg-00FZBm-IV for linux-arm-kernel@lists.infradead.org; Mon, 14 Jun 2021 17:59:14 +0000 Received: by mail-pl1-x636.google.com with SMTP id u18so6372043plc.0 for <linux-arm-kernel@lists.infradead.org>; Mon, 14 Jun 2021 10:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ikgWymc1ypzBC+qNXVUU0vzqUyTd66gZ/nAfzMGF6Gs=; b=WY/R0WLaBaiYdlkocqkG/FJRbohR+AMqvPTJBgCgQ6WUpM6WGjKHryGL50t5NkWvsm vMcH1hbSdap6cslA79RfB+rP6Fc2nsooTv9Fbah/pcwb7KaiyIr0RTqlzXX2SPnreISO M6r2ObUm6QdboLUe/Xsmg1vyziPOxsnZSQ8FUxZS3TQkMFiYm2vJ7tlkj5xJb1iVoQ6q k/FYyV8gYGC1iOQSj0xq6w2U0mlqDjyCCZBI0riuo17i4vKea++vngs2XSPoKPjaXVMa UnmI5/8WQ0BpC+Mq9BVZPrmd5tYBXBXV9esqEQSVd+pvT895+vg5+SyfmCSnWUpHUr7W 2Z3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ikgWymc1ypzBC+qNXVUU0vzqUyTd66gZ/nAfzMGF6Gs=; b=ESuY7a3dKy9ZKvsO4IGioN+Gi+keX5BkHv85ONeTXT+KtmHXyD0C7KyXe8X9k8ERba w3bhRCLXYXMt0j4UzEeo0tCehIe0INOClpBglqKlAQHUtWOScPT3VULOLRzhdhjQg/M5 F+BYU84WNU7AiFiwpSJ2O1U2SNeAHNK5jLF/G6r+Jds5lFZBHinZQoqpjcDBU/4zpj32 xm5ryYMXHvyxN+zBC5dIHWNLWf4fT4oBHT5pULWuopv9+V2eGSEJl6wMD0nxiGBnTF4q UxBTTeigNFxJgRgbGDIU46QAD71ZfqTO2Fq0OBv1RomumLjmmUznnqr5zCLecJBUyLxO q6fg== X-Gm-Message-State: AOAM532TTIpdyEtls3D6jcTsdfMJ8FyHgIjy0DQPj0f248WeVeyrgTXM X3K441/BwRrHj8xwQJEklCUwArLauQSkDA== X-Google-Smtp-Source: ABdhPJzgBl1fU+pCey+nzBpjvGIYgZkPno3JTYM2mPOn574FE4xRd5Go9RIDWay2rJHRcRbQPliVpA== X-Received: by 2002:a17:90b:4c8c:: with SMTP id my12mr20698468pjb.13.1623693551409; Mon, 14 Jun 2021 10:59:11 -0700 (PDT) Received: from p14s.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id z17sm13553246pfq.218.2021.06.14.10.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 10:59:10 -0700 (PDT) From: Mathieu Poirier <mathieu.poirier@linaro.org> To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer() Date: Mon, 14 Jun 2021 11:59:00 -0600 Message-Id: <20210614175901.532683-6-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614175901.532683-1-mathieu.poirier@linaro.org> References: <20210614175901.532683-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210614_105912_649597_437A60D4 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
coresight: Patches for v5.14
|
expand
|
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index 45b85edfc690..cd0fb7bfba68 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -530,7 +530,7 @@ static unsigned long tmc_update_etf_buffer(struct coresight_device *csdev, buf_ptr = buf->data_pages[cur] + offset; *buf_ptr = readl_relaxed(drvdata->base + TMC_RRD); - if (lost && *barrier) { + if (lost && i < CORESIGHT_BARRIER_PKT_SIZE) { *buf_ptr = *barrier; barrier++; }