Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-04 Thread Jason Gunthorpe
On Fri, Apr 02, 2021 at 06:29:55PM -0700, Kees Cook wrote: > On Fri, Apr 02, 2021 at 08:30:18PM -0300, Jason Gunthorpe wrote: > > On Fri, Apr 02, 2021 at 04:03:30PM -0700, Kees Cook wrote: > > > > > > relevant. It seems to me that the hw_counters 'struct attribute_group' > > > > should probably

Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-03 Thread Nathan Chancellor
On Fri, Apr 02, 2021 at 04:03:30PM -0700, Kees Cook wrote: > On Fri, Apr 02, 2021 at 12:52:41PM -0700, Nathan Chancellor wrote: > > Hi all, > > > > I am testing the Clang Control Flow Integrity series that is being > > worked on right now [1] and I encounter a violation in the Infiniband > >

Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Kees Cook
On Fri, Apr 02, 2021 at 08:30:18PM -0300, Jason Gunthorpe wrote: > On Fri, Apr 02, 2021 at 04:03:30PM -0700, Kees Cook wrote: > > > > relevant. It seems to me that the hw_counters 'struct attribute_group' > > > should probably be its own kobj within both of these structures so they > > > can have

Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Jason Gunthorpe
On Fri, Apr 02, 2021 at 04:03:30PM -0700, Kees Cook wrote: > > relevant. It seems to me that the hw_counters 'struct attribute_group' > > should probably be its own kobj within both of these structures so they > > can have their own sysfs ops (unless there is some other way to do this > > that I

Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Kees Cook
On Fri, Apr 02, 2021 at 12:52:41PM -0700, Nathan Chancellor wrote: > Hi all, > > I am testing the Clang Control Flow Integrity series that is being > worked on right now [1] and I encounter a violation in the Infiniband > sysfs core (drivers/infiniband/core/sysfs.c) on an arm64 server with mlx5:

CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Nathan Chancellor
Hi all, I am testing the Clang Control Flow Integrity series that is being worked on right now [1] and I encounter a violation in the Infiniband sysfs core (drivers/infiniband/core/sysfs.c) on an arm64 server with mlx5: $ cat /sys/class/infiniband/mlx5_bond_0/ports/1/hw_counters/lifespan 12 $