From patchwork Sun May 28 19:10:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 99927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1134799vqr; Sun, 28 May 2023 13:54:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6p7UghQfb/o2Q3aX6Clg55whActXyzIY/gIeb+xBw/A0uvj29NsPi4pAp4QHTn7UHBVAk2 X-Received: by 2002:a17:90a:9514:b0:24e:4b1c:74d2 with SMTP id t20-20020a17090a951400b0024e4b1c74d2mr9364453pjo.32.1685307273629; Sun, 28 May 2023 13:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685307273; cv=none; d=google.com; s=arc-20160816; b=yux8UM8wJx4dIXgBFbJ7pNUbjIypcug44dF6mhC4zXLIvoutIMvzAX3ypvl/HxTeCr 6xTegLnSd5SxkAkAulEEmAHwzepr7PjPJA1zppxYepEv6Vj+w1NNOYpNZlM6LbtJkIZp Fj/9zYqUUR6qG/xs/fBlGw4AsfV6UNE7vLVsZzj5pjhL4ncD6ob5fLlz+3cb3Ir1+SID 8waUYByfoMdTkAE9f/YwdN8mxDs/MqqmxqcDiFQaH8S5pKngbOCD+1WLbsbypIU5qVZj NW8vnnyBfN69lSqtsfh/9hH8lWLZPJu+AI9d8nGfRRJJMD0TUMXsEl8ZCKnUbzCuoEup PyZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zommxYkvvV6t4XbMJiQ6EYW5SAmt8uwA4t8BU6wRUb8=; b=HKSren3xOFmXne+rIsJYgXoA6otlzW82edjLZW85Wszj751WNCur/NUehkdXfWSDlP /3QmLrKmSfAFuxvkJtswiy+Y7oiOBperBkG3HGxT71eAe164tjjp25/PGBcyv/SuWeCY nBHviETAQ7BARQi1omcYsXJoKc1oXVLX4rD+25jFWxoLsgiRLur/ZtdMswo4Czu/4h6n Eu88T2rF7/doU/cyE/FAfV1iZp6HeBlQayjosP8rCZZ1A4uJa0SFWjHSLoBn0FsPlSrL yJWkxH4T3StozEx1dUdORSEa+9H1oMhDa6Qqd/S9ipZs3sbioV9iBGl6l3flwus5R2Wm TSqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q619cOsG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 20-20020a631854000000b0053ef518d7ffsi8185870pgy.303.2023.05.28.13.54.21; Sun, 28 May 2023 13:54:33 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q619cOsG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbjE1Tek (ORCPT + 99 others); Sun, 28 May 2023 15:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbjE1Teh (ORCPT ); Sun, 28 May 2023 15:34:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 684BEB1; Sun, 28 May 2023 12:34:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0176F61DF2; Sun, 28 May 2023 19:34:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEFC4C433EF; Sun, 28 May 2023 19:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685302475; bh=4ZPCwhkH1brojeZZcV9gpHcRj54LzG/1n3oPSBY+ijA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q619cOsGVMiv+tDDUcml+Rv3blPxKPPdC03aE5ZokHCcw2puCIWVQA5j3RN5+xlRU 5wv5sxvKmBnq5AJTVZvSm1NskksO991XdRzY8ogjlUwnnoHCDdgdZpy/BvZDfBn4r3 tGrfOQBX+Yazjpoz/6NXFHkMjcSuNYdfbbNCEBwM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Arcari , Jithu Joseph , Ashok Raj , Tony Luck , Hans de Goede , Mark Gross , Thomas Gleixner , Dan Williams , linux-kernel@vger.kernel.org Subject: [PATCH 6.1 018/119] platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain Date: Sun, 28 May 2023 20:10:18 +0100 Message-Id: <20230528190835.937793702@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230528190835.386670951@linuxfoundation.org> References: <20230528190835.386670951@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767172759567560802?= X-GMAIL-MSGID: =?utf-8?q?1767172759567560802?= From: David Arcari commit 3279decb2c3c8d58cb0b70ed5235c480735a36ee upstream. Object Debug results in the following warning while attempting to load ifs firmware: [ 220.007422] ODEBUG: object 000000003bf952db is on stack 00000000e843994b, but NOT annotated. [ 220.007459] ------------[ cut here ]------------ [ 220.007461] WARNING: CPU: 0 PID: 11774 at lib/debugobjects.c:548 __debug_object_init.cold+0x22e/0x2d5 [ 220.137476] RIP: 0010:__debug_object_init.cold+0x22e/0x2d5 [ 220.254774] Call Trace: [ 220.257641] [ 220.265606] scan_chunks_sanity_check+0x368/0x5f0 [intel_ifs] [ 220.288292] ifs_load_firmware+0x2a3/0x400 [intel_ifs] [ 220.332793] current_batch_store+0xea/0x160 [intel_ifs] [ 220.357947] kernfs_fop_write_iter+0x355/0x530 [ 220.363048] new_sync_write+0x28e/0x4a0 [ 220.381226] vfs_write+0x62a/0x920 [ 220.385160] ksys_write+0xf9/0x1d0 [ 220.399421] do_syscall_64+0x59/0x90 [ 220.440635] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 220.566845] ---[ end trace 3a01b299db142b41 ]--- Correct this by calling INIT_WORK_ONSTACK instead of INIT_WORK. Fixes: 684ec215706d ("platform/x86/intel/ifs: Authenticate and copy to secured memory") Signed-off-by: David Arcari Cc: Jithu Joseph Cc: Ashok Raj Cc: Tony Luck Cc: Hans de Goede Cc: Mark Gross Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Dan Williams Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230523105400.674152-1-darcari@redhat.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/intel/ifs/load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/x86/intel/ifs/load.c +++ b/drivers/platform/x86/intel/ifs/load.c @@ -154,7 +154,7 @@ static int scan_chunks_sanity_check(stru continue; reinit_completion(&ifs_done); local_work.dev = dev; - INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks); + INIT_WORK_ONSTACK(&local_work.w, copy_hashes_authenticate_chunks); schedule_work_on(cpu, &local_work.w); wait_for_completion(&ifs_done); if (ifsd->loading_error)