CEPH filesystem development
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@suse.de>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: wip-msgr2
Date: Tue, 15 Dec 2020 16:14:46 +0000	[thread overview]
Message-ID: <873607yrk9.fsf@suse.de> (raw)
In-Reply-To: <CAOi1vP8Qx8qLd0BtS_t8nn1ukXh0uAxveJOd=NyHv+rYnzTpBg@mail.gmail.com> (Ilya Dryomov's message of "Tue, 15 Dec 2020 16:30:10 +0100")

Ilya Dryomov <idryomov@gmail.com> writes:

<snip>

>> Looks like the memset in prepare_head_secure_small() is cleaning behind
>> the base limits.  Unfortunately, I didn't really had time to dig deeper
>> into this.
>
> Ah, I disabled KASAN for some performance testing and didn't turn
> it back on.  This doesn't actually corrupt any memory because the
> 96-byte object that gets allocated is big enough.  In fact, the
> relevant code used to request 96 bytes independent of the connection
> mode until I changed it to follow the on-wire format more strictly.
>
> This frame is 68 bytes in plane mode and 96 bytes in secure mode
> but we are requesting 68 bytes in both modes.  The following should
> fix it:

Yep, it does fix it.  Thanks for the quick reply.

Cheers,
-- 
Luis

>
> diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
> index 5e38c847317b..11fd47b36fc8 100644
> --- a/net/ceph/messenger_v2.c
> +++ b/net/ceph/messenger_v2.c
> @@ -1333,7 +1333,8 @@ static int prepare_auth_signature(struct
> ceph_connection *con)
>         void *buf;
>         int ret;
>
> -       buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE, false));
> +       buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE,
> +                                                 con_secure(con)));
>         if (!buf)
>                 return -ENOMEM;
>
> Thanks,
>
>                 Ilya


  reply	other threads:[~2020-12-15 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 13:43 wip-msgr2 Ilya Dryomov
2020-12-14 15:55 ` wip-msgr2 Luis Henriques
2020-12-14 16:59   ` wip-msgr2 Ilya Dryomov
2020-12-14 17:26     ` wip-msgr2 Luis Henriques
2020-12-15 13:14       ` wip-msgr2 Luis Henriques
2020-12-15 15:30         ` wip-msgr2 Ilya Dryomov
2020-12-15 16:14           ` Luis Henriques [this message]
2020-12-17 16:46           ` wip-msgr2 Luis Henriques
2020-12-17 17:25             ` wip-msgr2 Ilya Dryomov
2020-12-18 16:45               ` wip-msgr2 Luis Henriques
2020-12-16 15:31 ` wip-msgr2 Jeff Layton
2020-12-16 17:18   ` wip-msgr2 Ilya Dryomov

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=873607yrk9.fsf@suse.de \
    --to=lhenriques@suse.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    /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