Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2196682rdb; Fri, 8 Dec 2023 00:36:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6Q34asLsY2oPTUlGFAqJD0WlCYps7nYM6JY0Jno2zIqq51NEibFA6NUlTWmvWJkOS1Aop X-Received: by 2002:a05:6a00:1914:b0:6cb:db73:a6db with SMTP id y20-20020a056a00191400b006cbdb73a6dbmr3513680pfi.21.1702024575954; Fri, 08 Dec 2023 00:36:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702024575; cv=pass; d=google.com; s=arc-20160816; b=GsVm13nzPf63XjLIgP+zbXBnB9A5uF1FMVfn5OWTi2KMmJTdF3NhjEx40a9B7Ovszp TtU5snJSVJYm2drYgUSI3XjxsIV3GRaD64T8kVp6i79YE1L2k5ohN0VIMY71AFO3PCWs NGunIA/SjKpXpH0VrhC8rDkz1ToM/yGvqawPeyEtZl7hVrQ5glPTflfF9sahgynVz+pV 4ng5eTPdoFtdQsLhhGJc9BFxBA/sm+N7+vNKC6RHs28XhDjpyOpJYvt1i35Uif2yec4y vwAZTH/PcLtk+6bAmQEFA/EXkgz9pFZAb0Y1ByU/IetsoRvmz4VlliopVavNg3xNzkMt gH4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0PS1qsjAyi7LAUUUwdL7u90c8gVHA7BVFt0QFU/t1Hc=; fh=x4l+9ytSQjmtz6nfrq8b1+5vC/6ZDn86qvNdch0IzD8=; b=UpTSbQW/MwDbBud9bMPfEiUwpSr2JfdVCFRcBT/8Nrlmea4xoyY3xIVmEHSyjOUdce EZj6wULXDudCw+qN3jOjzHzi2/SlwBrcHY+kjT0DHy93k160GKA268vbszSeth/6DboW hnQYiPem9tTqsLkkodJ5WrkwvwvuK/PdW+lxV1MxrHcuszTOL0xNbSKWvfIRPSYPYzwc CTS+m97fHcdEdhJ96eQwynTypNU/B1gkSIb2sJShLjBmAjoBOzaSR/Oc81ZtXZ0urPWt UzXnfKotL72E+stIB1LTEsxWORD7KLK7QWtu6Za+fYexBwgfD8mdz/1pY2M0FflOKRc+ xDXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=qYSUk+S6; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=windriver.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y18-20020a634b12000000b005c6259da621si1152349pga.555.2023.12.08.00.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 00:36:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=qYSUk+S6; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=windriver.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 846DC8089A0D; Fri, 8 Dec 2023 00:35:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573357AbjLHIfW (ORCPT + 99 others); Fri, 8 Dec 2023 03:35:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573331AbjLHIfV (ORCPT ); Fri, 8 Dec 2023 03:35:21 -0500 Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0D481724 for ; Fri, 8 Dec 2023 00:35:27 -0800 (PST) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3B84PALO016297; Fri, 8 Dec 2023 08:35:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=date:from:to:cc:subject:message-id:references:content-type :in-reply-to:mime-version; s=PPS06212021; bh=0PS1qsjAyi7LAUUUwdL 7u90c8gVHA7BVFt0QFU/t1Hc=; b=qYSUk+S6xMvo5uZOKv3lWznkex0GDeP3ree CU0+LJuGreUJ1S9mEjj5z1HSLgO5p4OuuzdwgMZgrKi8e+lRat0Kw48Uwz04/cMQ Q8T754gLI0l0xbFdLprUzmbSZhjsREsc4M1SCRxbB9LYHHA9n4CqpVj/X9dn/Z4w 37ezUwixG84CsVW7/iGXYR7ZPofRxIzZB1H/lFjBWeXnt9Az8jHqRe13nabkuX72 dp2mpM+snE3ywnjHT4MOzx+0A8Svb/cpVGnpoWAZyOFAmF50/506TCTCUZJXqSza YvbarWRk37SXy+1f1Bndr1gwvx74wB5stUCpNLCDuroD111UBJA== Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3utd53tn6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 08:35:11 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ev51ARw+G7yoRHPLiqjPXj1g2GZrn5W425TE216IYOlGsxcESr7b/Sn6lE7AisQBf1pElgaFsDCK8SRy9/vQYazGXGy9OJyOZaELbb2LnPE29tmqMNAsgoIJoC7wA4O5gapPcQpfUvMbXsqU7L5uvabECumQSQSL5OGIgfGcBOdfC4OLvIFyN7+McBucpXvXckxcXOzy0fnNiN1s3XjqUi76Y5q4HeuADc8oKDWbzuKlh5VriYlwHCjrqqF2mk0gg7yOOCtGAgLbAUq7duD2sSQBcC+z4KDo4faZjX1Ghwafg/J6kDPSmdH8zOZQljqS0cNlqjXfP43FFBCGauV/ig== 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=0PS1qsjAyi7LAUUUwdL7u90c8gVHA7BVFt0QFU/t1Hc=; b=ZET3yriHt1W9kaxulN7fN9ewdbuZeFaVYGypkk+Kajx8rr5Pm2UQbJE+aw+6x4Y225Drw7eOQycP/TI3wsbMqTxUvDpcxBUiRh63gU/oe1ivgJEdgMjlr8znLo1AiN9gRov3QyE+TV4I4PSlA1FU2i7QOQkgzfs5+8FOu61Aa28sGnDlVQdmkNoQ2ioJnw13fMVbBHvQmngQaSXNyYxvUVaS36gvPrhZ+jwtkWbL2CYNIlkQaqwbmUqHlzRPZTm6i7Lde6mVaZBA3JZ5gmrWK2f8M5LsEetm0whCEJBbeq7oqjynHaSOQ3GTLk16oiAL+IYJ8wzevSxxh1dSfLkjDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA0PR11MB7378.namprd11.prod.outlook.com (2603:10b6:208:432::8) by SJ2PR11MB7599.namprd11.prod.outlook.com (2603:10b6:a03:4c6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 08:35:05 +0000 Received: from IA0PR11MB7378.namprd11.prod.outlook.com ([fe80::5548:b43c:f9ac:7b95]) by IA0PR11MB7378.namprd11.prod.outlook.com ([fe80::5548:b43c:f9ac:7b95%4]) with mapi id 15.20.7068.027; Fri, 8 Dec 2023 08:35:04 +0000 Date: Fri, 8 Dec 2023 03:35:01 -0500 From: Paul Gortmaker To: Thomas Gleixner Cc: LKML , x86@kernel.org, regressions@leemhuis.info, richard.purdie@linuxfoundation.org, regressions@lists.linux.dev Subject: Re: [patch 0/2] x86/alternatives: Prevent crash in NOP optimizer Message-ID: References: <0adb772c-e8d2-4444-92b0-00cbfdaf1fac@leemhuis.info> <87r0k9ym0y.ffs@tglx> <20231207193859.961361261@linutronix.de> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231207193859.961361261@linutronix.de> X-ClientProxiedBy: YT4PR01CA0095.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ff::18) To IA0PR11MB7378.namprd11.prod.outlook.com (2603:10b6:208:432::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PR11MB7378:EE_|SJ2PR11MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: 816522d2-6513-4a39-1fc1-08dbf7c893c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F7rcS7Ec9oBbiRseiAND+e/c2TkBBMWSQB2VU58ZCiLfYm8MaDYv1d+lfIK9DBGgasZ/3oZcdsUlBl5NwcJvU4t6y5zDpyj13cl88oo/sG1U7DBDkFZX3gcf1eRlJl0b6WEvMiOZadLjYRZLSnR/O2GAvQukqc0Vw+U+794jonggxf1uOU0dknPWYvYjNlINfnplfeyXT/6itA0FNVZAcwMXYnuj2s8/p+cfrEm0XTKaTigOj109/aIRWdTjPDDpvVhnscyQF7FGFOgLTt86lsGILBmH0R+WZE3zBxYnQuOx4/Bwl3tcFuwa4hBYKc7Ec/9wYkj8UAfa0PwmIVFtNt3bbykI6u9s/i76fZpcl3EOVm9n9IkNHL9qoEjhxcQqlTxzv+T1fOI/fRdyDFWpgFeATo3UmRgbbjyPsz5NWsWfwWaIKR1r+gIu2ebNJz0XwRf2ocs1cGe95vULLcgMcahoiFhiUzGoEjhc8fTQrl5q71Rdtcuhq/mWq20eQY82yvKKJNfS1yT6Wr64JiNaYUp0/1VU9S6tX18I+CUN44P7Dq3UjUDYcWMvs3IznJYS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA0PR11MB7378.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39850400004)(376002)(346002)(366004)(136003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(66946007)(38100700002)(86362001)(66556008)(66476007)(6916009)(6506007)(2616005)(26005)(83380400001)(36756003)(6666004)(41300700001)(6512007)(478600001)(6486002)(316002)(44832011)(4326008)(8936002)(8676002)(4744005)(2906002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wnvtNRUMIuSe5B+FvzFKX2kEkkW/c2k8xLwEzZfIpIE/nsgRVVHTUGYLCUb1?= =?us-ascii?Q?CS4OhyaN7wya6e261/vI2b9x/IX/MaQa+Q7gfTb89+sTbB+yRXkcJxcVfMci?= =?us-ascii?Q?X5hEzHCWbORwrlwb9Ygh+qOHgP1LcWoyH3geciqj1Dum5Wrb2ZyCTCDGaYfr?= =?us-ascii?Q?dozqHTDwqkWWnif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MXQ?= =?us-ascii?Q?NfhlY3mKejuzMCKMzuANYiAfkqzkwEH6a10EnbQKDWrkHfl/vSatGJdMm8nK?= =?us-ascii?Q?yJYV+zPTD9ERIpKV3Lb6c53ISeIvlGA1zRAqX9684humOXBrzl1kQhXlr3WY?= =?us-ascii?Q?57Ppj3lpO5a1tmZ06E958A4c1mwJjSU8YfpFsoWfSmsoMCwlATgQ3+YIEZ74?= =?us-ascii?Q?S910G9W36iVjlvFkXrQaLvHGC5R+kGbSyZhFHjU7HOIFBa5joENGY1z6x0RG?= =?us-ascii?Q?HeWHeW4qv0J1bf5tzyf42pEj+ZUfUuGffMrHI7xoyEAF9f2u23ffqEKuKO/D?= =?us-ascii?Q?BKRkiZbsENjF67l//pIrATF9z/tQDgDm8CpL6cBXD7ZsfBXulkthDhMDdXqk?= =?us-ascii?Q?x+HS7iZ1ACZ0qzaIGsPrEFOWbKIhlH9WGOXpfuuAKk9w1H7oMG7dubHu9wGG?= =?us-ascii?Q?8t7RdAu1zKDiK3hf3wLsdEUl0VxoplqdBJ7DUf7KJdVjXD6CQmqcRCgWIFNL?= =?us-ascii?Q?Dvy9zl2HM3/eGUtzX3k5xVEuE86bM+SVzrAv/gQyvVMPNqBuCLqXcmbKutxm?= =?us-ascii?Q?Zw=3D=3D?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 816522d2-6513-4a39-1fc1-08dbf7c893c1 X-MS-Exchange-CrossTenant-AuthSource: IA0PR11MB7378.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 08:35:04.8455 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hsIPFYoHVTxp8ZaKqE4mBxa1IvkIeUMyH7s9WyJsVQd0l23AJEAB3ymB6qVO2GPi74bywODM1pOwlbrQmrDyoXXDAVtLNWrTcS8vyBC66lo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7599 X-Proofpoint-GUID: SMh1aTmjfmDFYJvZ6dy4Dgcrg2iJcK1r X-Proofpoint-ORIG-GUID: SMh1aTmjfmDFYJvZ6dy4Dgcrg2iJcK1r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-16_25,2023-11-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 mlxlogscore=594 malwarescore=0 suspectscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312080070 X-Spam-Status: No, score=-0.9 required=5.0 tests=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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 08 Dec 2023 00:35:57 -0800 (PST) [[patch 0/2] x86/alternatives: Prevent crash in NOP optimizer] On 07/12/2023 (Thu 20:49) Thomas Gleixner wrote: > The following series addresses the regression report from Paul on behalf of > the yocto project. It turns out that the recent changes to alternatives > opened a race window where interrupts are enabled and NOPs are optimized in > place. An interrupt hitting into the modification will observe inconsistent > text and crash and burn. > > A 32bit QEMU crashes w/o these fixes reliably within about 50 boot > attempts. With the fix applied it survived close to 600 attempts by > now. I can confirm that - since I was already set up for it, I let it run overnight for about 1250 attempts. With an average of one in 200 that I was seeing before, I should have had around six fails. Didn't see one. > Thanks to Paul for providing all the information! On behalf of Richard and myself, thanks for the complex fix. Paul. -- > > Thanks, > > tglx > >