Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Re: Today's patches (Julien ?LIE)
2. Re: Today's patches (Richard Kettlewell)
3. RE: Today's patches (Matt Seitz (matseitz))
----------------------------------------------------------------------
Message: 1
Date: Tue, 05 May 2015 21:11:05 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: Today's patches
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
Hi Richard,
> /* A magic number for the group.index file so that we can later change the
> format in a backward-compatible fashion. */
> #define TDX_MAGIC (~(0xf1f0f33d))
>
> Why is it defined in the inverse? i.e. why not the much clearer:
>
> #define TDX_MAGIC 0x0e0f0cc2
I admit I do not know. Leaving this as-is does no harm, though.
> Subject: [PATCH 1/3] Initialize ARTHANDLE objects before passing by
> value
> Subject: [PATCH 3/3] Correct remap check in tradindexed group lookup
Both committed. Thanks!
> Subject: [PATCH 2/3] Remove redundant (broken!) code
>
> The check was (i) off by one and (ii) can never happen, given the
> loop condition.
At the end of the loop, we have:
parent = &entry->next.recno;
current = *parent;
Can't we imagine that the group index still has not been remaped
after the creation of a new newsgroup (therefore situated at index->count)?
Then, index->count is the next.recno and we should check that the same way
you did for patch #3.
"while (current >= 0)" only and check whether "current >= index->count"?
Wouldn't it make sense to do that?
--
Julien ?LIE
? Et devant cette lev?e de boucliers, moi, je l?ve le camp ! ?
(Ast?rix)
------------------------------
Message: 2
Date: Tue, 05 May 2015 23:21:28 +0100
From: Richard Kettlewell <[email protected]>
To: [email protected]
Subject: Re: Today's patches
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Julien ?LIE <[email protected]> writes:
> Hi Richard,
>
>> /* A magic number for the group.index file so that we can later change the
>> format in a backward-compatible fashion. */
>> #define TDX_MAGIC (~(0xf1f0f33d))
>>
>> Why is it defined in the inverse? i.e. why not the much clearer:
>>
>> #define TDX_MAGIC 0x0e0f0cc2
>
> I admit I do not know. Leaving this as-is does no harm, though.
*nod*
>> Subject: [PATCH 2/3] Remove redundant (broken!) code
>>
>> The check was (i) off by one and (ii) can never happen, given the
>> loop condition.
>
> At the end of the loop, we have:
>
> parent = &entry->next.recno;
> current = *parent;
Yes - but that is too late for the call to entry_splice(), which is
where the user-after-munmap (or use-after-free) would occur. So parent
must be recomputed somehow if a remap occurs. The conservative way to
do it would be just to start again from the top.
> Can't we imagine that the group index still has not been remaped
> after the creation of a new newsgroup (therefore situated at index->count)?
> Then, index->count is the next.recno and we should check that the same way
> you did for patch #3.
>
> "while (current >= 0)" only and check whether "current >= index->count"?
>
> Wouldn't it make sense to do that?
I don't know if the situation is a realistic one - I've not accumulated
enough whole-system knowledge about INN yet. If it is then your
approach is surely the right one.
--
http://www.greenend.org.uk/rjk/
------------------------------
Message: 3
Date: Tue, 5 May 2015 23:58:48 +0000
From: "Matt Seitz (matseitz)" <[email protected]>
To: Julien ?LIE <[email protected]>, "[email protected]"
<[email protected]>
Subject: RE: Today's patches
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
Maybe somebody wanted something that looked like "fifo feed"?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Julien ?LIE
Sent: Tuesday, May 05, 2015 12:11
To: [email protected]
Subject: Re: Today's patches
Hi Richard,
> /* A magic number for the group.index file so that we can later change the
> format in a backward-compatible fashion. */
> #define TDX_MAGIC (~(0xf1f0f33d))
>
> Why is it defined in the inverse? i.e. why not the much clearer:
>
> #define TDX_MAGIC 0x0e0f0cc2
I admit I do not know. Leaving this as-is does no harm, though.
> Subject: [PATCH 1/3] Initialize ARTHANDLE objects before passing by
> value
> Subject: [PATCH 3/3] Correct remap check in tradindexed group lookup
Both committed. Thanks!
> Subject: [PATCH 2/3] Remove redundant (broken!) code
>
> The check was (i) off by one and (ii) can never happen, given the loop
> condition.
At the end of the loop, we have:
parent = &entry->next.recno;
current = *parent;
Can't we imagine that the group index still has not been remaped after the
creation of a new newsgroup (therefore situated at index->count)?
Then, index->count is the next.recno and we should check that the same way you
did for patch #3.
"while (current >= 0)" only and check whether "current >= index->count"?
Wouldn't it make sense to do that?
--
Julien ?LIE
? Et devant cette lev?e de boucliers, moi, je l?ve le camp ! ?
(Ast?rix)
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 72, Issue 5
******************************************