On 26/10/2018 10:41, Peter Zijlstra wrote:
On Wed, Oct 24, 2018 at 12:34:49AM +0300, Igor Stoppa wrote:
+static __always_inline
That's far too large for inline.
The reason for it is that it's supposed to minimize the presence of
gadgets that might be used in JOP attacks.
I am ready to st
On 25/10/2018 01:24, Dave Hansen wrote:
+static __always_inline bool __is_wr_after_init(const void *ptr, size_t size)
+{
+ size_t start = (size_t)&__start_wr_after_init;
+ size_t end = (size_t)&__end_wr_after_init;
+ size_t low = (size_t)ptr;
+ size_t high = (size_t)ptr +
On Wed, Oct 24, 2018 at 12:34:49AM +0300, Igor Stoppa wrote:
> +static __always_inline
That's far too large for inline.
> +bool wr_memset(const void *dst, const int c, size_t n_bytes)
> +{
> + size_t size;
> + unsigned long flags;
> + uintptr_t d = (uintptr_t)dst;
> +
> + if (WARN
> +static __always_inline bool __is_wr_after_init(const void *ptr, size_t size)
> +{
> + size_t start = (size_t)&__start_wr_after_init;
> + size_t end = (size_t)&__end_wr_after_init;
> + size_t low = (size_t)ptr;
> + size_t high = (size_t)ptr + size;
> +
> + return likely(start
Implementation of write rare for statically allocated data, located in a
specific memory section through the use of the __write_rare label.
The basic functions are wr_memcpy() and wr_memset(): the write rare
counterparts of memcpy() and memset() respectively.
To minimize chances of attacks, this
5 matches
Mail list logo