On Fri, Nov 1, 2024 at 12:44 PM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > On Fri, Nov 1, 2024 at 12:29 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote: > > > > 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 > > > I should have maybe posted this in this form: 00200000-170ad000 r--p 00000000 07:01 5 /packages/obfuscated_file 172ac000-498e7000 r-xp 16eac000 07:01 5 /packages/obfuscated_file 49ae7000-49b8b000 r--p 494e7000 07:01 5 /packages/obfuscated_file 49d8b000-4a228000 rw-p 4958b000 07:01 5 /packages/obfuscated_file 4a228000-4c677000 rw-p 00000000 00:00 0 4c800000-4ca00000 r-xp 49c00000 07:01 5 /packages/obfuscated_file 4ca00000-4f600000 r-xp 49e00000 07:01 5 /packages/obfuscated_file 4f600000-5b270000 r-xp 4ca00000 07:01 5 /packages/obfuscated_file Those paths are pointing to the same binary. > > > 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? > > Yes, I did, of course. But as I said, they all belong to the same main > binary of the process. > > > > > 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. > > No all of what I posted above belongs to the same file (except > "4a228000-4c677000 rw-p 00000000 00:00 0" which doesn't have > associated file, but I suspect it originally was part of this file, we > do some tricks with re-mmap()'ing stuff due to huge pages usage). > > > > > > > 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