public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27300] New: GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK not working
@ 2021-01-31 23:34 honggyu.kp at gmail dot com
  2021-01-31 23:36 ` [Bug libc/27300] " honggyu.kp at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: honggyu.kp at gmail dot com @ 2021-01-31 23:34 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27300

            Bug ID: 27300
           Summary: GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK not
                    working
           Product: glibc
           Version: 2.31
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: honggyu.kp at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Hi,

I'm developing a function tracing tool called
uftrace(https://github.com/namhyung/uftrace) and trying to handle the case when
Intel CET feature is on.

In the project, we've handled this case in the previous issue for Fedora at
https://github.com/namhyung/uftrace/issues/738.

But it started to be broken in ubuntu 20.04. It's may because the CET is on by
default and it adds endbr64 instruction at the entry of each function.

00000000000011c0 <main>:
    11c0:       f3 0f 1e fa             endbr64
    11c4:       55                      push   %rbp
    11c5:       48 89 e5                mov    %rsp,%rbp
            ...

It was handled by setting GLIBC_TUNABLES as follows.

  GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK

But it doesn't work unlike Fedora and we've also tried again with

  GLIBC_TUNABLES=glibc.cpu.x86_ibt=off:glibc.cpu.x86_shstk=off

It doesn't work as well.

I've found two commits related to those but those are not included in
glibc-2.31.
-
https://sourceware.org/git/?p=glibc.git;a=commit;h=94cd37ebb293321115a36a422b091fdb72d2fb08
-
https://sourceware.org/git/?p=glibc.git;a=commit;h=04dff6fc0d4ad44fc4491f89fed6574380b78251

It looks like there can be another bug in glibc in Ubuntu 20.04 and it uses
glibc-2.31.

  $ ls -l /lib/x86_64-linux-gnu/libc.so.6
  lrwxrwxrwx 1 root root 12 Dec 16 11:04 /lib/x86_64-linux-gnu/libc.so.6 ->
libc-2.31.so

Could anyone please have a look if it's another bug?

Otherwise, it'd be helpful if someone can help how I can disable Intel CET
feature at runtime.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-04 22:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31 23:34 [Bug libc/27300] New: GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK not working honggyu.kp at gmail dot com
2021-01-31 23:36 ` [Bug libc/27300] " honggyu.kp at gmail dot com
2021-01-31 23:37 ` honggyu.kp at gmail dot com
2021-01-31 23:39 ` honggyu.kp at gmail dot com
2021-01-31 23:39 ` honggyu.kp at gmail dot com
2021-01-31 23:47 ` hjl.tools at gmail dot com
2021-01-31 23:48 ` hjl.tools at gmail dot com
2021-02-01  8:42 ` honggyu.kp at gmail dot com
2021-02-01 21:41 ` hjl.tools at gmail dot com
2021-02-01 21:52 ` honggyu.kp at gmail dot com
2021-02-01 22:23 ` hjl.tools at gmail dot com
2021-02-01 23:42 ` honggyu.kp at gmail dot com
2021-02-04 21:34 ` honggyu.kp at gmail dot com
2021-02-04 22:54 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).