From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28721C433DB for ; Fri, 12 Feb 2021 15:07:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2D2D64E57 for ; Fri, 12 Feb 2021 15:07:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2D2D64E57 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uWGIZvxiFSsvtq/D2PczVEIztdXEgAMQH0ZShxBo7SQ=; b=SJRKDdip0xA7pXtSVvYfK0Wb7 LEz/LirXrflNQl01qrG8CFh9uc0I6VHhyDo1FGhB8vk83FyVMupn5vYmqeE1A8nzxrkRhMw7K7+7h T7+R7BVv9zPH1nE/iAU1BRwLw5oU4rcmxCduMrR8y5N+eIjTMIxB7GFUi+lf7gdmiBV9CkTaZjwv9 6hQwdc3dgAVk9K3bsIMBh8vuz/Ktwk/MGmKVyeKdcRFToLRVSp3NfeniR8A3A9NmuE2XJ4xDV2erk 5Kvvn5oIKo8W+cpNarSoFHANQRZH93NhOrLGoFFPADEbpqaLoCeCp0Z/hZ1HYTpRRCcCvajgH0+yH +jUSZ60bA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAa1K-0001JJ-70; Fri, 12 Feb 2021 15:06:10 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAa1I-0001Io-4A for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 15:06:09 +0000 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-31-hrJHvB6rMCGK0AN18ZrM-g-1; Fri, 12 Feb 2021 15:06:03 +0000 X-MC-Unique: hrJHvB6rMCGK0AN18ZrM-g-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 12 Feb 2021 15:06:04 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 12 Feb 2021 15:06:04 +0000 From: David Laight To: 'Catalin Marinas' Subject: RE: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls Thread-Topic: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls Thread-Index: AQHXAUNInwWNlJur40qqyYPDj4lGvapUi6pAgAAM0ICAAAPe4A== Date: Fri, 12 Feb 2021 15:06:04 +0000 Message-ID: <427bfdffb2da4561879c720881d9dc96@AcuMS.aculab.com> References: <20210211202208.31555-1-Sonicadvance1@gmail.com> <58b03e17-3729-99ea-8691-0d735a53b9bc@arm.com> <20210212123515.GC6057@sirena.org.uk> <20210212132807.GC7718@arm.com> <7300c3cbce95498b9fbe7ee754250794@AcuMS.aculab.com> <20210212144400.GD7718@arm.com> In-Reply-To: <20210212144400.GD7718@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210212_100608_364816_386D3BB2 X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Gavin Shan , "linux-kernel@vger.kernel.org" , Julien Grall , Amit Daniel Kachhap , Vincenzo Frascino , Will Deacon , Qais Yousef , Jean-Philippe Brucker , Marc Zyngier , Anshuman Khandual , Andrey Ignatov , Steven Price , Sami Tolvanen , David Brazdil , Dave Martin , Kees Cook , "sonicadvance1@gmail.com" , Frederic Weisbecker , Kristina Martsenko , Mark Brown , Al Viro , Kevin Hao , Peter Collingbourne , "linux-arm-kernel@lists.infradead.org" , Jens Axboe , "amanieu@gmail.com" , Jason Yan , Oleg Nesterov , Tian Tao , Andrew Morton , Mike Rapoport Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > > Any user space adaption layer would have to know which actual > > driver has been opened and what internal structures it has. > > Getting that right is hard and difficult. > > The recent changes to move (IIRC) sockopt compatibility down > > into the protocol code found quite a few places where it was > > previously broken. > > It is much easier to get it right in the code that knows about > > the actual structures. > > As Arnd I think was suggesting, we could have an ioctl32() syscall that > allows compat arguments but not opening up the whole set of compat > syscalls to native processes. Why is that a problem. The kernel has to allow absolute garbage in syscall parameters. So it really shouldn't matter. It may give processes extra ways to 'shoot themselves in the foot' but surely that is their problem. Certainly, on x86, a 64bit process can make all three different types of system call. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FB43C433E6 for ; Fri, 12 Feb 2021 15:08:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A8E364E57 for ; Fri, 12 Feb 2021 15:08:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbhBLPHt convert rfc822-to-8bit (ORCPT ); Fri, 12 Feb 2021 10:07:49 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:35506 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhBLPHo (ORCPT ); Fri, 12 Feb 2021 10:07:44 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-31-hrJHvB6rMCGK0AN18ZrM-g-1; Fri, 12 Feb 2021 15:06:03 +0000 X-MC-Unique: hrJHvB6rMCGK0AN18ZrM-g-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 12 Feb 2021 15:06:04 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 12 Feb 2021 15:06:04 +0000 From: David Laight To: 'Catalin Marinas' CC: Mark Brown , Steven Price , "sonicadvance1@gmail.com" , "amanieu@gmail.com" , Will Deacon , Mark Rutland , Oleg Nesterov , Al Viro , Dave Martin , "Amit Daniel Kachhap" , Marc Zyngier , David Brazdil , Jean-Philippe Brucker , Andrew Morton , Anshuman Khandual , Gavin Shan , Mike Rapoport , Vincenzo Frascino , "Kristina Martsenko" , Kees Cook , Sami Tolvanen , Frederic Weisbecker , Kevin Hao , Jason Yan , Andrey Ignatov , Peter Collingbourne , Julien Grall , Tian Tao , Qais Yousef , Jens Axboe , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls Thread-Topic: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls Thread-Index: AQHXAUNInwWNlJur40qqyYPDj4lGvapUi6pAgAAM0ICAAAPe4A== Date: Fri, 12 Feb 2021 15:06:04 +0000 Message-ID: <427bfdffb2da4561879c720881d9dc96@AcuMS.aculab.com> References: <20210211202208.31555-1-Sonicadvance1@gmail.com> <58b03e17-3729-99ea-8691-0d735a53b9bc@arm.com> <20210212123515.GC6057@sirena.org.uk> <20210212132807.GC7718@arm.com> <7300c3cbce95498b9fbe7ee754250794@AcuMS.aculab.com> <20210212144400.GD7718@arm.com> In-Reply-To: <20210212144400.GD7718@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Any user space adaption layer would have to know which actual > > driver has been opened and what internal structures it has. > > Getting that right is hard and difficult. > > The recent changes to move (IIRC) sockopt compatibility down > > into the protocol code found quite a few places where it was > > previously broken. > > It is much easier to get it right in the code that knows about > > the actual structures. > > As Arnd I think was suggesting, we could have an ioctl32() syscall that > allows compat arguments but not opening up the whole set of compat > syscalls to native processes. Why is that a problem. The kernel has to allow absolute garbage in syscall parameters. So it really shouldn't matter. It may give processes extra ways to 'shoot themselves in the foot' but surely that is their problem. Certainly, on x86, a 64bit process can make all three different types of system call. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)