Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3663533ybi; Mon, 10 Jun 2019 14:23:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCjVu4DQfa/gYLv8zEZPAGBa6a2c+K/yRTm+CmuhvsizHPr716qcjTAKjmbn8Ar8LRXvYd X-Received: by 2002:a17:902:b093:: with SMTP id p19mr37003621plr.174.1560201814295; Mon, 10 Jun 2019 14:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560201814; cv=none; d=google.com; s=arc-20160816; b=asjZUFqItJsabcpjl2O7x4dTgKgoTlYq1bhIHQqoAHz7mFkW+IYaEso0cVfZ5LHBDq GeTIeBhG2kZWFwQoDCYQtj7G+/UUruSZn2SC2f6WeU5IuoX9iDzAwGDXiNP6TfmeLxoK DAOEXwy85tqvDjiKshdR7082ykOFDsOAaLVBX4p4zwHG1MqPCG/lKqYaxywpMTDomzhk f3ETy+pZc2T1CaG+aF4WuLyJ5dV+z6HjSMEEWnKy5Sk9YqWtBk35eDj4HodoM2OzjfPq 4/8LNQASndPdsxgEYs5MuXXj7NubkmWBj9Yh9fGKtCLq/BFfq8xdFpXTz+MW2k1Y6Bc+ VZgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gK/Yvf8faVmrh63U+btuZjl3JBVDnWKA1ZT84y942oU=; b=RRFtWO1GgITual9ZLHzUUinPqZlNF+qQ50VtDFU63tgR6E29vuBwx969cY+Z5W9gPp wWmrdivFZMZr1L5hUrPHML1DYd3FJjwqM5DL+Qj5ZFt9f4DBUsQjThdsfW3j1vSFaERY t+qSKHJJ8O1ElSF9WAkcg6ZnBcfeIpccPHNLPjvoeNRmuqmiVDC1/J2xeg72Buvx36Cj 6fQRLzjhwHS+R3dzWuSFUqety3HsuNbIOUC81o5Rt6f/dNZ8/Bn8VByl0yQvOhERvqId rTUXAn+XX6Q8sQs5Ibd0ob7rwO8lC2GzO43H79c3F3KLKUqoV3c/j0gaeFi/fjaHtDiG 5JBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RHjJBaxB; 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 b188si10640453pfa.8.2019.06.10.14.23.19; Mon, 10 Jun 2019 14:23:34 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RHjJBaxB; 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 S2390088AbfFJVUf (ORCPT + 99 others); Mon, 10 Jun 2019 17:20:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37382 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389891AbfFJVUe (ORCPT ); Mon, 10 Jun 2019 17:20:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gK/Yvf8faVmrh63U+btuZjl3JBVDnWKA1ZT84y942oU=; b=RHjJBaxBkB5IiWj3V3fPdq4m/K EjuJORZAFiVm6d4mdhDs4JLDsl6wUJO3nR5o4pJIgKrh+pJq3AEcq3NdqQuCpmBYhSpDDbtToqctZ iyByb/RPV0OPCQzpDK9f289ecsGhvalnq1DgVFv55KHwjvXQKe3leewYe3N2n5N2gd6/RMmnpt8cf S9a2af7b1zrQX9Zy2HZagfWdwZwkpkmBtLa8BtUe2jCIuT4qgfSCNTRRK+X4H1f9MEdzbrupeeHj4 rQ3ifXtcYCwiFaTj/Dkx3g/p+orYj0csWFJvUsitLlEFAw/fF6csL7BX6LIkkdqqEByJPP9zEjTvS wYEiTTnQ==; Received: from 089144193064.atnat0002.highway.a1.net ([89.144.193.64] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1haRiL-0000Me-FJ; Mon, 10 Jun 2019 21:20:25 +0000 From: Christoph Hellwig To: Greg Ungerer Cc: Michal Simek , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/15] binfmt_flat: provide a default version of flat_get_relocate_addr Date: Mon, 10 Jun 2019 23:20:03 +0200 Message-Id: <20190610212015.9157-4-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190610212015.9157-1-hch@lst.de> References: <20190610212015.9157-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This way only the two architectures that do masking need to provide the helper. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/flat.h | 2 -- arch/c6x/include/asm/flat.h | 1 - arch/m68k/include/asm/flat.h | 1 - arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/binfmt_flat.c | 4 ++++ 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 576241d74704..a185fe023b60 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h @@ -30,6 +30,4 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) #endif } -#define flat_get_relocate_addr(rel) (rel) - #endif /* __ARM_FLAT_H__ */ diff --git a/arch/c6x/include/asm/flat.h b/arch/c6x/include/asm/flat.h index ac87368efad1..c4d703b454c6 100644 --- a/arch/c6x/include/asm/flat.h +++ b/arch/c6x/include/asm/flat.h @@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) put_unaligned(addr, (__force u32 *)rp); return 0; } -#define flat_get_relocate_addr(rel) (rel) #endif /* __ASM_C6X_FLAT_H */ diff --git a/arch/m68k/include/asm/flat.h b/arch/m68k/include/asm/flat.h index 955617bb937b..217fa89c8e34 100644 --- a/arch/m68k/include/asm/flat.h +++ b/arch/m68k/include/asm/flat.h @@ -28,7 +28,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) return put_user(addr, rp); #endif } -#define flat_get_relocate_addr(rel) (rel) #define FLAT_PLAT_INIT(regs) \ do { \ diff --git a/arch/sh/include/asm/flat.h b/arch/sh/include/asm/flat.h index 6f3b18679a98..0d520b4cc5ea 100644 --- a/arch/sh/include/asm/flat.h +++ b/arch/sh/include/asm/flat.h @@ -24,7 +24,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) put_unaligned(addr, (__force u32 *)rp); return 0; } -#define flat_get_relocate_addr(rel) (rel) #define FLAT_PLAT_INIT(_r) \ do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \ diff --git a/arch/xtensa/include/asm/flat.h b/arch/xtensa/include/asm/flat.h index b1bc0d9a8d4e..a1d88aa3ef8a 100644 --- a/arch/xtensa/include/asm/flat.h +++ b/arch/xtensa/include/asm/flat.h @@ -17,6 +17,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) put_unaligned(addr, (__force u32 *)rp); return 0; } -#define flat_get_relocate_addr(rel) (rel) #endif /* __ASM_XTENSA_FLAT_H */ diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index a4c0b245ab1f..c0e4535dc1ec 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -43,6 +43,10 @@ #include #include +#ifndef flat_get_relocate_addr +#define flat_get_relocate_addr(rel) (rel) +#endif + /****************************************************************************/ /* -- 2.20.1