Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3158964pxj; Mon, 7 Jun 2021 04:00:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcVHzL4CXO/qQ1JD9yb72a9vX8gcPIA9TpluOx2uBDrXFjt2IVI1z5um+A87e+TRL/mALr X-Received: by 2002:a17:906:d85:: with SMTP id m5mr17472264eji.55.1623063644675; Mon, 07 Jun 2021 04:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623063644; cv=none; d=google.com; s=arc-20160816; b=SwNxnwkgt3AsB2tOXnow71Jrd9k7CW6JijjD8M2rOm7CRig4ENTHO+unpcsIxeBGBP yjgdIdqtKv2plMj1qRYLiBFRS1PAwSZHcmbkV814QwGcQEzyNPMdE5T8tIo682UvIi7g lzqGDAbJTVN8bsdFmDxnU/LiKwBykiAbIfGIR6SIZ/D7xLo7E89cZnK2GHzl7ttesuiq FzsLb2VuBNjsXqvIhiVb/tHGr84vYPLi0dSMSkuAMVFlV3zPY2mv6C1xqVE6kYvSCZzc 4Cr68dT1C1QlU967WvSHdRFO5iUTqRyS15yDILue3uSKGoUiPVvI2FE1YqJt1l2wkLno LVZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4AN2CA0GuJHNAFTpN0s5mVh7V1bwkgGdEaCEZc4EmZA=; b=YMN6/lPucOb4dlBHDL6PoM50kjKcHNHBBZJErUfDnRaXQZ99tNLh17we5cwCcR/stT Py5UZqR1ebCPcXipAYySN5LlN7d2g23Z7LnYr2wvwKOV7ngzUXucNEKRYOzP/FQ30VRS 1As9Sq6MrBWT/jEFpc9KN2W8pkAKOsNu+9rekJ3C22VlNjNr03Zy7oTp/zEdxJrVJEWH uoaw4rV8XKe81wfHaUSjLuh25klrLTXd6GKYu4izzBCeJlH7Sz3mzQgvQq1m08YjDdsf nQfhrzesDHt1Tenk6GKvp6G5r3kU/X78uqPERfLUHR4hdaUVrGvuZm9fJzNAZN+KVI7b AgVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nah15DsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t27si11322882ejd.372.2021.06.07.04.00.21; Mon, 07 Jun 2021 04:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nah15DsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230465AbhFGLAc (ORCPT + 99 others); Mon, 7 Jun 2021 07:00:32 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:21720 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbhFGLAb (ORCPT ); Mon, 7 Jun 2021 07:00:31 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 157AXHkO195101; Mon, 7 Jun 2021 06:58:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=4AN2CA0GuJHNAFTpN0s5mVh7V1bwkgGdEaCEZc4EmZA=; b=nah15DsKNTSEuw1FTKHDGfW0Dq1Nf57uBsw4VRhljFlvewI/gak/ma4R0KE7NixQk7Mk 2WwlSr1geKwijnXVqT2jnxDx6mahBui0nvEaZ7/yoyAUEzSXR/4ZtYzr9zq1C1uw0H4E g9jChdlMALCtP+DQmgQKq7D8cLeHzvax7yVBpVjS+EeeQYqmjssnanYtuji6aAfKqixs Gf+IQEje/PEnkxHZ3LyOsYK6aCGOsLxTrvIRgzHUokvVi1HH6io5PgP/Oirc+7gZ6pGV gXeKR8jldsuSJwiktYRbYx6XHbZ8PALUIV1LCe/915IbjDqyyvoAwf6Nv0bS1/z1TbGp +Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 391db4gaab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Jun 2021 06:58:02 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 157AguL4034323; Mon, 7 Jun 2021 06:58:01 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 391db4ga9p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Jun 2021 06:58:01 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 157ArLHE026321; Mon, 7 Jun 2021 10:57:59 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 3900hhruud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Jun 2021 10:57:59 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 157AvuLE31261016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Jun 2021 10:57:56 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F19DE4203F; Mon, 7 Jun 2021 10:57:55 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 58ECA42049; Mon, 7 Jun 2021 10:57:55 +0000 (GMT) Received: from osiris (unknown [9.171.17.10]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 7 Jun 2021 10:57:55 +0000 (GMT) Date: Mon, 7 Jun 2021 12:57:53 +0200 From: Heiko Carstens To: Barry Song Cc: akpm@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, gor@linux.ibm.com, borntraeger@de.ibm.com, naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, mhiramat@kernel.org, linux-s390@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v2] kprobes: remove duplicated strong free_insn_page in x86 and s390 Message-ID: References: <20210607091854.31580-1-song.bao.hua@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210607091854.31580-1-song.bao.hua@hisilicon.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oDpWfoLYqSGBbqOS0oP66RlJBZuwVMXC X-Proofpoint-ORIG-GUID: fSLjZx7Pw9a_vgp9UKRPpWUchr74zUMb X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-06-07_07:2021-06-04,2021-06-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=906 phishscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106070081 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 09:18:54PM +1200, Barry Song wrote: > free_insn_page() in x86 and s390 are same with the common weak function > in kernel/kprobes.c. > Plus, the comment "Recover page to RW mode before releasing it" in x86 > seems insensible to be there since resetting mapping is done by common > code in vfree() of module_memfree(). > So drop these two duplicated strong functions and related comment, then > mark the common one in kernel/kprobes.c strong. > > Cc: Christoph Hellwig > Signed-off-by: Barry Song > --- > -v2: > remove free_insn_page in s390 as well and remove the __weak in common > code according to Christoph's comment; > > arch/s390/kernel/kprobes.c | 5 ----- > arch/x86/kernel/kprobes/core.c | 6 ------ > kernel/kprobes.c | 2 +- > 3 files changed, 1 insertion(+), 12 deletions(-) For the s390 part: Acked-by: Heiko Carstens