search for: interpose

Displaying 20 results from an estimated 117 matches for "interpose".

2016 Nov 29
2
RFC: Add an "interposible" linkage type (and implement -fsemantic-interposition)
...interposition is in a confusing > > > state, > > > and I propose making a few (hopefully simple) adjustments in > > > order > > > to bring our model into a self-consistent state. > > > > > > The problem: On ELF systems, global symbols can be interposed. > > > This > > > means, for example, that calls to global functions in some > > > (shared) > > > library defined in that same library might end up being > > > redirected > > > to an implementation in some other library (or in the main > &gt...
2016 Nov 29
4
RFC: Add an "interposible" linkage type (and implement -fsemantic-interposition)
...> wrote: > Hi everyone, > > Clang/LLVM's support for ELF interposition is in a confusing state, and I > propose making a few (hopefully simple) adjustments in order to bring our > model into a self-consistent state. > > The problem: On ELF systems, global symbols can be interposed. This means, > for example, that calls to global functions in some (shared) library > defined in that same library might end up being redirected to an > implementation in some other library (or in the main executable). The most > common reason for this is the use of LD_PRELOAD, but the...
2016 Feb 23
2
RFC: Add guard intrinsics to LLVM
On Mon, Feb 22, 2016 at 11:18 PM, Chandler Carruth <chandlerc at gmail.com> wrote: >> # step A: Introduce an `interposable` function attribute >> >> We can bike shed on the name and the exact specification, but the >> general idea is that you cannot do IPA / IPO over callsites calling >> `interposable` functions without inlining them. This attribute will
2017 Jun 14
4
LLD support for mach-o aliases (weak or otherwise)
...(PAGE_ZERO control, overriding the shared cache mappings, etc) that is really the only supported mechanism. > The issue I am having with libSystem.dylib is the lack of weak linkage (versus weak_import) i.e. weak aliases. I don’t want to use a wrapper binary with DYLD_INSERT_LIBRARIES. I want to interpose Libc symbols with some of the symbols present in my binary (memory allocator, mmap). Interposition support is somewhat lacking in the Mach-O toolchain and runtime linker despite the Mach-O format technically supporting what I need (N_INDR and N_WEAK_DEF). > > - https://developer.apple.com/do...
2016 Nov 29
0
RFC: Add an "interposible" linkage type (and implement -fsemantic-interposition)
Hi everyone, Clang/LLVM's support for ELF interposition is in a confusing state, and I propose making a few (hopefully simple) adjustments in order to bring our model into a self-consistent state. The problem: On ELF systems, global symbols can be interposed. This means, for example, that calls to global functions in some (shared) library defined in that same library might end up being redirected to an implementation in some other library (or in the main executable). The most common reason for this is the use of LD_PRELOAD, but there are plenty of oth...
2016 Feb 23
5
RFC: Add guard intrinsics to LLVM
Assuming everyone is on the same page, here's a rough high level agenda: # step A: Introduce an `interposable` function attribute We can bike shed on the name and the exact specification, but the general idea is that you cannot do IPA / IPO over callsites calling `interposable` functions without inlining them. This attribute will (usually) have to be used on function bodies that can
2016 Nov 30
2
RFC: Add an "interposible" linkage type (and implement -fsemantic-interposition)
...> wrote: > Hi everyone, > > Clang/LLVM's support for ELF interposition is in a confusing state, and I > propose making a few (hopefully simple) adjustments in order to bring our > model into a self-consistent state. > > The problem: On ELF systems, global symbols can be interposed. This means, > for example, that calls to global functions in some (shared) library > defined in that same library might end up being redirected to an > implementation in some other library (or in the main executable). The most > common reason for this is the use of LD_PRELOAD, but the...
2016 Feb 23
2
RFC: Add guard intrinsics to LLVM
On Tue, Feb 23, 2016 at 10:55 AM, Chandler Carruth <chandlerc at gmail.com> wrote: >> Part of the challenge here is to specify the attribute in a way that >> allows inlining, but not IPA without inlining. In fact, maybe it is >> best to not call it "interposable" at all? > > > Yea, this is something *very* different from interposable. GCC and other >
2016 Feb 29
4
Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
...at is, it explicitly ALLOWS for replacing the symbol's > definition. The policy of "You can't replace the definition of the > symbol, but it is globally visible" is exactly what the "protected" > visibility mode is for. > If we want to say that you can't interpose by default on ELF targets, > that would be a choice. Then, we should make the default symbol > visibility "protected" instead of "default". But, continuing to > generate calls through the PLT -- which is only needed because the > symbols might be replaced -- while si...
2004 Feb 21
0
Solaris interposer code for nsswitch.conf
...o some people. tim. ps I'm not a C coder so this may not be the best in the world - if anyone can do it better then please fix and post to the list. /* * Intercept open() call so that rather than using /etc/nsswitch.conf, * a different file can be used. Build as follows: * cc -o nsswitch_interposer.so -G -Jpic nsswitch_interposer.c * setenv LD_PRELOAD $cwd/nsswitch_interposer.so * run smbd * * Remove the printf statements in each function when using in earnest - they are just there for debugging. */ #include <stdio.h> #include <strings.h> #include <dlfcn.h> FILE* fop...
2006 Apr 05
23
DTrace as a security tool / http://systrace.org
...things like: "httpd can bind to port 80 but not any other port, it can open for writting files in /var/apache/log but no where else". It seems that a lot of what systrace needs to implement the policy is already available with the fbt and syscall providers since it largely just "interposes" on system calls. I think the key thing here is we would need for DTrace not just observe but to be able to change program flow, by that I mean if the policy says that a given system call isn''t allowed we need to return in error without ever running the code of the system call....
2016 Mar 11
2
RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
...ut there who’s relying on interposition despite our poor support for it. Therefore, we need to have a story for how to unbreak them. For a small number of interposable symbols, it’s reasonable for us to tell them to use __attribute__((weak)). However, some people might have a ton of symbols they interpose, and other people will complain about us doing things differently from GCC; for those people, we will need to support an explicit -fsemantic-interposition option. So let’s talk about how to support that. Deciding whether a symbol is dynamically replaceable should not be a target- and option-speci...
2013 Sep 30
1
how to interpose my own "[" function?
I want to create my own "[" function (for use on vectors, matrices, arrays, etc.), which calls the stock R "[", does some additional work, and then finally returns the modified result. But, how do I properly call the stock R "[" function? It takes a varying number of positional arguments, and its R-level closure is just: .Primitive("[") It's
2012 Dec 04
3
[LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
+kledzik at apple.com The dynamic runtime is using dylib interposition (google for "__DATA,__interpose). If I'm understanding correctly (Nick, can you please confirm this?) this allows to interpose the function regardless of the two-level namespace. The support for dynamic runtime in ASan is almost there. But the new interposition method has revealed some issues with the allocator which were cor...
2017 Jun 14
1
LLD support for mach-o aliases (weak or otherwise)
> On Jun 6, 2017, at 4:08 PM, Michael Clark via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi Folks, > > I’m working on a port of musl libc to macos (arch triple is “x86_64-xnu-musl”) to solve some irreconcilable issues I’m having with libSystem.dylib. I don’t want to use glibc for various reasons, mainly because I want to static link. I have static PIE + ASLR working
2016 Mar 11
4
RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
...lvm.org>> wrote: > I mean, I’ve never really liked ELF’s stance on symbol interposition, but taking it as given, I’m not sure I agree that it’s reasonable to carve out virtual functions as a general exception. > > Given that LLVM does IPO (inlining, funcattrs) on symbols that can be interposed on ELF, we already don't support interposability very well: > https://llvm.org/bugs/show_bug.cgi?id=23501 <https://llvm.org/bugs/show_bug.cgi?id=23501> > > Adding another exception for virtual functions, especially under an off-by-default flag, doesn't seem like a big deal....
2002 Nov 04
3
passwd command problem with Solaris/winbind/pam
Hi- I am running Samba 2.2.5 on Solaris 8 with winbind and pam configured. I have the following in my nsswitch.conf: passwd: files winbind group: files winbind Now local users on the Solaris 8 machine cannot change there password using the passwd command: Here is the sample output: # passwd michasp1 Enter new password: Enter new password again: Supported configurations for passwd
2012 Dec 04
0
[LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
On Tue, Dec 04, 2012 at 09:46:09AM -0800, Alexander Potapenko wrote: > +kledzik at apple.com > The dynamic runtime is using dylib interposition (google for > "__DATA,__interpose). > If I'm understanding correctly (Nick, can you please confirm this?) > this allows to interpose the function regardless of the two-level > namespace. > The support for dynamic runtime in ASan is almost there. But the new > interposition method has revealed some issues with the...
2016 Feb 29
0
Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
...ike on Darwin) -- that is, it explicitly ALLOWS for replacing the symbol's definition. The policy of "You can't replace the definition of the symbol, but it is globally visible" is exactly what the "protected" visibility mode is for. If we want to say that you can't interpose by default on ELF targets, that would be a choice. Then, we should make the default symbol visibility "protected" instead of "default". But, continuing to generate calls through the PLT -- which is only needed because the symbols might be replaced -- while simultaneously making...
2006 Apr 17
2
Encrypting Ogg
...t if I sit my decrypter in between the reading application and the encrypted file, you should be able to use all the normal seeking operations, etc, on the "encrypted" file as the cleartext stream. But my brain gets a bit stuck on implementation... I'm not quite sure how to "interpose" my library/application that way. I'm using Python for development (I can always backtrack to C++/etc); my application should take an encrypted OGG stream and a key, and you should be able to seek through the file as if it wasn't encrypted. Any pointers? Similar projects? Any hel...