From: Arnd Bergmann <arnd@arndb.de>
To: Harshal Patil <harshal.patil@in.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Sudipto Ghosh <sudiptoghosh@in.ibm.com>
Subject: Re: ioctl structs differ from x86_64?
Date: Wed, 15 Mar 2017 16:15:46 +0100 [thread overview]
Message-ID: <CAK8P3a1+LtWf-VdJeA-0TycrEDkiPztMOnNN5wCfjrxYPtsVvg@mail.gmail.com> (raw)
In-Reply-To: <OF8A8205F0.34AB5FF3-ON002580E3.00393B30-002580E3.003A62F5@notes.na.collabserv.com>
On Tue, Mar 14, 2017 at 11:37 AM, Harshal Patil
<harshal.patil@in.ibm.com> wrote:
> Hello,
>
> I am looking into a bug,
> https://bugzilla.linux.ibm.com/show_bug.cgi?id=152493 ( external mirror is
> at, https://github.com/opencontainers/runc/issues/1364)
>
> Recently in runc code, they added this code
> https://github.com/opencontainers/runc/commit/eea28f480db435dbef4a275de9776b9934818b8c#diff-5f5c07d0cab3ce2086437d3d43c0d25fR155.
> As you can see they set -onlcr to get rid of \r (line no. 164). Golang, in
> which runc is written, doesn't have any bindings for ioctls. This means you
> have to invoke C code directly (that's what they are doing there).
>
> Our guess is the ioctls in ppc64le differ than x86_64, and thats why the
> code which is clearing onclr bit
> (https://github.com/opencontainers/runc/commit/eea28f480db435dbef4a275de9776b9934818b8c#diff-5f5c07d0cab3ce2086437d3d43c0d25fR164)
> is failing on ppc64le but works fine on x86_64.
>
> Any pointers on the possible solution would be really helpful.
There are a couple of reasons for ioctl numbers to differ:
- like this one, the command number may be defined in asm/ioctls.h.
Most architectures
in the kernel are the same, some (arm, blackfin, frv, m68k, and
s390) only differ
in FIOQSIZE, others (alpha, mips, parisc, powerpc, sh, sparc, and
xtensa) redefine
all the traditional file (FIO*) and tty (TC*, TIO*) commands
- command numbers that are defined in terms of structure sizes depend on the
architectures type definitions (e.g. long, off_t, uid_t, ...) that
can differ in both
size and alignment
- alpha, mips, powerpc and sparc use _IOC_SIZEBITS==13, everything else uses
_IOC_SIZEBITS==14, and that in turn means that the majority of ioctl commands
are different between those four and the rest.
Arnd
next prev parent reply other threads:[~2017-03-15 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 10:37 ioctl structs differ from x86_64? Harshal Patil
2017-03-15 15:15 ` Arnd Bergmann [this message]
2017-03-15 18:11 ` Reza Arbab
2017-03-15 18:27 ` Reza Arbab
2017-03-16 10:49 ` Michael Ellerman
[not found] <OF8A8205F0.34AB5FF3-ON002580E3.00393B30-002580E3.003A62F5@LocalDomain>
2017-03-14 10:57 ` Harshal Patil
2017-03-14 10:59 ` Harshal Patil
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=CAK8P3a1+LtWf-VdJeA-0TycrEDkiPztMOnNN5wCfjrxYPtsVvg@mail.gmail.com \
--to=arnd@arndb.de \
--cc=harshal.patil@in.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sudiptoghosh@in.ibm.com \
/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.