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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 DBA0FC433E8 for ; Wed, 15 Jul 2020 08:41:44 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 ACFDB20657 for ; Wed, 15 Jul 2020 08:41:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="ETTz8vtc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACFDB20657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvcym-0005zr-5o; Wed, 15 Jul 2020 08:41:28 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jvcyl-0005zl-3K for xen-devel@lists.xenproject.org; Wed, 15 Jul 2020 08:41:27 +0000 X-Inumbo-ID: f685dbba-c676-11ea-939d-12813bfff9fa Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f685dbba-c676-11ea-939d-12813bfff9fa; Wed, 15 Jul 2020 08:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1594802485; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=qOIlK/cVyyOE1sWXX5QKm0Oq6F74EPo/yMXtJBvTGzc=; b=ETTz8vtcZn5eFji4cWWsgyyh0YeCz3cKGfCJfFx5V/XE+b391Q9Hi6/a XtpTq8/mOcIkahl7I+YnfJ71CkDtPgm3AOkP/cFedBRujpCbHdo3TaERp 5FGmSUrlcArdXLztyKFwSF08yLvimm2gmRVAfAPzcoX/g6pUh68BOjTEl w=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: b7rsqCGmoulWnZI2MCgkcsNEKMBHqsqx/4UsM2fKwx2lHSNCWuPfD5mkXkZHbezHKbJ6RMvscE 6NCiv6ivzGBbmr4bN5qMTB/rVAmL0lLoJ3j/EPfj91VQbF9abgeQ/OF5cILErAv3+++ZdmIQUo lukqUnj5FPabD6n16K6oq96NBSK616oX9iVjE2ti3nUJYrQRG1lIGne25K6zz/t6VcVyZqBj/d bFAyv/w2IdyVroDvtbeeZVnW82yyrGFCbzGPuYLNMXy3lOGrqpFsU/AOQBOSDyC+Q2JVwwmqkr ZnM= X-SBRS: 2.7 X-MesageID: 22407872 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,354,1589256000"; d="scan'208";a="22407872" Date: Wed, 15 Jul 2020 10:41:15 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Jan Beulich Subject: Re: [PATCH v2 6/7] flask: drop dead compat translation code Message-ID: <20200715084115.GS7191@Air-de-Roger> References: <7711f68d-394e-a74f-81fa-51f8447174ce@suse.com> <20200714145800.GO7191@Air-de-Roger> <937a51c5-7563-0ac2-4ada-b4dfd7a5d636@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <937a51c5-7563-0ac2-4ada-b4dfd7a5d636@suse.com> X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Paul Durrant , George Dunlap , Andrew Cooper , Ian Jackson , "xen-devel@lists.xenproject.org" , Daniel de Graaf Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jul 15, 2020 at 08:42:44AM +0200, Jan Beulich wrote: > On 14.07.2020 16:58, Roger Pau Monné wrote: > > On Wed, Jul 01, 2020 at 12:28:07PM +0200, Jan Beulich wrote: > >> Translation macros aren't needed at all (or else a devicetree_label > >> entry would have been missing), and userlist has been removed quite some > >> time ago. > >> > >> No functional change. > >> > >> Signed-off-by: Jan Beulich > >> > >> --- a/xen/include/xlat.lst > >> +++ b/xen/include/xlat.lst > >> @@ -148,14 +148,11 @@ > >> ? xenoprof_init xenoprof.h > >> ? xenoprof_passive xenoprof.h > >> ? flask_access xsm/flask_op.h > >> -! flask_boolean xsm/flask_op.h > >> ? flask_cache_stats xsm/flask_op.h > >> ? flask_hash_stats xsm/flask_op.h > >> -! flask_load xsm/flask_op.h > >> ? flask_ocontext xsm/flask_op.h > >> ? flask_peersid xsm/flask_op.h > >> ? flask_relabel xsm/flask_op.h > >> ? flask_setavc_threshold xsm/flask_op.h > >> ? flask_setenforce xsm/flask_op.h > >> -! flask_sid_context xsm/flask_op.h > >> ? flask_transition xsm/flask_op.h > > > > Shouldn't those become checks then? > > No, checking will never succeed for structures containing > XEN_GUEST_HANDLE(). But there's no point in generating xlat macros > when they're never used. There are two fundamentally different > strategies for handling the compat hypercalls: One is to wrap a > translation layer around the native hypercall. That's where the > xlat macros come into play. The other, used here, is to compile > the entire hypercall function a second time, arranging for the > compat structures to get used in place of the native ones. There > are no xlat macros involved here, all that's needed are correctly > translated structures. (For completeness, x86's MCA hypercall > uses yet another, quite adhoc strategy for handling, but also not > involving any xlat macro use. Hence the consideration there to > possibly drop the respective lines from the file here.) Thanks, I think this explanation is helpful and I wonder whether it would be possible to have something along this lines in a file or as a comment somewhere, maybe at the top of xlat.lst? Also could you add a line to the commit message noting that flask code doesn't use any of the translation macros because it follows a different approach to compat handling? IMO the compat code is complicated to understand, and it also seems to be mostly undocumented. For the patch: Reviewed-by: Roger Pau Monné Thanks.