Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp819342rdb; Fri, 1 Sep 2023 05:21:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEETeNf5fQQ6DUQSlUo2trEWqxvjJQ2aWJeCq7/xqWyHHm4MmosGFXV0LAt39fkcJP7/R+C X-Received: by 2002:a17:902:d2c8:b0:1b8:95fc:cfe with SMTP id n8-20020a170902d2c800b001b895fc0cfemr2726118plc.3.1693570864992; Fri, 01 Sep 2023 05:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693570864; cv=none; d=google.com; s=arc-20160816; b=QEIvsaSdHH5RcmJ+SPUUt6aEsabAE7vtBjyt/19WY1YI+751evigbG3s1TF3+f4in/ 5lWo9QNwfvdaRWw7r8xC1T8WQG5jg7UHYc12z9s9KvPxLqwpz8nI0ebNJ49Bb/O8wTYT NV//ziyoy7uRDoKwXp3MgqWoWGMrtSzrTqChk397Svs8jjqZKQnWw1TKy1c9ZKs8EnVZ TGzvEcGKUe4cExoXlLvFU951pScAhSL7z0byEfUubRJ63iWgVcRL/ZgFPrKqe6afLgPM hbM8DkeAFaI+4MBn3BBvNlyD0A7refJIsBE3FhWCuZw1GAZXqr/Ot8dTa80Q1qNTlBm0 9gbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=eLjJojNFZZXfqOKeVeyQvs0TNP/PZfOC0hBXYdr0MDM=; fh=st1LklRx7WjTyLGmeN9ECtQc0kTUENMbJbT+3uv65PY=; b=l7HMlc1jOotNpj0ti+Hoawv39M/sT0J/VuL0ITDbVl3S0LST5rNBOqDgR0cTHoGAsT LJCTTCKPCXEw8KjHy6FitsakPzVyosszICYqrY/Ws/cMOEvapsHtPGUofVvqBx77ybuL E2JhhSvb27/mqPaIaXmqXLV2QINwHUvYunuhcBMA1LhlM2ZRmxBC0C+MC3JZNPNbeW2X +u9yF6RHfH/gt49dyBeTg0TJRHDoENS6RRzq8yKpzYnAMWDduhipcNKL6T5FCWoY+Tlw pUf73diwEc/O8pM9uASUocPKtH5c+qqUHPKRL400axGHUqV8kUcI3P0oL8/z6Lrbs1/o ewZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170903124900b001bbdd44bbd4si2812570plh.74.2023.09.01.05.20.55; Fri, 01 Sep 2023 05:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234994AbjIACkB convert rfc822-to-8bit (ORCPT + 26 others); Thu, 31 Aug 2023 22:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbjIACj6 (ORCPT ); Thu, 31 Aug 2023 22:39:58 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C7D3E7E; Thu, 31 Aug 2023 19:39:54 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 610D324E281; Fri, 1 Sep 2023 10:39:53 +0800 (CST) Received: from EXMBX167.cuchost.com (172.16.6.77) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 1 Sep 2023 10:39:53 +0800 Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX167.cuchost.com (172.16.6.77) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 1 Sep 2023 10:39:52 +0800 Received: from EXMBX168.cuchost.com ([fe80::1869:e641:8a12:96d6]) by EXMBX168.cuchost.com ([fe80::1869:e641:8a12:96d6%16]) with mapi id 15.00.1497.044; Fri, 1 Sep 2023 10:39:52 +0800 From: JiaJie Ho To: Aurelien Jarno , Conor Dooley CC: "herbert@gondor.apana.org.au" , "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "kernel@esmil.dk" , "linux-riscv@lists.infradead.org" , "davidlt@rivosinc.com" Subject: RE: starfive crypto list_add corruption Thread-Topic: starfive crypto list_add corruption Thread-Index: AQHZ2yzjjWDz/x6w9kGlTSbBzWx+s7AEQLcAgAECsiA= Date: Fri, 1 Sep 2023 02:39:52 +0000 Message-ID: <292c90859f2e4135b40307d61488692c@EXMBX168.cuchost.com> References: <20230830-track-glutinous-39f536b4ced1@wendy> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [161.142.156.69] x-yovoleruleagent: yovoleflag Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS 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-crypto@vger.kernel.org Hi Aurelian/Conor, Thanks for bringing this up. > On 2023-08-30 11:26, Conor Dooley wrote: > > Hi, > > > > There's been a report on the irc fedora-riscv irc of list_add > > corruption with the starfive crypto stuff: > > list_add corruption. next->prev should be prev (ffffffff02f65320), but > was ffffffd8eef15848. (next=ffffffd8eef15840). > > ------------[ cut here ]------------ > > kernel BUG at lib/list_debug.c:29! > > Kernel BUG [#1] > > [snip] > > > I feel like this isn't the first report I saw, but the other might've > > been for the equivalent driver in the vendor tree & I probably didn't > > pay any attention to. > > I got this issue, if I remember correctly, I fixed it by enabling > CONFIG_ARM_AMBA and CONFIG_AMBA_PL08X. It improved things a bit, Thanks for bringing this up. I'll submit a patch to fix the Kconfig dependencies. > but now the driver is still not functional and instead I get this kind of trace > appearing during the self test of the driver: > > ------------[ cut here ]------------ > WARNING: CPU: 3 PID: 292 at crypto/api.c:176 > crypto_wait_for_test+0x8e/0x92 Modules linked in: nvme_fabrics ad7418 > binfmt_misc jh7110_tdm snd_soc_core snd_pcm_dmaengine ofpart spi_nor > snd_pcm starfive_wdt mtd watchdog jh7110_crypto(+) snd_timer > jh7110_trng crypto_engine rng_core snd soundcore sfctemp cpufreq_dt drm > loop fuse drm_panel_orientation_quirks configfs ip_tables x_tables autofs4 > ext4 crc32c_generic crc16 mbcache jbd2 rtc_ds1307 dm_mod dax nvme > xhci_pci nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic > crct10dif_common xhci_hcd usbcore axp20x_regulator dwmac_starfive > stmmac_platform usb_common dw_mmc_starfive dw_mmc_pltfm > axp20x_i2c axp20x mfd_core regmap_i2c stmmac dw_mmc pcs_xpcs of_mdio > fixed_phy phylink fwnode_mdio mmc_core libphy clk_starfive_jh7110_vout > clk_starfive_jh7110_isp clk_starfive_jh7110_aon spi_cadence_quadspi > i2c_designware_platform clk_starfive_jh7110_stg phy_jh7110_usb > phy_jh7110_pcie i2c_designware_core > CPU: 3 PID: 292 Comm: (udev-worker) Not tainted 6.5.0-rc7+ #1 Hardware > name: StarFive VisionFive 2 v1.2A (DT) epc : crypto_wait_for_test+0x8e/0x92 [...] I'll investigate this error. Thanks, Jia Jie