This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MIPS] hsdis need non-executable PT_GNU_STACK support

Hi Joseph,

Thanks for your response!

hsdis is just able to workaround when linking with -Wl,-z,noexecstack flag, and my environment:

$ uname -a
Linux localhost.localdomain 3.10.84-19.fc21.loongson.2.mips64el #1 SMP PREEMPT Fri Jul 6 18:47:47 CST 2018 mips64 mips64 mips64 GNU/Linux

$ gcc -v
Using built-in specs.
Target: mips64el-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl= --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-arch=loongson3a --enable-languages=c,c++,objc,obj-c++,fortran,go,lto --enable-plugin --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/cloog-install --enable-gnu-indirect-function --with-long-double-128 --build=mips64el-redhat-linux
Thread model: posix
gcc version 4.9.3 20150626 (Red Hat 4.9.3-8) (GCC)

$ ld -v
GNU ld version 2.24

$ rpm -q glibc

But I want to find out the root cause, I have no idea whether or not kernel supported ELF MIPS_GNU_STACK:

+ /* Flag to indicate that non-executable stack supported by kernel.
+    Ref: arch/mips/include/asm/elf.h in kernel sources. */
+#define AV_FLAGS_MIPS_GNU_STACK	(1 << 24)

But what is the status of kernel and toolchain for X86? Why it is *not* able to reproduce the hsdis issue for X86?

And I can prepare the test environment with the latest kernel and toolchain applied with your patch. Please give me some suggestion to support your job, thanks a lot!

在 2018年08月14日 17:43, Joseph Myers 写道:
On Tue, 14 Aug 2018, Leslie Zhai wrote:

The root cause is the patch [MIPS] Enable non-executable PT_GNU_STACK support,
contributed by Faraz in 2016 February, had not been merged by GCC toolchain
Was there a non-RFC GCC patch posting?  RFC means you're looking for
comments with a view to producing later patch versions, not for an actual
review with a view to getting that version of the changes checked in.

As noted in <>
you'll need a non-RFC glibc patch posting, with architecture-independent
and MIPS-specific parts split out, and with comments pointing to the
upstream releases of kernel, GCC, binutils with relevant support.

Leslie Zhai

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]