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