From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com [136.143.188.12]) (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 3500C1803A; Wed, 7 Aug 2024 10:23:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.12 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723026213; cv=pass; b=VC6u0dKKeLZZafM3rFNW8FHWYMunDQdIfHkEtoMbB50vvJ2xxchXyHc+huHcjOyo9lHo8PAqQjY4neUJMWEJLWY21ESoAlXZSMyXPIpVRXltCrCZ7x9dtHbZgr9NdhxD7gbZPiJe91KnXQyRkUPi0ewvJmogc9HjcjpWSa3W3Vo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723026213; c=relaxed/simple; bh=wnWSXJaeQCwIHmnEOPhe0/nxJnIM5HR9ZukuJwrGK+Q=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=aYWrZIoeM2N6eLUCNB7eXWLuba2/BXjWJfWCWKsLShJfFk/oSuv8drvLRjDuY+R9nZ8SG/RRkSaLVY2r8rBO6x8i9Yj2vzZbR/v+z4WAM2OUQs2TmwJX+3n4kLdCq1e0qjxT8A7ctC/p1Q/vbGMSgXAvZz87SmEgbiMeMmR8MtE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=Usama.Anjum@collabora.com header.b=IqxrD3KH; arc=pass smtp.client-ip=136.143.188.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=Usama.Anjum@collabora.com header.b="IqxrD3KH" ARC-Seal: i=1; a=rsa-sha256; t=1723026154; cv=none; d=zohomail.com; s=zohoarc; b=eQDaHF0UtmKq766okb9YAb1uVFKscDK0cg5eoQFjHe698y5wviqxXRXsW/U+dARP112dVe6SCs3C9DiGImo6tGTS10g5HoNfvwhLdToYgm2F5VFnqN+2A4OMgarxjroIe0Eqe2wAqxePPhz6EbiQXCv3sey8nlhhtYyZkJ1lT3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723026154; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=scd/Y76ACZDqO6vf5zLO5/NvxyWCWABtzKGRnR86dDc=; b=GbBQ/avdO9yzTbjTBILxGRf9s6D02T9dAYDAHW1N530LOH7GX+Shof/q53Wyd2MjSj0B6Ni04ufveBMSh/ZcJkldqyELhp2SHH8LMgVlRrQjS1XNLLUp4+YHeYZRzxbHLF+rw6oSNOzri3U8x2n101AfvtOzCDCcHO5s74MG4uk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=Usama.Anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1723026154; s=zohomail; d=collabora.com; i=Usama.Anjum@collabora.com; h=Message-ID:Date:Date:MIME-Version:Cc:Cc:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=scd/Y76ACZDqO6vf5zLO5/NvxyWCWABtzKGRnR86dDc=; b=IqxrD3KHgvy2hhbTtPTpF2qv2qv0npSBO6ngLDL3gIJtPUg79y4yVCB7oSKL0j6q oB6CR8InZCxv6TekzlOnVqGwQyRnvc76srbPKS/uN3Zah6jiSI/KE1NzMYaDATcLiQO tFDeUabmvGYhzpwP7ros+MMlychGkIiOyp0mfnWk= Received: by mx.zohomail.com with SMTPS id 1723026153049605.1074578697151; Wed, 7 Aug 2024 03:22:33 -0700 (PDT) Message-ID: Date: Wed, 7 Aug 2024 15:22:18 +0500 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Usama.Anjum@collabora.com, "H . J . Lu" , Chris Kennelly , Eric Biederman , Shuah Khan , Fangrui Song , Andrew Morton , Yang Yingliang , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Mike Rapoport , Rui Salvaterra , Victor Stinner , Jan Palus , Al Viro , Christian Brauner , Jan Kara , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 1/3] selftests/exec: Build both static and non-static load_address tests To: Kees Cook , John Hubbard References: <20240508172848.work.131-kees@kernel.org> <20240508173149.677910-1-keescook@chromium.org> <1f6a2905-395d-4f81-9ee0-57c541fb2486@nvidia.com> <202405082312.D922795@keescook> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <202405082312.D922795@keescook> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External On 5/9/24 11:16 AM, Kees Cook wrote: > On Wed, May 08, 2024 at 07:54:13PM -0700, John Hubbard wrote: >> Didn't we learn recently, though, that -static-pie is gcc 8.1+, while the >> kernel's minimum gcc version is 5? > > Yes, that's true. If we encounter anyone trying to build the selftests > with <8.1 I think we'll have to add a compiler version test in the > Makefile to exclude the static pie tests. > > There's also the potential issue with arm64 builds that caused the > original attempt at -static. We'll likely need an exclusion there too. > I'm not getting failures for arm64 instead for arm. I'm trying to find this "rcrt1.o" file. Does anybody have any idea if this error can be resolved by missing file or is it something arm-linux-gnueabihf toolchain doesn't support? make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- arm-linux-gnueabihf-gcc -Wall -Wno-nonnull -D_GNU_SOURCE= -Wl,-z,max-page-size=0x1000 \ -fPIE -static-pie load_address.c -o /home/usama/repos/kernel/linux_mainline/tools/testing/selftests/exec/load_address.static.0x1000 /usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: cannot find rcrt1.o: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:39: /home/usama/repos/kernel/linux_mainline/tools/testing/selftests/exec/load_address.static.0x1000] Error 1 -- BR, Muhammad Usama Anjum