Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp502874imm; Fri, 27 Jul 2018 00:39:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfW9/HVe5f/5/X1lazwD1uxnFgiIXqYpT9MNLEGT50szt6Fx5VlywAghc5xAOgoViE3ae5H X-Received: by 2002:a17:902:3a2:: with SMTP id d31-v6mr5080411pld.287.1532677141090; Fri, 27 Jul 2018 00:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532677141; cv=none; d=google.com; s=arc-20160816; b=qPBQmIbp09FWVOH/b6wwCy546nUGre/79P5iPVlsIXOsC2R55YqNFV20ZshRV7OpvM gjX93NlPsBIfIO9REs73p+eWJf45h/4CRDWzmdMloe4FMGp7AtILDDi/yHUGjXnCl5ll +EWVVcsS0blg8XgUhf7KWue2dYCv/eYWOUzAMsI47syMhyqyJjAkxSDhZHzqCZfkfbXG FoHCH8rZhgNl4HXPWtwiF7c6F63HBy15BAl6beJEtG/ffone8GijCCG86BrB97hK57ZA krnfIN08nYbcaKz+HJ/A4Lld6wnBGEEb8btdkQOMo69O7zwyizsP7jgmKV6KdcKYtkGg KPDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=24xD95VrHGthavKy2CMvFrKpNTHTW1+seXT0oyAYlkw=; b=GMsgKMSWhIDId2fkJYuZacNY4NKmjrR+eK+m56H+JHaqzdJ6ftcE7siIOqrBbgy9RA iEUB7KA7w6Z89FItMwTCZ+dolSOpxfNrW1VNVGdrepFIuoAgJpmIcOi83sxynkIIZaY3 PycJfLBSbYMl+QheLcDZtjNpjI4cfY6M9MmOv4yOHtrETACJYZyutgV1yaEMtNN4tCta eXUXPzXDXkGZWf1tKgG5U4qD8Ypk7804vusdhTchShDkQz6jSGL9UjldG1JQwe/mXRAl C/WcdiZhcBNwft9gSoV509duWPnaYQCrvqMyUYY05iMdnxqHrJmmFSsZccyCW2ns1C+B kmSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5-v6si3278364pgo.466.2018.07.27.00.38.45; Fri, 27 Jul 2018 00:39:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730108AbeG0I62 (ORCPT + 99 others); Fri, 27 Jul 2018 04:58:28 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:57902 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729472AbeG0I61 (ORCPT ); Fri, 27 Jul 2018 04:58:27 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id A0301201AE; Fri, 27 Jul 2018 11:37:33 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t_6LZFLTIku4; Fri, 27 Jul 2018 11:37:32 +0200 (CEST) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id E3DDB2007F; Fri, 27 Jul 2018 11:37:32 +0200 (CEST) Received: from gauss2.secunet.de (10.182.7.193) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server id 14.3.399.0; Fri, 27 Jul 2018 09:37:47 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 9118E318201B; Fri, 27 Jul 2018 09:37:47 +0200 (CEST) Date: Fri, 27 Jul 2018 09:37:47 +0200 From: Steffen Klassert To: Florian Westphal CC: Dmitry Safonov , , "David S. Miller" , Herbert Xu , Dmitry Safonov <0x7f454c46@gmail.com>, , "Andy Lutomirski" , Ard Biesheuvel , "H. Peter Anvin" , Ingo Molnar , John Stultz , "Kirill A. Shutemov" , Oleg Nesterov , "Stephen Boyd" , Steven Rostedt , "Thomas Gleixner" , , , Andrew Morton , Greg Kroah-Hartman , Mauro Carvalho Chehab , Shuah Khan , , Eric Paris , "Jozsef Kadlecsik" , Pablo Neira Ayuso , Paul Moore , , , , Fan Du Subject: Re: [PATCH 00/18] xfrm: Add compat layer Message-ID: <20180727073747.h27dtojlnmc3k25v@gauss3.secunet.de> References: <20180726023144.31066-1-dima@arista.com> <20180726084959.pzjvflfjq6a76du6@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180726084959.pzjvflfjq6a76du6@breakpoint.cc> User-Agent: NeoMutt/20170609 (1.8.3) X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: B91603A4-0695-4C19-880C-8A123D7819D6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 10:49:59AM +0200, Florian Westphal wrote: > Dmitry Safonov wrote: > > So, here I add a compatible layer to xfrm. > > As xfrm uses netlink notifications, kernel should send them in ABI > > format that an application will parse. The proposed solution is > > to save the ABI of bind() syscall. The realization detail is > > to create kernel-hidden, non visible to userspace netlink groups > > for compat applications. > > Why not use exisiting netlink support? > Just add the 32bit skb to skb64->frag_list and let > netlink find if tasks needs 64 or 32 one. > > It only needs this small fix to properly signal the end of a dump: > https://marc.info/?l=linux-netdev&m=126625240303351&w=2 > > I had started a second attempt to make xfrm compat work, > but its still in early stage. > > One link that might still have some value: > https://git.breakpoint.cc/cgit/fw/net-next.git/commit/?h=xfrm_config_compat_07&id=f64430e6d9e297f3990f485a4832e273751b9869 > (compat structure definitions with BUILD_BUG_ON checking) > > My plan was to make xfrm compat work strictly as shrinker (64->32) > and expander (32->64), i.e. no/little changes to exisiting code and > pass all "expanded" skbs through existing xfrm rcv functions. I agree here with Florian. The code behind this ABI is already complicated. Please stay away from generic code a much as possible. Generic and compat code should be clearly separated.