Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2328181pxb; Mon, 12 Apr 2021 22:18:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc3YUj4e3UPjQjH8elrbLF7ZoED8EdClctuVF+pn89gl26X4zMYR5J1ViFvzPv29L2fiDA X-Received: by 2002:a05:6402:1498:: with SMTP id e24mr32054651edv.176.1618291119852; Mon, 12 Apr 2021 22:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618291119; cv=none; d=google.com; s=arc-20160816; b=VwXaojqypCU8EpKHdTCM6+4AD0un+kEwua+z6oeqRh8Zc4X3EYqA66NOvkKef7wbGQ z/BiTC1Fwi5KCoGbQLtTuCofIvTg0Tcw8QdlTnOa0LVZuTHW+UZJIuu1aQr4flm6wudS kwNMqHaUHKjOtKZ8MJrdLyvvoWVf/fYjm2UlSFKaBZbQd27K9nAADgy0H9Bpahqsyo8y 9CuBl6a5huvIWQdQZaZ4ZAZZx58+UjLSCTa5IVcCikx8o/rKOa3c7WYM/tNG0D/7ssTD kgiKfPugA8K8WNlHl33hU3E3rHsyMNxQCD64ooE15oKoBa8Lcepv0jYOIORc+O+JogaE TmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fvalhZunXH7epLYYoSy6BgPEhU+DOrmdmcJv5fbgncY=; b=0vgAm8ECBZHiLlblK2GL2OoPnMJwB5bHg9hmIpgOBJ8LK9cfAEedBhQy2FZZTh1sqA FtLIsYG0JFkphTMg3kIicmeIyZSNgRowAS6RTAekWM849pDv2qiKXNmIBacntEVLxyzl cpS4/iC1qHsXM5V6o+740fZ604EuV5PZntETOy2LSg7RlewlXlNULtnBrN9JpU2kccjT k000AW197rSCrvoUJtWfgAI8mQrI5WT0rfNT2FBgkMdYqvcu6LEGH9HzWU53jNOhSCvg EKwCfyJepMhzE9LtioMzU5TPss1ST7/9oVnZTzBjTi1EnXtG5JLX+rOTocnmTjvLY5Pi KsVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mail.ustc.edu.cn header.s=dkim header.b=krv6YJoX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go7si3462255ejc.278.2021.04.12.22.18.16; Mon, 12 Apr 2021 22:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mail.ustc.edu.cn header.s=dkim header.b=krv6YJoX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244750AbhDLQgp (ORCPT + 99 others); Mon, 12 Apr 2021 12:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244927AbhDLQ3M (ORCPT ); Mon, 12 Apr 2021 12:29:12 -0400 Received: from ustc.edu.cn (email6.ustc.edu.cn [IPv6:2001:da8:d800::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 91A13C061374 for ; Mon, 12 Apr 2021 09:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ustc.edu.cn; s=dkim; h=Received:Date:From:To:Cc:Subject: Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=fvalhZunXH7epLYYoSy6BgPEhU+DOrmdmc Jv5fbgncY=; b=krv6YJoXIfDnNRAi5GyPYct+lmsTEWhVDZXVOg3eeqaFsJAu6g cq6sVsEt2U2SZ2TQFmf0YRw9btCBcNVNZ7KaNlU9Oa03mn06YN3lBYXeoyBVzsCt k63RdMQgn+LTCSyCHPWbqRGMe1Ow5VNDF5CyySKP3ymRXMIyu34gl5S2o= Received: from xhacker (unknown [101.86.20.15]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygC3vExddHRgRELLAA--.45187S2; Tue, 13 Apr 2021 00:25:01 +0800 (CST) Date: Tue, 13 Apr 2021 00:19:59 +0800 From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , " =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?=" , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Luke Nelson , Xi Wang , Anup Patel Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/10] riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU Message-ID: <20210413001959.5d2b221b@xhacker> In-Reply-To: <20210413001110.7209bae6@xhacker> References: <20210413001110.7209bae6@xhacker> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CM-TRANSID: LkAmygC3vExddHRgRELLAA--.45187S2 X-Coremail-Antispam: 1UD129KBjvdXoW7GFy3Cw48Cr4DZw4DKF13CFg_yoWfGFX_Ga yxJryUur18Jay8CFZ2gr1fZr1j93yUWFy8uF1Y9ryDZa42gw13X3ZIyas5ZF15Zw1jqF4x ZayIqF17JryjqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb4AYjsxI4VW3JwAYFVCjjxCrM7AC8VAFwI0_Xr0_Wr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4 vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40E FcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUtVWrXwAv7VC2z280aVAFwI0_Gr 0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JM4IIrI8v6xkF7I0E8cxan2IY 04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI 0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y 0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVW8JVW3JwCI42IY6I8E87Iv67AKxVW8JVWx JwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7IU8tKsU UUUUU== X-CM-SenderInfo: xmv2xttqjtqzxdloh3xvwfhvlgxou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jisheng Zhang Now we can set ARCH_HAS_STRICT_MODULE_RWX for MMU riscv platforms, this is good from security perspective. Signed-off-by: Jisheng Zhang Reviewed-by: Anup Patel --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 58a1d69713a9..e8074d248457 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -29,6 +29,7 @@ config RISCV select ARCH_HAS_SET_DIRECT_MAP select ARCH_HAS_SET_MEMORY select ARCH_HAS_STRICT_KERNEL_RWX if MMU + select ARCH_HAS_STRICT_MODULE_RWX if MMU select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT -- 2.31.0