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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 66CA1C4320E for ; Wed, 11 Aug 2021 09:38:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 475B760FC0 for ; Wed, 11 Aug 2021 09:38:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236618AbhHKJiu (ORCPT ); Wed, 11 Aug 2021 05:38:50 -0400 Received: from mail-vs1-f43.google.com ([209.85.217.43]:42713 "EHLO mail-vs1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236605AbhHKJiu (ORCPT ); Wed, 11 Aug 2021 05:38:50 -0400 Received: by mail-vs1-f43.google.com with SMTP id k24so1072738vsg.9; Wed, 11 Aug 2021 02:38:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jFrsES6PK29W3F7zHpy8Q/7CDx1PGMKHOeHn4kSSpjk=; b=MFY0fWRVEBnfjSQsEplj4oYUIzWDR/ah1kJcHSGcMcO99u/xkEpcbuRbAY0pfr03dM ulaG7U7DC6fhna/TtHX+6uyWHmzgO0MI2OZQc+GTTsi0T8KvDpfVcBZ2EKVQ8t40vNg7 p9m5nndiTd8iN2N4AtgVP8Bc/YrpcVSSW+yAgRk40tMnRxzeBAUSeSV1ywuDPTcGolFX JE5tBH+Ur/ooAqOivvxr/vnFRU9Ou36pOMpKzwwioC2yuZ88f9+D2AUd/YdHeLJFxGLJ x10UNTMupJaEXHjWGWOqE/dkpJGwfRNdg+iq+XEakYp57cBtyuB7jLTrE587r0zQemLR 3HRQ== X-Gm-Message-State: AOAM530oPGY3WU1UGgZNCrkwaT0IdW47pbsYBbzXNnSDi0Fiy1nf9TI7 wQdcZPElyIPonekqVkMBhX+II/obVXOukTVxCFk= X-Google-Smtp-Source: ABdhPJwaw19/a3af/wq9KAfUTaIhn/b/oWusE9PSK1kD5S7XVBrLMX/us0cmhGf351HBIl3Htr8XHfPPG6n8KuahPiE= X-Received: by 2002:a05:6102:d9:: with SMTP id u25mr15945790vsp.42.1628674706266; Wed, 11 Aug 2021 02:38:26 -0700 (PDT) MIME-Version: 1.0 References: <20210808125012.4715-1-len.baker@gmx.com> <20210808125012.4715-3-len.baker@gmx.com> In-Reply-To: <20210808125012.4715-3-len.baker@gmx.com> From: Geert Uytterhoeven Date: Wed, 11 Aug 2021 11:38:14 +0200 Message-ID: Subject: Re: [PATCH v4 2/3] drivers/soc/renesas: Prefer memcpy over strcpy To: Len Baker Cc: Andy Gross , Bjorn Andersson , Magnus Damm , Santosh Shilimkar , Kees Cook , David Laight , Robin Murphy , linux-hardening@vger.kernel.org, linux-arm-msm , Linux Kernel Mailing List , Linux-Renesas , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Sun, Aug 8, 2021 at 4:50 PM Len Baker wrote: > strcpy() performs no bounds checking on the destination buffer. This > could result in linear overflows beyond the end of the buffer, leading > to all kinds of misbehaviors. So, use memcpy() as a safe replacement. > > This is a previous step in the path to remove the strcpy() function > entirely from the kernel. > > Signed-off-by: Len Baker Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-devel for v5.15. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds