Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4163275rwd; Tue, 23 May 2023 04:13:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6upzJSQuyGIOaMh5t2VKDCDoBElQlUkYyAHwA+/PP7u8bSUBTnShurimZjvWJqOHE/GpOf X-Received: by 2002:a05:6a20:938f:b0:103:90ab:d79 with SMTP id x15-20020a056a20938f00b0010390ab0d79mr15943624pzh.25.1684840431787; Tue, 23 May 2023 04:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684840431; cv=none; d=google.com; s=arc-20160816; b=xYRLgw9ktYWK+qEL5IqXjd0vvIFvsHMtkYfVsIatJkKIXQ+c1llD1om/tRE+D5jFHo aMYQ2xYNLRkVPpm0ckEk2U71bMukw47r4gEkOWSiK9dgeWqXLKagAZ5Z04zSn2Ssexp8 Hel0P3LRkyom4wByjQV8DFrb6Mrskmg7kYrE4ry2Ms++mI/Aybq0lTGsuZC8dS5TQHK5 GsFfncHRstZzRgAiCo1Y21bGmgnDfqDSQM8okfukZvKdHOIati3oKdI2QTiRCBmZ8fuE 255Hdq41psWDJBkUC+xGD7mVIahLORoS9CWXccoyrCd3OSwUDXnkcp8mbuCquVNDLPf6 WqhA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=BJTjmH1bvSQiv1dY4ZXd2PGQrsClXzAj4WHKRaeS0KE=; b=FxgHyt/VAmK7AD0mWE7753jFAIIfQV2zQ47nChYaYU5OXkXL6vfHxmg+AIR0jV73NM +TW6/arlVPjGWctewQfXRmZoxE95unRvDsorE/Knf4VtP1hCpEF6yA/NiVz/lYOUj1pP ZeaIK1xdg0eE5Zwu4mnwk15tmoYv50K69jf1luzzObCtlNoWcie2mp+Z7Kek65ULTflX jC2sj7FfnEQ38HBMVR4i6lYUEq5EGir4h/Wlpy922mfJieJ7oZR0QTwKLmjiuPWWroNp mkKZvEUAE4KiZRVuE72+PgDW/4P5A4Kq5Njql+dGTaz6tEqzUi86immIKGtSPiGGY8Vv Il1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ywgxeksr; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a17090ac28e00b00250b2c89e20si1801241pjt.102.2023.05.23.04.13.36; Tue, 23 May 2023 04:13:51 -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=@redhat.com header.s=mimecast20190719 header.b=Ywgxeksr; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjEWKzK (ORCPT + 99 others); Tue, 23 May 2023 06:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbjEWKzI (ORCPT ); Tue, 23 May 2023 06:55:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC00FF for ; Tue, 23 May 2023 03:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684839262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BJTjmH1bvSQiv1dY4ZXd2PGQrsClXzAj4WHKRaeS0KE=; b=YwgxeksrEZUzxV3KiGgLzU9f2XcidoWWvEO76NLvUwzi/n9LIj4e6B1vrLRqegGiqD/BC9 TF/UuC8F+8BExb44rU9vm+P402PMtDijGLU17NhofBrnEdLaZCUz8d3O0ubXXjKlrogDE7 C3VLvtZS+TaXJWGSSeeOLt/SG1pFUHY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-IsNu_UZEOk67pwoPBqva1w-1; Tue, 23 May 2023 06:54:19 -0400 X-MC-Unique: IsNu_UZEOk67pwoPBqva1w-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2009629AA382; Tue, 23 May 2023 10:54:19 +0000 (UTC) Received: from dba62.ml3.eng.bos.redhat.com (dba62.ml3.eng.bos.redhat.com [10.19.176.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id B802D492B0A; Tue, 23 May 2023 10:54:18 +0000 (UTC) From: David Arcari To: platform-driver-x86@vger.kernel.org Cc: David Arcari , Jithu Joseph , Ashok Raj , Tony Luck , Hans de Goede , Mark Gross , Greg Kroah-Hartman , Thomas Gleixner , Dan Williams , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain Date: Tue, 23 May 2023 06:54:00 -0400 Message-Id: <20230523105400.674152-1-darcari@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 --- drivers/platform/x86/intel/ifs/load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c index 61dffb4c8a1d..e6ae8265f3a3 100644 --- a/drivers/platform/x86/intel/ifs/load.c +++ b/drivers/platform/x86/intel/ifs/load.c @@ -208,7 +208,7 @@ static int scan_chunks_sanity_check(struct device *dev) 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) { -- 2.27.0