From nobody Wed Feb 09 02:43:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D593819B3B39; Wed, 9 Feb 2022 02:43:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jtkhb5dVsz4fSP; Wed, 9 Feb 2022 02:43:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f46.google.com with SMTP id r144so1460694iod.9; Tue, 08 Feb 2022 18:43:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KODDQe9B6THhsfZp6WLmAvamz0dlegcgPnyRFfyLB2s=; b=40UH5kw51J7iSLOBnJDm9Jk5NfINf5yHG6dTFWtOlKYeGaHxpzd0sfpge81cd5m3Fa bzK02mqQLXvBpw0FuAOrZc9PW0T/SNKZYPWfRRJ8Gg8CSWfxoEEBt+9bj+Sa5n+C1lZx aJOIsIrK2fZE7NUi1ecCLHEwLX04sM4gToUF57qXJjJ2wS9Ca9ky6EmiWDDZK2DE0u3r /YQWw+X/5IPqCETsip4dRvhfqIt94zNkunX10l/MxyxzMEAOusFapHHcGsuZ26GAnaMW nyZpiwYrhFtG37n7pf/dgwaysK5SRsBJnYmaWpdEMWTmpEqk14meJdcOPpFEF000NXfe g37g== X-Gm-Message-State: AOAM532nQ64pI/6ekvG6MGhtx9pdEMcmZmYPtRThKI42lk2viDjRKDdS 7OiROhm8dIuR82ltuvxbAjhXsv7A5iHNyOZzbcV4D+WAkuM= X-Google-Smtp-Source: ABdhPJz0TLKkqIZ7IWsZvJnkBzdE4OtlIvJzoExLZq+8AxbbepDYkxIicIQAr3l2k+wJUXzNOX28AIkliJNs0l9VDGQ= X-Received: by 2002:a02:1181:: with SMTP id 123mr100883jaf.93.1644374599819; Tue, 08 Feb 2022 18:43:19 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202202041620.214GKn2V007538@gitrepo.freebsd.org> <0b6f8813-6c07-3adb-a8e6-d4f9d55247bf@FreeBSD.org> In-Reply-To: <0b6f8813-6c07-3adb-a8e6-d4f9d55247bf@FreeBSD.org> From: Ed Maste Date: Tue, 8 Feb 2022 21:43:07 -0500 Message-ID: Subject: Re: git: 930a7c2ac67e - main - compiler-rt: re-exec with ASLR disabled when necessary To: Kubilay Kocak Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Jtkhb5dVsz4fSP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, 8 Feb 2022 at 17:30, Kubilay Kocak wrote: > > On 5/02/2022 3:20 am, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=930a7c2ac67e1e8e511aa1d0a31a16c632060ebb > > > > commit 930a7c2ac67e1e8e511aa1d0a31a16c632060ebb > > Author: Ed Maste > > AuthorDate: 2022-01-16 19:22:05 +0000 > > Commit: Ed Maste > > CommitDate: 2022-02-04 16:20:00 +0000 > > > > compiler-rt: re-exec with ASLR disabled when necessary > > Could we sysctl tunable this, defaulting to previous behaviour? This is entirely userland, so an environment variable is probably the appropriate way to control it. In fact there is already an ASAN_OPTIONS variable and hooking into that is likely appropriate. > Feels useful, particularly with respect to compatibility with *San > behaviour elsewhere and cases where a re-exec may not be desirable I'm not sure what you mean by "*San behaviour elsewhere" - where necessary Linux already has the behaviour implemented here. We just did not have a working re-exec routine implemented originally. In any case the eventual fix here is to address the underlying failure in the sanitizers with ASLR enabled, and remove both the ASLR detection and re-exec. I have no timeline for work on that, though.