rela | Reinforcement Learning Assembly | Reinforcement Learning library
kandi X-RAY | rela Summary
kandi X-RAY | rela Summary
Reinforcement Learning Assembly
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rela
rela Key Features
rela Examples and Code Snippets
Community Discussions
Trending Discussions on rela
QUESTION
I am studying ROP on Arm64, I posted my thread here Return Oriented Programming on ARM (64-bit)
However a new/separate issue about choosing rop gadgets has arisen which requires the opening of a new thread. So to sum up i am studying ROP vulnerability on ARM 64 bit and i am trying to test it using a very simple c code (attached to the previous thread). I'am using ropper tool in order to search for gadgets to build my rop chain. But when i overflow the pc with the address of the gadget i got this within gdb:
...ANSWER
Answered 2021-Jun-13 at 14:57Your gadget is at 0x55555558f8
.
Ropper shows the addresses of gadgets the way the ELF header describes the memory layout of the binary. According to that header:
- The file contents 0x0-0xadc are to be mapped as
r-x
at address 0x0. - The file contents 0xdb8-0x1048 are to be mapped as
rw-
at address 0x10db8.
Account for page boundaries and you get one page mapping file offset 0x0 to address 0x0 as executable and two pages mapping file offset 0x0 to address 0x10000 as writeable.
From your GDB dump, these mappings are created at 0x5555555000 and 0x5555565000 in the live process, respectively.
QUESTION
I am sort of new to kernel programming, but i have been struggling a ton with this issue for days now. I have a machine with linux kernel '5.10.0-kali7-amd64' and im using it for development of a linux kernel module for Ubutnu 16.04.4 '4.4.0-119-generic', but i can't figure out any way that i can compile it on my machine for that version and for it to actually work on the 4.4.0 kernel machine.
The closest i've got is this:
- I downloaded source from https://launchpad.net/ubuntu/xenial/+package/linux-headers-4.4.0-119 and installed with dpkg
- I then downloaded and installed the 4.4.0-119-generic from https://www.ubuntuupdates.org/package/core/xenial/main/updates/linux-image-4.4.0-119-generic
- Both of them installed with no issue.
- I compiled my module by using in my Makefile
make -C /lib/modules/4.4.0-119-generic/build M=$(PWD) modules
which also worked and compiled my hello world module.
However when uploaded to the 4.4.0 machine the insmod errored saying insmod: ERROR: could not insert module rootkitMy.ko: Invalid module format
. The dmesg says: module: rootkit: Unknown rela relocation: 4
I then compiled my source code on the 4.4.0 machine and created a module with literally the exact same modinfo, but that one did work.
here are the modinfos for both:
ANSWER
Answered 2021-May-29 at 13:57I managed to resolve the issue. Unknown rela relocation: 4
is an insmod error you get due to a change in the way the kernel handles PLT, more specifically the R_X86_64_PC32 and R_X86_64_PLT32. With binutils >= 2.31, the linker has decided to use R_X86_64_PLT32 relocations, which aren't supported in the older kernel.
To fix this:
- I downloaded an older version of binutils (2.26.1) from https://ftp.gnu.org/gnu/binutils/
- extracted the folder from the archive
- compiled the binutils to /usr/local/binutils-2.6 by running
QUESTION
Edit: Still No answer works, the output is:
...ANSWER
Answered 2021-May-27 at 20:53I think your arithmetic has gone wrong.
The first LOAD segment is loaded at address 0x400000 and has size 0x1d14, so it indeed includes the 10 bytes starting at 0x401bc0, at offset 0x401bc0 - 0x400000 = 0x1bc0
into this segment. The segment starts at offset 0 in the file, so you need to look at offset 0x1bc0
in the file, not offset 0xbc0
. And 0x1bc0
is decimal 7104
.
(And 0xbc0
in decimal is 3008, not 4660. A good fact to memorize for mental arithmetic is that 0x1000 = 4096
is one page. So 0x1bc0
must be between 4096 and 8192, and likewise 0xbc0
must be less than 4096. That's how I could tell at a glance that something was wrong with your math.)
QUESTION
I have gone through the internet for hours for similar cases to mine but I've tried all solutions and hasn't got my code working. I'm using a library called "vdo_slam" which has been built and can be found in /usr/local/include/vdo_slam
. In my project's CMakeList.txt
I can find_package(vdo_slam REQUIRED)
with no error. The only problem I have is at the end of "catkin_build" I get several of these "undefined reference to ...." as shown below. I have tried several solutions as listed below. All these undefined references are declared and defined inside the "vdo_slam" package. Any help is appreciated.
Known solutions I have tried:
I looked for classes and functions mentioned in the errors and see if there are pure virtual destructors as mentioned in here but they are all defined solidly.
I have tried to debug with "readelf" command as shown below referring to this. But i don't have the "libvdo_slam.so" which actually includes these functions in the error. I suppose i need to have "libvdo_slam.so" when i run this "readelf" command right? How can i add that?
Error message from "catkin_build":
...ANSWER
Answered 2021-May-02 at 01:02Eureka!
I found a solution although it's not an ideal one. As mentioned in the question, I noticed that libvdo_slam.so
was not listed as a shared library when running $ readelf
. So I manually added -lvdo_slam
in the CMakeList.txt so it looks like:
QUESTION
I compile a sample code in following:
...ANSWER
Answered 2021-Apr-02 at 18:01On "mainstream" CPUs like Skylake-X and IceLake, it's only worth using 512-bit vectors at all if you use them consistently for a lot of your program's run-time, not just for an occasional memcpy. See SIMD instructions lowering CPU frequency for the details: you don't want occasional calls to memcpy to hold your CPU frequency down to a lower max turbo.
Using AVX-512 features with 256-bit vectors (AVX-512VL) can be worth it for some things, e.g. if masking is nice, or if you use YMM16..31 to avoid VZEROUPPER.
I'd guess that glibc would only resolve memcpy to __memcpy_avx512_no_vzeroupper
on systems like Knight's Landing (KNL) Xeon Phi, where the CPU is designed around AVX-512, and there's no downside to using 512-bit ZMM vectors. There's no need for vzeroupper even after using ymm0..15 on KNL. In fact vzeroupper is very slow on KNL, and definitely something to avoid, hence putting no_vzeroupper
in the function name.
https://code.woboq.org/userspace/glibc/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S.html is the source for that version. It uses ZMM vectors, including ZMM0..15, so if used on a Skylake/IceLake CPU it should use vzeroupper. This version looks designed for KNL.
There would be some tiny benefit to having an AVX-512VL version that used ymm16..31 to avoid vzeroupper (to speed 32 .. 64 byte copies), without ever using ZMM registers.
And it would make sense for __memcpy_avx512_no_vzeroupper
to only use ZMM16..31 so avoiding vzeroupper isn't a problem on mainstream CPUs; then it would be a usable option in code that already made heavy use of AVX-512 (and thus was already paying the CPU-frequency cost.)
QUESTION
I am trying to convert a list into a tree structure for a primeng TreeTable.
...ANSWER
Answered 2021-Mar-31 at 10:30I just wrote and tested this code for you, I believe it can be better refactored but most important that it can achieve the same structure you wanted
QUESTION
I am building an ELF binary which needs to be able to process and reverse its own relocations at runtime. (The reversing will happen in a separate buffer, not in the original code page, obviously.) The purpose of this is so that the module contents in memory can be HMAC'd and compared against a known good value calculated from the module on disk, to ensure no corruption has occurred. I'm aware that this is somewhat unusual, but it's a requirement of a standard that we have to adhere to.
I've been able to reverse all of the relocations in the binary except for the R_X86_64_JUMP_SLOT
relocations which happen in the Global Offset Table. . Looking at the relocation entries in my test module's .rela.plt
section with readelf -a mylib.so
, I see these relocations:
ANSWER
Answered 2021-Mar-26 at 03:55You can sidestep the problem by compiling with -fno-plt
so you don't have any PLT entries at all, and the associated lazy-binding machinery doesn't come into play.
GCC and clang will use call *printf@GOTPCREL(%rip)
which forces early binding: resolving the GOT entries on process startup. This makes each call more efficient, and some distros (e.g. Arch GNU/Linux) are compiling their packages this way already.
TL:DR: This is generally a good option, it's just not on by default (yet) in current GCC and clang distro configs.
QUESTION
So I want to debug a golang application that is running on k8s cluster, but I get the error message when I want to attach delve to the app. "could not attach to pid XXX: could not open debug info "
In the k8s deployments I added the needed privileges:
...ANSWER
Answered 2021-Feb-28 at 07:00You're passing -s -w
as flags to the linker.
According to the documentation of cmd/link
:
-s: Omit the symbol table and debug information.
-w: Omit the DWARF symbol table.
In short, your build command removes the information your debugger requires for debugging.
If you remove -ldflags
(or only -s -w
), it should work as expected.
QUESTION
I would like to debug with gdb an app on an embedded system. This app requires a newer glibc, threading and works correctly by invoking the Linux dynamic loader ld-linux-x86-64.so.2
. What I would like is to attach gdb and see the symbols and stack trace, but the loader "interferes" with gdb.
Here's a sample test.c
file:
ANSWER
Answered 2021-Feb-26 at 16:21but none worked...
The add-symbol-file ...
solution should work. I suspect you are not supplying correct .text
address.
cat /proc/30622/maps | grep "r-xp" | grep "/root/test/test"
This assumes that the very first segment of /root/test/test
has RX
permissions.
That used to be the case, but no longer is on modern systems (see e.g. this answer).
You didn't provide output from readelf -Wl /root/test/test
, but I bet it looks similar to the 4-segment example from the other answer (with the first LOAD
segment having R
ead only permissions.
Generally you need to find the address of the first LOAD
segment of the test
executable in memory, and add the address of .text
to that base address.
Update:
With the newly-supplied output from /proc/$pid/maps
and readelf
, we can see that my guess was correct: this binary has 4 LOAD
segments, and the first one doesn't have r-x
permissions.
The calculation then is: $address_of_the_first_PT_LOAD + $address_of_.text
. That is (for the 16873 process):
QUESTION
I've been having a problem while using Fast Reports in Delphi, The Object I'm using is TfrxMailExport, The problem I'm facing is that the values of the email server aren't getting filled properly.
The Code:
...ANSWER
Answered 2021-Feb-26 at 18:17Since the post is not likely to get an answer (if there is one), I'm gonna post my workaround as a solution in case someone is having the same problem.
I created a form similar to the one in Fast Reports, I export the FR file to PDF, this one works fine.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rela
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page