Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4057195rdh; Tue, 28 Nov 2023 10:33:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4HJv1K7XANaIKoHCI1djKIVHfmiln1PGwbMj8qtigI7qGbfGDV+Uuoo8JHrfHzj+q+uqA X-Received: by 2002:a05:6a20:42a1:b0:187:5fe9:3046 with SMTP id o33-20020a056a2042a100b001875fe93046mr20135872pzj.0.1701196436879; Tue, 28 Nov 2023 10:33:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701196436; cv=pass; d=google.com; s=arc-20160816; b=j8ckJnHf4BMUjoXERVLRCj0JehRwA16uoL/9dSASFWc9NYJBYybzukSSfmFRKS22jH eG+a4rEGzLMvujrIsmUGQ7mcKnr+qvt7KQ1rwcEl1ofeQvniwXvfpuv7ssLfV32p37qQ tCQgBaL8/DyWDHOr+hxdpw+uOI8BsuQOZtrZfHkSPBQzMlCiEk9OgoVSoEH0bUWRNr12 w5xj/GI+n5nUawOhglH0nRfMQuZryNyYn3OHcZk9XEeLEEyPud29njDn5OOXbgR3ak5u o3DwnxjLnNyAGcUfWu1UCoZrcT1egzPbEDSqTDhkYVVaPUkrt9N77VlJkRkJt5uHAX+B XX9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:autocrypt:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature; bh=FFvTVz1Uu6mbWIeOvnz2F3mxn8FRdBB7V6sDqLyeqFA=; fh=AGeefj0myuxBb3IvcUBAAgNB3/vJkILamk7mbng5PM0=; b=amdvfa5ekpHFb6Z60kKp45fYmCnL1CAa1VxCUBn1CAGV5UqS06Vhnger1peoTONmjD NMPEknlUIpV3hVTsSJvLYhbRRjvFtKKGFVxoCQHBmGjGoJIuXEo14cE1r2vLZ9GhjkYP 6bR0XxxAHSTRolfYXCNj5UFDXQLQt/25GVB2nuTIpO/0TilI25QITKHUkxYUKhkQjFqj 58Kh1W1FvwrAATSEua+f+PUaFF9EH6DCXUh/sGc0s2sxLNejo13V6/2rcIiQWvgBYia8 jh+XNNdGVlFsxfpkU3k6+3tMcNxGYRa107Xx7YothgZjblvei40rK18OC4m6Pc7y80Jm oQlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gg0T7sLY; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id lt14-20020a17090b354e00b0027d4f7298e2si12161958pjb.65.2023.11.28.10.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 10:33:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gg0T7sLY; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F16FA80491C2; Tue, 28 Nov 2023 10:33:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234877AbjK1Sde (ORCPT + 99 others); Tue, 28 Nov 2023 13:33:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjK1Sdc (ORCPT ); Tue, 28 Nov 2023 13:33:32 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2059.outbound.protection.outlook.com [40.107.93.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7978CDE; Tue, 28 Nov 2023 10:33:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JLdvKv0qHNlSy8I0v8zNhdHqw6Ep4+zkibFqpm/S7A9C2xqbxoDvePfshBdndT6uWpdBPQEU5YXH+9w4/0Kz+b5dUYAC0v+QEg22f/jIiOOrLHdR5tHyYVVuZRC+kKvnrDs0cEsvGH1mUAtBNzc+OhB0+P7yK9xD7A7odJDk/dH2l/l2TMHhJdCaib99tWL/1PB0QojObQqSN0osAe7HxSTpmLhAKkxNZpQYzC9wl7Cea2D3AA3odywkvi4IAgxXjWBJkMr+xJ9fbO2cf+PwNCZGc89Rz2IAyGPV65K9RTVvwF5RaOfuwoQjKhaqQVJNuB0xSWuUl8igXZ4aPnkJkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FFvTVz1Uu6mbWIeOvnz2F3mxn8FRdBB7V6sDqLyeqFA=; b=GM1t5gfcVaLiYH2ZHu1QfAPnXXrKHB2iNwes7gaQ6YN4D1JpApzcwfNWWZYw3ObNU28bundctsH5DzSgFP7NWC5osjh3WPQHr54FsvGQIe3c2kbLBS6euyZiwqxpV+7UerGhxcnNCPtcgyRMZ+d2Br5BCrnjgtP0PDFblLAUZ+8o8da/XlVDH6vrciy1BlN5lV4qNCnEtLUwZiu6YvRUMPVMlv0OgEyqI0zqefMqXeVd/f5Xw4YNxtuBGiuigaQkLed6pvJ51srWiKihOSqSiIAewLh0bOHq5JO2nw5r4fFahhDgpe+l5QWcA9ae7JNdPONZTlZ5q2YsOzPla4YHjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFvTVz1Uu6mbWIeOvnz2F3mxn8FRdBB7V6sDqLyeqFA=; b=gg0T7sLYhAFV6dfjZM1PF7VB1tTZeGMwtGpcuGe4lpcx22YlEcQppHS8Z7YcWRinzaWxtUUGilgWvOZ1fMGnWPoGKWBubAShTPIecww3oTiuDaGXJl/rRRH2Lz5UWd9JBXvTJzslE1Di5AHHluHy60ccPbeKdB7NkZwmraP6FVY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by PH0PR12MB8149.namprd12.prod.outlook.com (2603:10b6:510:297::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Tue, 28 Nov 2023 18:33:34 +0000 Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::1d68:1eb8:d7dc:4b43]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::1d68:1eb8:d7dc:4b43%6]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 18:33:33 +0000 Message-ID: <05e44249-8686-4e0d-856d-46a344127589@amd.com> Date: Tue, 28 Nov 2023 12:33:31 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [bug report] x86/split_lock: Make life miserable for split lockers Content-Language: en-US To: Tony Luck , Dan Carpenter , Joerg Roedel Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <6bc08e77-812f-4e9e-938a-6a13263ce9d1@moroto.mountain> From: Tom Lendacky Autocrypt: addr=thomas.lendacky@amd.com; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160bK87qn0SbYLfplwiXZY/b/+ez 0zBtIt+uhZJ38HnOLWdda/8kuLX3qhGL5aNz1AeqcE5TW4D8v9ndYeAXFhQI7kbOhr0ruUpA udREH98EmVJsADuq0RBcIEkojnme4wVDoFt1EG93YOnqMuif76YGEl3iv9tYcESEeLNruDN6 LDbE8blkR3151tdg8IkgREJ+dK+q0p9UsGfdd+H7pni6Jjcxz8mjKCx6wAuzvArA0Ciq+Scg hfIgoiYQegZjh2vF2lCUzWWatXJoy7IzeAB5LDl/E9vz72cVD8CwQZoEx4PCsHslVpW6A/6U NRAz6ShU77jkoYoI4hoGC7qZcwy84mmJqRygFnb8dOjHI1KxqQARAQABzSZUb20gTGVuZGFj a3kgPHRob21hcy5sZW5kYWNreUBhbWQuY29tPsLBmQQTAQoAQwIbIwcLCQgHAwIBBhUIAgkK CwQWAgMBAh4BAheAAhkBFiEE3Vil58OMFCw3iBv13v+a5E8wTVMFAl/aLz0F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MAAP9Eoh/L1ZU0z71xDyJ53WPBd9Izfr9wJ 1NhFSLKvfA== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN7PR04CA0087.namprd04.prod.outlook.com (2603:10b6:806:121::32) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|PH0PR12MB8149:EE_ X-MS-Office365-Filtering-Correlation-Id: a7f12181-741c-4ccd-83b0-08dbf0408716 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u3LNkHZfasWmxsRUgt82IjceAn4OfT9nZre5cr5tXv+pPUT4tRqAtQiUDu7JpbmhFX8YL5+UnKq/0409eJwYme5TgWpPvC8e+EwLZ+2lOS2AvS/3dpkfg74mE66CgZLyZy1wK2l0wnKs6QINX0m5af9vaJ9zRkVXGyUOLCB1fkbmwN1FK97MPVCfS7NfUfoxB8f7/4Ybf3u3wU21Gduk+8Ra43rE4l4bf47CxWtCnDYWlEhHBjUcNtYn1n2vKAYp/F4m3/wjt7XcXDBSFUia8SnEtsLZlI+VgLRw2MvnlL/FuUIJzTh7YyFFEbGqNzXKcsSYlG0onuo+6hf0um/KZmasJwUZReq6iPAN1ZS4dwbK3cTONWT1DqLCy+AWHpkJ1IS1DVdD6oi7RcwvkUoSUzhJ8bmi4Avo2MbxASXzd9cAUyW1xf+mfdkOY2272RG4PpoZGi2m6agjgzrLLDvZdkLFSylT6gYtotJF0Eol1RAW9aZmuYWJySQfvLxYd4vb9TzIzxOHfhNTVOZROtjflk6Dq9z/FSiu9DHBaCWzk14CAn5feg1ItxZpKtuD0Lt0tgbOPPBJ/e2ARh+0lDCdi0L+k2i+C32bmoL9DL3kdGnVaWypTvGVGwGhkBCH3iPgElp/KBRr+Y1Pn92iR0sYcT55ne9ReDHFMYUNoSqu5Oh/J6+HmY0lbAUGImfx/W7u X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5732.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(39860400002)(376002)(396003)(366004)(230922051799003)(230273577357003)(230173577357003)(451199024)(1800799012)(186009)(64100799003)(26005)(83380400001)(38100700002)(31686004)(6512007)(6506007)(8936002)(4326008)(66946007)(110136005)(316002)(66556008)(53546011)(66476007)(5660300002)(31696002)(478600001)(8676002)(86362001)(6486002)(36756003)(2906002)(41300700001)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V3dCVWsyVlkyNVJ1b1JOZVAwTVNmaVpCcU5nUzhzd25BV2dzSlBQaS9pZEJ4?= =?utf-8?B?OTdsZVA0ekRSVVRERHR4Tk1EejM1ZlRDQVJxbnBWTitoZC9BZGE0TXFGVndQ?= =?utf-8?B?aXAvL1NOeGUrb2JSek4wd1NPN0IzcU9TMVd1ekkwdkVpalR2RWdGSFV0a0pT?= =?utf-8?B?c1dJQ0R4QVhpZEtqdkYyRkc4RXl5Z0NCQk5hVGc5bmxsQTE4TFFoODI0dzlo?= =?utf-8?B?Z3U0bnh2M0VhdHV5Z21nK2FSVUpJN3Y5T0UyZUE2ekgxbGdZRWNNcFk2alhG?= =?utf-8?B?M0JSVnFRcFBUSkdiV3MwK2l1L0lWNEpCUjNBR09VWFNmWGRQbERoYnpBZVNn?= =?utf-8?B?L212ZXpkYXdTclU2aUx3QXE3MlUzYzZsT1ZiMGRlZ3ZCVWJpeG1vK1F2SHdO?= =?utf-8?B?L0hqOWM2R1o0cFkrSGtHa3V5Z1pOZ2k1azlMK2VlbktNNEkyRlUxTWRUWnMr?= =?utf-8?B?dkwvNlQ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8?B?N25TRjgzZ0FtQ0V2MmVmK2o0bFA1NGo0VjQ4N2oyeXc3WUduUGdzNHR4YWgr?= =?utf-8?B?aE1BSE9IaDRySlJ5eVB0SkI5Snp0UHNzTUNScDBRVmhUeDg5N2kwa1hTUlNX?= =?utf-8?B?ejNMdGJ6aFoxdnVsUG5ZOVVwM0dtRlExR2h4YkZYa0hUVklwMStESmhXSloy?= =?utf-8?B?QlR2WUVERHlZU3hVK1krSkRpWkcrK0NRNzFNcDZYbG5CeGpKRmpJOU5QbE1O?= =?utf-8?B?UVZGdXlGYTNrS3BRKzlMOHRYTDhKYjUrQ3cwZEU4UGVxeFFPdEtIZEU5b0Zl?= =?utf-8?B?WXRrOE1ZYVlIeGhBbzA5Q3N3N0hnV042VHBCK05FalRUREx1T09mM0d1M3g2?= =?utf-8?B?Mnk4L0YyaDVIRi93dW96UUltOE5JMWluN2ZicStDOG1tOW5FQ0ZtQmJoYnR2?= =?utf-8?B?T2l4QlZZYXh6Y0I2blFwa2tGWnlHNTVWSm5JSTlCMkRzajN4VDdTaXNMVENo?= =?utf-8?B?ZGh5YUlhU0JGRnRQRGQ0UVVabUdQbzRRL2pvUE8zKy9OcWN0Mkc5cGZ3cWZY?= =?utf-8?B?SFIxOFM5RUpUZ2hVRFBQV1FleU92c00yb29CUEM0bmc4WDRuQjBDRWhoc0hT?= =?utf-8?B?L3pMRUUxTFdKTlFoVTBodzVLYmxnaUF3V1haN01qU2kvYjQyR0JJWUJmd05I?= =?utf-8?B?VXFRakMwUkY5T3RkdEtmQUNLMkJRQWlSMWxqMFFSbVljb2s2dlUyNmZYSWVp?= =?utf-8?Q?KxP6wHqTGMwpWsCSjxi6LOHoz?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7f12181-741c-4ccd-83b0-08dbf0408716 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 18:33:33.9308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: USmFNxBetaYw5SCP6tEfLz/R8xCT3VENvRm30cnv7U7OZo4q3Ah4Uu+5ClnhDlxeOeYpTOACSi2slSiLq7Zr+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8149 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 10:33:54 -0800 (PST) +Joerg On 11/28/23 11:40, Tony Luck wrote: > On Tue, Nov 28, 2023 at 04:12:24PM +0300, Dan Carpenter wrote: >> Hello Tony Luck, >> >> The patch b041b525dab9: "x86/split_lock: Make life miserable for >> split lockers" from Mar 10, 2022 (linux-next), leads to the following >> Smatch static checker warning: >> >> arch/x86/kernel/cpu/intel.c:1179 split_lock_warn() >> warn: sleeping in atomic context >> >> arch/x86/kernel/cpu/intel.c >> 1158 static void split_lock_warn(unsigned long ip) >> 1159 { >> 1160 struct delayed_work *work; >> 1161 int cpu; >> 1162 >> 1163 if (!current->reported_split_lock) >> 1164 pr_warn_ratelimited("#AC: %s/%d took a split_lock trap at address: 0x%lx\n", >> 1165 current->comm, current->pid, ip); >> 1166 current->reported_split_lock = 1; >> 1167 >> 1168 if (sysctl_sld_mitigate) { >> 1169 /* >> 1170 * misery factor #1: >> 1171 * sleep 10ms before trying to execute split lock. >> 1172 */ >> 1173 if (msleep_interruptible(10) > 0) >> 1174 return; >> 1175 /* >> 1176 * Misery factor #2: >> 1177 * only allow one buslocked disabled core at a time. >> 1178 */ >> --> 1179 if (down_interruptible(&buslock_sem) == -EINTR) >> 1180 return; >> 1181 work = &sl_reenable_unlock; >> 1182 } else { >> 1183 work = &sl_reenable; >> 1184 } >> 1185 >> 1186 cpu = get_cpu(); >> 1187 schedule_delayed_work_on(cpu, work, 2); >> 1188 >> 1189 /* Disable split lock detection on this CPU to make progress */ >> 1190 sld_update_msr(false); >> 1191 put_cpu(); >> 1192 } >> >> The call tree is: >> >> kernel_exc_vmm_communication() <- disables preempt >> -> vc_raw_handle_exception() >> -> vc_forward_exception() >> -> exc_alignment_check() >> -> __exc_alignment_check() >> -> handle_user_split_lock() >> -> split_lock_warn() >> >> I think maybe the mismatch is that kernel_exc_vmm_communication() calls >> irqentry_nmi_enter(regs); which disable preemption but exc_alignment_check() >> does local_irq_enable() which doesn't enable it. > > I think we need some arch/x86/kernel/sev.c expertise to explain the > preemption requirements in that stack trace. Adding Tom Lendacky. Adding Joerg as the original developer of this code. I believe that irqentry_nmi_enter() is used so that we are ensured that the kernel can't be interrupted while using the per-CPU GHCB when entered from kernel-mode in order to avoid nested #VCs (except for an NMI). Joerg might have further insights since there was a lot of discussion around these changes. I'm not sure if is possible, but I wonder if irqentry_nmi_exit() can be issued before forwarding the exception - or even delay forwarding the exception until after irqentry_nmi_exit(). Thanks, Tom > >> Also why does arch/x86 not have a dedicated mailing list? > > Good question. X86 was once the default architecture. So everything went to > linux-kernel@vger.kernel.org. I'll add that to Cc: for this. But maybe > it's time for an x86 specific list? > >> regards, >> dan carpenter > > -Tony