From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C50081CF5DE; Fri, 1 Nov 2024 19:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730489380; cv=none; b=PwOTWUI/2ZDcA4NTmXalnM+CuUGAMN+Zm82TdtE01JoBWFfGuIeNnaeMLYyagv2CbBEz+ErW+59cfml19EZgsFCLC1OAqH2RvQqeZ6MezcQm1eb6dZ+E5HE0kNAofV1tJF89oo6nWO02fxbpv2pIc7hpG91RkvDY3ZbDTiYVlnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730489380; c=relaxed/simple; bh=tMMEau3NtPnyAeHx8uGed61FAphZVULNuA9qHtBhhOg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QsWKWrb8Ilao0xp8fL6PB/UwqKh6yfrKrx9012vPHYvsQkDmcsdqkpY1Ni/mnPv/ViUSCLUmv8JNHmeMpFmc+PjaAYY3epUx3CkhM0+KYWMDf8BJvNLupOyyvkEOjc+WAO6JGHbHKTD0bBFvM6XpsBhvYrFJcfPAT9u2N9i9YsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DYlgEYUy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DYlgEYUy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B6C4C4CECD; Fri, 1 Nov 2024 19:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730489380; bh=tMMEau3NtPnyAeHx8uGed61FAphZVULNuA9qHtBhhOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DYlgEYUyOZizWXWR8eNVvJc/QqHohbl60GpAPw3rCs6NZAduJJyXWrK+9LLSPQanO o/peCEWjEKNFFohrBB01XWsrx4sDpMLqHvdIygolfEUswTt/ryyvlx3de5SgK/ZubQ JMQPTMACdQD3wGVsrfDJX2YfK8vgkQLErPyRIgQEbIdoyAYg7rfCXaKUFyVH9T9qau ZhcABDQZLZVdDFwgGa41dxLej7yVMQo1o+LXcIdPOGLACbMqhLpULWpKh5xXDp+aHl PwbTeiyOE13V5hc8RBriybTJaUYgAwD4GRm1+zio0HAEYmGA/nJxKyXlX2SehqvJJR ZrH3uUg2RMkww== Date: Fri, 1 Nov 2024 12:29:37 -0700 From: Josh Poimboeuf To: Andrii Nakryiko Cc: x86@kernel.org, Peter Zijlstra , Steven Rostedt , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Indu Bhagat , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Mark Brown , linux-toolchains@vger.kernel.org, Jordan Rome , Sam James , linux-trace-kernel@vger.kerne.org, Jens Remus , Mathieu Desnoyers , Florian Weimer , Andy Lutomirski , bpf Subject: Re: [PATCH v3 09/19] unwind: Introduce sframe user space unwinding Message-ID: <20241101192937.opf4cbsfaxwixgbm@jpoimboe> References: <42c0a99236af65c09c8182e260af7bcf5aa1e158.1730150953.git.jpoimboe@kernel.org> <20241030055314.2vg55ychg5osleja@treble.attlocal.net> <20241031230313.ubybve4r7mlbcbuu@jpoimboe> Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, Nov 01, 2024 at 11:34:48AM -0700, Andrii Nakryiko wrote: > 00200000-170ad000 r--p 00000000 07:01 5 > 172ac000-498e7000 r-xp 16eac000 07:01 5 > 49ae7000-49b8b000 r--p 494e7000 07:01 5 > 49d8b000-4a228000 rw-p 4958b000 07:01 5 > 4a228000-4c677000 rw-p 00000000 00:00 0 > 4c800000-4ca00000 r-xp 49c00000 07:01 5 > 4ca00000-4f600000 r-xp 49e00000 07:01 5 > 4f600000-5b270000 r-xp 4ca00000 07:01 5 > > Sorry, I'm probably dense and missing something. But from the example > process above, isn't this check violated already? Or it's two > different things? Not sure, honestly. It's hard to tell exactly what's going on, did you strip the file names? The sframe limitation is per file, not per address space. I assume these are one file: > 172ac000-498e7000 r-xp 16eac000 07:01 5 and these are another: > 4c800000-4ca00000 r-xp 49c00000 07:01 5 > 4ca00000-4f600000 r-xp 49e00000 07:01 5 > 4f600000-5b270000 r-xp 4ca00000 07:01 5 Multiple mappings for a single file is fine, as long as they're contiguous. > > Actually I just double checked and even the kernel's ELF loader assumes > > that each executable has only a single text start+end address pair. > > See above, very confused by such assumptions, but I'm hoping we are > talking about two different things here. The "contiguous text" thing seems enforced by the kernel for executables. However it doesn't manage shared libraries, those are mapped by the loader, e.g. /lib64/ld-linux-x86-64.so.2. At a quick glance I can't tell if /lib64/ld-linux-x86-64.so.2 enforces that. > > There's no point in adding complexity to support some hypothetical. I > > can remove the printk though. > > We are talking about fundamental things like format for supporting > frame pointer-less stack trace capture. It will take years to adopt > SFrame everywhere, so I think it's prudent to think a bit ahead beyond > just saying "no real application should need more than 4GB text", IMO. I don't think anybody is saying that... -- Josh