lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a12cVdrEXdgWkHGHP6O04mz5khaB7WgQ1nvOptaUTu_SA@mail.gmail.com>
Date:   Fri, 19 Jul 2019 20:09:47 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     clang-built-linux <clang-built-linux@...glegroups.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: warning: objtool: fn1 uses BP as a scratch register

A lot of objtool fixes showed up in linux-next, so I looked at some
remaining ones.
This one comes a lot up in some configurations

https://godbolt.org/z/ZZLVD-

struct ov7670_win_size {
  int width;
  int height;
};
struct ov7670_devtype {
  struct ov7670_win_size *win_sizes;
  unsigned n_win_sizes;
};
struct ov7670_info {
  int min_width;
  int min_height;
  struct ov7670_devtype devtype;
} a;
int b;
int fn1() {
  struct ov7670_info c = a;
  int i = 0;
  for (; i < c.devtype.n_win_sizes; i++) {
    struct ov7670_win_size d = c.devtype.win_sizes[i];
    if (c.min_width && d.width < d.height < c.min_height)
      if (b)
        return 0;
  }
  return 2;
}

$ clang-8 -O2 -fno-omit-frame-pointer -fno-strict-overflow -c ov7670.i
$ objtool check  --no-unreachable --uaccess ov7670.o
ov7670.o: warning: objtool: fn1 uses BP as a scratch register

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ