All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Laura Abbott <labbott@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Kernel Hardening <kernel-hardening@lists.openwall.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Alexander Popov <alex.popov@linux.com>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH] arm64: Add support for STACKLEAK gcc plugin
Date: Wed, 11 Jul 2018 19:06:25 -0700	[thread overview]
Message-ID: <CAGXu5jJtuut1E4DKB=AVs-pq8H9Jvwr3Ve6eskraBL3ekfUzqA@mail.gmail.com> (raw)
In-Reply-To: <08f1c1d4-52a8-6d42-fe56-241c255ba934@redhat.com>

On Wed, Jul 11, 2018 at 6:45 PM, Laura Abbott <labbott@redhat.com> wrote:
>> +#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
>> +#define MIN_STACK_LEFT 256
>> +
>> +void __used stackleak_check_alloca(unsigned long size)
>> +{
>> +       unsigned long sp, stack_left;
>> +
>> +       sp = current_stack_pointer;
>> +
>> +       stack_left = sp & (THREAD_SIZE - 1);
>> +       BUG_ON(stack_left < MIN_STACK_LEFT ||
>> +               size >= stack_left - MIN_STACK_LEFT);
>> +}
>> +EXPORT_SYMBOL(stackleak_check_alloca);
>> +#endif
>
>
> I think the conclusion was this needs to be re-written to account
> for the different stack sizes in the same way as x86.

Oh, whoops! Sorry, I missed that fork of the thread. :)

-Kees

-- 
Kees Cook
Pixel Security

WARNING: multiple messages have this Message-ID (diff)
From: keescook@chromium.org (Kees Cook)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Add support for STACKLEAK gcc plugin
Date: Wed, 11 Jul 2018 19:06:25 -0700	[thread overview]
Message-ID: <CAGXu5jJtuut1E4DKB=AVs-pq8H9Jvwr3Ve6eskraBL3ekfUzqA@mail.gmail.com> (raw)
In-Reply-To: <08f1c1d4-52a8-6d42-fe56-241c255ba934@redhat.com>

On Wed, Jul 11, 2018 at 6:45 PM, Laura Abbott <labbott@redhat.com> wrote:
>> +#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
>> +#define MIN_STACK_LEFT 256
>> +
>> +void __used stackleak_check_alloca(unsigned long size)
>> +{
>> +       unsigned long sp, stack_left;
>> +
>> +       sp = current_stack_pointer;
>> +
>> +       stack_left = sp & (THREAD_SIZE - 1);
>> +       BUG_ON(stack_left < MIN_STACK_LEFT ||
>> +               size >= stack_left - MIN_STACK_LEFT);
>> +}
>> +EXPORT_SYMBOL(stackleak_check_alloca);
>> +#endif
>
>
> I think the conclusion was this needs to be re-written to account
> for the different stack sizes in the same way as x86.

Oh, whoops! Sorry, I missed that fork of the thread. :)

-Kees

-- 
Kees Cook
Pixel Security

  reply	other threads:[~2018-07-12  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  0:03 [PATCH] arm64: Add support for STACKLEAK gcc plugin Kees Cook
2018-07-12  0:03 ` Kees Cook
2018-07-12  1:45 ` Laura Abbott
2018-07-12  1:45   ` Laura Abbott
2018-07-12  2:06   ` Kees Cook [this message]
2018-07-12  2:06     ` Kees Cook

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='CAGXu5jJtuut1E4DKB=AVs-pq8H9Jvwr3Ve6eskraBL3ekfUzqA@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=alex.popov@linux.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.