All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	qemu-devel@nongnu.org, riku.voipio@iki.fi,
	peter.maydell@linaro.org, aurelien@aurel32.net,
	leon.alrae@imgtec.com, petar.jovanovic@imgtec.com,
	miodrag.dinic@imgtec.com, aleksandar.rikalo@imgtec.com,
	aleksandar.markovic@imgtec.com
Subject: Re: [Qemu-devel] [PATCH v6 6/7] linux-user: Add missing TARGET_EDQUOT error code for Mips
Date: Fri, 16 Sep 2016 21:22:26 +0200	[thread overview]
Message-ID: <ea88cb45-6e6d-4191-a964-fadf4d98c95c@vivier.eu> (raw)
In-Reply-To: <20160916111422.109959-7-aleksandar.markovic@rt-rk.com>



Le 16/09/2016 à 13:14, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
> 
> EDQUOT is defined for Mips platform in Linux kernel in such a way
> that it has different value than on most other platforms. However,
> correspondant TARGET_EDQUOT for Mips is missing in Qemu code. Moreover,
> TARGET_EDQUOT is missing from the table for conversion of error codes
> from host to target. This patch fixes these problems.
> 
> Without this patch, syscalls add_key(), keyctl(), link(), mkdir(), mknod(),
> open(), rename(), request_key(), setxattr(), symlink(), and write() will not
> be able to return the right error code in some scenarios on Mips platform.
> (Some of these syscalls are not yet supported in Qemu, but once they are
> supported, they will need correct EDQUOT handling.)
> 
> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>

> ---
>  linux-user/mips/target_syscall.h   | 2 ++
>  linux-user/mips64/target_syscall.h | 2 ++
>  linux-user/syscall.c               | 1 +
>  3 files changed, 5 insertions(+)
> 
> diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h
> index 2b4f390..827799f 100644
> --- a/linux-user/mips/target_syscall.h
> +++ b/linux-user/mips/target_syscall.h
> @@ -221,6 +221,8 @@ struct target_pt_regs {
>  #undef TARGET_ENOTRECOVERABLE
>  #define TARGET_ENOTRECOVERABLE 166     /* State not recoverable */
>  
> +#undef TARGET_EDQUOT
> +#define TARGET_EDQUOT          1133    /* Quota exceeded */
>  
>  #define UNAME_MACHINE "mips"
>  #define UNAME_MINIMUM_RELEASE "2.6.32"
> diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h
> index 8da9c1f..29c1983 100644
> --- a/linux-user/mips64/target_syscall.h
> +++ b/linux-user/mips64/target_syscall.h
> @@ -218,6 +218,8 @@ struct target_pt_regs {
>  #undef TARGET_ENOTRECOVERABLE
>  #define TARGET_ENOTRECOVERABLE 166     /* State not recoverable */
>  
> +#undef TARGET_EDQUOT
> +#define TARGET_EDQUOT          1133    /* Quota exceeded */
>  
>  #define UNAME_MACHINE "mips64"
>  #define UNAME_MINIMUM_RELEASE "2.6.32"
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index ee23b29..e4bd40d 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -725,6 +725,7 @@ static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = {
>      [ENAVAIL]		= TARGET_ENAVAIL,
>      [EISNAM]		= TARGET_EISNAM,
>      [EREMOTEIO]		= TARGET_EREMOTEIO,
> +    [EDQUOT]            = TARGET_EDQUOT,
>      [ESHUTDOWN]		= TARGET_ESHUTDOWN,
>      [ETOOMANYREFS]	= TARGET_ETOOMANYREFS,
>      [ETIMEDOUT]		= TARGET_ETIMEDOUT,
> 

  reply	other threads:[~2016-09-16 19:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 11:14 [Qemu-devel] [PATCH v6 0/7] linux-user: Fix miscellaneous Mips-specific issues Aleksandar Markovic
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 1/7] linux-user: Fix TARGET_SIOCATMARK definition for Mips Aleksandar Markovic
2016-09-16 18:22   ` Laurent Vivier
2016-09-19  8:31     ` Aleksandar Markovic
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 2/7] linux-user: Fix TARGET_F_GETOWN " Aleksandar Markovic
2016-09-16 18:30   ` Laurent Vivier
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 3/7] linux-user: Fix structure target_flock " Aleksandar Markovic
2016-09-16 18:42   ` Laurent Vivier
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 4/7] linux-user: Fix structure target_semid64_ds " Aleksandar Markovic
2016-09-16 19:00   ` Laurent Vivier
2016-09-19  8:32     ` Aleksandar Markovic
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 5/7] linux-user: Fix certain argument alignment cases for Mips64 Aleksandar Markovic
2016-09-16 19:29   ` Laurent Vivier
2016-09-19  8:33     ` Aleksandar Markovic
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 6/7] linux-user: Add missing TARGET_EDQUOT error code for Mips Aleksandar Markovic
2016-09-16 19:22   ` Laurent Vivier [this message]
2016-09-16 11:14 ` [Qemu-devel] [PATCH v6 7/7] linux-user: Add missing Mips syscalls items in strace.list Aleksandar Markovic
2016-09-16 19:35   ` Laurent Vivier
2016-09-19  8:38     ` Aleksandar Markovic

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=ea88cb45-6e6d-4191-a964-fadf4d98c95c@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=aleksandar.markovic@imgtec.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=aleksandar.rikalo@imgtec.com \
    --cc=aurelien@aurel32.net \
    --cc=leon.alrae@imgtec.com \
    --cc=miodrag.dinic@imgtec.com \
    --cc=petar.jovanovic@imgtec.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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.