From patchwork Tue Nov 14 09:29:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamalesh Babulal X-Patchwork-Id: 837760 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybj3S063Kz9s7m for ; Tue, 14 Nov 2017 20:32:52 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3ybj3R6N2fzDqxp for ; Tue, 14 Nov 2017 20:32:51 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=kamalesh@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 3ybhzl5PR9zDqlR for ; Tue, 14 Nov 2017 20:29:39 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAE9TZWn118006 for ; Tue, 14 Nov 2017 04:29:37 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e7un4xnc6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 14 Nov 2017 04:29:36 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Nov 2017 09:29:27 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 Nov 2017 09:29:24 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAE9TOel5177706; Tue, 14 Nov 2017 09:29:24 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1290AE056; Tue, 14 Nov 2017 09:22:50 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0F24AE04D; Tue, 14 Nov 2017 09:22:49 +0000 (GMT) Received: from localhost.localdomain (unknown [9.40.192.198]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 14 Nov 2017 09:22:49 +0000 (GMT) From: Kamalesh Babulal To: Michael Ellerman Subject: [PATCH v4 0/3] ppc64le: Add REL24 relocation support of livepatch symbols Date: Tue, 14 Nov 2017 04:29:07 -0500 X-Mailer: git-send-email 2.9.3 X-TM-AS-GCONF: 00 x-cbid: 17111409-0040-0000-0000-0000040E0AF7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111409-0041-0000-0000-000020B0BD4E Message-Id: <20171114092910.20399-1-kamalesh@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711140129 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Kamalesh Babulal , Josh Poimboeuf , live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This patchset drop the approach of creating new stub type for livepatch symbols and offloads the issue of handling local function becoming global to kpatch tool via gcc-plugin. In function restore_r2(), a check for sibling call is added and also improves the error message on unexpected op-code. v4: - Drop creation of stubs for livepatch symbols and offload solution to kpatch tool. - Introduce check for sibling call, when restoring r2 after branch. (Josh) - Improve error message in restore_r2(). (Josh) v3: - Defined FUNC_DESC_OFFSET to calculate func_desc offset from struct ppc64le_klp_stub_entry. - Replaced BUG_ON() with WARN_ON() in klp_stub_for_addr(). - Major commit message re-write. v2: - Changed klp_stub construction to re-use livepatch_handler and additional patch code required for klp_stub, instead of duplicating it. - Minor comments and commit body edit. Josh Poimboeuf (2): powerpc/modules: Don't try to restore r2 after a sibling call powerpc/modules: Improve restore_r2() error message Kamalesh Babulal (1): kernel/modules: Add REL24 relocation support of livepatch symbols arch/powerpc/kernel/module_64.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)