From patchwork Tue Nov 10 01:31:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7587381 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 13834C05C6 for ; Tue, 10 Nov 2015 01:34:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26AD0205D8 for ; Tue, 10 Nov 2015 01:34:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45C8D205DD for ; Tue, 10 Nov 2015 01:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbbKJBcD (ORCPT ); Mon, 9 Nov 2015 20:32:03 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33195 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384AbbKJBb4 (ORCPT ); Mon, 9 Nov 2015 20:31:56 -0500 Received: by pabfh17 with SMTP id fh17so217045257pab.0 for ; Mon, 09 Nov 2015 17:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to: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:subject :date:message-id:in-reply-to:references; bh=bfpHXj0wn5rKYAA3Wz1wWT+IC4CeotniIXZuqv4+yQQ=; b=E8Acmy9ZgaYA/7gQZbmU0ruhh/g6XuV2lxpF8UJBN0/k2NsS1AHoTjucSwvzhmbXek DwqBpxT2fpTiUcmUPEkbIVsBYe8TF3tvoBG4gk5CeB1cmVi1RVX7/f/fcK5KVgpascBz ZMda8zVegUCVFuZRuQaErr7ENYq9I6fHbDKMK2OcLSp6LxjpytDAQq7Xz6c92fw4GyoR gG9Mlp8uCPy5iTZ3hPncqYvavgI2GdLeu9ibh3NUfvG5fab+jMZfADPR2T6xWT+twZii VbJCFFjODbArm++KzaZOzwqTZYfwWHbCvbtpBnSyi1HFqi4N6O4O+eIoHfQO23p2Sbxw c7Kw== 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: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:subject:date:message-id:in-reply-to:references; bh=bfpHXj0wn5rKYAA3Wz1wWT+IC4CeotniIXZuqv4+yQQ=; b=Fl55W/MePw9dVzP766M2ycYmxMT3Sjahpv0fM9VTatwpwArVYRe6pc/bEd4giC2wMw ML517jwcGbP7BsPrSe4735DsB8zIJseC8vfPTpQX55HNDoVXt+FmRw+JV29e0X50EGXz j2m5fV29Sg2if+rrZvcrevmQABRZiDnv99QV7S4uhTyLgjt/ufceU9uiByp6NajRnOS2 kbTgih6xf3ZiHK7juDPSJI+s6AoRzLI4P6pWBdGp29u45TouFsyeUPZvlgf5gCZmdeRs seT2t/9yjkyFALfX7UH9gYZgp0EZUe8NjmDWs3BTG8lvP+Gj/qQdZ+ne7MjlZMomqunH zVeA== X-Gm-Message-State: ALoCoQlzt21hS/cTcJ39fQl4CdwWAJy1yD27Nr4uYwKdaGfNuitowW+UWTrFp+xhRprR+VrSSJQ5 X-Received: by 10.68.169.34 with SMTP id ab2mr1593959pbc.44.1447119115413; Mon, 09 Nov 2015 17:31:55 -0800 (PST) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id bs3sm579863pbd.89.2015.11.09.17.31.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 17:31:54 -0800 (PST) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com To: peterz@infradead.org 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: 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/14] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Date: Mon, 9 Nov 2015 17:31:05 -0800 Message-Id: <1447119071-19392-9-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1447119071-19392-1-git-send-email-palmer@dabbelt.com> References: <1446579994-9937-1-git-send-email-palmer@dabbelt.com> <1447119071-19392-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=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 f723cd3..e89fb43 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 88cd6ba..1b177c7 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.