From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org,
lindner_marek-LWAfsSFWpa4@public.gmane.org
Subject: Re: pull request: batman-adv 2011-11-26
Date: Fri, 2 Dec 2011 18:12:16 +0100 [thread overview]
Message-ID: <20111202171216.GA4561@ritirata.org> (raw)
In-Reply-To: <20111126.144122.775553783672941660.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Hello David,
On Sat, Nov 26, 2011 at 02:41:22 -0500, David Miller wrote:
[CUT]
> Some things to look into:
>
> + if (unlikely(skb_headlen(skb) <
> + sizeof(struct tt_query_packet) +
> + tt_len))
>
> This isn't formatted correctly, all the leading edges should line
> up to the openning parenthesis of the unlikely:
>
> + if (unlikely(skb_headlen(skb) <
> + sizeof(struct tt_query_packet) +
> + tt_len))
>
Thank you for reporting this issue. We have already prepared a patch which is
going to be sent within the next batch.
> Next, there is a lot of linearization done by the stack, but really the
> thing to do is to make sure that the part you want to look at is
> linear.
>
> You do this using pskb_may_pull() right before you want to look at some
> headers. It makes sure that, for the length given, that many bytes are
> linear at the head of the skb.
>
For this issue, we had some problem to understand it.
First of all I think you are referring to patch 08/10, in which I moved a
skb_linearise() operation.
To be sure it is really needed, I backtracked the code flow and noted down any
eventual psbk_may_pull() (or any other linearisation operation). The result is:
=> in batman_skb_recv()
- pskb_may_pull(2)
=> in recv_tt_query()
- pskb_may_pull(sizeof(header))
- skb_linearise()
Actually it seems we haven't any useless linearisation.
Would you mind explain us where you actually found the problem, please?
It might also be that I misunderstood your advice.
Thank you.
Best Regards,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
next prev parent reply other threads:[~2011-12-02 17:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 14:26 pull request: batman-adv 2011-11-26 Marek Lindner
2011-11-26 14:26 ` [PATCH 01/10] batman-adv: update internal version number Marek Lindner
[not found] ` <1322317612-7770-1-git-send-email-lindner_marek-LWAfsSFWpa4@public.gmane.org>
2011-11-26 14:26 ` [PATCH 02/10] batman-adv: tt_global_del_orig() has to print the correct message Marek Lindner
2011-11-26 14:26 ` [PATCH 03/10] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Marek Lindner
2011-11-26 14:26 ` [PATCH 04/10] batman-adv: refactoring gateway handling code Marek Lindner
2011-11-26 14:26 ` [PATCH 05/10] batman-adv: use orig_hash_find() instead of get_orig_node() in TT code Marek Lindner
2011-11-26 14:26 ` [PATCH 06/10] batman-adv: fixed hash functions type to uint32_t instead of int Marek Lindner
2011-11-26 14:26 ` [PATCH 08/10] batman-adv: linearise the tt_response skb only if needed Marek Lindner
2011-11-26 14:26 ` [PATCH 09/10] batman-adv: check for tt_reponse packet real length Marek Lindner
2011-11-26 14:26 ` [PATCH 10/10] batman-adv: Fix range check for expected packets Marek Lindner
2011-11-26 19:41 ` pull request: batman-adv 2011-11-26 David Miller
[not found] ` <20111126.144122.775553783672941660.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-12-02 17:12 ` Antonio Quartulli [this message]
[not found] ` <20111202171216.GA4561-E/2OGukznS5g9hUCZPvPmw@public.gmane.org>
2011-12-02 17:57 ` David Miller
[not found] ` <20111202.125725.896787381527077500.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-12-03 1:55 ` Antonio Quartulli
[not found] ` <20111203015528.GB3148-E/2OGukznS5g9hUCZPvPmw@public.gmane.org>
2011-12-03 1:59 ` David Miller
2011-11-26 14:26 ` [PATCH 07/10] batman-adv: directly write tt entries without buffering Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111202171216.GA4561@ritirata.org \
--to=ordex-gaufno9rbhfsroww+9zijq@public.gmane.org \
--cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=lindner_marek-LWAfsSFWpa4@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).