diff mbox

parisc: unbreak automounter support on 64-bit kernel with 32-bit userspace

Message ID 20130131200110.GA6032@p100.box (mailing list archive)
State Accepted, archived
Delegated to: Helge Deller
Headers show

Commit Message

Helge Deller Jan. 31, 2013, 8:01 p.m. UTC
Similiar to other 64 bit Linux targets autofs_wqt_t needs to be of type int
which has a size of 32 bits on 32- and 64-bit parisc kernels.

Signed-off-by: Helge Deller <deller@gmx.de>

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

James Bottomley Jan. 31, 2013, 8:26 p.m. UTC | #1
[adding autofs list and maintainer for their perusal and ack, although
this is an obvious fix to me

James]
On Thu, 2013-01-31 at 21:01 +0100, Helge Deller wrote:
> Similiar to other 64 bit Linux targets autofs_wqt_t needs to be of type int
> which has a size of 32 bits on 32- and 64-bit parisc kernels.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h
> index 77cdba9..d551754 100644
> --- a/include/uapi/linux/auto_fs.h
> +++ b/include/uapi/linux/auto_fs.h
> @@ -43,7 +43,7 @@
>   */
>  
>  #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
> - || defined(__powerpc__) || defined(__s390__)
> + || defined(__powerpc__) || defined(__s390__) || defined(__hppa__)
>  typedef unsigned int autofs_wqt_t;
>  #else
>  typedef unsigned long autofs_wqt_t;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rolf Eike Beer Jan. 31, 2013, 9 p.m. UTC | #2
James Bottomley wrote:
> [adding autofs list and maintainer for their perusal and ack, although
> this is an obvious fix to me
> 
> James]
> 
> On Thu, 2013-01-31 at 21:01 +0100, Helge Deller wrote:
> > Similiar to other 64 bit Linux targets autofs_wqt_t needs to be of type
> > int
> > which has a size of 32 bits on 32- and 64-bit parisc kernels.
> > 
> > Signed-off-by: Helge Deller <deller@gmx.de>
> > 
> > diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h
> > index 77cdba9..d551754 100644
> > --- a/include/uapi/linux/auto_fs.h
> > +++ b/include/uapi/linux/auto_fs.h
> > @@ -43,7 +43,7 @@
> > 
> >   */
> >  
> >  #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
> > 
> > - || defined(__powerpc__) || defined(__s390__)
> > + || defined(__powerpc__) || defined(__s390__) || defined(__hppa__)
> > 
> >  typedef unsigned int autofs_wqt_t;
> >  #else
> >  typedef unsigned long autofs_wqt_t;

Wouldn't it make sense to make it an unsigned int on all platforms? This 
wouldn't make any difference on 32 bit platforms and would prevent that to 
happen on the next 32-on-64 bit platform again.

Eike
H. Peter Anvin Jan. 31, 2013, 9:29 p.m. UTC | #3
On 01/31/2013 12:26 PM, James Bottomley wrote:
> [adding autofs list and maintainer for their perusal and ack, although
> this is an obvious fix to me
> 
> James]

The #if list probably should be inverted, and only specific platforms
should have unsigned long...

	-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
James Bottomley Jan. 31, 2013, 9:42 p.m. UTC | #4
On Thu, 2013-01-31 at 13:29 -0800, H. Peter Anvin wrote:
> On 01/31/2013 12:26 PM, James Bottomley wrote:
> > [adding autofs list and maintainer for their perusal and ack, although
> > this is an obvious fix to me
> > 
> > James]
> 
> The #if list probably should be inverted, and only specific platforms
> should have unsigned long...

The whitelist is 64 bit only platforms, like ia64, isn't it?  So yes,
they're far less numerous.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
H. Peter Anvin Jan. 31, 2013, 9:46 p.m. UTC | #5
On 01/31/2013 01:42 PM, James Bottomley wrote:
> On Thu, 2013-01-31 at 13:29 -0800, H. Peter Anvin wrote:
>> On 01/31/2013 12:26 PM, James Bottomley wrote:
>>> [adding autofs list and maintainer for their perusal and ack, although
>>> this is an obvious fix to me
>>>
>>> James]
>>
>> The #if list probably should be inverted, and only specific platforms
>> should have unsigned long...
> 
> The whitelist is 64 bit only platforms, like ia64, isn't it?  So yes,
> they're far less numerous.
> 

Correct.  It is basically the 64-bit platforms without any 32-bit
userspace, like Alpha and IA64.

	-hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rolf Eike Beer Jan. 31, 2013, 10:10 p.m. UTC | #6
H. Peter Anvin wrote:
> On 01/31/2013 01:42 PM, James Bottomley wrote:
> > On Thu, 2013-01-31 at 13:29 -0800, H. Peter Anvin wrote:
> >> On 01/31/2013 12:26 PM, James Bottomley wrote:
> >>> [adding autofs list and maintainer for their perusal and ack, although
> >>> this is an obvious fix to me
> >>> 
> >>> James]
> >> 
> >> The #if list probably should be inverted, and only specific platforms
> >> should have unsigned long...
> > 
> > The whitelist is 64 bit only platforms, like ia64, isn't it?  So yes,
> > they're far less numerous.
> 
> Correct.  It is basically the 64-bit platforms without any 32-bit
> userspace, like Alpha and IA64.

Arm64? Should this be a CONFIG_ARCH_CAN_HAVE_32BIT_USERSPACE that would cover 
this? And may e.g. be used to remove compat_ioctl on those archs, too?

Eike
H. Peter Anvin Jan. 31, 2013, 11:13 p.m. UTC | #7
On 01/31/2013 02:10 PM, Rolf Eike Beer wrote:
> H. Peter Anvin wrote:
>> On 01/31/2013 01:42 PM, James Bottomley wrote:
>>> On Thu, 2013-01-31 at 13:29 -0800, H. Peter Anvin wrote:
>>>> On 01/31/2013 12:26 PM, James Bottomley wrote:
>>>>> [adding autofs list and maintainer for their perusal and
>>>>> ack, although this is an obvious fix to me
>>>>> 
>>>>> James]
>>>> 
>>>> The #if list probably should be inverted, and only specific
>>>> platforms should have unsigned long...
>>> 
>>> The whitelist is 64 bit only platforms, like ia64, isn't it?
>>> So yes, they're far less numerous.
>> 
>> Correct.  It is basically the 64-bit platforms without any
>> 32-bit userspace, like Alpha and IA64.
> 
> Arm64? Should this be a CONFIG_ARCH_CAN_HAVE_32BIT_USERSPACE that
> would cover this? And may e.g. be used to remove compat_ioctl on
> those archs, too?
> 

compat_ioctl should be CONFIG_COMPAT.

	-hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Catalin Marinas Feb. 1, 2013, 2:51 p.m. UTC | #8
On 31 January 2013 22:10, Rolf Eike Beer <eike-kernel@sf-tec.de> wrote:
> H. Peter Anvin wrote:
>> On 01/31/2013 01:42 PM, James Bottomley wrote:
>> > On Thu, 2013-01-31 at 13:29 -0800, H. Peter Anvin wrote:
>> >> On 01/31/2013 12:26 PM, James Bottomley wrote:
>> >>> [adding autofs list and maintainer for their perusal and ack, although
>> >>> this is an obvious fix to me
>> >>>
>> >>> James]
>> >>
>> >> The #if list probably should be inverted, and only specific platforms
>> >> should have unsigned long...
>> >
>> > The whitelist is 64 bit only platforms, like ia64, isn't it?  So yes,
>> > they're far less numerous.
>>
>> Correct.  It is basically the 64-bit platforms without any 32-bit
>> userspace, like Alpha and IA64.
>
> Arm64?

It supports 32-bit user-space (CONFIG_COMPAT). But we missed this
#ifdef for arm64. I'm not familiar with the autofs subsystem but at a
first look it seems that autofs_wqt_t types are not shared with user
space as part of a structure. It can come as an argument for an ioctl
command but as long as we don't expect this type to hold data larger
than 32-bit it should be ok.
diff mbox

Patch

diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h
index 77cdba9..d551754 100644
--- a/include/uapi/linux/auto_fs.h
+++ b/include/uapi/linux/auto_fs.h
@@ -43,7 +43,7 @@ 
  */
 
 #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
- || defined(__powerpc__) || defined(__s390__)
+ || defined(__powerpc__) || defined(__s390__) || defined(__hppa__)
 typedef unsigned int autofs_wqt_t;
 #else
 typedef unsigned long autofs_wqt_t;