On 12/20/21 22:41, Richard Henderson wrote:
> Create a list of subcodes that we want to pass on, a list of
> subcodes that should not be passed on because they would affect
> the running qemu itself, and a list that probably could be
> implemented but require extra work. Do not pass on unknown subcodes.
> 
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  linux-user/syscall.c | 56 ++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 52 insertions(+), 4 deletions(-)

> +    case PR_SET_SYSCALL_USER_DISPATCH:
> +    case PR_GET_THP_DISABLE:
> +    case PR_SET_THP_DISABLE:
> +    case PR_GET_TSC:
> +    case PR_SET_TSC:
> +    case PR_GET_UNALIGN:
> +    case PR_SET_UNALIGN:
>      default:

Unfortunately prctl values are not enumerated, so we can't remove
the default case to catch new values at build time.

Maybe a qemu_log_mask(LOG_UNIMP) call would help here? (only
for default?)

Regardless:
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

> -        /* Most prctl options have no pointer arguments */
> -        return get_errno(prctl(option, arg2, arg3, arg4, arg5));
> +        /* Disable to prevent the target disabling stuff we need. */
> +        return -TARGET_EINVAL;
>      }
>  }
>  


Reply via email to