Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Andrew Donnellan
On 11/8/20 11:41 pm, Daniel Axtens wrote: +static bool block_rtas_call(int token, int nargs, + struct rtas_args *args) +{ + int i; + const char *reason; + char *token_name = rtas_token_name(token); This code isn't particularly performance critical,

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Daniel Axtens
Andrew Donnellan writes: > On 10/8/20 4:40 pm, Michael Ellerman wrote: >> Hi ajd, >> >> Thanks for taking care of this. >> >> I was going to merge this as-is, but given it's fixing a long standing >> issue there's not really a big rush. So a few comments below. > > Thanks for the review. > >>>

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Michael Ellerman
Andrew Donnellan writes: > On 10/8/20 4:40 pm, Michael Ellerman wrote: >> Hi ajd, >> >> Thanks for taking care of this. >> >> I was going to merge this as-is, but given it's fixing a long standing >> issue there's not really a big rush. So a few comments below. > > Thanks for the review. > >>>

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Andrew Donnellan
On 10/8/20 4:40 pm, Michael Ellerman wrote: Hi ajd, Thanks for taking care of this. I was going to merge this as-is, but given it's fixing a long standing issue there's not really a big rush. So a few comments below. Thanks for the review. diff --git a/arch/powerpc/kernel/rtas.c

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-10 Thread Michael Ellerman
Hi ajd, Thanks for taking care of this. I was going to merge this as-is, but given it's fixing a long standing issue there's not really a big rush. So a few comments below. Andrew Donnellan writes: > A number of userspace utilities depend on making calls to RTAS to retrieve > information and

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-07-26 Thread Daniel Axtens
Andrew Donnellan writes: > A number of userspace utilities depend on making calls to RTAS to retrieve > information and update various things. > > The existing API through which we expose RTAS to userspace exposes more > RTAS functionality than we actually need, through the sys_rtas syscall, >

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.7, v5.4.50, v4.19.131, v4.14.187, v4.9.229, v4.4.229. v5.7.7: Build OK!

[PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-07-02 Thread Andrew Donnellan
A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which allows root (or anyone with