mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Maninder Singh <maninder1.s@samsung.com>
Cc: Michal Marek <mmarek@suse.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"open list:KERNEL BUILD + fi..." <linux-kbuild@vger.kernel.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	pankaj.m@samsung.com, ajeet.y@samsung.com,
	Vaneet narang <v.narang@samsung.com>
Subject: Re: [PATCH 1/1] kasan: Support for r/w instrumentation control
Date: Mon, 12 Dec 2016 11:05:37 +0100	[thread overview]
Message-ID: <CACT4Y+aXgQHrLWHmNdHKPef5VBVHE2zBULyi0GNk3z_nvy67ow@mail.gmail.com> (raw)
In-Reply-To: <1481535157-24628-1-git-send-email-maninder1.s@samsung.com>

On Mon, Dec 12, 2016 at 10:32 AM, Maninder Singh
<maninder1.s@samsung.com> wrote:
> This provide option to control sanity of read and write operations
> Both read and write instrumentation increase size of uImage, So using
> this option read or write instrumentation can be avoided if not required.
> Useful in case of module sanity, using this uImage sanity can be avoided.
>
> Also user space ASAN provides this support for read/write instrumentation
> control.

Hi,

Do you actually hit an issue with image size? In what context?
Do you use inline/outline instrumentation? Does switching to the other
option help?
Does it make sense to ever disable writes? I assume that you are
disabling reads, right?
Disabling both certainly does not make sense.


> Signed-off-by: Vaneet narang <v.narang@samsung.com>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Ajeet Yadav <ajeet.y@samsung.com>
> ---
>  lib/Kconfig.kasan      | 16 ++++++++++++++++
>  scripts/Makefile.kasan |  4 ++++
>  2 files changed, 20 insertions(+)
>
> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
> index bd38aab..6f0f774 100644
> --- a/lib/Kconfig.kasan
> +++ b/lib/Kconfig.kasan
> @@ -45,6 +45,22 @@ config KASAN_INLINE
>
>  endchoice
>
> +config KASAN_READS
> +               prompt "Read instrumentation"
> +               bool
> +               default y
> +               depends on KASAN
> +               help
> +                       This configuration controls the sanity of  memory read.

/\/\/\

double space in "of  memory"

> +
> +config KASAN_WRITES
> +               prompt "Write instrumentation"
> +               bool
> +               default y
> +               depends on KASAN
> +               help
> +                       This configuration controls the sanity of memory write.
> +
>  config TEST_KASAN
>         tristate "Module for testing kasan for bug detection"
>         depends on m && KASAN
> diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
> index 37323b0..a61b18e 100644
> --- a/scripts/Makefile.kasan
> +++ b/scripts/Makefile.kasan
> @@ -29,3 +29,7 @@ else
>      endif
>  endif
>  endif
> +
> +CFLAGS_KASAN += $(call cc-option, \
> +               $(if $(CONFIG_KASAN_READS),, --param asan-instrument-reads=0) \
> +               $(if $(CONFIG_KASAN_WRITES),, --param asan-instrument-writes=0))
> --
> 1.9.1
>

  reply	other threads:[~2016-12-12 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  9:32 Maninder Singh
2016-12-12 10:05 ` Dmitry Vyukov [this message]
     [not found] ` <CGME20161212100600epcas4p2417928d125eb8b25589023cf0fdb733f@epcas4p2.samsung.com>
2016-12-12 10:29   ` Vaneet Narang
2016-12-12 10:49     ` Dmitry Vyukov
2016-12-12 11:12     ` Vaneet Narang
     [not found]       ` <CACT4Y+YGK=2beyfo14ibOx92Lf8MefjQe5PhH2BSSj=v2pFaRw@mail.gmail.com>
2016-12-12 13:44         ` Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACT4Y+aXgQHrLWHmNdHKPef5VBVHE2zBULyi0GNk3z_nvy67ow@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=ajeet.y@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maninder1.s@samsung.com \
    --cc=mmarek@suse.com \
    --cc=pankaj.m@samsung.com \
    --cc=v.narang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®