Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp384313lqr; Wed, 5 Jun 2024 08:46:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqJjjEzaG5wLRCa6u98xuBQ4bjZs1g/o5pK7CmNURUnOjkkQyDmE5ohdAVaq0kfQvKBpuXHubjuBW3LJYjKDKE4XpFAifl3e4d4yyX2g== X-Google-Smtp-Source: AGHT+IEtNrGQ8rW5rPlBR5TNwFj66FGjlImMUOkzTxpgu7dSmexX5z5BQo8uDbI96hXS3gR6cSZr X-Received: by 2002:ac2:4906:0:b0:52b:79a5:517a with SMTP id 2adb3069b0e04-52bab4e5283mr1715236e87.33.1717602387329; Wed, 05 Jun 2024 08:46:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717602387; cv=pass; d=google.com; s=arc-20160816; b=PMjwYI9WaoKIetzf95lXjSqYmOKL96ZkXSfrQBwtwD0PvYhhUT8YLDlRU9kx/NpFIL K3zvUHAthjdg2RU3TLV6d2+mSnZ/tdV8ykq9fPQMeBZ9rMDuFEltL9pe+B84yMlxmIVG o/A33QRW8TjJCqMYrin4/nKAYs0TdiGoNu337Bcowxe3eHBjtbWjnSG1AJ+Ry786jKWX NRigrmIB+yqWLip3zlMeWdZkBhmjgl1EGEYkV2dBxg6n292lcnPOXg3ZlDO6p1V11j1h 5+9khGGb0UD8XzUi8ulhnYMYStpxmITNn0Tp9TMqnRgdvA1p45Amhq1f2NkjxU8+UH/k LPjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cJA/0YhYMOptZl36ElVGXwTz6xh4HWGw1e28sY2Ix6U=; fh=nEGugsLBQDZbBxNoxzFAgWtctfI1pvfvqIp2LsQ+XSg=; b=yuiOUrfc8l26guyXGMC8umxDj56QI/qbhCCuPMEPSN64jtZvc7YIQsD5xIU0rOwjSB 24LdH4wK6V1OT8VtCUns6avFoPKnX3yzhjwO3ZHK7xOQHri36hOxh7gWDyO7rC6+Wr7Z z9nGNE2KMzhRdF8ZO9KgJqGWTYFXmaADMlLal9X/Lgl2u5ZwLU/9caTm3ACoDZawKHfW GU4U3Tbem1JGKwevawmTEXNjgSOTDvBNSA1WcAH55Y3LsjTfcu3BtRH73V+Vx5yHeLhw LET/iYlea6CqyPc89EcRGqOyYCip56ewSD2rwqKf6v2eFaIldDjbaUBbMK+d4k0CZTIt ZO+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DzI1vU88; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6916b8686fsi299101466b.393.2024.06.05.08.46.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DzI1vU88; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0AFEF1F23557 for ; Wed, 5 Jun 2024 15:46:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C39E27701; Wed, 5 Jun 2024 15:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DzI1vU88" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4615F155A4E; Wed, 5 Jun 2024 15:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602358; cv=none; b=gjbtHQnvLCJO0LKLDJS7JAtqbo+rHGs0GcYDGpn4V6dP0jVmnIBeubZ74O05K3WQz3F0dQl5JEtG5Tau+pVFEq8FnMiRabKWyARCKnRP4dXss3XQxfjq5v7CQVGjhgPT/Spog38G3pKMGtwvdm4DKu+tM6PzNBV6834IpeA041g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602358; c=relaxed/simple; bh=FyldfTzNZPniL6au2gQsSraHX6MskYD8BVPvkrZxxXE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Py4DwTCiLHhrnUx5updAGxPBLBNDurq6lVCvb5ltfEpQYS7S6oLry71cskgIeSmZ910Le5U9Hcf6e4j7XJmo+uqOQ1bMLcSPgkCUGRdSyZrfLLaTiy4fmBdA6UiJaBu22FsQQmXCF3IXN6TkR2d+MPJmxx54ZGxeKLdro5nE8XA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DzI1vU88; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 765F3C3277B; Wed, 5 Jun 2024 15:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717602357; bh=FyldfTzNZPniL6au2gQsSraHX6MskYD8BVPvkrZxxXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DzI1vU88LUfKlmlgo32PjDybshwRWjwpWqYUcHfY9ye2SmeiDYHDGIDPYaZErXrpy ije8AUE7uSBHXWJbP7bx6Gi3gI+HSiwtyXUr3qYzS01/Ps7SA+jQVVqUcVkRj3/AaE hru7ON9yz+Wv0oVrG4lLlgNJA91BAbTQgy3l4XrOXu2+oAhKMfoITAnoVuej99A4bD gQSSEoMPoXATDyb0XS/DV2OGgoG7tAqcSI4+7cUeQJ9aJllbDp5Po/N/eDDku5iLWu Ce23nPhyfVJw6pGpHgLWQH42+UIax3yC54KgLWgz/onMZQkU0yjKM3BcPvZN4tZOfj FMI7hr4n9kEOw== From: Will Deacon To: robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Mostafa Saleh Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon , linux-kernel@vger.kernel.org, joro@8bytes.org, nicolinc@nvidia.com, mshavit@google.com, Dan Carpenter , Jason Gunthorpe Subject: Re: [PATCH] iommu/arm-smmu-v3: Avoid uninitialized asid in case of error Date: Wed, 5 Jun 2024 16:45:46 +0100 Message-Id: <171759168166.1126369.9985606897560767685.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240604185218.2602058-1-smostafa@google.com> References: <20240604185218.2602058-1-smostafa@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Tue, 04 Jun 2024 18:52:18 +0000, Mostafa Saleh wrote: > Static checker is complaining about the ASID possibly set uninitialized. > This only happens in case of error and this value would be ignored anyway. > > A simple fix would be just to initialize the local variable to zero, > this path will only be reached on the first attach to a domain where > the CD is already initialized to zero. > This avoids having to bloat the function with an error path. > > [...] Applied to will (for-joerg/arm-smmu/updates), thanks! [1/1] iommu/arm-smmu-v3: Avoid uninitialized asid in case of error https://git.kernel.org/will/c/d3867e714831 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev