Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp278985pxb; Wed, 6 Oct 2021 04:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwm6w6QgKNKJEljeA7yQ/vu5DdijAXT8oyxT9Sq2das3bcuxB7t7U9KfN2vziDFeWCjj+Z X-Received: by 2002:aa7:d502:: with SMTP id y2mr27616548edq.231.1633521572286; Wed, 06 Oct 2021 04:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633521572; cv=none; d=google.com; s=arc-20160816; b=gj/oKP8Qj5lZLzS4cItqGUGL+hDVRImBdOh/lPlS9e/r+b4dqe0r5S65eQZMXoGR6x O8rkoEw3gcIQHsIAM2CyFLGzcF4m8BlYyP+scSev/73Vp0dIYYmiy2eDnaXPg5Z6/dcB JRfLqPpMMEQgL27uZ10t7TaKcqBZmJMgTtyyejpWFb8D+EkdbNSw+2Gv3asJIIFfGlN3 VBWarCh48kTsoyS7jO67v595u/lEhWdy0u3WHKd3EfTxZqPjRrql+fTWe680Rvj40iub hJQGrWTjPU9Tbw3zM0ZtvN5Rr2hJfGaoNgRBkZc7WUPLLcNNYYD4R1gb6dSJzVtcy+uy fKcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qP8qUdurFon+vS8eyUqKuAmxlr00Ucs7J31uCZEKlng=; b=B3J7k4Jckwyv4zqiwUmqHTtZ4UIgIwiOeHkD3XTDS8bhbexX52vbKeNfflH/bwh5Oy f8oa7MLlXX1pmMlnfmaKmv86M6kL5RNTSXxsETaM/quqavZ2s8v5I9MF+4ASSj+nrdZS mD8yQKir8ELJTmXil/7Ha3XPtODBwbO9GX6J88pz85kkfXGdn/c9XR0fsfJWCjcmO6kW WKAuXmJZkw6HTTWHr5L7ZxTEp2F1mGs01XceCbF5Lf6GaIzwIOxXQ8IaDerr+G5lY7Ph iyLZLBmWxfPOSurM2d38j2Cq0uJUxfko7PvCQjKbCTUDp1MJpUb2aTwVHlPGzv0Pf0h1 yZSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RHqUFEet; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si6616763edw.382.2021.10.06.04.59.07; Wed, 06 Oct 2021 04:59:32 -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=@gmail.com header.s=20210112 header.b=RHqUFEet; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238211AbhJFL7e (ORCPT + 99 others); Wed, 6 Oct 2021 07:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238167AbhJFL7b (ORCPT ); Wed, 6 Oct 2021 07:59:31 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D25C061749 for ; Wed, 6 Oct 2021 04:57:39 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id p80so2453047iod.10 for ; Wed, 06 Oct 2021 04:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qP8qUdurFon+vS8eyUqKuAmxlr00Ucs7J31uCZEKlng=; b=RHqUFEetTG/eYk7o+keixgzTsx76qze7UUJ06SBYaebyHUQ2d5IplJMpy/dauoI6iB dXDfk49UADHMti+mCSw3jTWGQjE/NgyfiGmOE5qL/lL/MPBMO0UjMMvD7P5hwfEGmnTp fswdFmXWOJINyEbFlJ8T5NobRk2GBLe1NKBcVcC+ueLeV1X1P5jxzNRiQvzBt/26KEZs fgXpPBMzaFop8NrepFeSG5d5inz6n9u76TL2FuJjgOh0lxhzA98scObInb5Bpu/19LBT pEsirjNTqtAilTcjDnmEoaZ0eH2ebJd6P7nA1tXnCkBRiyLQcvZYF13hpRZrB5GMogAt Fk1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qP8qUdurFon+vS8eyUqKuAmxlr00Ucs7J31uCZEKlng=; b=wW/f79lO8Xw7cdnHhjvgKXYRx2npdKosPbs7XI1QOw1NeKamh9BTt1QjdgRCJQMH8A RjdWNzeqDMneL9/SXL9RdFK6IW5rONL+EbJcWF6hGCsQnatJwKt5CpsrViszewYT8YFx eDc2yuZASIRmRCW+AI0e10BbuFQe3gSCZZiglbYd+6IIlF60f7zgxBU9WvH7WYgsVIUM pOC/3d5GhKHcDoiUCpiVk2fgNjW8T/PcCqRYLethYaqsBYkxGnPAJdkclouMfYOXETJC FNXE0hsSH0+RcFE/BXYuZs9s6olg5KERqedtp2wAWk49uzDLIYNNlD2eoZarrtLlXp26 Vg1w== X-Gm-Message-State: AOAM531z7Cc5/pa+8Gzj7ZjQwR5Kh1SJn4Byvq8gSZXFzobjI8a37x/Z 7E+C7yxeovili6cLWkT8TOSTs2+rmLtKgUlIZ14g0uxrarA= X-Received: by 2002:a5e:9b18:: with SMTP id j24mr6049480iok.202.1633521459169; Wed, 06 Oct 2021 04:57:39 -0700 (PDT) MIME-Version: 1.0 References: <20210922205525.570068-1-nathan@kernel.org> In-Reply-To: From: Andrey Konovalov Date: Wed, 6 Oct 2021 13:57:28 +0200 Message-ID: Subject: Re: [PATCH] kasan: Always respect CONFIG_KASAN_STACK To: Nathan Chancellor Cc: Andrey Ryabinin , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Nick Desaulniers , Arnd Bergmann , kasan-dev , LKML , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 6, 2021 at 4:43 AM Nathan Chancellor wrote: > > > This part of code always looked weird to me. > > > > Shouldn't we be able to pull all these options out of the else section? > > > > Then, the code structure would make sense: first, try applying > > KASAN_SHADOW_OFFSET; if failed, use CFLAGS_KASAN_MINIMAL; and then try > > applying all these options one by one. > > Prior to commit 1a69e7ce8391 ("kasan/Makefile: support LLVM style asan > parameters"), all the flags were run under one cc-option, meaning that > if $(KASAN_SHADOW_OFFSET) was not set, the whole call would fail. > However, after that commit, it is possible to do this but I was not sure > if that was intentional so I went for the minimal fix. Ack. Filed https://bugzilla.kernel.org/show_bug.cgi?id=214629 for the rest. Thanks!