From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9530C10F03 for ; Thu, 25 Apr 2019 03:32:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99B2121904 for ; Thu, 25 Apr 2019 03:32:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388979AbfDYDcN (ORCPT ); Wed, 24 Apr 2019 23:32:13 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50682 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388852AbfDYDcN (ORCPT ); Wed, 24 Apr 2019 23:32:13 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3P3SdnF050416 for ; Wed, 24 Apr 2019 23:32:12 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s32fbdc24-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 24 Apr 2019 23:32:11 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Apr 2019 04:32:09 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 25 Apr 2019 04:32:05 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3P3W4JU53018848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Apr 2019 03:32:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 98A3F4C046; Thu, 25 Apr 2019 03:32:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 51D524C044; Thu, 25 Apr 2019 03:32:03 +0000 (GMT) Received: from JAVRIS.in.ibm.com (unknown [9.124.31.152]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 25 Apr 2019 03:32:03 +0000 (GMT) Date: Thu, 25 Apr 2019 09:02:01 +0530 From: Kamalesh Babulal To: Miroslav Benes Cc: Josh Poimboeuf , Petr Mladek , Jiri Kosina , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task() References: <20190424085550.29612-1-pmladek@suse.com> <20190424085550.29612-4-pmladek@suse.com> <20190424155532.3uyxyxwm4c5dqsf5@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-TM-AS-GCONF: 00 x-cbid: 19042503-0012-0000-0000-00000313EF7E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042503-0013-0000-0000-0000214C472E Message-Id: <20190425033201.GC24416@JAVRIS.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-25_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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=998 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904250022 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 08:48:58PM +0200, Miroslav Benes wrote: > On Wed, 24 Apr 2019, Josh Poimboeuf wrote: > [...] > > > ret = save_stack_trace_tsk_reliable(task, &trace); > > > - WARN_ON_ONCE(ret == -ENOSYS); > > > + if (ret == -ENOSYS) { > > > + if (!enosys_warned) { > > > + printk_deferred(KERN_WARNING "%s: save_stack_trace_tsk_reliable() not supported on this architecture.\n", > > > + __func__); > > > + enosys_warned = 1; > > > + } > > > + return ret; > > > + } > > > > We already have a similar printk in patch 1, so is this warning really > > needed? > > I don't think so. pr_warn() in klp_enable_patch() should be enough in my > opinion. > > However, > > if (ret == -ENOSYS) > return ret; > > would be justified, wouldn't it? > Probably an one line comment on why we return, will be helpful. -- Kamalesh