Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp585640rdb; Tue, 23 Jan 2024 08:28:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMNf+inONdOc+pwEB3GC1+k9V+5wR78ozTwHmGlpYbmPdSwySCSYiNtdPuE/ZQJ2pzlhoV X-Received: by 2002:a05:6a20:a12a:b0:19a:7512:6f6 with SMTP id q42-20020a056a20a12a00b0019a751206f6mr3549317pzk.91.1706027291575; Tue, 23 Jan 2024 08:28:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706027291; cv=pass; d=google.com; s=arc-20160816; b=GQHDG0ahlLmWCLv0dqmLpFbF0sGMbok2P8vrA5IR2tgEQP8PeUUrYeMyaweIrArkqK 5U7g/e3b3FBHmM2v3FIjfYQQ7g4vWI3QHOFk/g50A6Vv5FSx8VnBVMLdBcymg3G5v6x1 4uop9YIgDs/YH0+JyKecLO5QA2ZwOEmBBu+iD863BscOGDOhsVNShkFvsx6xyEkUtkbb FUAgE39lC/6y2itOgTJlBvCfePwuroAonyRlzrReVOptfPHGK8bhA3HzTTQvRu0YVbYZ x7hmvf37dgECZeZ0IjEkbfhH+u9iIIEYA/lIq+vkbwrsCfq4zB+5QkTVWShFCYBrou9I rWVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=08AzbJBDTNvT7ROIQXDEvrMtJP9y4Vc1P/92plU2FMo=; fh=n8ydiutBPTM453jB2/IDhsL6cCUFujiYMK7NubQlJ6g=; b=I2xuFOfcflDN5T4JR4/4pfVE092OsSOioeiod8/l3VI1CX7DNeQMUqX3vwEyulTdBK 3A4X2O8RIMPsvG+CyedfQ6amyMjF/18OxhZd64EGWHTpb40/EgpWebG28cuDb43NONFN Pkwzw6z2nlXlAlOX4wBd+BnyHOwCVlI7/uxqhnuYa53/U6Xh/SLwxL67KMf0C6N+DaVo pO5J6EOSBRYfX+zhwt4pHi4LPqAyIJgqfW6KzIYMy+hSL5cGANKZ1u+m2h7007uablln ocLUXqYaobAhLq6KF7c4v7p0yEmrCwNdu3NxgLYDn2dpQ/CgTcY/0y6CNSjhzraW/tcR owVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@exia.io header.s=default header.b=5IkZ9qyF; arc=pass (i=1 spf=pass spfdomain=exia.io dkim=pass dkdomain=exia.io); spf=pass (google.com: domain of linux-kernel+bounces-33581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33581-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t8-20020a63dd08000000b005c65eb2bc63si9997848pgg.608.2024.01.23.08.28.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@exia.io header.s=default header.b=5IkZ9qyF; arc=pass (i=1 spf=pass spfdomain=exia.io dkim=pass dkdomain=exia.io); spf=pass (google.com: domain of linux-kernel+bounces-33581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33581-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 27CD7B327D5 for ; Mon, 22 Jan 2024 16:50:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78DA540BFB; Mon, 22 Jan 2024 15:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=exia.io header.i=@exia.io header.b="5IkZ9qyF" Received: from MTA-12-4.privateemail.com (mta-12-4.privateemail.com [198.54.127.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 079A63D964; Mon, 22 Jan 2024 15:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.54.127.107 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705937033; cv=none; b=Fp3FFxWVlvoGYbpuEqbawMLEaAeQ96+iYVnewQoi9ij6sx+RlvvH6eqf+UDW/tgmiuCk0axntpZwGyVd8rHpb9z92IiJaLAr3U6Nd3CH2Pn25bGvTovEGHro9vf7695QFCxTqbCoVgoxfivD3qJSLhW9nSSDlrEYk59W7sEA4o4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705937033; c=relaxed/simple; bh=08AzbJBDTNvT7ROIQXDEvrMtJP9y4Vc1P/92plU2FMo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IsWUWVCT5pXfBtw1Ad1wqejyR5yLfXBeiGDfFOUExpgGmnDjWM8aVQny2MGYHJo/UEJU6F6YAGUcZO7PYiKKnDWONQKXaxV5MS49UCsalMgXk1WEoCi0WATiZwlLdOwVao4gvfWGDz+0xSMVacg6AwovZZIxP7AgznNXMQXJa6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exia.io; spf=pass smtp.mailfrom=exia.io; dkim=pass (2048-bit key) header.d=exia.io header.i=@exia.io header.b=5IkZ9qyF; arc=none smtp.client-ip=198.54.127.107 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exia.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=exia.io Received: from mta-12.privateemail.com (localhost [127.0.0.1]) by mta-12.privateemail.com (Postfix) with ESMTP id A90DB18000AE; Mon, 22 Jan 2024 10:23:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=exia.io; s=default; t=1705937024; bh=08AzbJBDTNvT7ROIQXDEvrMtJP9y4Vc1P/92plU2FMo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=5IkZ9qyFHIk7pp99vhyLQ06zBRPufV1N+24fe8ZVDChfrZOR2vD14mdBd1TXW43m4 0/BBsYPE9UBOfEudTdy29kv54FCCVzL7Me2hNJS/vTO+iQR0SF4zo921wKRcWDZccH +ZRzgssiVAw/nOU3vUlrGWf4xCaUiAHtPzyTSFHRxHvW/LpeDqhrnvU/lLjDPQaetE 38EDGCdcutwWJiJwl8Gyob8M5PaAuMwu3X4946LgOyurhEt5tqLvKWRr6iah1Q48Nh 6sWkWAe3ygvj13OTmVyeEsakWedyQoLMpulO8dQt+oWYh98+EkoISa1BdcAaLauO9C ULJbm+XegtNpw== Received: from [192.168.1.17] (M106073142161.v4.enabler.ne.jp [106.73.142.161]) by mta-12.privateemail.com (Postfix) with ESMTPA; Mon, 22 Jan 2024 10:23:35 -0500 (EST) Message-ID: Date: Tue, 23 Jan 2024 00:23:27 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Recent-ish changes in binfmt_elf made my program segfault Content-Language: en-US To: Pedro Falcato Cc: ebiederm@xmission.com, keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, linux-fsdevel@vger.kernel.org References: From: Jan Bujak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On 1/22/24 23:54, Pedro Falcato wrote: > Hi! > > Where did you get that linker script? > > FWIW, I catched this possible issue in review, and this was already > discussed (see my email and Eric's reply): > https://lore.kernel.org/all/CAKbZUD3E2if8Sncy+M2YKncc_Zh08-86W6U5wR0ZMazShxbHHA@mail.gmail.com/ > > This was my original testcase > (https://github.com/heatd/elf-bug-questionmark), which convinced the > loader to map .data over a cleared .bss. Your bug seems similar, but > does the inverse: maps .bss over .data. > I wrote the linker script myself from scratch. Thank you for the link to the previous discussion. So assuming this breakage was intended my question here is - doesn't this run afoul of the "we do not break userspace" rule?