Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84D79C433FE for ; Thu, 6 Oct 2022 03:37:35 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MjcZk0Cx0z3cdY for ; Thu, 6 Oct 2022 14:37:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=d5zZcJYO; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=bgray@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=d5zZcJYO; dkim-atps=neutral Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MjcYZ3JBFz2xH9 for ; Thu, 6 Oct 2022 14:36:34 +1100 (AEDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 296339KC025202; Thu, 6 Oct 2022 03:36:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=k3gi/6UdRzypveZo1b+IIAFKwqF/Q19MkNTpmN/R3HI=; b=d5zZcJYOpIW6QL+3IxArd7G7ArQPhcouVaQ08C2FKmvRWd85sKtbHrVTVfrVUdQTaEdJ O5uT49QDPaBwi1KeKESxzwJ3YEEUMsR5Q//b0NrtYdOb9+37SrWhPUZoRrJ4DS3Kzlnn 52zfgW9F612ZH8YJckPuSVPawr+QsWhNQija7RtU4rbAuyZUoitgehXvjFlP4M/usfrP yAPK4FywKAxJWs0KAXnesFllexAZ1zpf8S4rZ42+b6IAqGPmSIQVAzDpe8+y7dQ0JeX6 hbi+jZbkWKSP4kfFB46tuVG50Hin/JAe1iJ2jMqVLcYEuLvqn02s3ajiB3uXq7nAvcVO Eg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k1ps2rt86-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Oct 2022 03:36:18 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2963R4oT024759; Thu, 6 Oct 2022 03:36:18 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k1ps2rt7n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Oct 2022 03:36:18 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2963aGUv010360; Thu, 6 Oct 2022 03:36:16 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 3jxd696chj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Oct 2022 03:36:16 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2963aES748103910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Oct 2022 03:36:14 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2D1894C040; Thu, 6 Oct 2022 03:36:14 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA0A94C046; Thu, 6 Oct 2022 03:36:13 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 6 Oct 2022 03:36:13 +0000 (GMT) Received: from li-0d7fa1cc-2c9d-11b2-a85c-aed20764436d.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 0CB3360245; Thu, 6 Oct 2022 14:36:06 +1100 (AEDT) Message-ID: <6642c9085a1b98a4aa8a03383b71d070881afe45.camel@linux.ibm.com> Subject: Re: [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function From: Benjamin Gray To: Christophe Leroy , "linuxppc-dev@lists.ozlabs.org" Date: Thu, 06 Oct 2022 14:36:05 +1100 In-Reply-To: <8625116b-4a0a-a9fe-fe81-47c23a58c91f@csgroup.eu> References: <20221005053234.29312-1-bgray@linux.ibm.com> <20221005053234.29312-2-bgray@linux.ibm.com> <8625116b-4a0a-a9fe-fe81-47c23a58c91f@csgroup.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IYsfPuqebkweBlAtngmkVSA91er_Plq6 X-Proofpoint-ORIG-GUID: XZ0s2UWTKQ7Qw-4N2eT5Y6VPD0Rf28bw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-05_05,2022-10-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=860 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210060020 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "ajd@linux.ibm.com" , "peterz@infradead.org" , "npiggin@gmail.com" , "ardb@kernel.org" , "jbaron@akamai.com" , "rostedt@goodmis.org" , "jpoimboe@kernel.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 2022-10-05 at 17:55 +0000, Christophe Leroy wrote: > I'm on business trip this week so I can't test it on hardware, but > the=20 > generated code looks horrid and sub-optimal, with a stack frame and > so=20 > many registers saved into it. That's mpc885_ads_defconfig built with > GCC=20 > 12, without modules without stackprotector with 4k pages. Yeah, that definitely wasn't supposed to happen. I was looking at the 32 and 64 bit machine code closely while actively writing it, but I must have refactored it badly when cleaning up for submission. It was supposed to automatically be inlined, leaving it identical to the original on 32-bit. Given inlining is desirable here, and 64-bit inlines anyway, I think I should just mark __patch_memory with __always_inline.