Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6264804iob; Tue, 10 May 2022 14:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv8trGnvitjXvwLNRxHls4XU1OumadGJ8HCkKprS7J4gjuzBx+rzv7GQtVXuraKD9hnfrc X-Received: by 2002:a17:90a:e7d2:b0:1dc:e6c6:604b with SMTP id kb18-20020a17090ae7d200b001dce6c6604bmr1781545pjb.183.1652217679013; Tue, 10 May 2022 14:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652217679; cv=none; d=google.com; s=arc-20160816; b=S8/C4CDndCwuUs4v9eVZa2eXw2lCHMlAjLmGmgEpLJsYc0E0WjJG2sWmMhCszwHdCI WxAGDohH7E8CjxJjg0Ht3jpgIp/3j5q0pp7Y+YTXJ9kp988hJQFd4R2Ga3A6c1Y2JdTW g9k2SEwYY2vwl59MUqQWlvmw1kRjVGjbnuHDx0qIIJcC57b14iAy4PuBA49bZSvv7UjY XIRPZK27ELbuPTXsGj1xfFP1+ypxLm3WezWmm0Q1ZrzbDlW//4v65w0Ne0OEIz8Bcsbv AvSeHq6XNW3mx0ePpVkvuFCcNPFYA59614TI0dchpCvlZlj87uh54ZVAkzmCCmtHPGe1 YHnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tmj1L3IWvFrzFiEfQY91rogEFniRVCgiz/fPrdfP0mY=; b=GOKfZU7uwyQv1CUfl14K4ZlZ/OStLyWU6TCSRIU4ypDhethg03o5wHNTBSpfHlstI4 18Fy3xa8jO1+XY7I5UWaH9W9ciBtYoq24/3OjdmPseH9z2MhlM/e4Y91pdwDVlBpBzik 17f4eGD6s5QYKlXpV5z4mJ4sU5vffoiedV74xXyuAHHaxNUNuro+IuCAtxPVFq537F8K uwlLCmfNf7w0ORvQ1AU4jqcwCfuUtuHQV7LoMYWCQtzx/Jw8PLbGuYlBV++zHzAc1Nyw YZCD4kMQfUb1vb9+kcPNG/aMITpz5nhoX7Loqm6zkrVAyM/UyWKHAgj3lBxVhV+nTv4o RMpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a170902ce8100b0015eaa840a13si236558plg.224.2022.05.10.14.21.03; Tue, 10 May 2022 14:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244612AbiEJPOZ (ORCPT + 99 others); Tue, 10 May 2022 11:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345103AbiEJPNg (ORCPT ); Tue, 10 May 2022 11:13:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B90A95047C; Tue, 10 May 2022 07:47:03 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 850AB12FC; Tue, 10 May 2022 07:47:03 -0700 (PDT) Received: from bogus (unknown [10.57.0.250]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4B4C33F73D; Tue, 10 May 2022 07:47:02 -0700 (PDT) Date: Tue, 10 May 2022 15:46:56 +0100 From: Sudeep Holla To: Mario Limonciello Cc: Jassi Brar , Sudeep Holla , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mailbox: pcc: Fix an invalid-load caught by the address sanitizer Message-ID: <20220510144656.nxbayvxdfcia3ykm@bogus> References: <20220509141716.1270-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509141716.1270-1-mario.limonciello@amd.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2022 at 09:17:16AM -0500, Mario Limonciello wrote: > `pcc_mailbox_probe` doesn't initialize all memory that has been allocated > before the first time that one of it's members `txdone_irq` may be > accessed. > > This leads to a an invalid load any time that this member is accessed: > [ 2.429769] UBSAN: invalid-load in drivers/mailbox/pcc.c:684:22 > [ 2.430324] UBSAN: invalid-load in drivers/mailbox/mailbox.c:486:12 > [ 4.276782] UBSAN: invalid-load in drivers/acpi/cppc_acpi.c:314:45 > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=215587 > Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Thanks for catching and fixing this. Reviewed-by: Sudeep Holla -- Regards, Sudeep