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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Feb 2018 17:59:30 +0800
From:   Chris Mi <chrism@...lanox.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Cong Wang <xiyou.wangcong@...il.com>,
        Khalid Aziz <khalid.aziz@...cle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: Fwd: Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running
 selftest

Hi Matthew,

Sorry for the late response. I'll add the idr test cases for the new 
APIs ASAP.

Thanks,
Chris

On 2/24/2018 10:46 AM, Matthew Wilcox wrote:
> On Sat, Feb 24, 2018 at 01:49:35AM +0000, Chris Mi wrote:
>> To verify this patch, the following is a sanity test case:
>>
>> # tc qdisc delete dev $link ingress > /dev/null 2>&1;
>> # tc qdisc add dev $link ingress;
>> # tc filter add dev $link prio 1 protocol ip handle 0x80000001 parent ffff: flower skip_hw src_mac e4:11:0:0:0:2 dst_mac e4:12:0:0:0:2 action drop;
>> # tc filter show dev $link parent ffff:
>>
>> filter pref 1 flower chain 0
>> filter pref 1 flower chain 0 handle 0x80000001
> I added these tests to my local tree for now.
>
> diff --git a/tools/testing/radix-tree/idr-test.c b/tools/testing/radix-tree/idr-test.c
> index 44ef9eba5a7a..28d99325a32d 100644
> --- a/tools/testing/radix-tree/idr-test.c
> +++ b/tools/testing/radix-tree/idr-test.c
> @@ -178,6 +178,29 @@ void idr_get_next_test(int base)
>   	idr_destroy(&idr);
>   }
>   
> +void idr_u32_test(struct idr *idr, int base)
> +{
> +	assert(idr_is_empty(idr));
> +	idr_init_base(idr, base);
> +	u32 handle = 10;
> +	idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> +	BUG_ON(handle != 10);
> +	idr_remove(idr, handle);
> +	assert(idr_is_empty(idr));
> +
> +	handle = 0x80000001;
> +	idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> +	BUG_ON(handle != 0x80000001);
> +	idr_remove(idr, handle);
> +	assert(idr_is_empty(idr));
> +
> +	handle = 0xffe00000;
> +	idr_alloc_u32(idr, NULL, &handle, handle, GFP_KERNEL);
> +	BUG_ON(handle != 0xffe00000);
> +	idr_remove(idr, handle);
> +	assert(idr_is_empty(idr));
> +}
> +
>   void idr_checks(void)
>   {
>   	unsigned long i;
> @@ -248,6 +271,9 @@ void idr_checks(void)
>   	idr_get_next_test(0);
>   	idr_get_next_test(1);
>   	idr_get_next_test(4);
> +	idr_u32_test(&idr, 0);
> +	idr_u32_test(&idr, 1);
> +	idr_u32_test(&idr, 4);
>   }
>   
>   /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ