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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 E93D4C433DF for ; Thu, 6 Aug 2020 13:51:47 +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 E6C7123128 for ; Thu, 6 Aug 2020 13:51:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="thFeBoKF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LvlvYpq9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6C7123128 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vvG/lXeaTLIKI1EysngdbN+Lt5pDeXKsukrO4OixT6Y=; b=thFeBoKFjceor8FAWf41D7ZeA BHeiAoLTylu67O/nFl1HSRNfjk5Sr0f/pp2+vUo4zqyQUOC4j6AWJWrLFVo0EzsMtKbDSO/AoEPqY dsrWQGJDvVjxzvX9u3bce+jvMHH5oEK+3k2ycfGE3+CL4+xiwaejXssB1bigt7BeYncyaMHOHdUWg cQeIeeFeM+xmB7tFqQpGRPP81CuJXB9iMnB82cQGsT/JygZ/gjhWMlrwY97RJQjB9An7mlflX8vDX HP19H1jNiBVjEyfz/SfhlvmsQDtMKvPFhP0vD7yk+mCZ33GkW5qy3dc9IvRbWgib4pFAq5XckW8Z3 IS5AsvmsA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3gI7-0007lA-7h; Thu, 06 Aug 2020 13:50:43 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3gI4-0007kJ-Df for linux-arm-kernel@lists.infradead.org; Thu, 06 Aug 2020 13:50:41 +0000 Received: by mail-ed1-x542.google.com with SMTP id a14so18234048edx.7 for ; Thu, 06 Aug 2020 06:50:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pYOAU4zyTtJPYkEQfnQ4aWaYGVh8/wQuqp7IpTtJ6do=; b=LvlvYpq9JUMWnC9/yFSS4wQkoMzm46piNKWyoQ5DuTwW/jjZl7ANZ4j592Uyj1yy3Y 31H9pN3pbfyxBlVjBg64O+j4LwbZFScsNLIjvF/xJffyXB6z4b1w/YA+UINKPohJPaKM DhL8lwL+cYEe5vSJyl7gu1SCgZsX7iilU2sURy2UrTJgoEa0KrNbaU6eVmOsX1Dtp1Vs A040v/hmZTFY4JNauiwROduRvAeiJehMUPswUJA9yeARYk+30rTwtZkzc7LQhJPv/sEt kSF0maMNyYzQhF8UsZAf9VAKcQmDJRyt8GUPaEH5dTUt+t8xVfWwudrXhnv/OhxEJC80 KuwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=pYOAU4zyTtJPYkEQfnQ4aWaYGVh8/wQuqp7IpTtJ6do=; b=Pl8XbA1e8YzvDpiUGeVOMCPxdq2oJ9g+toq9kWs9EryWJQ3TKKUvDaHI2j4N1orMer xpLh4JVgTW+yezkLnr024HJTSA3yCUOXou9FTt0ZOYPDPol2ES9kmmJ59WGEKrHMKrg+ JCeQcwdJwaiuoy1tuIqIjxT5D+UWKuXv+29sumh0foTjccomr/qIXgFgVRQTSdZFxFI6 rzmdNvUb/hVBve/gYFPZk/s2f7cIFzeMlH1M5Sab9PcgdXmfxP5UD7jpn2u9QIi0ddGI frcQfWIxXIOsCDqj50jWMBCm7WOiUp8hcpKZfOePzXd77ZJaPbMKz8w7lm9zjYE9JqkR nZ+g== X-Gm-Message-State: AOAM530A75dHudeiPxc79zNHKCiG4cffuskQZcnS3Jwssb5aC7mrequj UdvuzwIvKCugFIDdWAhW3dw= X-Google-Smtp-Source: ABdhPJzYxh9mNb/BHUYWWWsOHgNjPXvNZwBtPKO84YZdhn5EUVlGhMh8pj2PSHlZ0cZ/+d3acTJDPQ== X-Received: by 2002:a05:6402:13d9:: with SMTP id a25mr4192009edx.141.1596721839522; Thu, 06 Aug 2020 06:50:39 -0700 (PDT) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id c7sm3614732edf.1.2020.08.06.06.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 06:50:38 -0700 (PDT) Date: Thu, 6 Aug 2020 15:50:36 +0200 From: Ingo Molnar To: Christoph Hellwig Subject: Re: improve compat handling for the i386 u64 alignment quirk v2 Message-ID: <20200806135036.GA2077896@gmail.com> References: <20200731122202.213333-1-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200731122202.213333-1-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_095040_477601_0395A728 X-CRM114-Status: GOOD ( 15.74 ) 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: linux-arch@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 * Christoph Hellwig wrote: > Hi all, > > the i386 ABI is a little special in that it uses less than natural > alignment for 64-bit integer types (u64 and s64), and a significant > amount of our compat handlers deals with just that. Unfortunately > there is no good way to check for this specific quirk at runtime, > similar how in_compat_syscall() checks for a compat syscall. This > series adds such a check, and then uses the quota code as an example > of how this improves the compat handling. I have a few other places > in mind where this will also be useful going forward. > > Changes since v1: > - use asm-generic/compat.h instead of linux/compat.h for > compat_u64 and compat_s64 > - fix a typo > > Diffstat: > b/arch/arm64/include/asm/compat.h | 2 > b/arch/mips/include/asm/compat.h | 2 > b/arch/parisc/include/asm/compat.h | 2 > b/arch/powerpc/include/asm/compat.h | 2 > b/arch/s390/include/asm/compat.h | 2 > b/arch/sparc/include/asm/compat.h | 3 > b/arch/x86/entry/syscalls/syscall_32.tbl | 2 > b/arch/x86/include/asm/compat.h | 3 > b/fs/quota/Kconfig | 5 - > b/fs/quota/Makefile | 1 > b/fs/quota/compat.h | 34 ++++++++ > b/fs/quota/quota.c | 73 +++++++++++++++--- > b/include/asm-generic/compat.h | 8 ++ > b/include/linux/compat.h | 9 ++ > b/include/linux/quotaops.h | 3 > b/kernel/sys_ni.c | 1 > fs/quota/compat.c | 120 ------------------------------- > 17 files changed, 113 insertions(+), 159 deletions(-) If nobody objects to this being done at runtime, and if it's 100% ABI compatible, then the x86 impact looks good to me: Acked-by: Ingo Molnar Thanks, Ingo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel