Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp793971imm; Thu, 6 Sep 2018 10:09:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYEdUngrztmu+GxxGnFdYnjmr0vQVJIk1VlyxdYFM4PnrfrSyS1YS1s0XAXvFdyuotzlz/9 X-Received: by 2002:aa7:8118:: with SMTP id b24-v6mr3967949pfi.78.1536253796784; Thu, 06 Sep 2018 10:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536253796; cv=none; d=google.com; s=arc-20160816; b=ItQ3LlR/TbjIiMh/tWWyGTBFUKK2AelwS0u5hFV86nVKeC+oh8RG8pANJQqqzNwvAv wvTryHRHbIlr4zH9ZQgi5rxL6fROwO0Yk0o0eZCNCVdgKQOdFo0BZTXCAHhIdM+sHPSH LFT6IPeF/a4Kh/rf2IFUqBYC8G0/sir1KgN7oD7GTlvz+P0u1BMCllHYzCFsShJ5Ue2f AfFIFQsiR2YjOZ2f8RP2qo8I/miqaMucihsJqSq2rDwZQaHv23f7Dth5BcEd78l5nxVa 6tUnpNuzvC7+b/A0/09Ufcn/Jt7lBxkRxOfmf/I3LEyoW+MTbm0PT8i35ZAsdTC1/vZe Ggcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=EHOgSiBl06ux3Vyuj2DaOPZgP472avntxqxmK1nlIuU=; b=YaTS/bBCMrEoA9YFaHTkVU39qvjf6agOfIku7b0AYFVSpdF1XdqYC3rncUfMHEQ+so DHpha6paeB9AZHHJUlanjbv2NwX+j8odM8O767/3fU7XfFJYtJVmKK2tQq3UKlHTIBp2 uIa1uGhqd1NG02IlauCWtXzCtXw7CJ6bXX+RSo4cc5nUPpqbt2p0g2EheSSCocJT46h9 npxDXXIDJSswRPYp/lJAVu39jTv9BDGCGd142i00FHlXUcqiqOk98qpcDlXeIBs0jSQ9 MDcWXYElbbwUw/SsAX1NahbQHJ3FFqfBkqZm7rQiLGMsPV/AwfJ1oK3VmTm2UMzYJFOb sXbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=EaK0KpiC; 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=pass (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 h14-v6si873235plk.357.2018.09.06.10.09.39; Thu, 06 Sep 2018 10:09:56 -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; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=EaK0KpiC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728918AbeIFVnD (ORCPT + 99 others); Thu, 6 Sep 2018 17:43:03 -0400 Received: from mail-eopbgr00117.outbound.protection.outlook.com ([40.107.0.117]:18399 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728178AbeIFVnD (ORCPT ); Thu, 6 Sep 2018 17:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EHOgSiBl06ux3Vyuj2DaOPZgP472avntxqxmK1nlIuU=; b=EaK0KpiCL/8HoMwAOpViOgDZffZ9CkEKuGunyLeGA/VIYAy95h8CPhI/iJ6gUJ4/kNol6Y1ZBc5N2w9cyuSwQE2DiKEWlLCv5V6c42s4JOJqUP8+UUbkeVULYtNUGJbf2Dg5uPllaPuL2nyDE0/2dEUxPYTMRJHiY2Ouis+DeMA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (185.231.240.5) by DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Thu, 6 Sep 2018 17:06:32 +0000 Subject: Re: [PATCH v2] arm64: kasan: add interceptors for strcmp/strncmp functions To: Kyeongdon Kim Cc: catalin.marinas@arm.com, will.deacon@arm.com, glider@google.com, dvyukov@google.com, Jason@zx2c4.com, robh@kernel.org, ard.biesheuvel@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org References: <1535014606-176525-1-git-send-email-kyeongdon.kim@lge.com> <12d4e435-e229-b4af-4286-a53fa77cb09d@virtuozzo.com> <0bde837e-2804-c6d6-4bda-8b166bdcfc6b@lge.com> From: Andrey Ryabinin Message-ID: <4301317d-74a1-963c-e423-781808de215a@virtuozzo.com> Date: Thu, 6 Sep 2018 20:06:48 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0bde837e-2804-c6d6-4bda-8b166bdcfc6b@lge.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR03CA0066.eurprd03.prod.outlook.com (2603:10a6:803:50::37) To DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cacb401d-444b-4d9a-7218-08d6141b190a X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR08MB3259; X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3259;3:P8266I6Tj1V5CzqBGLVN709EV0aZRppeNCrkJFwpc/e8GEd5GQqvWA2gBY8vVFzrFol54l30t+sA8NNgZYc/pkyKGbb+uhKR9ri0Ih18+LOGwrMFZZeQMUgm8133AunVED8dqugrwX7tgFflAu2FX6OA5Cd51+FJGJbcihMgrcSJndYf6v3rnkaM1MhdhtnSWzeG4HWTuUaKD/87N5pYKdOYMHsJ/gRP0pikLFt5tySr68FmpeM0Q2u1bkDqx24v;25:gBGeedZXNkz77KWjE07bMI6+hFD9qpwcg/1zAORD5yXamL5iDQTf5q0jbop5hmHY6WU1iyj+zLTgIiGRKoYkgfzZF5f8CCZVDJcqLY7t7hKhY5+Xx3ndVNm5E3WFgQbFcFIRInYoSXtC8mhm7ajmugv1yKaDNb0/hZ14Zs9C0rbPtZ29LdaVx/BtfZisJViTRZ+v0kARkDzatt6i7Y73gohh2nBZzbXpotPfYIv1Gw3OJVkvV3na5hUH5XD0UkNxOnjVafsvvurD5afnAI9/SKOPMUndXY+8e0Aa72ENphTtAfMMJj8VYC/+qMkQVkwGRjiwZ1w1dKqHN3+H8Mgx3g==;31:LDba74Y1RqPKs/T9HgX2ufgjIkoWZwG/75nzLG24Bqk6qvMnEhenQbqFEQx02D+CCWfSRtzrSB7a7Sw4SHr0n+kvtAOb4AtEnwZoL4Y80VON2gTSxTXjMwTeDEyBNM/+YXE78ZgwrKBFJcjkRrINY/ndEqn9tRFnko5pFiI4ghq1Lz04cXhIkqzrCBQoYXGEoX/cUH9eeBxlccoRFtCOsFx1OQvTB/kSc/wcixyjlqE= X-MS-TrafficTypeDiagnostic: DB7PR08MB3259: X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3259;20:E/ITgoNbfSfNkThIVXrXqkVRZvtk8xhwXrBHiHMXT2ZzEGlIlmplSbOIWsr9DE1riKYGONsMiMShY267jsjOmXnQ0/6uaJhR/xQJlpw+bHUq3PRn93HKgmE9dbknmXSYCWTvgBajl6yg1WvIKlPm+9UHhh/vWzXT3XhnyAxCRNrc1d2h3HqcTaRUB6kIonE49J1CFSaI14/z1I1Bz/nvbBZ6gaJNDxJZOnQrxfnqgx0GrenENG0V27/msO5HzraupKA5F/35mUFBixLCmRUfA9xLhHmm7unl2gx7i780PKqFD3AT2PPpD8P9TWk7Bbe5cWPiQivFYtqDD75vXXXZtHtxm/hOl8vJ+nn5vt2a6qgOttx2kxlYHmWa2d7/YwUNTVLqgGCKpHlCx8KTnXYL9wzOxQPALKZseO097iA/OJz+UPbSBzrHm+5u9WQlkRWJn9KOKfMkXfW54Y+8KgmprWHWxfAybgEnKuUG9LPMdhQXNlpKzHIp649vW6I96jvn;4:mdBXEcLunBT8mfVPwl6gYTVrve6Qc96k2ujwGXS8yLOSpuI0VfSM2t8ZWE6LTL55HIJWvQ/Ob3k/VYPzuknxVkZ3/pZ/GGvGl6OdRNBBFqPeWBdgCLATF6fsD+4z0i0EbDLaP2XFapbGazaCjDhRsWXbOdpvfx6C8165IoxBlBUHn+muOjI2QPDX76jVd6JmRAj7gxNlGAm1BukxkorTfMYqYPPB+n0mm84zwjxtfKgRbKUjAPVXI7sgtXRbmV94el2kILz8jbEED9V6B6vpr+tu1DsDNv4Dy1ED5hTL5jAX/q2orgwYgCKxje2/l8GD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42068640409301); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:DB7PR08MB3259;BCL:0;PCL:0;RULEID:;SRVR:DB7PR08MB3259; X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(346002)(136003)(366004)(396003)(376002)(39850400004)(199004)(189003)(966005)(97736004)(66066001)(65806001)(68736007)(53936002)(6306002)(65956001)(50466002)(64126003)(8936002)(86362001)(16526019)(476003)(2616005)(446003)(956004)(47776003)(186003)(7736002)(305945005)(486006)(229853002)(3846002)(6116002)(316002)(5660300001)(65826007)(36756003)(386003)(53546011)(77096007)(31686004)(31696002)(106356001)(81156014)(81166006)(52146003)(58126008)(23676004)(6916009)(6666003)(16576012)(52116002)(76176011)(26005)(2486003)(8676002)(6486002)(11346002)(478600001)(105586002)(25786009)(2906002)(6246003)(4326008)(2870700001)(7416002)(133343001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB7PR08MB3259;H:[172.16.25.12];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjdQUjA4TUIzMjU5OzIzOjJwNU1ieGlYUGhXKzhVN1p0VU0wQk1tOHZr?= =?utf-8?B?czU0RThLZ05jOU1NY1g0M3l1WU9zMm02SG96c0NsQXV4VlBNaE9YTE9MVE5S?= =?utf-8?B?WW5BR3hxMEtVU0Y5MzFMTnZFU2pSWFVwcmNyYzZ1N1YyY1cyNjlFQ2xtWEhZ?= =?utf-8?B?TEV6cGR1eTduMmFXUXNUNlovanlkS3RyRVBqNDd5S0l4R0owY2IzVTh0RE16?= =?utf-8?B?d3lOZjV3UWVsMFNMVjQ1aVVXSXVrVHB0M09yZ3VkdFE0UlBUSE85L0ZCckpo?= =?utf-8?B?SmF4bXJrZV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/Q3biAt0uLSKgUGnn+r5+NgVbQwAnC2GzxdBTxrVw6sEKKc7UlRN3VWJaqtCL8NfnXYibnRrIZRFXTPVFjC/qbSvd01KvLO8DCrEOVLOgZUHMPW8S/q5CFPyr5Cf7/itlXtcIoDhfpeAgz9sRT+HhBMLLS923HwfkMeYfefnx83j/+z SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB7PR08MB3259;20:eU/J6MJ9Pse8ppDUAXG3xDuQStz+XxqlCQdSj4m6J5lJkvIkILFQgkGhby7ayg1m8WS90NgY0KnJqiaJVGwrkEsJ/JSimY30eJjIEMgh29TaYI1wK3YUd69ydnSkKz4OjpggMn58pkIJblYV6fPU+e5h0mIIKnTu9il7ImS0sQc= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 17:06:32.3482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cacb401d-444b-4d9a-7218-08d6141b190a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3259 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/2018 10:44 AM, Kyeongdon Kim wrote: > > > On 2018-09-05 오전 1:24, Andrey Ryabinin wrote: >> >> >> On 09/04/2018 01:10 PM, Andrey Ryabinin wrote: >> > >> > >> > On 09/04/2018 09:59 AM, Kyeongdon Kim wrote: >> > >> >>>> +#undef strncmp >> >>>> +int strncmp(const char *cs, const char *ct, size_t len) >> >>>> +{ >> >>>> + check_memory_region((unsigned long)cs, len, false, _RET_IP_); >> >>>> + check_memory_region((unsigned long)ct, len, false, _RET_IP_); >> >>> >> >>> This will cause false positives. Both 'cs', and 'ct' could be less than len bytes. >> >>> >> >>> There is no need in these interceptors, just use the C implementations from lib/string.c >> >>> like you did in your first patch. >> >>> The only thing that was wrong in the first patch is that assembly implementations >> >>> were compiled out instead of being declared week. >> >>> >> >> Well, at first I thought so.. >> >> I would remove diff code in /mm/kasan/kasan.c then use C implementations in lib/string.c >> >> w/ assem implementations as weak : >> >> >> >> diff --git a/lib/string.c b/lib/string.c >> >> index 2c0900a..a18b18f 100644 >> >> --- a/lib/string.c >> >> +++ b/lib/string.c >> >> @@ -312,7 +312,7 @@ size_t strlcat(char *dest, const char *src, size_t count) >> >>  EXPORT_SYMBOL(strlcat); >> >>  #endif >> >> >> >> -#ifndef __HAVE_ARCH_STRCMP >> >> +#if (defined(CONFIG_ARM64) && defined(CONFIG_KASAN)) || !defined(__HAVE_ARCH_STRCMP) >> > >> > No. What part of "like you did in your first patch" is unclear to you? >> >> Just to be absolutely clear, I meant #ifdef out __HAVE_ARCH_* defines like it has been done in this patch >> http://lkml.kernel.org/r/<1534233322-106271-1-git-send-email-kyeongdon.kim@lge.com> > I understood what you're saying, but I might think the wrong patch. > > So, thinking about the other way as below: > can pick up assem variant or c one, declare them as weak. It's was much easier for me to explain with patch how this should be done in my opinion. So I just sent the patches, take a look.