From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>,
gustavo@padovan.org, igt-dev@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 1/2] Increase the string size for a module name
Date: Tue, 21 Aug 2018 10:57:47 -0300 [thread overview]
Message-ID: <20180821135747.tso444lixxjxk4vp@smtp.gmail.com> (raw)
In-Reply-To: <20180821091308.qswpykknvr6jtmqb@platvala-desk.ger.corp.intel.com>
On 08/21, Petri Latvala wrote:
> On Sat, Jul 07, 2018 at 08:24:39PM -0300, Rodrigo Siqueira wrote:
> > Some modules name are larger than 5 characters, this can be a problem to
> > add support for other modules. This patch, increase the maximum size in
> > order to enable other modules to use IGT.
> >
> > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > ---
> > lib/drmtest.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/drmtest.c b/lib/drmtest.c
> > index fae6f86f..eee733eb 100644
> > --- a/lib/drmtest.c
> > +++ b/lib/drmtest.c
> > @@ -60,6 +60,8 @@
> > #include "ioctl_wrappers.h"
> > #include "igt_dummyload.h"
> >
> > +#define NAME_LEN 32
> > +
> > /**
> > * SECTION:drmtest
> > * @short_description: Base library for drm tests and tools
> > @@ -82,7 +84,7 @@ static int __get_drm_device_name(int fd, char *name)
> > drm_version_t version;
> >
> > memset(&version, 0, sizeof(version));
> > - version.name_len = 4;
> > + version.name_len = NAME_LEN;
> > version.name = name;
> >
> > if (!drmIoctl(fd, DRM_IOCTL_VERSION, &version)){
> > @@ -94,7 +96,7 @@ static int __get_drm_device_name(int fd, char *name)
> >
> > static bool __is_device(int fd, const char *expect)
> > {
> > - char name[5] = "";
> > + char name[NAME_LEN] = "";
>
> This would need to be NAME_LEN + 1 to have room for the
> null-termination.
>
> But, is this patch really necessary? Are there false matches from
> using a substring of 4 to match driver names?
Hi,
To test the force option, I used two drivers: Bochs and VKMS. I noticed
that Bochs failed to load because the module name is "bochs-drm".
Additionally, if we want to add a force option, I assume that someone
can have a module name larger than four characters. Make sense? Or Did I
missed something?
Thanks for your feedback
>
> --
> Petri Latvala
--
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-08-21 13:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 23:24 [PATCH i-g-t 0/2] Add support to force specific module load Rodrigo Siqueira
2018-07-07 23:24 ` [PATCH i-g-t 1/2] Increase the string size for a module name Rodrigo Siqueira
2018-08-21 9:13 ` Petri Latvala
2018-08-21 13:57 ` Rodrigo Siqueira [this message]
2018-08-22 8:12 ` [igt-dev] " Petri Latvala
2018-07-07 23:25 ` [PATCH i-g-t 2/2] Add support for forcing specific module Rodrigo Siqueira
2018-08-21 9:43 ` Petri Latvala
2018-08-21 14:22 ` Rodrigo Siqueira
2018-08-22 8:18 ` [igt-dev] " Petri Latvala
2018-08-20 13:33 ` [PATCH i-g-t 0/2] Add support to force specific module load Rodrigo Siqueira
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=20180821135747.tso444lixxjxk4vp@smtp.gmail.com \
--to=rodrigosiqueiramelo@gmail.com \
--cc=arkadiusz.hiler@intel.com \
--cc=gustavo@padovan.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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).