lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1316169496.8502.6.camel@perseus.themaw.net>
Date:	Fri, 16 Sep 2011 18:38:16 +0800
From:	Ian Kent <raven@...maw.net>
To:	Thomas Meyer <thomas@...3r.de>
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	dhowells@...hat.com
Subject: Re: [PATCH] Force same size of struct autofs_v5_packet on x86 and
 x86_64

On Fri, 2011-09-16 at 11:19 +0100, Al Viro wrote:
> On Fri, Sep 16, 2011 at 12:06:38PM +0200, Thomas Meyer wrote:
> > autofs_v5_packet is 300 bytes on x86 and 304 bytes on x86_64.
> > This difference is wrong and leads to a hang in systemd when running
> > a x86 userspace on an x86_64 kernel.
> 
> NAK.
> 
> You are talking about the userland ABI.  With existing users.  Changing
> it might help systemd (what the hell is it doing with autofs, anyway?),
> but breaking existing binaries (you know, ones that *do* have some business
> dealing with autofs) is not acceptable.

That's right.

Certainly my mistake (made a long time ago) and when I realized it I
decided I would need to handle it in user space for the same reasons Al
has mentioned.

I think this should be enough (but any further recommendations are
welcome, apart from the fact we might get new archs):

static size_t get_kpkt_len(void)
{
        size_t pkt_len = sizeof(struct autofs_v5_packet);
        struct utsname un;

        uname(&un);

        if (pkt_len % 8) {
                if (strcmp(un.machine, "alpha") == 0 ||
                    strcmp(un.machine, "ia64") == 0 ||
                    strcmp(un.machine, "x86_64") == 0 ||
                    strcmp(un.machine, "ppc64") == 0)
                        pkt_len += 4;

        }

        return pkt_len;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ