diff mbox series

libsanitizer: Don't intercept ustat for Linux

Message ID 20180522123703.GA7551@intel.com
State New
Headers show
Series libsanitizer: Don't intercept ustat for Linux | expand

Commit Message

H.J. Lu May 22, 2018, 12:37 p.m. UTC
<sys/ustat.h> has been removed from glibc 2.28 by:

commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Sun Mar 18 11:28:59 2018 +0800

    Deprecate ustat syscall interface

This patch removes its reference from libsanitizer for Linux.

The LLVM patch is posted at

https://reviews.llvm.org/D47165

OK for trunk?

H.J.
---
	PR sanitizer/85835
	* sanitizer_common/sanitizer_common_syscalls.inc (ustat): Don't
	intercept for Linux.
	* sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
	include <sys/ustat.h> for Linux.
	(struct_ustat_sz): Don't define for Linux.
---
 libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc     | 2 +-
 .../sanitizer_common/sanitizer_platform_limits_posix.cc         | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Jakub Jelinek May 22, 2018, 1 p.m. UTC | #1
On Tue, May 22, 2018 at 05:37:03AM -0700, H.J. Lu wrote:
> <sys/ustat.h> has been removed from glibc 2.28 by:
> 
> commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
> Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> Date:   Sun Mar 18 11:28:59 2018 +0800
> 
>     Deprecate ustat syscall interface
> 
> This patch removes its reference from libsanitizer for Linux.
> 
> The LLVM patch is posted at
> 
> https://reviews.llvm.org/D47165
> 
> OK for trunk?

Please wait on whatever upstream accepts, then it can be cherry-picked.

	Jakub
diff mbox series

Patch

diff --git a/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc b/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc
index 6fd5ef74274..20b9afc5f60 100644
--- a/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc
@@ -921,7 +921,7 @@  POST_SYSCALL(newfstat)(long res, long fd, void *statbuf) {
   }
 }
 
-#if !SANITIZER_ANDROID
+#if !SANITIZER_LINUX && !SANITIZER_ANDROID
 PRE_SYSCALL(ustat)(long dev, void *ubuf) {}
 
 POST_SYSCALL(ustat)(long res, long dev, void *ubuf) {
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 858bb218450..8c2c30161c8 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -157,7 +157,6 @@  typedef struct user_fpregs elf_fpregset_t;
 # include <sys/procfs.h>
 #endif
 #include <sys/user.h>
-#include <sys/ustat.h>
 #include <linux/cyclades.h>
 #include <linux/if_eql.h>
 #include <linux/if_plip.h>
@@ -250,7 +249,6 @@  namespace __sanitizer {
 #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
 
 #if SANITIZER_LINUX && !SANITIZER_ANDROID
-  unsigned struct_ustat_sz = sizeof(struct ustat);
   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
 #endif // SANITIZER_LINUX && !SANITIZER_ANDROID