lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230324093812.331734c7@kernel.org>
Date:   Fri, 24 Mar 2023 09:38:12 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     Arun Ramadoss <arun.ramadoss@...rochip.com>,
        Woojung Huh <woojung.huh@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        UNGLinuxDriver@...rochip.com, Eric Dumazet <edumazet@...gle.com>,
        Vladimir Oltean <olteanv@...il.com>, kernel@...gutronix.de,
        Paolo Abeni <pabeni@...hat.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net v1 2/6] net: dsa: microchip: ksz8: fix
 ksz8_fdb_dump() to extract all 1024 entries

On Fri, 24 Mar 2023 06:35:12 +0100 Oleksij Rempel wrote:
> > Any reason you didn't CC Arun, just an omission or they're no longer
> > @microchip?  
> 
> He is not in MAINTAINERS for drivers/net/dsa/microchip/* even if he is
> practically maintaining it  .. :)

get_maintainer is occasionally useful in pointing out people who wrote
the code but mostly the authors of code under Fixes. I use this little
script usually:


#!/usr/bin/env python3

import argparse
import fileinput
import subprocess
import tempfile
import sys
import os
import re

emailpat = re.compile(r'([^ <"]*@[^ >"]*)')
skip = {'kuba@...nel.org',
        'davem@...emloft.net',
        'pabeni@...hat.com',
        'edumazet@...gle.com',
        'netdev@...r.kernel.org',
        'linux-kernel@...r.kernel.org'}


def do(lines):
    ret = ['---']

    for line in lines:
        line = line.strip()
        if not line:
            continue

        ret.append('# ' + line)

        if "moderated" in line:
            ret.append('# skip, moderated')
            continue

        match = emailpat.search(line)
        if match:
            addr = match.group(1)
            if addr in skip:
                ret.append('# skip, always-cc')

            else:
                ret.append('CC: ' + addr)
        else:
            ret.append('# Bad line')

    return ret


def run(cmd):
    p = subprocess.run(cmd, capture_output=True, check=True)
    return p.stdout.decode("utf-8").strip()


def git_commit_msg():
    return run(["git", "show", "--format=%B", "--no-patch"])


def git_commit(filename):
    return run(["git", "commit", "--amend", "-F", filename])


def git_patch_format():
    return run(["git", "format-patch", "HEAD~", "-o", "/tmp/"])


def get_maint(patch_file):
    return run(["./scripts/get_maintainer.pl",
                "--git-min-percent", "30", patch_file])


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--stdin',
                        help="Read the get_maintainer output from stdin",
                        action='store_true')
    parser.add_argument('--inline', help="Amend HEAD directly",
                        action='store_true')
    args = parser.parse_args()

    if args.stdin:
        out = do(sys.stdin.readlines())
    elif args.inline:
        msg = git_commit_msg()

        patch_file = git_patch_format()
        maint = get_maint(patch_file)
        os.unlink(patch_file)

        out = do(maint.split("\n"))
        out = [l for l in out if l[0] != '#']

        tmpf = tempfile.NamedTemporaryFile(mode='w+', encoding="utf-8")
        tmpf.write(msg + '\n')
        tmpf.write('\n'.join(out))
        tmpf.flush()
        git_commit(tmpf.name)
        tmpf.close()
        out = ["Updated inline: " + msg.split("\n")[0]]
    else:
        patch_file = git_patch_format()
        maint = get_maint(patch_file)
        os.remove(patch_file)

        out = do(maint.split("\n"))

    print('\n'.join(out))

if __name__ == '__main__':
    sys.exit(main())

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ