2019-10-14 08:41:47

by Dmitry Vyukov

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
>
> Hi Dmitry,
>
> I am from Qualcomm Linux Security Team, just going through KCSAN and found that there was a thread for arm64 support (https://lkml.org/lkml/2019/9/20/804).
>
> Can you please tell me if KCSAN is supported on ARM64 now? Can I just rebase the KCSAN branch on top of our let’s say android mainline kernel, enable the config and run syzkaller on that for finding race conditions?
>
> It would be very helpful if you reply, we want to setup this for finding issues on our proprietary modules that are not part of kernel mainline.
>
> Regards,
>
> Sachin Grover

+more people re KCSAN on ARM64


2019-10-14 09:13:45

by Marco Elver

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
>
> On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> >
> > Hi Dmitry,
> >
> > I am from Qualcomm Linux Security Team, just going through KCSAN and found that there was a thread for arm64 support (https://lkml.org/lkml/2019/9/20/804).
> >
> > Can you please tell me if KCSAN is supported on ARM64 now? Can I just rebase the KCSAN branch on top of our let’s say android mainline kernel, enable the config and run syzkaller on that for finding race conditions?
> >
> > It would be very helpful if you reply, we want to setup this for finding issues on our proprietary modules that are not part of kernel mainline.
> >
> > Regards,
> >
> > Sachin Grover
>
> +more people re KCSAN on ARM64

KCSAN does not yet have ARM64 support. Once it's upstream, I would
expect that Mark's patches (from repo linked in LKML thread) will just
cleanly apply to enable ARM64 support.

Thanks,
-- Marco

2019-10-14 09:31:45

by Sachin Grover

[permalink] [raw]
Subject: RE: KCSAN Support on ARM64 Kernel

Hi Marco,

When can we expect upstream of KCSAN on kernel mainline. Any timeline?

Regards,
Sachin Grover

-----Original Message-----
From: Marco Elver <[email protected]>
Sent: Monday, 14 October, 2019 2:40 PM
To: Dmitry Vyukov <[email protected]>
Cc: [email protected]; kasan-dev <[email protected]>; LKML <[email protected]>; Paul E. McKenney <[email protected]>; Will Deacon <[email protected]>; Andrea Parri <[email protected]>; Alan Stern <[email protected]>; Mark Rutland <[email protected]>
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
>
> On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> >
> > Hi Dmitry,
> >
> > I am from Qualcomm Linux Security Team, just going through KCSAN and found that there was a thread for arm64 support (https://lkml.org/lkml/2019/9/20/804).
> >
> > Can you please tell me if KCSAN is supported on ARM64 now? Can I just rebase the KCSAN branch on top of our let’s say android mainline kernel, enable the config and run syzkaller on that for finding race conditions?
> >
> > It would be very helpful if you reply, we want to setup this for finding issues on our proprietary modules that are not part of kernel mainline.
> >
> > Regards,
> >
> > Sachin Grover
>
> +more people re KCSAN on ARM64

KCSAN does not yet have ARM64 support. Once it's upstream, I would expect that Mark's patches (from repo linked in LKML thread) will just cleanly apply to enable ARM64 support.

Thanks,
-- Marco

2019-10-14 09:35:49

by Marco Elver

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

Hi Sachin,

My plan was to send patches upstream within the month.

Thanks,
-- Marco

On Mon, 14 Oct 2019 at 11:30, <[email protected]> wrote:
>
> Hi Marco,
>
> When can we expect upstream of KCSAN on kernel mainline. Any timeline?
>
> Regards,
> Sachin Grover
>
> -----Original Message-----
> From: Marco Elver <[email protected]>
> Sent: Monday, 14 October, 2019 2:40 PM
> To: Dmitry Vyukov <[email protected]>
> Cc: [email protected]; kasan-dev <[email protected]>; LKML <[email protected]>; Paul E. McKenney <[email protected]>; Will Deacon <[email protected]>; Andrea Parri <[email protected]>; Alan Stern <[email protected]>; Mark Rutland <[email protected]>
> Subject: Re: KCSAN Support on ARM64 Kernel
>
> On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
> >
> > On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> > >
> > > Hi Dmitry,
> > >
> > > I am from Qualcomm Linux Security Team, just going through KCSAN and found that there was a thread for arm64 support (https://lkml.org/lkml/2019/9/20/804).
> > >
> > > Can you please tell me if KCSAN is supported on ARM64 now? Can I just rebase the KCSAN branch on top of our let’s say android mainline kernel, enable the config and run syzkaller on that for finding race conditions?
> > >
> > > It would be very helpful if you reply, we want to setup this for finding issues on our proprietary modules that are not part of kernel mainline.
> > >
> > > Regards,
> > >
> > > Sachin Grover
> >
> > +more people re KCSAN on ARM64
>
> KCSAN does not yet have ARM64 support. Once it's upstream, I would expect that Mark's patches (from repo linked in LKML thread) will just cleanly apply to enable ARM64 support.
>
> Thanks,
> -- Marco
>

2019-10-14 10:20:54

by Mark Rutland

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, Oct 14, 2019 at 11:09:40AM +0200, Marco Elver wrote:
> On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
> >
> > On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> > >
> > > Hi Dmitry,
> > >
> > > I am from Qualcomm Linux Security Team, just going through KCSAN
> > > and found that there was a thread for arm64 support
> > > (https://lkml.org/lkml/2019/9/20/804).
> > >
> > > Can you please tell me if KCSAN is supported on ARM64 now? Can I
> > > just rebase the KCSAN branch on top of our let’s say android
> > > mainline kernel, enable the config and run syzkaller on that for
> > > finding race conditions?
> > >
> > > It would be very helpful if you reply, we want to setup this for
> > > finding issues on our proprietary modules that are not part of
> > > kernel mainline.
> > >
> > > Regards,
> > >
> > > Sachin Grover
> >
> > +more people re KCSAN on ARM64
>
> KCSAN does not yet have ARM64 support. Once it's upstream, I would
> expect that Mark's patches (from repo linked in LKML thread) will just
> cleanly apply to enable ARM64 support.

Once the core kcsan bits are ready, I'll rebase the arm64 patch atop.
I'm expecting some things to change as part of review, so it'd be great
to see that posted ASAP.

For arm64 I'm not expecting major changes (other than those necessary to
handle the arm64 atomic rework that went in to v5.4-rc1)

FWIW, I was able to run Syzkaller atop of my arm64/kcsan branch, but
it's very noisy as it has none of the core fixes.

Thanks,
Mark.

2019-12-02 05:09:16

by Sachin Grover

[permalink] [raw]
Subject: RE: KCSAN Support on ARM64 Kernel

Hi All,

Is there any update in Arm64 support of KCSAN.

Regards,
Sachin Grover

-----Original Message-----
From: Mark Rutland <[email protected]>
Sent: Monday, 14 October, 2019 3:50 PM
To: Marco Elver <[email protected]>
Cc: Dmitry Vyukov <[email protected]>; [email protected]; kasan-dev <[email protected]>; LKML <[email protected]>; Paul E. McKenney <[email protected]>; Will Deacon <[email protected]>; Andrea Parri <[email protected]>; Alan Stern <[email protected]>
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, Oct 14, 2019 at 11:09:40AM +0200, Marco Elver wrote:
> On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
> >
> > On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> > >
> > > Hi Dmitry,
> > >
> > > I am from Qualcomm Linux Security Team, just going through KCSAN
> > > and found that there was a thread for arm64 support
> > > (https://lkml.org/lkml/2019/9/20/804).
> > >
> > > Can you please tell me if KCSAN is supported on ARM64 now? Can I
> > > just rebase the KCSAN branch on top of our let’s say android
> > > mainline kernel, enable the config and run syzkaller on that for
> > > finding race conditions?
> > >
> > > It would be very helpful if you reply, we want to setup this for
> > > finding issues on our proprietary modules that are not part of
> > > kernel mainline.
> > >
> > > Regards,
> > >
> > > Sachin Grover
> >
> > +more people re KCSAN on ARM64
>
> KCSAN does not yet have ARM64 support. Once it's upstream, I would
> expect that Mark's patches (from repo linked in LKML thread) will just
> cleanly apply to enable ARM64 support.

Once the core kcsan bits are ready, I'll rebase the arm64 patch atop.
I'm expecting some things to change as part of review, so it'd be great to see that posted ASAP.

For arm64 I'm not expecting major changes (other than those necessary to handle the arm64 atomic rework that went in to v5.4-rc1)

FWIW, I was able to run Syzkaller atop of my arm64/kcsan branch, but it's very noisy as it has none of the core fixes.

Thanks,
Mark.

2019-12-02 09:40:42

by Marco Elver

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

We're in the process of upstreaming KCSAN, which will simplify a lot
of things including Arm64 support. So far KCSAN is not yet in
mainline, but I assume when that happens (if things go well, very
soon) it should be trivial to add Arm64 support based on Mark's
prototype.

Thanks,
-- Marco

On Mon, 2 Dec 2019 at 06:07, <[email protected]> wrote:
>
> Hi All,
>
> Is there any update in Arm64 support of KCSAN.
>
> Regards,
> Sachin Grover
>
> -----Original Message-----
> From: Mark Rutland <[email protected]>
> Sent: Monday, 14 October, 2019 3:50 PM
> To: Marco Elver <[email protected]>
> Cc: Dmitry Vyukov <[email protected]>; [email protected]; kasan-dev <[email protected]>; LKML <[email protected]>; Paul E. McKenney <[email protected]>; Will Deacon <[email protected]>; Andrea Parri <[email protected]>; Alan Stern <[email protected]>
> Subject: Re: KCSAN Support on ARM64 Kernel
>
> On Mon, Oct 14, 2019 at 11:09:40AM +0200, Marco Elver wrote:
> > On Mon, 14 Oct 2019 at 10:40, Dmitry Vyukov <[email protected]> wrote:
> > >
> > > On Mon, Oct 14, 2019 at 7:11 AM <[email protected]> wrote:
> > > >
> > > > Hi Dmitry,
> > > >
> > > > I am from Qualcomm Linux Security Team, just going through KCSAN
> > > > and found that there was a thread for arm64 support
> > > > (https://lkml.org/lkml/2019/9/20/804).
> > > >
> > > > Can you please tell me if KCSAN is supported on ARM64 now? Can I
> > > > just rebase the KCSAN branch on top of our let’s say android
> > > > mainline kernel, enable the config and run syzkaller on that for
> > > > finding race conditions?
> > > >
> > > > It would be very helpful if you reply, we want to setup this for
> > > > finding issues on our proprietary modules that are not part of
> > > > kernel mainline.
> > > >
> > > > Regards,
> > > >
> > > > Sachin Grover
> > >
> > > +more people re KCSAN on ARM64
> >
> > KCSAN does not yet have ARM64 support. Once it's upstream, I would
> > expect that Mark's patches (from repo linked in LKML thread) will just
> > cleanly apply to enable ARM64 support.
>
> Once the core kcsan bits are ready, I'll rebase the arm64 patch atop.
> I'm expecting some things to change as part of review, so it'd be great to see that posted ASAP.
>
> For arm64 I'm not expecting major changes (other than those necessary to handle the arm64 atomic rework that went in to v5.4-rc1)
>
> FWIW, I was able to run Syzkaller atop of my arm64/kcsan branch, but it's very noisy as it has none of the core fixes.
>
> Thanks,
> Mark.
>

2020-06-15 15:32:56

by Marco Elver

[permalink] [raw]
Subject: Re: KCSAN Support on ARM64 Kernel

On Mon, 14 Oct 2019 at 11:31, Marco Elver <[email protected]> wrote:
> My plan was to send patches upstream within the month.
[...]
> On Mon, 14 Oct 2019 at 11:30, <[email protected]> wrote:
[...]
> > When can we expect upstream of KCSAN on kernel mainline. Any timeline?
[...]
> > > > Can you please tell me if KCSAN is supported on ARM64 now? Can I just rebase the KCSAN branch on top of our let’s say android mainline kernel, enable the config and run syzkaller on that for finding race conditions?
[...]
> > KCSAN does not yet have ARM64 support. Once it's upstream, I would expect that Mark's patches (from repo linked in LKML thread) will just cleanly apply to enable ARM64 support.

Just FYI, KCSAN is in mainline now. I believe porting it to other
architectures has also become much simpler due to its reworked
ONCE/atomic support relying on proper compiler instrumentation instead
of other tricks.

Thanks,
-- Marco