mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "alice" <alice@ayaya.dev>
To: <musl@lists.openwall.com>
Subject: Re: [musl] _chk Variants
Date: Mon, 11 Jul 2022 22:31:14 +0200	[thread overview]
Message-ID: <CLD41R1M06DC.177KZ85CV24Z3@aldra> (raw)
In-Reply-To: < <MN2PR12MB308734AB7A84D25A20E5880EAB879@MN2PR12MB3087.namprd12.prod.outlook.com>>

On Mon Jul 11, 2022 at 10:11 PM CEST, Mike Granby wrote:
> I have been trying to run a GCC cross-compiler within Alpine, and
> hitting an issue with musl not providing the _chk variants of various
> APIs. For example, glibc provides __printf_chk which takes an
> additional argument and optionally performs various security checks
> before proceeding. I know the official way forward is to rebuild the
> compiler with the option to disable these calls, but rebuilding the
> GCC toolchain is not for the faint of heart, and I have thus been
> loath to go down that path.
have you tried using a cross toolchain from https://musl.cc ? the
underlying musl-cross-make[0] system used to make them is very easy to
use, and can generate you a cross toolchain after copying and editing a
config.mak with roughly 3 lines of text (TARGET, some cflags, etc..).
[0]: https://github.com/richfelker/musl-cross-make
> Instead, I developed a patch for the
> Alpine's musl APK that implemented the _chk variants as mere wrappers
> for the underlying APIs, thus allowing GCC to operate, albeit without
> the extra security that a full implementation would provide. This met
> my immediate need, but I am interested as to the view of the community
> in either implementing the _chk variants for real, or in providing the
> wrappers to enable better binary compatibility.


      parent reply	other threads:[~2022-07-11 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 20:11 Mike Granby
     [not found] ` < <MN2PR12MB308734AB7A84D25A20E5880EAB879@MN2PR12MB3087.namprd12.prod.outlook.com>
2022-07-11 20:31   ` alice [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=CLD41R1M06DC.177KZ85CV24Z3@aldra \
    --to=alice@ayaya.dev \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).