Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3415878pxv; Mon, 28 Jun 2021 04:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy22vOTysPJx5cLm9rDGr17BbaMxm9inB6JhRVZ960nEXuDG/RTZRd2iwSnan1cneZR1otO X-Received: by 2002:a17:906:1284:: with SMTP id k4mr15877034ejb.25.1624878690705; Mon, 28 Jun 2021 04:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624878690; cv=none; d=google.com; s=arc-20160816; b=iXmm0A/An0rxIffgnqL84cFfUkUT1+XoNCQmkeCpp6YJBoJTF3R17Y8jobwgLb9U37 ERP7P/6/STSq5brxSxui40N7smlYSu5Vnoiinmz2/dJdxswvrvWocsdTdL3/Mz23zgb8 EAhIq+nB84+9um9i9rzF+ddnNnmCxFx324fGnqq1Bl3uzovH+DzUpkW0svMoojbsu+ln PO7q99LrKJSvPWwe1hHHVjhgLtxidXvZSv3D/6+CXqbLGGAud0DeCKsgMbmP/lOKVEBw n4InO2cAIdt+WgBelcAaCw91IksxO9rdy3ZOOIYYxk7qvacwx5MQTsGCtEFQaeGLjcNQ 2XWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=D7+xp13zH1h2Ho1HWHXWyw2JK1uJRexDI71U1y1x27c=; b=aPRJjgoeQLr6wcYaV+PiPLts+ZjIXkWVTUdbUrYycOer+rx39ZjNJ/13W+1z0l7OGC NzM3xWJW39vWOMceKS+x/ARBrjwDnlNmxd0jwZe8KXunIDnryRBkFKxKj4XP4tdU5MSB XOduZrsGAsRSpGTul7ooOpGDsNMDD6fuYjSWbtsBueLT5CWsxbHYMWO34+YKMAVEX0xD wOw2nKN928jWHttpyEhxe/et71yz47JGZXhZIc+R68aphf50gipGEsN6FwKZsIUvMRuX ho/0sFaCVvTMkU572+yXMLU4dvQ6cRPPs1mGQg7voh3HBgbuC856o//QJU80apXsmvp5 x46g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si13004196ejc.221.2021.06.28.04.11.06; Mon, 28 Jun 2021 04:11:30 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232803AbhF1LLs (ORCPT + 99 others); Mon, 28 Jun 2021 07:11:48 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5819 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232781AbhF1LLq (ORCPT ); Mon, 28 Jun 2021 07:11:46 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GD4VV3Ky7zXjFY; Mon, 28 Jun 2021 19:04:02 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 28 Jun 2021 19:09:19 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 28 Jun 2021 19:09:19 +0800 Subject: Re: [PATCH 7/9] s390: kprobes: Use is_kernel() helper To: Heiko Carstens CC: Arnd Bergmann , , , Vasily Gorbik , "Christian Borntraeger" , References: <20210626073439.150586-1-wangkefeng.wang@huawei.com> <20210626073439.150586-8-wangkefeng.wang@huawei.com> From: Kefeng Wang Message-ID: <33b1d13e-a13c-44e0-bae6-3d8394892bbc@huawei.com> Date: Mon, 28 Jun 2021 19:09:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/28 18:02, Heiko Carstens wrote: > On Sat, Jun 26, 2021 at 03:34:37PM +0800, Kefeng Wang wrote: >> Use is_kernel() helper instead of is_kernel_addr(). >> >> Cc: Heiko Carstens >> Cc: Vasily Gorbik >> Cc: Christian Borntraeger >> Cc: linux-s390@vger.kernel.org >> Signed-off-by: Kefeng Wang >> --- >> arch/s390/kernel/kprobes.c | 9 ++------- >> 1 file changed, 2 insertions(+), 7 deletions(-) > ... >> -static inline int is_kernel_addr(void *addr) >> -{ >> - return addr < (void *)_end; >> -} >> - >> static int s390_get_insn_slot(struct kprobe *p) >> { >> /* >> @@ -105,7 +100,7 @@ static int s390_get_insn_slot(struct kprobe *p) >> * field can be patched and executed within the insn slot. >> */ >> p->ainsn.insn = NULL; >> - if (is_kernel_addr(p->addr)) >> + if (is_kernel(p->addr)) >> p->ainsn.insn = get_s390_insn_slot(); >> else if (is_module_addr(p->addr)) >> p->ainsn.insn = get_insn_slot(); >> @@ -117,7 +112,7 @@ static void s390_free_insn_slot(struct kprobe *p) >> { >> if (!p->ainsn.insn) >> return; >> - if (is_kernel_addr(p->addr)) >> + if (is_kernel(p->addr)) >> free_s390_insn_slot(p->ainsn.insn, 0); >> else >> free_insn_slot(p->ainsn.insn, 0); > Given that this makes sense its own, and I can't follow the discussion > of the patch series due to missing cc, I applied this to the s390 tree > - and also fixed up the missing unsigned long casts. Thanks Heiko, I got some tips(someone says, not send all patches to all the people who maybe not care about the other patches), so I only send this one to you,  but the patches is cc to all the maillist, and it could be check from https://lore.kernel.org/linux-arch/20210626073439.150586-1-wangkefeng.wang@huawei.com > > Thanks! > . >