From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AA74C43463 for ; Fri, 18 Sep 2020 15:29:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65A26238D6 for ; Fri, 18 Sep 2020 15:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726389AbgIRP3f (ORCPT ); Fri, 18 Sep 2020 11:29:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:39232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbgIRP3f (ORCPT ); Fri, 18 Sep 2020 11:29:35 -0400 Received: from gaia (unknown [31.124.44.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 559FA2388B; Fri, 18 Sep 2020 15:29:32 +0000 (UTC) Date: Fri, 18 Sep 2020 16:29:29 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Marco Elver , Dmitry Vyukov , Vincenzo Frascino , kasan-dev , Andrey Ryabinin , Alexander Potapenko , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Will Deacon , Andrew Morton , Linux ARM , Linux Memory Management List , LKML Subject: Re: [PATCH v2 35/37] kasan, slub: reset tags when accessing metadata Message-ID: <20200918152928.GF6335@gaia> References: <20200918144423.GF2384246@elver.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 04:55:45PM +0200, Andrey Konovalov wrote: > On Fri, Sep 18, 2020 at 4:44 PM Marco Elver wrote: > > > > On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote: > > [...] > > > static void set_track(struct kmem_cache *s, void *object, > > > @@ -583,7 +585,8 @@ static void set_track(struct kmem_cache *s, void *object, > > > unsigned int nr_entries; > > > > > > metadata_access_enable(); > > > - nr_entries = stack_trace_save(p->addrs, TRACK_ADDRS_COUNT, 3); > > > + nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), > > > + TRACK_ADDRS_COUNT, 3); > > > > Suggested edit (below 100 cols): > > > > - nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), > > - TRACK_ADDRS_COUNT, 3); > > + nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), TRACK_ADDRS_COUNT, 3); > > Ah, yes, it's a 100 lines now :) Will do in v3, thanks! Don't get too carried way ;). The preferred limit is still 80, as per Documentation/process/coding-style.rst (and commit bdc48fa11e46), unless it significantly increases readability and does not hide information. The checkpatch.pl was changed as not to make 80 a hard limit (and so an arbitrary higher limit was picked). What (to me) would increase readability above is aligning the descendants to the open function parenthesis rather than increasing the line length. Anyway, it's up to you on the kasan code, just don't bother changing the patches for longer lines in arch/arm64. -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED1C7C43464 for ; Fri, 18 Sep 2020 15:30:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 802832076B for ; Fri, 18 Sep 2020 15:30:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NFnvzHiS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 802832076B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rZhfRqERV1vkdjdp1Auf6cqtuFk0/C82JN4BsOzC09s=; b=NFnvzHiSU98x/ioF+lg1aLmXP mjEfZ3N95v8QtZRHSrhWcO2MNcy4i7V+aFufX7yMOIdsJULXb8XwzB4jVm8DlkDixaOV5tR1yfkpm EEYhA2Zo6+lp0KfOMXsxupWnici1sSuvO9X3IJqLz4FXyc5MIOpFlcmNRKmKuTLflREW7AJkwvQmz 1519/wIBJusjrZueyA7p8pG1dtWwSRga7IInCQ6B7hYeTULq5POiEl447kXHIK+QFMPDnw6Jb8FbM 5KYDHZJLwkH/s2bh9nrxTO/TZuf3T2pJFTZnGc25izMocwn5Pp6ZDU5XY3FffqDHCe8mbEIHUUg5P ND8CiuC4w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJIKR-0004Zi-91; Fri, 18 Sep 2020 15:29:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJIKO-0004YS-A5 for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 15:29:37 +0000 Received: from gaia (unknown [31.124.44.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 559FA2388B; Fri, 18 Sep 2020 15:29:32 +0000 (UTC) Date: Fri, 18 Sep 2020 16:29:29 +0100 From: Catalin Marinas To: Andrey Konovalov Subject: Re: [PATCH v2 35/37] kasan, slub: reset tags when accessing metadata Message-ID: <20200918152928.GF6335@gaia> References: <20200918144423.GF2384246@elver.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_112936_404087_5AD3CE37 X-CRM114-Status: GOOD ( 15.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , Marco Elver , Elena Petrova , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev , LKML , Linux Memory Management List , Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 18, 2020 at 04:55:45PM +0200, Andrey Konovalov wrote: > On Fri, Sep 18, 2020 at 4:44 PM Marco Elver wrote: > > > > On Tue, Sep 15, 2020 at 11:16PM +0200, Andrey Konovalov wrote: > > [...] > > > static void set_track(struct kmem_cache *s, void *object, > > > @@ -583,7 +585,8 @@ static void set_track(struct kmem_cache *s, void *object, > > > unsigned int nr_entries; > > > > > > metadata_access_enable(); > > > - nr_entries = stack_trace_save(p->addrs, TRACK_ADDRS_COUNT, 3); > > > + nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), > > > + TRACK_ADDRS_COUNT, 3); > > > > Suggested edit (below 100 cols): > > > > - nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), > > - TRACK_ADDRS_COUNT, 3); > > + nr_entries = stack_trace_save(kasan_reset_tag(p->addrs), TRACK_ADDRS_COUNT, 3); > > Ah, yes, it's a 100 lines now :) Will do in v3, thanks! Don't get too carried way ;). The preferred limit is still 80, as per Documentation/process/coding-style.rst (and commit bdc48fa11e46), unless it significantly increases readability and does not hide information. The checkpatch.pl was changed as not to make 80 a hard limit (and so an arbitrary higher limit was picked). What (to me) would increase readability above is aligning the descendants to the open function parenthesis rather than increasing the line length. Anyway, it's up to you on the kasan code, just don't bother changing the patches for longer lines in arch/arm64. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel