From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yang Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. Date: Thu, 29 Mar 2018 09:12:10 +0800 Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> Reply-To: Wei Yang Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:To:From:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QyAdBoaK/beNrWPszdFE0Y2uZrLVDr5lZcwBuSnac50=; b=NLuLAy/u0CmbeN aIlzRKiaqq4clImdUHd3ByvzJigiQ9pZXim6a/1ywrHz5gpVc68qZK0myeJwx8WhnYbxITwDJN2Ay gC/Xh6XOO2YlrMlE//qvWpFCdMhg7xrZ9uiTwTfe7i9/xmzhMh0pVFiPDsAspqliyomqe9iQXZqR1 UoPY/Y2gMsKzKjPmu1RycJ2gFTigxBmnmK0qqUuBA/h4I+RN8WdBEuQfrjnaoGBb/UhvFUOETseb/ ah63d4TX6rPaPtf0CJyiGb90B7VlbGS6AyrERyLhhIke72Ct3HP7vwIqsPpj9rE9QSU8guB2+PXCn fAsm9es/zOSDz3T+WeHQ==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GAsEAuA/4wkkmLXuWBTfZ4TahUKEhDVaSCN3DyLMjvE=; b=LHfXHTp7MzKRPDSPZV2kYbx9kEXh85Q7liv+TLSGpWcJRHzbAGkOQ1rGp6+aAJw0Rp IG/zdWQhG1oyyXQG7Pc1+oKUW4kakhfDbLxX9jzzrLDE783il+ILPeB7tr9dJjjZeM4D 3kj27mWYweHChqDNKerEu27J5Gle6OdWMpEeOvU8+WXE7BzXwiurBn5CxcTwV83iHhTT oFp03ZQo+rdCpl5sRgN5wAEZN2a6e3K9YNiBc5kTu+/iFs0lj+WXLH4qlDG8KE949mcI Ih8lSjGSe2OEh3HjNmJePj0MxtgdTExA9ydLDH1VduifGwEuACk1aGIgMSVquaa3iN1o yTBA== Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+gla-linux-snps-arc=m.gmane.org@lists.infradead.org To: Kees Cook Cc: Linux MIPS Mailing List , linux-sh , Benjamin Herrenschmidt , Linus Walleij , Will Deacon , Paul Mackerras , Michael Ellerman , "James E.J. Bottomley" , Christoph Hellwig , Geert Uytterhoeven , Catalin Marinas , Matt Turner , Eugeniy Paltsev , uclinux-h8-devel@lists.sourceforge.jp, Vladimir Murzin , Marc Zyngier , adi-buildroot-devel@lists.sourceforge.net, Al Viro , Thomas Gleixner , Richard Henderson , linux-cris-kernel@axis.com, Greg Kroah-Hartman On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 29 Mar 2018 03:12:34 +0200 (CEST) Received: from mail-pf0-x243.google.com ([IPv6:2607:f8b0:400e:c00::243]:41439 "EHLO mail-pf0-x243.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23994614AbeC2BM2DvLNn (ORCPT ); Thu, 29 Mar 2018 03:12:28 +0200 Received: by mail-pf0-x243.google.com with SMTP id a11so2067434pff.8; Wed, 28 Mar 2018 18:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GAsEAuA/4wkkmLXuWBTfZ4TahUKEhDVaSCN3DyLMjvE=; b=LHfXHTp7MzKRPDSPZV2kYbx9kEXh85Q7liv+TLSGpWcJRHzbAGkOQ1rGp6+aAJw0Rp IG/zdWQhG1oyyXQG7Pc1+oKUW4kakhfDbLxX9jzzrLDE783il+ILPeB7tr9dJjjZeM4D 3kj27mWYweHChqDNKerEu27J5Gle6OdWMpEeOvU8+WXE7BzXwiurBn5CxcTwV83iHhTT oFp03ZQo+rdCpl5sRgN5wAEZN2a6e3K9YNiBc5kTu+/iFs0lj+WXLH4qlDG8KE949mcI Ih8lSjGSe2OEh3HjNmJePj0MxtgdTExA9ydLDH1VduifGwEuACk1aGIgMSVquaa3iN1o yTBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=GAsEAuA/4wkkmLXuWBTfZ4TahUKEhDVaSCN3DyLMjvE=; b=WrW5lVJk/oxIPwCWeedNxjoTE0DVr6rhd2IGygiB35IYp5gP9W2IntX3BekA3jh3F9 519sVdXZYkQgPCQh3/pLf4aYZL82tVNB67M3HgFQ9wj19M2l6cXDIxmV4axHwaYRu/PR aRHYLW2zcuXzE26ZMDYo0npigLi+VjBGBHSsWZEEZwvf87rzfr55QTj3x7LKz0xX5K9H lzgCIJNDP36gjom6M8Vryhe1FvwpYnxFq9SIi4zj/GJorBVVNFr9YReGV74v1yAgvQXi DOjoqSMWJ+I9h03TS4dJJGiMCvn2LtzlRAkLpQdgdrUS9kmjaNWrdGlDX5HO6A3pzA9H x1cg== X-Gm-Message-State: AElRT7EQrM/SbkmDal3PwMzILEQgx/ZYyOP20SnoWPzO5LmM2bJsvMFD eRamvThfkdX4TptRDMd2/3E= X-Google-Smtp-Source: AIpwx48kiM9+mVxnOH2o0IX/MD4L9mQM3AoMsbZywd49Q/fHuYkETWQP9/yuofvEraKatP6oLMPEPw== X-Received: by 10.99.160.67 with SMTP id u3mr3948473pgn.389.1522285941447; Wed, 28 Mar 2018 18:12:21 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id k70sm8579678pga.72.2018.03.28.18.12.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 18:12:20 -0700 (PDT) Date: Thu, 29 Mar 2018 09:12:10 +0800 From: Wei Yang To: Kees Cook Cc: Shea Levy , linux-riscv@lists.infradead.org, LKML , Christoph Hellwig , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Mark Salter , Aurelien Jacquiot , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Richard Kuo , Tony Luck , Fenghua Yu , Geert Uytterhoeven , James Hogan , Michal Simek , Ralf Baechle , David Howells , Ley Foon Tan , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Palmer Dabbelt , Albert Ou , Martin Schwidefsky , Heiko Carstens , Chen Liqin , Lennox Wu , Rich Felker , "David S. Miller" , Jeff Dike , Richard Weinberger , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Chris Zankel , Max Filippov , Kate Stewart , Greg Kroah-Hartman , Philippe Ombredanne , Eugeniy Paltsev , Al Viro , Vladimir Murzin , Linus Walleij , Michal Hocko , Andrew Morton , Sudip Mukherjee , Marc Zyngier , Rob Herring , Vlastimil Babka , Balbir Singh , Christophe Leroy , Joe Perches , Oliver O'Halloran , Dan Williams , Wei Yang , Christian =?iso-8859-1?Q?K=F6nig?= , Arnd Bergmann , Deepa Dinamani , Daniel Thompson , Rob Landley , Florian Fainelli , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel , adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, Linux MIPS Mailing List , linux-am33-list@redhat.com, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc , PowerPC , linux-s390 , linux-sh , sparclinux , user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-xtensa@linux-xtensa.org Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> Reply-To: Wei Yang References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 63324 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: richard.weiyang@gmail.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yang Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. Date: Thu, 29 Mar 2018 09:12:10 +0800 Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> Reply-To: Wei Yang Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Linux MIPS Mailing List , linux-sh , Benjamin Herrenschmidt , Linus Walleij , Will Deacon , Paul Mackerras , Michael Ellerman , "James E.J. Bottomley" , Christoph Hellwig , Geert Uytterhoeven , Catalin Marinas , Matt Turner , Eugeniy Paltsev , uclinux-h8-devel@lists.sourceforge.jp, Vladimir Murzin , Marc Zyngier , adi-buildroot-devel@lists.sourceforge.net, Al Viro , Thomas Gleixner , Richard Henderson , linux-cris-kernel@axis.com, Greg Kroah-Hartman Return-path: In-Reply-To: List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-snps-arc-bounces+gla-linux-snps-arc=m.gmane.org@lists.infradead.org On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard.weiyang@gmail.com (Wei Yang) Date: Thu, 29 Mar 2018 09:12:10 +0800 Subject: [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> To: linux-riscv@lists.infradead.org List-Id: linux-riscv.lists.infradead.org On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard.weiyang@gmail.com (Wei Yang) Date: Thu, 29 Mar 2018 09:12:10 +0800 Subject: [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> List-ID: Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> To: linux-snps-arc@lists.infradead.org On Wed, Mar 28, 2018@09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018@8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yang Date: Thu, 29 Mar 2018 09:12:10 +0800 Subject: [OpenRISC] [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> Message-ID: <20180329011210.GA4275@WeideMacBook-Pro.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig >> +++ b/usr/Kconfig >> @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION >> default ".lzma" if RD_LZMA >> default ".bz2" if RD_BZIP2 >> default "" >> + >> +config HAVE_ARCH_FREE_INITRD_MEM >> + bool >> + default n > >If you keep the Kconfig, you can leave off "default n", and I'd >suggest adding a help section just to describe what the per-arch >responsibilities are when select-ing the config. (See >HAVE_ARCH_SECCOMP_FILTER for an example.) > One question about this change. The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch. After this change, we need to manually "select" this? >-Kees > >-- >Kees Cook >Pixel Security -- Wei Yang Help you, Help me