From patchwork Mon Sep 14 22:50:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7179041 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1CA109F326 for ; Mon, 14 Sep 2015 22:53:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45A882058C for ; Mon, 14 Sep 2015 22:53:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C2032057E for ; Mon, 14 Sep 2015 22:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbbINWxe (ORCPT ); Mon, 14 Sep 2015 18:53:34 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33843 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbbINWvO (ORCPT ); Mon, 14 Sep 2015 18:51:14 -0400 Received: by padhy16 with SMTP id hy16so155880469pad.1 for ; Mon, 14 Sep 2015 15:51:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:subject:date:message-id:in-reply-to:references; bh=a01zYJZI4GKfKO7pI2MNeiVBwPhJ810Qs+Rxn1shukg=; b=lv0h4ubgaM4z8ca5JiLftaKBTf/4kAuckWhGuhBeZbct09Bzy1U6WUK8Az8paPi0rk Lc1W36ENp6nfhjUhm/T3tBCD7klLyESQQvPGLwnUv5IGpbdNzZNgfY88wkKrpJW9TV/B MgKOc6pe3WFDt5IEhFFD8mg/tDJ643htM3zjOFXMxJ8lB8SWrst8LIRirajbaozcALxr 7SgHue254qsp2U8nFxBwqF3m+vz/XqEa84BLMdKH+9H1qzImhC7LgaYI1V9H8mUspekE Ybnf5yn2RTfJC/giG9JHtgI1G60WLNocUvOp6Z7iCvGajAkW0zgSgdQZJengrKrHxha4 z4sw== X-Gm-Message-State: ALoCoQnmes+TIX6dZWO/WYFXN4/NKcCL5mIl4aFj4hEC1XojYgp9VTf7vMyfN+G0cZ+RDoDZ4Kir X-Received: by 10.68.242.130 with SMTP id wq2mr39157546pbc.117.1442271074334; Mon, 14 Sep 2015 15:51:14 -0700 (PDT) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id fm5sm18136743pbb.60.2015.09.14.15.51.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 15:51:13 -0700 (PDT) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com Cc: viro@zeniv.linux.org.uk Cc: ast@plumgrid.com Cc: aishchuk@linux.vnet.ibm.com Cc: aarcange@redhat.com Cc: akpm@linux-foundation.org Cc: luto@kernel.org Cc: acme@kernel.org Cc: bhe@redhat.com Cc: 3chas3@gmail.com Cc: chris@zankel.net Cc: dave@sr71.net Cc: dyoung@redhat.com Cc: drysdale@google.com Cc: davem@davemloft.net Cc: ebiederm@xmission.com Cc: geoff@infradead.org Cc: gregkh@linuxfoundation.org Cc: hpa@zytor.com Cc: mingo@kernel.org Cc: iulia.manda21@gmail.com Cc: plagnioj@jcrosoft.com Cc: jikos@kernel.org Cc: josh@joshtriplett.org Cc: kexec@lists.infradead.org Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: mathieu.desnoyers@efficios.com Cc: jcmvbkbc@gmail.com Cc: paulmck@linux.vnet.ibm.com Cc: a.p.zijlstra@chello.nl Cc: tglx@linutronix.de Cc: tomi.valkeinen@ti.com Cc: vgoyal@redhat.com Cc: x86@kernel.org Cc: Palmer Dabbelt Subject: [PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Date: Mon, 14 Sep 2015 15:50:42 -0700 Message-Id: <1442271047-4908-9-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1442271047-4908-1-git-send-email-palmer@dabbelt.com> References: <1441832902-28993-1-git-send-email-palmer@dabbelt.com> <1442271047-4908-1-git-send-email-palmer@dabbelt.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I'm not sure what this is, but it doesn't feel like something that should be exposed to userspace here. I'm assuming this file was exposed for the structure in it, which doesn't depend on MAX_SHARED_LIBS. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- fs/binfmt_flat.c | 6 ++++++ include/uapi/linux/flat.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index f723cd3a455c..e89fb43c2a10 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -72,6 +72,12 @@ #define RELOC_FAILED 0xff00ff01 /* Relocation incorrect somewhere */ #define UNLOADED_LIB 0x7ff000ff /* Placeholder for unused library */ +#ifdef CONFIG_BINFMT_SHARED_FLAT +#define MAX_SHARED_LIBS (4) +#else +#define MAX_SHARED_LIBS (1) +#endif + struct lib_info { struct { unsigned long start_code; /* Start of text segment */ diff --git a/include/uapi/linux/flat.h b/include/uapi/linux/flat.h index 88cd6baba8f3..1b177c7637c4 100644 --- a/include/uapi/linux/flat.h +++ b/include/uapi/linux/flat.h @@ -13,12 +13,6 @@ #define FLAT_VERSION 0x00000004L -#ifdef CONFIG_BINFMT_SHARED_FLAT -#define MAX_SHARED_LIBS (4) -#else -#define MAX_SHARED_LIBS (1) -#endif - /* * To make everything easier to port and manage cross platform * development, all fields are in network byte order.