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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 2B033C433E7 for ; Sat, 10 Oct 2020 23:11:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4F5E2075E for ; Sat, 10 Oct 2020 23:11:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="fBkr2geY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389977AbgJJWz4 (ORCPT ); Sat, 10 Oct 2020 18:55:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731489AbgJJT3i (ORCPT ); Sat, 10 Oct 2020 15:29:38 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F52C05BD36 for ; Sat, 10 Oct 2020 09:16:23 -0700 (PDT) Received: from zn.tnic (p200300ec2f1bdf00ce147181cc3ed261.dip0.t-ipconnect.de [IPv6:2003:ec:2f1b:df00:ce14:7181:cc3e:d261]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 308C31EC02C1; Sat, 10 Oct 2020 18:11:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1602346280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=UoyZM+DcLuyJWqGDtXwL5mcUJFE4ZqJWlnLiDWhzhg4=; b=fBkr2geYMoyKNkdAgkV+Uz1Bh2tKv8W2IAOQTpGm/pz+H0RwXYEiVrnR+4iiQW5crbQb/w RaQ4AQEGUUlXh6XSHrTZ+QajBphQHpxi/KDJ7m1nthkfbu6ck+3JKuBQ7IaXXEeOKtBYtR Gp2RLkOruVO2Dua4P6tj10WrFG8eJiI= Date: Sat, 10 Oct 2020 18:11:12 +0200 From: Borislav Petkov To: Joe Perches Cc: X86 ML , Andrew Morton , Andy Whitcroft , LKML , Peter Zijlstra Subject: Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86 Message-ID: <20201010161112.GC24674@zn.tnic> References: <20201009161423.14583-1-bp@alien8.de> <20201010105421.GA24674@zn.tnic> <4147e49c0b1251343181b5580d946c2273247927.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4147e49c0b1251343181b5580d946c2273247927.camel@perches.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2020 at 08:27:20AM -0700, Joe Perches wrote: > Then this could use: > > /"\s*\.byte\s+(?:0x[0-9a-fA-F]{1,2}\s*,\s*){2,4}/ Yes, this is getting close. I've tweaked it a bit to: '/\s*\.byte\s+(?:0x[0-9a-f]{1,2}[\s,]*){2,}/i' which assumes at least 2 opcode bytes; upper limit can be more than 4. It still has some false positives in crypto but I'd say that's good enough. I'll play more with it later. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette