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>] [day] [month] [year] [list]
Date:	Mon, 3 Oct 2011 16:03:14 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Wei Yang <weiyang.kernel@...il.com>
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: One comment on the __release_region in kernel/resource.c

On Mon, Oct 3, 2011 at 15:35, Wei Yang <weiyang.kernel@...il.com> wrote:
> 2011/10/3 Geert Uytterhoeven <geert@...ux-m68k.org>
>> On Mon, Oct 3, 2011 at 12:24, KAMEZAWA Hiroyuki
>> <kamezawa.hiroyu@...fujitsu.com> wrote:
>> > On Sun, 2 Oct 2011 21:57:07 +0800
>> > Wei Yang <weiyang.kernel@...il.com> wrote:
>> >
>> >> Dear experts,
>> >>
>> >> I am viewing the source code of __release_region() in
>> >> kernel/resource.c.
>> >> And I have one comment for the performance issue.
>> >>
>> >> For example, we have a resource tree like this.
>> >> 10-89
>> >>    20-79
>> >>        30-49
>> >>        55-59
>> >>        60-64
>> >>        65-69
>> >>    80-89
>> >> 100-279
>> >>
>> >> If the caller wants to release a region of [50,59], the original code
>> >> will
>>                                              ^^^^^^^
>> Do you really mean [50,59]?
>
> Yes.
>>
>> I don't think that's allowed, as the tree has [55,59], so you would
>> release a
>> larger region that allocated.
>
> So you mean the case I mentioned will not happen?

Indeed, it should not happen.
Actually I'm surprised it doesn't return an error code.

> Actually, I believe every developer should pass the resource region which
> has been allocated.
> While if some one made a mistake and pass a region which is not allocated
> before and overlap
> some "BUSY" region?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ