Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4451680imu; Mon, 7 Jan 2019 23:58:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN5nhlom6upuQ/XuaSeW3VGGj2wDHrcoO3L2XuU7AznZIxOpHiprFVdc9CFT+7AYHIV+0Z+w X-Received: by 2002:a63:fa58:: with SMTP id g24mr625418pgk.390.1546934307486; Mon, 07 Jan 2019 23:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546934307; cv=none; d=google.com; s=arc-20160816; b=NotBcRo2gINMeg19Uty6HOc0SK8/AQgi2pqgYcg0SI+pibG8kdFWAoipI8abBD7to2 bW4jyvBz+E77pGyiukBCSSbOISp19oDeeiw+0iwm7/Ctq7TXSdIlFyGDi7gIRfYXJDlu wTRJ76aV4JTGTXS6KVTkYOUhy2qCgUn+O2+8586szirovtGcOFSV6LVzuaG81ppZS2pV ZvAIaZIjh0yp7VFIAy0pQikO+dGCcazpun4Pg6u3bMIyz15ASoWGc9ao5ZcOXMd15iQW afQpVX8LNgqG7MJ8U1umv86JbZDJjL0VLPRfZS1ordQ4mNTvJGgVV3uh+wTCQpXx92W1 j46A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=rySBcmuq6MC1aua4zuDq5jYyrsEtfhwGkXLDWTkT/u4=; b=sr3id2wK69grE/CWcRrZnO5eSqzTCV1mVmEm++zBDmlBKo+2apoPgmFkfu2LZR/2GO hhPCZB24H6n5gG5BtPR4PjLGAVN+/kC3TePlIEyRkc28tAp4VAaJexEfe9vBVgyB12Be qu3LwDF7dEuRkv9vFz5KkgUxsabgmkdoNr21qkN0Pp+UHeiCJda/SMcCl1cK/4DdiIYI m4F6mjRN8ovtehZEBRF0g3tPpIKAUqV3PYEzcG87sm2ItdzcXoBOz4TwAJ/Mjj+KxTqQ awLqIFOVEyv0j2aARkjlEVURqypeikRALRBmwjW428+lnkycuUaefHUy9ok1klPsvNOm ObCg== ARC-Authentication-Results: i=1; mx.google.com; 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 h6si65501511plk.231.2019.01.07.23.58.11; Mon, 07 Jan 2019 23:58:27 -0800 (PST) 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; 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 S1727954AbfAHH5G (ORCPT + 99 others); Tue, 8 Jan 2019 02:57:06 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:34689 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbfAHH5F (ORCPT ); Tue, 8 Jan 2019 02:57:05 -0500 Received: by mail-vs1-f66.google.com with SMTP id y27so1931038vsi.1; Mon, 07 Jan 2019 23:57:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rySBcmuq6MC1aua4zuDq5jYyrsEtfhwGkXLDWTkT/u4=; b=MwrEnOyUAIp97AiKfFx5gVb/gLmXYamPfhllx3wvv1AKqukZjWv/gLut78WTj+aNX7 7p9b7BKycojDBByVYxlU9cBldlg6V9Cbt/9yOk7a1dkioGJDg2eSBzJ7AoVaKVGHd3G/ ehEnCWC6RIeKeAg/Ywl32dThkN9BRdigCuGCaS1AMkTSKIoSE1F/Km1SDu4urYCW1U7U QwSN+ytRJqNUEKZnROJ7Bc+iPNaIhKpeTQwQ5inSI9ZdgITjNQzSiPSkJtKne0nvaBeR VRytSPn/hZwXvS+J/rOyxvokv8T8JjHGZ+RShH6p/LpMU1OuE0+7eRRThC0NuXycEtOp hsSg== X-Gm-Message-State: AJcUukcSWjvGfUQ4x4DqkwBfMfb0aCRVCUSiqk9HVnnMwWkLI5kFvauU PqXa+ufLjaNh1qosEA0rcMPv+EnrxtY/4DdQjGI= X-Received: by 2002:a67:b60d:: with SMTP id d13mr317002vsm.152.1546934223659; Mon, 07 Jan 2019 23:57:03 -0800 (PST) MIME-Version: 1.0 References: <1546904307-11124-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: <1546904307-11124-1-git-send-email-yamada.masahiro@socionext.com> From: Geert Uytterhoeven Date: Tue, 8 Jan 2019 08:56:52 +0100 Message-ID: Subject: Re: [PATCH] arch: unexport asm/shmparam.h for all architectures To: Masahiro Yamada Cc: Andrew Morton , Michal Simek , Yoshinori Sato , Richard Kuo , "open list:QUALCOMM HEXAGON..." , Guan Xuetao , Linux-Arch , Nicolas Dichtel , Arnd Bergmann , Aurelien Jacquiot , linux-riscv@lists.infradead.org, Greentime Hu , linux-c6x-dev@linux-c6x.org, Guo Ren , Stafford Horne , Palmer Dabbelt , "moderated list:H8/300 ARCHITECTURE" , Stefan Kristiansson , linux-m68k , Openrisc , Mark Salter , Albert Ou , Jonas Bonn , Linux Kernel Mailing List , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yamada-san, On Tue, Jan 8, 2019 at 12:41 AM Masahiro Yamada wrote: > Most architectures do not export shmparam.h to user-space. > > $ find arch -name shmparam.h | sort > arch/alpha/include/asm/shmparam.h > arch/arc/include/asm/shmparam.h > arch/arm64/include/asm/shmparam.h > arch/arm/include/asm/shmparam.h > arch/csky/include/asm/shmparam.h > arch/ia64/include/asm/shmparam.h > arch/mips/include/asm/shmparam.h > arch/nds32/include/asm/shmparam.h > arch/nios2/include/asm/shmparam.h > arch/parisc/include/asm/shmparam.h > arch/powerpc/include/asm/shmparam.h > arch/s390/include/asm/shmparam.h > arch/sh/include/asm/shmparam.h > arch/sparc/include/asm/shmparam.h > arch/x86/include/asm/shmparam.h > arch/xtensa/include/asm/shmparam.h > > Strangely, some users of the asm-generic wrapper export shmparam.h > > $ git grep 'generic-y += shmparam.h' > arch/c6x/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/h8300/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/hexagon/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/m68k/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/microblaze/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/openrisc/include/uapi/asm/Kbuild:generic-y += shmparam.h > arch/riscv/include/asm/Kbuild:generic-y += shmparam.h > arch/unicore32/include/uapi/asm/Kbuild:generic-y += shmparam.h > > The newly added riscv correctly creates the asm-generic wrapper > in the kernel space, but the others (c6x, h8300, hexagon, m68k, > microblaze, openrisc, unicore32) create the one in the uapi directory. > > Digging into the git history, now I guess fcc8487d477a ("uapi: > export all headers under uapi directories") was the misconversion. > Prior to that commit, no architecture exported to shmparam.h > As its commit description said, that commit exported shmparam.h > for c6x, h8300, hexagon, m68k, openrisc, unicore32. > > 83f0124ad81e ("microblaze: remove asm-generic wrapper headers") > accidentally exported shmparam.h for microblaze. > > This commit unexports shmparam.h for those architectures. > > There is no more reason to export include/uapi/asm-generic/shmparam.h, > so it has been moved to include/asm-generic/shmparam.h > > Signed-off-by: Masahiro Yamada Thanks for your patch! include/uapi/asm-generic/shmparam.h contains a single definition: #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ So this definition is not used by userspace? Note that it is refered to by include/uapi/linux/shm.h, albeit in a comment: #define SHM_RND 020000 /* round attach address to SHMLBA boundary */ Glibc provides its own definition in /usr/include/x86_64-linux-gnu/bits/shm.h #define SHMLBA (__getpagesize ()) So probably this is safe. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds