Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1412427imm; Thu, 12 Jul 2018 01:10:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfH85ODkcO8yFv0Ljv4AIBIkjt4yxBhd1blYW0YW7xMxRCyBQTER3pOoJwi4DthpnMhFlty X-Received: by 2002:a17:902:e101:: with SMTP id cc1-v6mr1195674plb.96.1531383016275; Thu, 12 Jul 2018 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531383016; cv=none; d=google.com; s=arc-20160816; b=SJfUzvsGH/E4XfOSQ5iNRIyBr7yb/h9aPjToUMGci9GEkXFHm9jEHmB13X6wUe9X4H 4ijvvwD5AVFsrKdbCVohoRkdxzzpuHWKpQKMSbVpYRQ2CaRLu2EWYBjRihHzU9xvxyYo KDouTDyGPPdga7NmyMQem4NDFJ1ztszNj7GFbN7Y0q6EDGztV8Y4GU6F7rD+Mr6+buGj D6cq0+cv47796zd2VkE81MAtJu3qQquqkJTsGXjU9PbrHVBamt3RpQkLeElNuFlnyzTO K0YgpOF9mWcw4yZCZjQsg8LU816my5plDZfMwAZQGhFCN1i9y7pjRuKSCkVnZUNrMc/Q uihA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/jKvyVr/OdfEdHc53b0y3anKwPRFk1eidFvaQkgs/L8=; b=j+UoHRPiqWyOKpGJpYgdT9a9Ul0O42+wx5mfFYkh7jDg7wYt2x6Au+UeTR4JRe5Hup Si2gn/Llr63UdiDmgQr7d8I2wjQpwOb2kF+Hv8HrVWmagoUs7pzEJi3ZDZajQgTFIpgp 74poIKxH/xcTNYjuTD+YtIBBJLY+GaCGhGhSL3Fp/koY91b6shBvVSaBLqsrzN81us9Y JjTGWJC6UPjxhp24TdFZgWI1jX4hUhhMBrmtwI7xIKtIM47HSaLotxZ6TV2TdgZ7wGez DLO0njuh+RmXThIhakVmYXeRW36LEqNv3M5RLNGDB3yA3tOCrUb/REIIl2gifPC5bxRG 3wqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si8227899pgg.347.2018.07.12.01.10.00; Thu, 12 Jul 2018 01:10:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732483AbeGLIQk (ORCPT + 99 others); Thu, 12 Jul 2018 04:16:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57604 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbeGLIQk (ORCPT ); Thu, 12 Jul 2018 04:16:40 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6C85NVi059019 for ; Thu, 12 Jul 2018 04:08:12 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k61xd377n-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Jul 2018 04:08:12 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Jul 2018 09:08:11 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Jul 2018 09:08:09 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6C8886E42336316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Jul 2018 08:08:08 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CAEC652063; Thu, 12 Jul 2018 11:08:29 +0100 (BST) Received: from JARVIS.in.ibm.com (unknown [9.124.35.95]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id A476852054; Thu, 12 Jul 2018 11:08:28 +0100 (BST) From: Kamalesh Babulal To: Miroslav Benes , Josh Poimboeuf Cc: Kamalesh Babulal , Jiri Kosina , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] livepatch: Remove reliable stacktrace check in klp_try_switch_task() Date: Thu, 12 Jul 2018 13:35:06 +0530 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18071208-0008-0000-0000-000002523E73 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071208-0009-0000-0000-000021B87606 Message-Id: <1531382706-9732-1-git-send-email-kamalesh@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-12_03:,, 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=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=973 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807120083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Support for immediate flag was removed by commit d0807da78e11 ("livepatch: Remove immediate feature"). We bail out during patch registration for architectures, those don't support reliable stack trace. Remove the check in klp_try_switch_task(), as its not required. Signed-off-by: Kamalesh Babulal --- kernel/livepatch/transition.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c index 7c6631e693bc..5bc349805e03 100644 --- a/kernel/livepatch/transition.c +++ b/kernel/livepatch/transition.c @@ -310,13 +310,6 @@ static bool klp_try_switch_task(struct task_struct *task) return true; /* - * For arches which don't have reliable stack traces, we have to rely - * on other methods (e.g., switching tasks at kernel exit). - */ - if (!klp_have_reliable_stack()) - return false; - - /* * Now try to check the stack for any to-be-patched or to-be-unpatched * functions. If all goes well, switch the task to the target patch * state. -- 2.7.4