qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: laurent@vivier.eu, "Warner Losh" <imp@bsdimp.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN
Date: Tue, 9 Jan 2024 00:21:47 +0100	[thread overview]
Message-ID: <77aa582f-3c0c-47de-984b-69faabfaafdf@linaro.org> (raw)
In-Reply-To: <98572a44-c587-4591-b2e4-b07f6f28bde3@linaro.org>

On 8/1/24 22:13, Richard Henderson wrote:
> On 1/9/24 04:15, Philippe Mathieu-Daudé wrote:
>>> +/*
>>> + * This can't go in hw/core/cpu.c because that file is compiled only
>>> + * once for both user-mode and system builds.
>>> + */
>>>   static Property cpu_common_props[] = {
>>> -#ifndef CONFIG_USER_ONLY
>>> +#ifdef CONFIG_USER_ONLY
>>>       /*
>>> -     * Create a memory property for softmmu CPU object,
>>> -     * so users can wire up its memory. (This can't go in hw/core/cpu.c
>>> -     * because that file is compiled only once for both user-mode
>>> -     * and system builds.) The default if no link is set up is to use
>>> +     * Create a property for the user-only object, so users can
>>> +     * adjust prctl(PR_SET_UNALIGN) from the command-line.
>>
>> How can I test this per-thread property?
> 
> -cpu foo,prctl-unalign-sigbus=true
> 
> 
>> Shouldn't this be an accel (TCG/user) property, for all threads?
> 
> There is always one cpu at user-only startup, and it is copied on clone.
> 
> Logically it would be a kernel property, since it's something the kernel 
> does, not the cpu.  But cpu vs accel makes no difference to me; it was 
> just easy here.

Can a process started with prctl(PR_SET_UNALIGN) unset it before
forking?

"kernel property" as "accel property" works for me.

> IIRC, this is simply a proxy for not really being able to inherit this 
> bit across fork+exec like you can with the real kernel.
> 
> 
> r~



  reply	other threads:[~2024-01-08 23:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 21:41 [PATCH 0/6] linux-user: prctl improvements Richard Henderson
2021-12-20 21:41 ` [PATCH 1/6] linux-user: Split out do_prctl and subroutines Richard Henderson
2021-12-20 22:35   ` Philippe Mathieu-Daudé
2021-12-22 20:47   ` Laurent Vivier
2021-12-20 21:41 ` [PATCH 2/6] linux-user: Disable more prctl subcodes Richard Henderson
2021-12-20 22:41   ` Philippe Mathieu-Daudé
2021-12-22 20:50     ` Laurent Vivier
2021-12-20 21:41 ` [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN Richard Henderson
2021-12-20 22:31   ` Philippe Mathieu-Daudé
2021-12-25  1:50     ` Richard Henderson
2021-12-22 20:56   ` Laurent Vivier
2024-01-08 17:15   ` Philippe Mathieu-Daudé
2024-01-08 21:13     ` Richard Henderson
2024-01-08 23:21       ` Philippe Mathieu-Daudé [this message]
2024-01-09  8:33         ` Richard Henderson
2021-12-20 21:41 ` [PATCH 4/6] target/alpha: Implement prctl_unalign_sigbus Richard Henderson
2021-12-20 21:41 ` [PATCH 5/6] target/hppa: " Richard Henderson
2021-12-20 21:41 ` [PATCH 6/6] target/sh4: " Richard Henderson
2021-12-23 21:22   ` Laurent Vivier
2021-12-23 21:27     ` Richard Henderson
2022-01-06 10:46 ` [PATCH 0/6] linux-user: prctl improvements Laurent Vivier
2022-01-07  8:46   ` gaosong
2022-01-07  9:27     ` Laurent Vivier

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=77aa582f-3c0c-47de-984b-69faabfaafdf@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=imp@bsdimp.com \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).