Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7040766ybi; Thu, 13 Jun 2019 08:34:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSQZT0qFw4Qq4bAVdSlCPaN2kjO+9AUdDWEGvrSZK/9yt9GtDbylfB3odwhYMmh2B7gmaY X-Received: by 2002:a63:87c8:: with SMTP id i191mr31692487pge.131.1560440081535; Thu, 13 Jun 2019 08:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560440081; cv=none; d=google.com; s=arc-20160816; b=DRV74BMTzw9akXwFjTvK7YrWRbtBQpi8Z7jAlt64xYjsrclzJhKcwNBbHaJwsftxtQ hscbno8JpCAVuqy+iI7NUEvEWSi/REMcD9JBFfqsowbM/WEL/49AZwJP4hIb0YVi8Kri ++aukyYi//PfJosrGSsPOzRIkNEAsGz8DFnSCAQ0Ns58f7hlxbU+suksQlLts9oJQPXx MFDWlSYzN3G7ZpKJ3prSjtV+maOZbl3G/y76g0qlsYzQw0LMaKq3UNwvQfmapUwyJdnh 2gcHExi+l+XV9vfFWx2MTHM2NTJD62+uE2KLeXkG/7PO4yJzuGJYiACnKww3V4V2HQcV ywVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5hK3yMvwnY3zH2JsgNq+7IiVoTtZzfmZIgWdSdRL3Mc=; b=wXMDo94umxrczpECbohU7cyMAx2VWr915MYhBasg3zxCQ2+HyXqu2Hy3NYI7+YAp1T TLlLImufppVw+LlXOpNkjrZzkTbpBc+PrVN76R79bJQEfT1N66blSD/uxqkdweXfKHOE BlI+TMgLKx23NA5po9hSgd3LMnhqvfVXHXa+ptGJZskNrLCYODzbWx63XA2PREG69aO5 i5BF8N/2VuXw1oIo+Bit692pfrwyWKB8K/zN0avFHEBLfCyHPhhRsWTr6IeCNv3gomaH o1uYLRJYsgKanjAMY+I8kVjMfkioAvHZvmrnUMzwsoo27TjJ/qCekNhb7jA4swr4DaiM ttJg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d132si3672774pfd.102.2019.06.13.08.34.26; Thu, 13 Jun 2019 08:34:41 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728550AbfFMPcE (ORCPT + 99 others); Thu, 13 Jun 2019 11:32:04 -0400 Received: from relay.sw.ru ([185.231.240.75]:40084 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728554AbfFMKub (ORCPT ); Thu, 13 Jun 2019 06:50:31 -0400 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hbNJM-0000cp-C9; Thu, 13 Jun 2019 13:50:28 +0300 Subject: Re: [PATCH v3 2/3] x86: Use static_cpu_has in uaccess region to avoid instrumentation To: Marco Elver , peterz@infradead.org, dvyukov@google.com, glider@google.com, andreyknvl@google.com, mark.rutland@arm.com, hpa@zytor.com Cc: corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, arnd@arndb.de, jpoimboe@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kasan-dev@googlegroups.com References: <20190531150828.157832-1-elver@google.com> <20190531150828.157832-3-elver@google.com> From: Andrey Ryabinin Message-ID: Date: Thu, 13 Jun 2019 13:50:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190531150828.157832-3-elver@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/19 6:08 PM, Marco Elver wrote: > This patch is a pre-requisite for enabling KASAN bitops instrumentation; > using static_cpu_has instead of boot_cpu_has avoids instrumentation of > test_bit inside the uaccess region. With instrumentation, the KASAN > check would otherwise be flagged by objtool. > > For consistency, kernel/signal.c was changed to mirror this change, > however, is never instrumented with KASAN (currently unsupported under > x86 32bit). > > Signed-off-by: Marco Elver > Suggested-by: H. Peter Anvin Reviewed-by: Andrey Ryabinin