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=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 20E6AC4727C for ; Thu, 1 Oct 2020 13:21:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE01020754 for ; Thu, 1 Oct 2020 13:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732336AbgJANVH (ORCPT ); Thu, 1 Oct 2020 09:21:07 -0400 Received: from www62.your-server.de ([213.133.104.62]:47462 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731993AbgJANU6 (ORCPT ); Thu, 1 Oct 2020 09:20:58 -0400 Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1kNyVz-0005O2-Eu; Thu, 01 Oct 2020 15:20:55 +0200 Received: from [178.196.57.75] (helo=pc-9.home) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNyVz-000Ehn-9x; Thu, 01 Oct 2020 15:20:55 +0200 Subject: Re: mb2q experience and couple issues To: Thomas Gleixner , Alexei Starovoitov , bpf , LKML References: <87sgayfgwz.fsf@nanos.tec.linutronix.de> From: Daniel Borkmann Message-ID: <84c7a204-3d2e-0573-05ad-bd14d9de4d47@iogearbox.net> Date: Thu, 1 Oct 2020 15:20:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <87sgayfgwz.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/25943/Wed Sep 30 15:54:21 2020) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/1/20 11:13 AM, Thomas Gleixner wrote: > On Wed, Sep 30 2020 at 11:12, Alexei Starovoitov wrote: >> For the last couple years we've been using mb2q tool to normalize patches >> and it worked wonderfully. > > Fun. I thought I'm the only user of it :) We're using it pretty much daily since you've put it on korg :) It's in a bunch of scripts^hacks we use for bpf trees: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/ >> Recently we've hit few bugs: >> curl -s https://patchwork.kernel.org/patch/11807443/mbox/ > >> /tmp/mbox.i; ~/bin/mb2q --mboxout mbox.o /tmp/mbox.i >> Drop Message w/o Message-ID: No subject >> No patches found in mbox >> >> I've tried to debug it, but couldn't figure out what's going on. >> The subject and message-id fields are parsed correctly, >> but later something happens. >> Could you please take a look? > > The problem is the mbox storage format. The mbox created by curl has a > mail body which has a line starting with 'From' in the mail body: > > From the VAR btf_id, the verifier can also read the address of the > ksym's corresponding kernel var from kallsyms and use that to fill > dst_reg. > > The mailbox parser trips over that From and takes it as start of the > next message. > > http://qmail.org/qmail-manual-html/man5/mbox.html > > Usually mailbox storage escapes a From at the start of a > newline with '>': > > >From the VAR btf_id, the verifier can also read the address of the > ksym's corresponding kernel var from kallsyms and use that to fill > dst_reg. > > Yes, it's ugly and I haven't figured out a proper way to deal with > that. There are quite some mbox formats out there and they all are > incompatible with each other and all of them have different horrors. > > Let me think about it. It seems these issues only appeared since maybe a month or so. Perhaps also something changed on ozlabs/patchwork side. Cheers, Daniel