All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: roman.stratiienko@globallogic.com, xenomai@xenomai.org
Subject: Re: [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers
Date: Tue, 19 Mar 2019 21:03:10 +0100	[thread overview]
Message-ID: <7e3568e9-a3b2-acce-79d8-ace79b4929ad@siemens.com> (raw)
In-Reply-To: <20190311143722.21320-1-roman.stratiienko@globallogic.com>

On 11.03.19 15:37, roman.stratiienko--- via Xenomai wrote:
> From: Roman Stratiienko <roman.stratiienko@globallogic.com>
> 
> Use access_wok / access_rok wrappers to enable support for kernel v5.0
> 
> Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
> ---
> 
> This patch is also required to support v5.0
> 
>   kernel/cobalt/pipe.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/cobalt/pipe.c b/kernel/cobalt/pipe.c
> index 0b8f8cbf8..16e85125c 100644
> --- a/kernel/cobalt/pipe.c
> +++ b/kernel/cobalt/pipe.c
> @@ -28,6 +28,7 @@
>   #include <linux/device.h>
>   #include <linux/uaccess.h>
>   #include <asm/io.h>
> +#include <asm/xenomai/syscall.h>
>   #include <cobalt/kernel/sched.h>
>   #include <cobalt/kernel/heap.h>
>   #include <cobalt/kernel/pipe.h>
> @@ -795,7 +796,7 @@ static ssize_t xnpipe_read(struct file *file,
>   	ssize_t ret;
>   	spl_t s;
>   
> -	if (!access_ok(VERIFY_WRITE, buf, count))
> +	if (!access_wok(buf, count))
>   		return -EFAULT;
>   
>   	xnlock_get_irqsave(&nklock, s);
> @@ -903,7 +904,7 @@ static ssize_t xnpipe_write(struct file *file,
>   	if (count == 0)
>   		return 0;
>   
> -	if (!access_ok(VERIFY_READ, buf, count))
> +	if (!access_rok(buf, count))
>   		return -EFAULT;
>   
>   	xnlock_get_irqsave(&nklock, s);
> 

And this one is in now as well.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


      parent reply	other threads:[~2019-03-19 20:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:37 [PATCH] kernel: cobalt: replace access_ok with corresponding wrappers roman.stratiienko
2019-03-11 14:37 ` [PATCH v3] travis: add basic CI support roman.stratiienko
2019-03-18 12:59   ` Jan Kiszka
2019-03-18 13:25     ` Jan Kiszka
2019-03-18 14:21       ` Roman Stratiienko
2019-03-18 14:24         ` Jan Kiszka
2019-03-18 15:39           ` Jan Kiszka
2019-03-18 16:47             ` Roman Stratiienko
2019-03-18 16:51               ` Jan Kiszka
2019-03-18 17:22                 ` Roman Stratiienko
2019-03-18 17:45                   ` Philippe Gerum
2019-03-19 20:03 ` Jan Kiszka [this message]

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=7e3568e9-a3b2-acce-79d8-ace79b4929ad@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=roman.stratiienko@globallogic.com \
    --cc=xenomai@xenomai.org \
    /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.