public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [RFC PATCH 1/2] lib: add support for kinds of hpsize reservation
Date: Thu, 7 Sep 2023 16:10:35 +0200	[thread overview]
Message-ID: <ZPnZ29GMkQsMZF55@yuki> (raw)
In-Reply-To: <CAEemH2f+oQuiFNM_AHpszJHOE_+CspoNoZzfZD0R=5rUhVzeYg@mail.gmail.com>

Hi!
> > This pointer (hugepage_path) is on stack and is passed to a function
> > that stores the structure into a list and then uses it to restore the
> > value at the end of the testrun, which will probably crash the test
> > since there will be random leftovers on the stack.
> >
> 
> 
> But the function tst_sys_conf_save_str allocates a new memory
> area for saving the structure info, the original is not used for
> appending to the list, isn't it?
> 
> strncpy() inside that function helps avoid the problem you pointed.

My bad, I was for some reason under impression that it just stores the
pointer.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2023-09-07 14:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:39 [LTP] [RFC PATCH 1/2] lib: add support for kinds of hpsize reservation Li Wang
2023-05-24  9:39 ` [LTP] [RFC PATCH 2/2] hugemmap33: Test to detect bug with migrating gigantic pages Li Wang
2023-09-07 11:30   ` Cyril Hrubis
2023-09-11  7:47     ` Li Wang
2023-09-11  8:11       ` Cyril Hrubis
2023-09-11  8:25         ` Li Wang
2023-09-07  9:26 ` [LTP] [RFC PATCH 1/2] lib: add support for kinds of hpsize reservation Cyril Hrubis
2023-09-07 12:37   ` Li Wang
2023-09-07 12:52     ` Li Wang
2023-09-07 14:10     ` Cyril Hrubis [this message]
2023-09-11  8:02 ` [LTP] [PATCH v2 " Li Wang
2023-09-11  8:02   ` [LTP] [PATCH v2 2/2] hugemmap34: Test to detect bug with migrating gigantic pages Li Wang
2023-09-11  8:33     ` Li Wang
2023-09-14  9:44   ` [LTP] [PATCH v2 1/2] lib: add support for kinds of hpsize reservation Li Wang
2023-10-18  9:10     ` Richard Palethorpe
2023-10-19  8:22       ` Li Wang

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=ZPnZ29GMkQsMZF55@yuki \
    --to=chrubis@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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