From nobody Wed Nov 24 16:37:56 2021 X-Original-To: dev-commits-src-main@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 1952418A18A8 for ; Wed, 24 Nov 2021 16:38:09 +0000 (UTC) (envelope-from dgr@semihalf.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 4HzmsD54Qcz4Thh for ; Wed, 24 Nov 2021 16:38:08 +0000 (UTC) (envelope-from dgr@semihalf.com) Received: by mail-ed1-x52e.google.com with SMTP id t5so13375295edd.0 for ; Wed, 24 Nov 2021 08:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PrGvHz/FsJ2j0PcwWgF7sWE7vu174Mhu56wwrjvHrYc=; b=ECIEhEmyYMiB0RUw2n4+x7tZq2GbRbLdJGZQFN451mc+//0NhG9fb7eJuw+ew8lqmY IGI5ROrvGhxXC/Cuxm2S8fBwBPa1R/AHnkq5bpujJBY9un3h2vLc7iwE5wfQRgNbw4ei enrdQAFyriA2awuAhwbUi9DuWHUCEO6Ntm5olRSM9UMOv6dR726qYCo1CinyssmttLNB XuFct4uIVdDlSn33IAJwg7fSOK9uETX7jlzSJ8NOleJ5naEYSVP7TLfd9Uvo6cn9c29I oXmuubPFPNZlfX4qJOvNbOt7n1hYbQ2uuxqMGRrl1PuaWnNkA7v6wPfYPHWzu5OrVAS2 qwWg== 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=PrGvHz/FsJ2j0PcwWgF7sWE7vu174Mhu56wwrjvHrYc=; b=FMejLwNNJgJpDD7XdBTdRwirzb8snQPFTHD37zDk4L6DyFmP/ajsdtSub3k5yJrOEG u+DXjF690VTHKGqYOkZVsM2U7Dgsoaj23QlVNCMnA5mqF4qMXyi/dyWKduhNjCLYfg7S lTZmf9aZHZXHUWEDbvuHtLlkqOytngj0eUxjg7T156/zl/uU+wkLgRvCVcpxnVn7SAN/ yTuYIrxNO2sZ+JbvQVnCc6STT+OcVStOvXCIEDMOY6TDxZzH04+aAs2hL4XA/wdIAhin JaQSteNmJmJv2cGmNnIr/L2dgA4448TRfMnIypVMjU+gGy2ZaGvFjQSJAUxSe3COY7Ih hrEw== X-Gm-Message-State: AOAM532+XQSPQhQJSsn1h5JtWWrmTc+JpqVphW+luz1hNJ8SzRYk7EWt JHfSuT+Hz5XPrp+EqB31/koSdCxcpPBFzfZGEekwKA== X-Google-Smtp-Source: ABdhPJwtrchPWsgpJ4eGYNfMYm9epEOEqnqota6sSXj7wKQ1AMtl/srBMNuqMP3uF0TjHrM7Ue1t0LA21tsMde25nio= X-Received: by 2002:a17:907:2d10:: with SMTP id gs16mr21123713ejc.353.1637771887141; Wed, 24 Nov 2021 08:38:07 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> <20211124144112.GF77338@zxy.spb.ru> In-Reply-To: <20211124144112.GF77338@zxy.spb.ru> From: =?UTF-8?Q?Dawid_G=C3=B3recki?= Date: Wed, 24 Nov 2021 17:37:56 +0100 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Slawa Olhovchenkov Cc: Marcin Wojtas , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4HzmsD54Qcz4Thh 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 Wed, Nov 24, 2021 at 3:41 PM Slawa Olhovchenkov wrote: > > On Tue, Nov 16, 2021 at 10:26:42PM +0000, Marcin Wojtas wrote: > > > > > Enable ASLR by default for 64-bit executables > > > > Now any core dumps will be useless? > Core dumps work fine. I just created a test application to confirm. LLDB resolves everything without issues. First run: root@aslr-dgr:~/coretest # lldb ./coretest --core ./coretest.core (lldb) target create "./coretest" --core "./coretest.core" Core file '/root/coretest/coretest.core' (x86_64) was loaded. (lldb) bt This version of LLDB has no plugin for the language "assembler". Inspection of frame variables will be limited. * thread #1, name = 'coretest', stop reason = signal SIGABRT * frame #0: 0x000021d0be68c53a libc.so.7`__sys_thr_kill at thr_kill.S:4 frame #1: 0x000021d0be604bf4 libc.so.7`__raise(s=6) at raise.c:52:10 frame #2: 0x000021d0be6b62c9 libc.so.7`abort at abort.c:67:8 frame #3: 0x000021c8bd67d9f5 coretest`main at coretest.c:10:2 frame #4: 0x000021c8bd67d7cd coretest`_start(ap=, cleanup=) at crt1_c.c:73:7 (lldb) frame select 3 frame #3: 0x000021c8bd67d9f5 coretest`main at coretest.c:10:2 7 int a = 1; 8 printf("Core dump test.\n"); 9 -> 10 abort(); 11 12 return 0; 13 } (lldb) frame v (int) a = 1 (lldb) quit Second run: root@aslr-dgr:~/coretest # ./coretest Core dump test. Abort trap (core dumped) root@aslr-dgr:~/coretest # lldb ./coretest --core ./coretest.core (lldb) target create "./coretest" --core "./coretest.core" Core file '/root/coretest/coretest.core' (x86_64) was loaded. (lldb) bt This version of LLDB has no plugin for the language "assembler". Inspection of frame variables will be limited. * thread #1, name = 'coretest', stop reason = signal SIGABRT * frame #0: 0x0000063d5022353a libc.so.7`__sys_thr_kill at thr_kill.S:4 frame #1: 0x0000063d5019bbf4 libc.so.7`__raise(s=6) at raise.c:52:10 frame #2: 0x0000063d5024d2c9 libc.so.7`abort at abort.c:67:8 frame #3: 0x000006354fc1d9f5 coretest`main at coretest.c:10:2 frame #4: 0x000006354fc1d7cd coretest`_start(ap=, cleanup=) at crt1_c.c:73:7 (lldb) You can see that addresses change but core dump still works.