lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33b1d13e-a13c-44e0-bae6-3d8394892bbc@huawei.com>
Date:   Mon, 28 Jun 2021 19:09:18 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Heiko Carstens <hca@...ux.ibm.com>
CC:     Arnd Bergmann <arnd@...db.de>, <linux-arch@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Vasily Gorbik <gor@...ux.ibm.com>,
        "Christian Borntraeger" <borntraeger@...ibm.com>,
        <linux-s390@...r.kernel.org>
Subject: Re: [PATCH 7/9] s390: kprobes: Use is_kernel() helper


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 <hca@...ux.ibm.com>
>> Cc: Vasily Gorbik <gor@...ux.ibm.com>
>> Cc: Christian Borntraeger <borntraeger@...ibm.com>
>> Cc: linux-s390@...r.kernel.org
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
>> ---
>>   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!
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ