Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2096056pxb; Fri, 8 Oct 2021 00:13:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzmGzMJug0HluqIj9mH/rJpSO+GopEd7VckWhIMoevLKds5b8CN4LMYZup7aWQ5efdunO2 X-Received: by 2002:a17:90a:c082:: with SMTP id o2mr6279695pjs.31.1633677219606; Fri, 08 Oct 2021 00:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633677219; cv=none; d=google.com; s=arc-20160816; b=Z51vF9HJJW568LdWLH7u0KQm/VThqaCNsNPgFV6wqxgZ25JMDTFfP4BZTelvnKvYdw fL7KjHmAL14D2LcUzhyOwo1hlRK7ANXlO/kWoLRoyATQtqr08ZQEQSsWp03v66MY1HbZ cFUmSmGn8eiKaRD319b97vpcNjeehXdeV0bKax6gn86giGA2KSZFNGwqxLDBYthd4SUs bpXLulu4z+KK8JWOEnMyOY2NjAukcsd9+CFec1OiQqpMw2ReSSQx9oRcIHKRO61bpACD 8ktEDl2Hp8FlmYDlMs3Wc5ME8VpgJscTdL43bjqy0BJwgPoMM8XmawuOGZD5nD3BXIN0 qkOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Kj6XXrVZqPvHK+vYRsmZ1ir5/IQKzkTT/MG+KKzC3gM=; b=Z4Ixx/5bsOcWCq8tTL1186BN4ALMgHlxGYigcMS/K+WCBIo9/sxW/Az/pa8IkHRLY/ AYytFpVBbwBEreUCp7pSXJxB9ptUIxJyIzmy+hG7am0Ho/pv5FKWXOF2JXy9a/5Hc0eb MoW9UK8D19rwipBbF9u5EWtuauWKaxqlnLDPhwE21N++wwSET1IeJ9leVGjVysSIDd5B Bnwo0xC58b+NzKqEFC5xmmFI0Y8ekOHPmpuMVCkWe8xERWLZF03xoHVOBBqjyFHWIg3W NQvWMRF96sLTtCnfia0Dufe7SmQJ43+g8UBD/qSfbAeZHMASLWZkzMP32pn0nN0peSiQ Ehvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si2287876plx.285.2021.10.08.00.13.27; Fri, 08 Oct 2021 00:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbhJHHO2 (ORCPT + 99 others); Fri, 8 Oct 2021 03:14:28 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:37256 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230453AbhJHHOZ (ORCPT ); Fri, 8 Oct 2021 03:14:25 -0400 Received: from localhost.localdomain (unknown [124.16.138.128]) by APP-05 (Coremail) with SMTP id zQCowAD32O1D719hKcjVAg--.40575S2; Fri, 08 Oct 2021 15:12:03 +0800 (CST) From: Jiasheng Jiang To: bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com Cc: linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: Re: Re: [PATCH] x86/microcode/amd: Add __list_del_entry_valid() in front of __list_del() in free_cache() Date: Fri, 8 Oct 2021 07:12:01 +0000 Message-Id: <1633677121-81314-1-git-send-email-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: zQCowAD32O1D719hKcjVAg--.40575S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZryDCFy5uFWDCF1rKFW3KFg_yoWxArg_W3 WUC348WwsrCFZFga12vr4Fya97AFn8GFZ7tryftryxJw15KFZ8J3ZxuFW5ury5Wr1Yqrs3 Kr4rJryqgFySvjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbc8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVAFwVW8CwCF 04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r 18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vI r41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr 1lIxAIcVCF04k26cxKx2IYs7xG6Fyj6rWUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY 6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUrVyIUUUUU X-Originating-IP: [124.16.138.128] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 22:29:19PM +0000, Christoph Hellwig wrote: >On Tue, Sep 28, 2021 at 09:04:44AM +0000, Jiasheng Jiang wrote: >> Directly use __list_del() to remove 'p->plist' might be unsafe, >> as we can see from the __list_del_entry_valid() of 'lib/list_debug.c' >> that p->plist->prev or p->plist->next may be the LIST_POISON, >> or p->list is not a valid double list. >> In that case, __list_del() will be corruption. >> Therefore, we suggest that __list_del_entry_valid() >> should be added in front of the __list_del() in free_cache. >No one should be using list_del directly anyway, so please fix that. What the 'fix that' means?