Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp241905pxj; Wed, 16 Jun 2021 01:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFB0Fo8JOvK4e9Y7u/o8Wb8ju1GAiPJt9YEHImiAnleHzOg+YMKr7mjYygoctz7qtxs5zv X-Received: by 2002:a17:906:974b:: with SMTP id o11mr3862348ejy.363.1623830662076; Wed, 16 Jun 2021 01:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623830662; cv=none; d=google.com; s=arc-20160816; b=DccS70a7dueswXOTapT7PcZgF8M//zs/DmTyRBsqSX9l1YELCbHmLW0ULK42OudEbY 1/B9aEV69i6MzWX/HUfnb3R5duFdOPwdPimihbNxsXqFQTfKlcsFzJ1ipWgIY1sSSg8Y 3WKwphvnxLRiweQx70MgxXFU99I56fcLfjvux7q3dGIu6XFyYJs7yqIRA7FeOAMgKSG4 sfAtDIhSlvj3+8GBVVf9EUalD3afbj432luxAzYURfp2YHRvYVm/6OrJrM1ruGNr5ccx v1jtMVi4tCo5AF9kYA1/9zAdYxeq31nltJOYICZ51kBkfVgbKoHyY7HpSsa4cocHizOd zdmw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cw10uFtM6j6ivpIAHKyfGYAPjF+AZvHLGbY1I1Cvnes=; b=Euixg0INMNgV/dW5iAZqMBeO7o0wFCRiPhBE7xB8pbDVBA3BmhPWwCliKR/XhVO/ev XCVtEdN2OJO9prII1GsmIzsDPfJltMh9yBh51BXi44NOTJhrYFXP7XuP2cMcPqMaWe7q oVKdvpeKSlY5yQDM2lypwTPh8SpVIcXqAatCd6YyyO6QJB3YTPSL6a2CKokeQfjcnpt8 bRorr7cYCz6L2hzv7bErvqJc/lpQQiKveJMF5BKg3lMjJ7CVt3CcynH4CYwd/mbDHYlU iZX017h8gEcH0g06tTTPhLnaRwJphWxLba8Ez+4vVa/WBmgAXQ3OPgH3bAoJ7j9zRX/7 /WXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b="QPnQjC/i"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id og3si1055575ejc.48.2021.06.16.01.03.59; Wed, 16 Jun 2021 01:04:22 -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=@axtens.net header.s=google header.b="QPnQjC/i"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231741AbhFPIE4 (ORCPT + 99 others); Wed, 16 Jun 2021 04:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231409AbhFPIEz (ORCPT ); Wed, 16 Jun 2021 04:04:55 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E811EC061574 for ; Wed, 16 Jun 2021 01:02:49 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id g22so1335257pgk.1 for ; Wed, 16 Jun 2021 01:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cw10uFtM6j6ivpIAHKyfGYAPjF+AZvHLGbY1I1Cvnes=; b=QPnQjC/imXfUDfxqjiSI4NF+/NKMtw6Adrdw/ELeXbXZra76qgDP9zC6J1U1y9NOt4 u3kgAKeQQuREYzGZQlZMFN4+Pq0lK/VqesWv/DqZLZyDm6UlMjUAZqIob+QtbqgV6ZMS Cop5PE067jtkmcXpYSnRdeBlAyFJ/etIcr1Eo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cw10uFtM6j6ivpIAHKyfGYAPjF+AZvHLGbY1I1Cvnes=; b=CZ8btvdbraVPYAqg0mQmxAxEn1jykJxpFgsGlCWIKtO2D/KUJIUuTFLdcCdK3hevLC FSbuYWPFgVWm+yK/kQRa8dMIR6kmeNV5qok4kPmKKaax8wrMpwMzIdSKV5aH5uJ9ktw6 YItFue8/KQJRZbkFfHFn2flurbkjPIljbwV9HMD3/9RFLh5JBVx3Q/UmDjmOWbJfHjw7 OARAEI0CB9H/45U2hiBMbRAnsMsseRv1DweAuPGx6PaYzbSfKx4F6OmWS+iZDI3qF1zz LPmiqoDFvmpW1zH+yyBTb05AYpmmRDDSF90kwoiXm5qcthdzEEStBWeUiruRjEI0Ebmi RNvQ== X-Gm-Message-State: AOAM530gy2fqL/kQtfxBt+c/keygQ6mGzkC86ji6CXykfo1/iADsf3D1 xsXqC9JWLy9+rEkVaLlHsY0uWO8L8PKmOQ== X-Received: by 2002:a63:a805:: with SMTP id o5mr3777437pgf.328.1623830569286; Wed, 16 Jun 2021 01:02:49 -0700 (PDT) Received: from localhost ([203.206.29.204]) by smtp.gmail.com with ESMTPSA id k19sm1408921pji.32.2021.06.16.01.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 01:02:48 -0700 (PDT) From: Daniel Axtens To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, elver@google.com, akpm@linux-foundation.org, andreyknvl@gmail.com Cc: linuxppc-dev@lists.ozlabs.org, christophe.leroy@csgroup.eu, aneesh.kumar@linux.ibm.com, bsingharora@gmail.com, Daniel Axtens Subject: [PATCH v13 0/3] KASAN core changes for ppc64 radix KASAN Date: Wed, 16 Jun 2021 18:02:41 +1000 Message-Id: <20210616080244.51236-1-dja@axtens.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building on the work of Christophe, Aneesh and Balbir, I've ported KASAN to 64-bit Book3S kernels running on the Radix MMU. I've been trying this for a while, but we keep having collisions between the kasan code in the mm tree and the code I want to put in to the ppc tree. So this series just contains the kasan core changes that we need. These can go in via the mm tree. I will then propose the powerpc changes for a later cycle. (The most recent RFC for the powerpc changes is in the last series at https://lore.kernel.org/linux-mm/20210615014705.2234866-1-dja@axtens.net/ ) v13 applies to next-20210611. There should be no noticeable changes to other platforms. Changes since v12: respond to Marco's review comments - clean up the help for ARCH_DISABLE_KASAN_INLINE, and add an arch readiness check to the new granule poisioning function. Thanks Marco. Kind regards, Daniel Daniel Axtens (3): kasan: allow an architecture to disable inline instrumentation kasan: allow architectures to provide an outline readiness check kasan: define and use MAX_PTRS_PER_* for early shadow tables include/linux/kasan.h | 18 +++++++++++++++--- lib/Kconfig.kasan | 14 ++++++++++++++ mm/kasan/common.c | 4 ++++ mm/kasan/generic.c | 3 +++ mm/kasan/init.c | 6 +++--- mm/kasan/kasan.h | 4 ++++ mm/kasan/shadow.c | 8 ++++++++ 7 files changed, 51 insertions(+), 6 deletions(-) -- 2.30.2