All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: mendoza.ricardo@gmail.com
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>,
	Ricardo Mendoza <ricmm@pantacor.com>
Subject: Re: [PATCH] compat: allow override of depmod basedir
Date: Fri, 24 Jul 2020 11:09:14 +0200	[thread overview]
Message-ID: <CAHmME9q8Xrm0RK8d45xBDGe4=0dOyeMJFnMHX8h=KbFUYw1GEA@mail.gmail.com> (raw)
In-Reply-To: <20200722114051.1919-1-mendoza.ricardo@gmail.com>

Thanks for figuring this out. It looks like '/' as the default is
indeed safe, as this value is only used in this expression:

       cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
                                 "%s/lib/modules/%s",
                                 root == NULL ? "" : root, cfg.kversion);

and // and / are equivalent.

I've applied this with slight modifications here:
https://git.zx2c4.com/wireguard-linux-compat/commit/?id=6028795b4415d7f467acc01c5292f8e4703a6b39


Jason

      reply	other threads:[~2020-07-24  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 11:40 [PATCH] compat: allow override of depmod basedir mendoza.ricardo
2020-07-24  9:09 ` Jason A. Donenfeld [this message]

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='CAHmME9q8Xrm0RK8d45xBDGe4=0dOyeMJFnMHX8h=KbFUYw1GEA@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=mendoza.ricardo@gmail.com \
    --cc=ricmm@pantacor.com \
    --cc=wireguard@lists.zx2c4.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.