Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935642Ab3DIX66 (ORCPT ); Tue, 9 Apr 2013 19:58:58 -0400 Received: from mail-da0-f43.google.com ([209.85.210.43]:60083 "EHLO mail-da0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765410Ab3DIX64 convert rfc822-to-8bit (ORCPT ); Tue, 9 Apr 2013 19:58:56 -0400 MIME-Version: 1.0 In-Reply-To: <1365501657-4213-7-git-send-email-serban.constantinescu@arm.com> References: <1365501657-4213-1-git-send-email-serban.constantinescu@arm.com> <1365501657-4213-7-git-send-email-serban.constantinescu@arm.com> Date: Tue, 9 Apr 2013 16:58:56 -0700 Message-ID: Subject: Re: [PATCH v2 6/7] staging: android: binder: fix alignment issues From: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= To: Serban Constantinescu Cc: LKML , Greg KH , Android Kernel Team , John Stultz , Dave Butcher Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1031 Lines: 26 On Tue, Apr 9, 2013 at 3:00 AM, Serban Constantinescu wrote: > The Android userspace aligns the data written to the binder buffers to > 4bytes. Thus for 32bit platforms or 64bit platforms running an 32bit > Android userspace we can have a buffer looking like this: > > platform buffer(binder_cmd pointer) size > 32/32 32b 32b 8B > 64/32 32b 64b 12B > 64/64 32b 64b 12B > > Thus the kernel needs to check that the buffer size is aligned to 4bytes > not to (void *) that will be 8bytes on 64bit machines. > > The change does not affect existing 32bit ABI. > Do we not want the pointers to be 8 byte aligned on 64bit platforms? -- Arve Hj?nnev?g -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/