Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1352818pxb; Wed, 4 Nov 2020 06:50:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdX727RQ3UF7KyUC2Nx72ev8MyeqYspx1g1pK8lJJsNyS2JTxIPS4+ZSCX3eZmYuBNMCnl X-Received: by 2002:a17:906:402:: with SMTP id d2mr23907118eja.165.1604501415724; Wed, 04 Nov 2020 06:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604501415; cv=none; d=google.com; s=arc-20160816; b=fU2IQ0T3ue452+V4OFMetoEWFqFMsV+AaQqMPL0p7DGM7gOoBLkKol4RoiJ/VBP4r0 zzNofnGRiZ99QDV5ql7rSPmXBjK9hOLZfN9rbi8wMW6KKKK5Ekf1MTXxgsezuzoayIeV K2G13DnhFZQ3T1QTKjOiKivv0yZvuB0of0qpHuwKkXFvidlAROF5iv7oFsLTzjM9qOmj 0dE5oY/Viistxi1mL/EBern7psv/dC4j4Dd2HwL3Un1P0QZG58Tb0Z/0fNk70LB0bAPu bvyIpFa/7Au2HmFtN6y7rs/sfibasQQffMEbfJeMEhotCbj0i9lWhdlJpOUg8Oa9qxZy mBDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=2/qDMVtos7dYdtcZu5rNmBGlotvjjozf9G0PRDDGQXs=; b=xTodScCFlCk4sCxxoM5ICX30W1u5X40WvcmJTvddBnee+IjmsDxy0NOcT6buYq4Zym +e/EMrdpebNcgDzFJ4Amp4CtJwdwDuLuLnoqbcBs8ICPNS+129YLTU6yx2BAXQrY6BUi v9KKF6F/bz6qtf5r2RL+6yyoYie0PDJ005OAhwZ76ulWHot5RQ03/W4XVVJzgyPAiCmT gShrTYRu8ULpuSjMEEVbil2DYiFYi4jr/TTXoqe6hScCvKlWa26MyUXySTDa/f7DvSj8 oSw4+PGY/W1+A7fd2w0t94OfHyj+EMIfmNB/OxjvD/OVWrVqJxlBW5qt8swoBQvR7SzA WWfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FuehmNZc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm22si1397434edb.342.2020.11.04.06.49.53; Wed, 04 Nov 2020 06:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FuehmNZc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730203AbgKDOp6 (ORCPT + 99 others); Wed, 4 Nov 2020 09:45:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39219 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730243AbgKDOp5 (ORCPT ); Wed, 4 Nov 2020 09:45:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604501156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2/qDMVtos7dYdtcZu5rNmBGlotvjjozf9G0PRDDGQXs=; b=FuehmNZcdrcy7rGZnQ6XxJIDWzKhga0wN8DWf9q9lAn5+h7YMqS/iRfTkVcDYtLce2bqEv rpV8BHUYd8xNdGdP48JbZTM5DM6puvHJbrMDqYBiiEC5BY4k19KWWdwDQlVcWqmpb8BpPz Cs/+yMIC2jWRjTSFP4fauRvai2JRQJE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-202-jgwp6zJgNeGan1kW1fiemg-1; Wed, 04 Nov 2020 09:45:52 -0500 X-MC-Unique: jgwp6zJgNeGan1kW1fiemg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5D1931084C80; Wed, 4 Nov 2020 14:45:50 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-113-12.ams2.redhat.com [10.36.113.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3E125B4D8; Wed, 4 Nov 2020 14:45:45 +0000 (UTC) From: Florian Weimer To: Catalin Marinas Cc: Szabolcs Nagy , Jeremy Linton , Mark Brown , libc-alpha@sourceware.org, Mark Rutland , Will Deacon , Kees Cook , Salvatore Mesoraca , Lennart Poettering , Topi Miettinen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com, linux-hardening@vger.kernel.org Subject: Re: [PATCH 0/4] aarch64: avoid mprotect(PROT_BTI|PROT_EXEC) [BZ #26831] References: <20201103173438.GD5545@sirena.org.uk> <8c99cc8e-41af-d066-b786-53ac13c2af8a@arm.com> <20201104085704.GB24704@arm.com> <20201104144120.GD28902@gaia> Date: Wed, 04 Nov 2020 15:45:44 +0100 In-Reply-To: <20201104144120.GD28902@gaia> (Catalin Marinas's message of "Wed, 4 Nov 2020 14:41:21 +0000") Message-ID: <87ft5p2naf.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Catalin Marinas: > Can the dynamic loader mmap() the main exe again while munmap'ing the > original one? (sorry if it was already discussed) No, we don't have a descriptor for that. /proc may not be mounted, and using the path stored there has a race condition anyway. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill