Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2655381rdb; Mon, 12 Feb 2024 11:43:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW18zEQYWtJ6JjQm6QrNb9NtMgBTtw97CZgxTJFIWFvJtpPEyuLV1nSEHBcVnEa+aO52bM6DItshg9iTTwQOzRaJDPWzEDYXQ2WM4s2WA== X-Google-Smtp-Source: AGHT+IHfRLpxjGEjGUWFXXTyjUvRmPkv/xXCG4NNZJj8oROKLwnspJqfoSE7Kr4epS1NqiHzR7XR X-Received: by 2002:a25:bac1:0:b0:dcb:b41c:77ef with SMTP id a1-20020a25bac1000000b00dcbb41c77efmr1397459ybk.24.1707767023143; Mon, 12 Feb 2024 11:43:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6wWgnQJ+No7xzcx2BN6H0DDJltEB2Xs/pCqLT0BCI8X9pP3L+exXOUuF4v9MhGHxZZYU1ibrIXDBfd77CW2i2eHxI2rQxOYbaqQiSJg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bk36-20020a05620a1a2400b007832366f885si7183938qkb.224.2024.02.12.11.43.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 11:43:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2T9syo0P; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-62280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D1F0E1C21763 for ; Mon, 12 Feb 2024 19:43:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D14A47A53; Mon, 12 Feb 2024 19:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="2T9syo0P" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B89A45BFC; Mon, 12 Feb 2024 19:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.46 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707767015; cv=fail; b=kXJEE4icVuTMaVbiAogNAVXBfgP/LdFwo1Z8XODuVmxiAKLMMU1Bu66FOVLM8xQlXrJf9RaTZPRoQ5j9Av74xdJBERHqJLzdCLllMmLn5vadrVDeCInPR48fQgIMeLcRLEGhbVjlRvejFYPZwbKBcLHmQEX2AvXVGmdhIR/bWoY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707767015; c=relaxed/simple; bh=IDtG98i2A3RfKfNzW7pbzSoxFjaxOLHiwj+Fnu3FmGc=; h=Message-ID:Date:Cc:Subject:To:References:From:In-Reply-To: Content-Type:MIME-Version; b=n9RxMNLr6KyoX2HGe9ldSlxGhYDceWyamuJxex6/p0+In2bAL1DiJOFtj6H9z1ilNjCkBuI9aG+xhQ+LfloTGI/2hJAXCAPrHLW809sqU3DcYnZjikHYRt57Wzs/1Xty60OgykI12A5/nQq46ewHJLjOYaBVUqD0vYZiIrEDCYU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=2T9syo0P; arc=fail smtp.client-ip=40.107.223.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6CzsSz7DWSgG7qjQ6YDMrOvDPB25DL8fgzFbtpPowfpX55iVA635S2J20j/5CGDRb7/UUTOCPfjAW6h+/ySX37JOjjpsBxQYypfscYlT515EWB7nf+TJ6wO7PH9VNso46PvKLQv2UWpNV2pSOz9Oz5kiRUfQhLJyY8Nb1GYGqEVtSSnBB1zTyWSieXxswh4l14RccMDp7c2xQI67Z5GFHoTc8toTVYjiAklCHhRfqffUDS8hp5qdtlysBgs4d44hV6pAUr5RHZU4HXV8DkhuQ/LaTXpc9yoQMGsEgB/mzAhZwNt7ThcU10U/mpayrVnzekg6S7iF9FAtaWb3Gz2Bg== 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=D3EH3/nEYd/FW5i/4wQumoYMbM3B4XE4mTKzLnjxghc=; b=OwySCy1ub0iZMvg2uPQ1dspd8aAwdzg1DQsJ1I5pG5VpkxEbSFvr9xGFJbKiB4tIXKnsdQWK7SFpcMN0xa5Kdll/ltynrlByw0KClELzhqE/VbnA3tNZ9RQGlQa3BVnF4MiTYGDDd9u4R2lPanaAynYZVQN9a2/pC4NkV0JHCUg4if7S54CCk0YmpzPyyrE9pnGpKv/s7UrHhhXaueSkD/xzdwNjaN7+C8zmEGN3XMwqGBfT0ndIVnPnJStUPR+EY4lcjK4A96La//9ym80FYtCSAJxXgw3BT+uU2SOyYclACnFJp9qtTCFN79U0prEG5QnjY7uCjZHyU+DFme7bDA== 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=D3EH3/nEYd/FW5i/4wQumoYMbM3B4XE4mTKzLnjxghc=; b=2T9syo0PIW+nE0wHs6gfew4IYbQnRUsCEE53xGglakOd9wi1lq/Eo0pWas1iThaW/7L2+khGFRogGhJ23YYQHSCjLh9MXPoY0Dd8Y8gfA4ltavAI4mfR/XSU/024uyfYOClCvCY7Tvb5ZMFdTvJw7salncSHRNCT9VOD1WrP/D0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3108.namprd12.prod.outlook.com (2603:10b6:408:40::20) by CH0PR12MB8531.namprd12.prod.outlook.com (2603:10b6:610:181::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.16; Mon, 12 Feb 2024 19:43:30 +0000 Received: from BN8PR12MB3108.namprd12.prod.outlook.com ([fe80::3a46:cf50:1239:510c]) by BN8PR12MB3108.namprd12.prod.outlook.com ([fe80::3a46:cf50:1239:510c%7]) with mapi id 15.20.7270.016; Mon, 12 Feb 2024 19:43:30 +0000 Message-ID: <34b19db5-bd72-457c-9b6a-c2089f6be83c@amd.com> Date: Mon, 12 Feb 2024 14:43:28 -0500 User-Agent: Mozilla Thunderbird Cc: yazen.ghannam@amd.com, "Mehta, Sohil" , "x86@kernel.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Avadhut Naik Subject: Re: [PATCH 2/2] x86/MCE: Add command line option to extend MCE Records pool Content-Language: en-US To: "Luck, Tony" , Borislav Petkov , "Naik, Avadhut" References: <20240207225632.159276-1-avadhut.naik@amd.com> <20240207225632.159276-3-avadhut.naik@amd.com> <8b4f8ec2-7534-4f77-b44f-6728c699ff64@intel.com> <51255499-0b5d-45c6-9c72-f353bae83c0d@amd.com> <20240209200920.GFZcaGcOr757W9O3IG@fat_crate.local> <7a4945b0-322a-444e-a0ca-860a062a49c3@amd.com> <20240209205111.GGZcaQP1gb6C9m0WZB@fat_crate.local> <5DB0FF8D-C6DA-45DC-B287-201A9BF48BDA@alien8.de> <75ddf61d-8dda-47fa-9da0-24221feb22a2@amd.com> <20240211111455.GAZcisL09LeFPWa2EI@fat_crate.local> From: Yazen Ghannam In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BN9PR03CA0527.namprd03.prod.outlook.com (2603:10b6:408:131::22) To BN8PR12MB3108.namprd12.prod.outlook.com (2603:10b6:408:40::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3108:EE_|CH0PR12MB8531:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c2762d4-3f63-46b2-3aa2-08dc2c02e3cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K0PTf2cT2cU04hi4iVY8oQ2AWO8QRTYm4a7OJwRnpyrqEcSO06TJBJ8thEOVd9nDMfMtCPd1QXjw9/xr2q6su9wum2WM4U/GFtE4dPJlFLEOyKJqMHaST3ia2NTQAqzkMedOtKzkbGcO3W2+10TcinNjxlex/uW1L1PPnEU11fNPjBoB3gWqFJMME3+YEiEKSeW5fCqQz0ZDSo6z3IV6GByTrxfS+xTZg7wUiIRXrcibKSdGssSsPmzIjiP4G+KSraoWF0DpwcsqMAI6WOfm3yE6zs8Pmn1y3F8aA5GArCij04/WuyJEY1yYM+TvZK22+XGMdUIO0mb7q1edhi+kXTMynY7K5VJGYBaKMz057fB4fwBf4tXnKvZuaoPV98O+iTu+8K0gAD+jBG1nKENxttkDzNJTm+QGO/VzgwE9B7wA4Rr93Qu0jwCn28CpKQO9/HogZW4f4t0kpyH2T5kUcK4MG/qZQPEKVjOcA1YElQlmbxh4vF+dinAKygtpc8R9Cw2D5Iu9XfzCvAgVbNn9AcdVxTyr4VALSzwV0yl6Oi13Fzj2DkKpL0/I1v86tUvQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3108.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(136003)(396003)(376002)(39860400002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(316002)(66946007)(66476007)(110136005)(54906003)(66556008)(6636002)(31686004)(4744005)(2906002)(41300700001)(5660300002)(44832011)(8936002)(8676002)(6512007)(31696002)(86362001)(478600001)(6486002)(36756003)(53546011)(6506007)(2616005)(38100700002)(83380400001)(26005)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d1dwM3MzR2N0M1lVQTUxV2F3eUp2L3kvZ1VtZi9rQW03dWxFa3RoenRmU3Jh?= =?utf-8?B?N2Ixc21vRkp0TE5QRHhYdk9KTTRqZnV4UU51Uyt5bHo4ZTYzbkg0MDZCNis2?= =?utf-8?B?Q29rZkhpWnJndVhyUWRVeE1yQ3VzbjZkZ2JYeldOUDZoN3dGaWpvSG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TMWJrb1NzSk4ybXVSWlR1WFhCa0FXRnFYT3BV?= =?utf-8?B?eEhmOVZSMnJLSzVtYitIZlpQYmdqYUk2cnc1VEVoYWJtRHUrTEQrd3liWFMx?= =?utf-8?B?L1RvZXQ1OW5JMDhsYTlsTmI0REQyL01hKzU3Z0MzZUdTMmpYWnF4Wkk3ZDJX?= =?utf-8?Q?VC0yF35jbQ9JCibhdMRNQQDwU?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c2762d4-3f63-46b2-3aa2-08dc2c02e3cb X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3108.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2024 19:43:30.4652 (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: yWvNqHQQPUGnRmiAcUAyNoxOJMOkkhv27ps9G5u5c71URJoTKCDnWlvIfXq/xUcK7gkfMWc5lFj6EgM1t5vR4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8531 On 2/12/2024 1:58 PM, Luck, Tony wrote: >> I need to look more at the genpool code, but I thought I'd ask too. > > Yazen, > > gen_pool_add_owner() is the code that adds an extra chunk to an existing genpool. > > This bit doesn't look obviously safe against a #MC at the wrong moment in the middle of > the list_add_rcu() > > spin_lock(&pool->lock); > list_add_rcu(&chunk->next_chunk, &pool->chunks); > spin_unlock(&pool->lock); > Thanks Tony. So the concern is not about traversal, but rather that the #MC can break the list_add_rcu(). Is this correct? Thanks, Yazen