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: <aa79d98a0908112243u1a5ccb33wc51a3e9ace3e97df@mail.gmail.com>
Date:	Wed, 12 Aug 2009 09:43:32 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Nick Piggin <npiggin@...e.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Manfred Spraul <manfred@...orfullife.com>,
	Nadia Derbey <Nadia.Derbey@...l.net>,
	Pierre Peiffer <peifferp@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 4/4] ipc: sem optimise simple operations

On 8/12/09, Nick Piggin <npiggin@...e.de> wrote:
> On Wed, Aug 12, 2009 at 12:07:11AM +0400, Cyrill Gorcunov wrote:
>> [npiggin@...e.de - Tue, Aug 11, 2009 at 09:09:06PM +1000]
>> ...
>> | +static void update_queue_simple(struct sem_array *sma, ushort semnum)
>> | +{
>> | +	if (unlikely(sma->complex_count)) {
>> | +		update_queue(sma);
>> | +	} else {
>> | +		struct sem *sem;
>> | +
>> | +		sem = &sma->sem_base[semnum];
>> | +		if (sem->semval > 0)
>> | +			update_negv_queue(sma, sem);
>> | +		if (sem->semval == 0)
>> | +			update_zero_queue(sma, sem);
>> | +	}
>> | +}
>> | +
>> ...
>>
>> Hi Nick,
>>
>> mostly probably miss something but can't we trgigger BUG_ON at updating
>> zero queue if semaphore was created with undo list and via new operation
>> reached -ERANGE on undo value?
>>
>> Again, I could be missing something or plain wrong. Just a thought.
>
> Hi Cyrill,
>
> Thanks for looking... Hmm, you mean BUG_ON(error) due to try_atomic_semop
> returning -ERANGE? I think it should not be possible because it should
> prevent any operation from bringing the undo list to -ERANGE so then any
> operation which does not modify the sem value should not go out of range
> I think.
>
> (I think it would be a bug if we ever return -ERANGE for a wait-for-zero
> operation).
>
> Thanks,
> Nick
>
Thanks for explanation, Nick! I meant exactly that.
--
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